From df1c1f018647a504500c3091f823ec01459ef701 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 13 Jun 2025 20:52:26 +0800 Subject: [PATCH] Fix: pass project info In GiftingDialog, project information is passed along if: - Selecting "Show All" to go to ContactGiftingView - Selecting "Photos and Other Options" to go to GiftedDetailsView --- src/components/GiftedDialog.vue | 16 ++++++++++++---- src/views/ContactGiftingView.vue | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 7b3f4af8..269671e5 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -91,7 +91,15 @@
  • @@ -503,15 +511,15 @@ export default class GiftedDialog extends Vue { this.apiServer, this.activeDid, this.showProjects ? undefined : giverDid as string, - recipientDid as string, + this.showProjects && this.isFromProjectView ? this.giver?.handleId : recipientDid as string, description, amount, unitCode, - this.toProjectId, + this.showProjects && this.isFromProjectView ? this.giver?.handleId : this.toProjectId, this.offerId, false, undefined, - this.showProjects ? this.giver?.handleId : undefined, + this.showProjects && !this.isFromProjectView ? this.giver?.handleId : undefined, ); if (!result.success) { diff --git a/src/views/ContactGiftingView.vue b/src/views/ContactGiftingView.vue index e43d68ae..afdf3c47 100644 --- a/src/views/ContactGiftingView.vue +++ b/src/views/ContactGiftingView.vue @@ -97,6 +97,9 @@ export default class ContactGiftingView extends Vue { description = ""; projectId = ""; prompt = ""; + recipientProjectName = ""; + recipientProjectImage = ""; + recipientProjectHandleId = ""; async created() { try { @@ -124,7 +127,10 @@ export default class ContactGiftingView extends Vue { ); } - this.projectId = (this.$route.query["projectId"] as string) || ""; + this.projectId = (this.$route.query["recipientProjectId"] as string) || ""; + this.recipientProjectName = (this.$route.query["recipientProjectName"] as string) || ""; + this.recipientProjectImage = (this.$route.query["recipientProjectImage"] as string) || ""; + this.recipientProjectHandleId = (this.$route.query["recipientProjectHandleId"] as string) || ""; this.prompt = (this.$route.query["prompt"] as string) ?? this.prompt; // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -146,7 +152,12 @@ export default class ContactGiftingView extends Vue { openDialog(giver?: GiverReceiverInputInfo | "Unnamed") { const recipient = this.projectId - ? undefined + ? { + did: this.recipientProjectHandleId, + name: this.recipientProjectName, + image: this.recipientProjectImage, + handleId: this.recipientProjectHandleId + } : { did: this.activeDid, name: "you" }; if (giver === "Unnamed") {