forked from jsnbuchanan/crowd-funder-for-time-pwa
Fix GiftedDialog functionality
- Add description, amountInput, and unitCode parameters to GiftedDialog.open() - Pass offer details to GiftedDialog in ProjectViewView - Update ContactsView to handle new GiftedDialog parameters
This commit is contained in:
@@ -222,14 +222,19 @@ export default class GiftedDialog extends Vue {
|
|||||||
receiver?: libsUtil.GiverReceiverInputInfo,
|
receiver?: libsUtil.GiverReceiverInputInfo,
|
||||||
offerId?: string,
|
offerId?: string,
|
||||||
prompt?: string,
|
prompt?: string,
|
||||||
|
description?: string,
|
||||||
|
amountInput?: string,
|
||||||
|
unitCode?: string,
|
||||||
callbackOnSuccess: (amount: number) => void = () => {},
|
callbackOnSuccess: (amount: number) => void = () => {},
|
||||||
) {
|
) {
|
||||||
this.giver = giver;
|
this.giver = giver;
|
||||||
this.prompt = prompt || "";
|
|
||||||
this.receiver = receiver;
|
this.receiver = receiver;
|
||||||
this.amountInput = "0";
|
|
||||||
this.callbackOnSuccess = callbackOnSuccess;
|
|
||||||
this.offerId = offerId || "";
|
this.offerId = offerId || "";
|
||||||
|
this.prompt = prompt || "";
|
||||||
|
this.description = description || "";
|
||||||
|
this.amountInput = amountInput || "0";
|
||||||
|
this.unitCode = unitCode || "HUR";
|
||||||
|
this.callbackOnSuccess = callbackOnSuccess;
|
||||||
this.firstStep = !giver;
|
this.firstStep = !giver;
|
||||||
this.stepType = "giver";
|
this.stepType = "giver";
|
||||||
|
|
||||||
|
|||||||
@@ -1069,6 +1069,9 @@ export default class ContactsView extends Vue {
|
|||||||
receiver,
|
receiver,
|
||||||
undefined as unknown as string,
|
undefined as unknown as string,
|
||||||
undefined as unknown as string,
|
undefined as unknown as string,
|
||||||
|
undefined as unknown as string,
|
||||||
|
undefined as unknown as string,
|
||||||
|
undefined as unknown as string,
|
||||||
callback,
|
callback,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1234,8 +1234,17 @@ export default class ProjectViewView extends Vue {
|
|||||||
};
|
};
|
||||||
(this.$refs.giveDialogToThis as GiftedDialog).open(
|
(this.$refs.giveDialogToThis as GiftedDialog).open(
|
||||||
giver,
|
giver,
|
||||||
undefined,
|
{
|
||||||
|
did: offer.issuerDid,
|
||||||
|
name: this.name,
|
||||||
|
handleId: this.projectId,
|
||||||
|
image: this.imageUrl,
|
||||||
|
},
|
||||||
offer.handleId,
|
offer.handleId,
|
||||||
|
undefined,
|
||||||
|
offer.objectDescription,
|
||||||
|
offer.amount.toString(),
|
||||||
|
offer.unit,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user