fix problem detecting plans when editing gifts
This commit is contained in:
@@ -249,9 +249,10 @@ export default class GiftedDetails extends Vue {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const prevAmount = this.prevCredToEdit?.claim?.object?.amountOfThisGood;
|
||||||
this.amountInput =
|
this.amountInput =
|
||||||
(this.$route as Router).query["amountInput"] ||
|
(this.$route as Router).query["amountInput"] ||
|
||||||
String(this.prevCredToEdit?.claim?.object?.amountOfThisGood) ||
|
(prevAmount ? String(prevAmount) : "") ||
|
||||||
this.amountInput;
|
this.amountInput;
|
||||||
this.description =
|
this.description =
|
||||||
(this.$route as Router).query["description"] ||
|
(this.$route as Router).query["description"] ||
|
||||||
@@ -275,13 +276,13 @@ export default class GiftedDetails extends Vue {
|
|||||||
: fulfills
|
: fulfills
|
||||||
? [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"] ||
|
this.offerId = ((this.$route as Router).query["offerId"] ||
|
||||||
offer?.identifier ||
|
offer?.identifier ||
|
||||||
this.offerId) as string;
|
this.offerId) as string;
|
||||||
|
|
||||||
// find any project ID
|
// 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"] ||
|
this.projectId = ((this.$route as Router).query["projectId"] ||
|
||||||
project?.identifier ||
|
project?.identifier ||
|
||||||
this.projectId) as string;
|
this.projectId) as string;
|
||||||
|
|||||||
Reference in New Issue
Block a user