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.
This commit is contained in:
Matthew Raymer
2025-07-18 07:23:20 +00:00
parent ca3fb8fa04
commit dacf1f8083
2 changed files with 34 additions and 26 deletions

View File

@@ -39,9 +39,9 @@
:offer-id="offerId"
:from-project-id="fromProjectId"
:to-project-id="toProjectId"
@update:description="description = $event"
@update:amount="handleAmountUpdate"
@update:unit-code="unitCode = $event"
:on-update-description="(desc: string) => (description = desc)"
:on-update-amount="handleAmountUpdate"
:on-update-unit-code="(code: string) => (unitCode = code)"
@edit-entity="handleEditEntity"
@explain-data="explainData"
@submit="handleSubmit"