Add form field preservation in gifting flow

- Preserve description, amount, and unit code when navigating between gifting steps
- Add form field props to EntitySelectionStep and GiftedDialog components
- Update ContactGiftingView to handle form state persistence in URL parameters
This commit is contained in:
Jose Olarte III
2025-08-01 11:36:17 +08:00
parent 8b2c6714ec
commit 404a7cbc71
3 changed files with 37 additions and 4 deletions

View File

@@ -136,6 +136,16 @@ export default class EntitySelectionStep extends Vue {
@Prop()
receiver?: EntityData | null;
/** Form field values to preserve when navigating to "Show All" */
@Prop({ default: "" })
description!: string;
@Prop({ default: "0" })
amountInput!: string;
@Prop({ default: "HUR" })
unitCode!: string;
/** Notification function from parent component */
@Prop()
notify?: (notification: NotificationIface, timeout?: number) => void;
@@ -228,6 +238,10 @@ export default class EntitySelectionStep extends Vue {
stepType: this.stepType,
giverEntityType: this.giverEntityType,
recipientEntityType: this.recipientEntityType,
// Form field values to preserve
description: this.description,
amountInput: this.amountInput,
unitCode: this.unitCode,
...(this.stepType === "giver"
? {
recipientProjectId: this.toProjectId || "",