Browse Source

fix problem detecting plans when editing gifts

playwright-pwa-install-test
Trent Larson 3 months ago
parent
commit
375d6ddbe2
  1. 7
      src/views/GiftedDetails.vue

7
src/views/GiftedDetails.vue

@ -249,9 +249,10 @@ export default class GiftedDetails extends Vue {
);
}
const prevAmount = this.prevCredToEdit?.claim?.object?.amountOfThisGood;
this.amountInput =
(this.$route as Router).query["amountInput"] ||
String(this.prevCredToEdit?.claim?.object?.amountOfThisGood) ||
(prevAmount ? String(prevAmount) : "") ||
this.amountInput;
this.description =
(this.$route as Router).query["description"] ||
@ -275,13 +276,13 @@ export default class GiftedDetails extends Vue {
: fulfills
? [fulfills]
: [];
const offer = fulfillsArray.find((rec) => rec.claimType === "Offer");
const offer = fulfillsArray.find((rec) => rec["@type"] === "Offer");
this.offerId = ((this.$route as Router).query["offerId"] ||
offer?.identifier ||
this.offerId) as string;
// find any project ID
const project = fulfillsArray.find((rec) => rec.claimType === "PlanAction");
const project = fulfillsArray.find((rec) => rec["@type"] === "PlanAction");
this.projectId = ((this.$route as Router).query["projectId"] ||
project?.identifier ||
this.projectId) as string;

Loading…
Cancel
Save