forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix ClaimView affirm delivery action
- Add offer context support to gifting flow - Add offerId prop to EntitySelectionStep for offer fulfillment context - Pass offerId through GiftedDialog to EntitySelectionStep - Update ContactGiftingView to handle offerId from route query parameters - Extract offer details (description, amount, unitCode) for pre-population
This commit is contained in:
@@ -125,6 +125,7 @@ export default class ContactGiftingView extends Vue {
|
||||
toProjectId = "";
|
||||
showProjects = false;
|
||||
isFromProjectView = false;
|
||||
offerId = "";
|
||||
|
||||
async created() {
|
||||
this.notify = createNotifyHelpers(this.$notify);
|
||||
@@ -173,6 +174,7 @@ export default class ContactGiftingView extends Vue {
|
||||
(this.$route.query["showProjects"] as string) === "true";
|
||||
this.isFromProjectView =
|
||||
(this.$route.query["isFromProjectView"] as string) === "true";
|
||||
this.offerId = (this.$route.query["offerId"] as string) || "";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} catch (err: any) {
|
||||
@@ -229,13 +231,13 @@ export default class ContactGiftingView extends Vue {
|
||||
(this.$refs.giftedDialog as GiftedDialog).open(
|
||||
giver,
|
||||
recipient,
|
||||
undefined,
|
||||
this.offerId,
|
||||
this.prompt,
|
||||
this.description,
|
||||
this.amountInput,
|
||||
this.unitCode,
|
||||
);
|
||||
|
||||
|
||||
// Immediately select "Unnamed" and move to Step 2 based on stepType
|
||||
if (this.stepType === "giver") {
|
||||
(this.$refs.giftedDialog as GiftedDialog).selectGiver();
|
||||
@@ -287,7 +289,7 @@ export default class ContactGiftingView extends Vue {
|
||||
(this.$refs.giftedDialog as GiftedDialog).open(
|
||||
giver,
|
||||
recipient,
|
||||
undefined,
|
||||
this.offerId,
|
||||
this.prompt,
|
||||
this.description,
|
||||
this.amountInput,
|
||||
|
||||
Reference in New Issue
Block a user