From 433f3c1154de450ad8e22d9939378fae71b195ee Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Thu, 31 Jul 2025 17:28:46 +0800 Subject: [PATCH] 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 --- src/components/GiftedDialog.vue | 11 ++++++++--- src/views/ContactsView.vue | 3 +++ src/views/ProjectViewView.vue | 11 ++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 30178566..d86c999f 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -222,14 +222,19 @@ export default class GiftedDialog extends Vue { receiver?: libsUtil.GiverReceiverInputInfo, offerId?: string, prompt?: string, + description?: string, + amountInput?: string, + unitCode?: string, callbackOnSuccess: (amount: number) => void = () => {}, ) { this.giver = giver; - this.prompt = prompt || ""; this.receiver = receiver; - this.amountInput = "0"; - this.callbackOnSuccess = callbackOnSuccess; this.offerId = offerId || ""; + this.prompt = prompt || ""; + this.description = description || ""; + this.amountInput = amountInput || "0"; + this.unitCode = unitCode || "HUR"; + this.callbackOnSuccess = callbackOnSuccess; this.firstStep = !giver; this.stepType = "giver"; diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index f3fc6ffb..4d30c550 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -1069,6 +1069,9 @@ export default class ContactsView extends Vue { 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, callback, ); } diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index b7a6b83f..83bbdb1a 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -1234,8 +1234,17 @@ export default class ProjectViewView extends Vue { }; (this.$refs.giveDialogToThis as GiftedDialog).open( giver, - undefined, + { + did: offer.issuerDid, + name: this.name, + handleId: this.projectId, + image: this.imageUrl, + }, offer.handleId, + undefined, + offer.objectDescription, + offer.amount.toString(), + offer.unit, ); }