From dacf1f80839867bca38ec1fe4d9aa3a383de7fa8 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 18 Jul 2025 07:23:20 +0000 Subject: [PATCH] refactor: convert GiftDetailsStep update handlers from emits to function props - Replace @Emit("update:description"), @Emit("update:amount"), @Emit("update:unitCode") with function props - Add onUpdateDescription, onUpdateAmount, onUpdateUnitCode function props with TypeScript typing - Update GiftedDialog to use new function prop interface for update handlers - Remove emit decorators and methods for update events - Keep emit pattern for non-update events (edit-entity, explain-data, submit, cancel) - Improve component documentation to reflect new architecture This change provides better parent control over validation and update behavior for form fields while maintaining existing functionality for other events. --- src/components/GiftDetailsStep.vue | 54 +++++++++++++++++------------- src/components/GiftedDialog.vue | 6 ++-- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/src/components/GiftDetailsStep.vue b/src/components/GiftDetailsStep.vue index 703e16fe..26009d98 100644 --- a/src/components/GiftDetailsStep.vue +++ b/src/components/GiftDetailsStep.vue @@ -5,7 +5,8 @@ with edit capability * - Gift description input with placeholder support * - Amount input with increment/decrement controls * - Unit code selection (HUR, USD, BTC, etc.) * - Photo & more options navigation * - Conflict detection and warning display * - Form validation and submission * - Cancel functionality * - -Template streamlined with computed CSS properties * * @author Matthew Raymer */ +Template streamlined with computed CSS properties * - Function props for parent +control over updates and validation * * @author Matthew Raymer */