forked from jsnbuchanan/crowd-funder-for-time-pwa
feat: migrate GiftDetailsStep.vue with template streamlining
- Extract long CSS classes to computed properties
- Fix header comment formatting to JSDoc format
- Enhance component documentation
- No database/notification migration needed (pure UI component)
- Human testing completed
Security: No risks (cosmetic changes only)
Lint: ✅ Passed
Migration: Phase 4 only - Template streamlining
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
/** * GiftDetailsStep.vue - Gift details step component * * Extracted from
|
||||
GiftedDialog.vue to handle the complete step 2 * gift details form interface
|
||||
with entity summaries and validation. * * @author Matthew Raymer */
|
||||
/**
|
||||
* GiftDetailsStep.vue - Gift details step component
|
||||
*
|
||||
* Extracted from GiftedDialog.vue to handle the complete step 2
|
||||
* gift details form interface with entity summaries and validation.
|
||||
*
|
||||
* Features:
|
||||
* - Entity summary display 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>
|
||||
<div id="sectionGiftedGift">
|
||||
<!-- Entity Summary Buttons -->
|
||||
@@ -56,10 +72,7 @@ with entity summaries and validation. * * @author Matthew Raymer */
|
||||
</div>
|
||||
|
||||
<!-- Photo & More Options Link -->
|
||||
<router-link
|
||||
:to="photoOptionsRoute"
|
||||
class="block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-lg mb-4"
|
||||
>
|
||||
<router-link :to="photoOptionsRoute" :class="photoOptionsClasses">
|
||||
Photo & more options…
|
||||
</router-link>
|
||||
|
||||
@@ -93,12 +106,7 @@ with entity summaries and validation. * * @author Matthew Raymer */
|
||||
>
|
||||
Sign & Send
|
||||
</button>
|
||||
<button
|
||||
class="block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-lg"
|
||||
@click="handleCancel"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
<button :class="cancelButtonClasses" @click="handleCancel">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -132,6 +140,7 @@ interface EntityData {
|
||||
* - Conflict detection and warning display
|
||||
* - Form validation and submission
|
||||
* - Cancel functionality
|
||||
* - Template streamlined with computed CSS properties
|
||||
*/
|
||||
@Component({
|
||||
components: {
|
||||
@@ -197,6 +206,20 @@ export default class GiftDetailsStep extends Vue {
|
||||
private localAmount: number = 0;
|
||||
private localUnitCode: string = "HUR";
|
||||
|
||||
/**
|
||||
* CSS classes for the photo & more options link
|
||||
*/
|
||||
get photoOptionsClasses(): string {
|
||||
return "block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-lg mb-4";
|
||||
}
|
||||
|
||||
/**
|
||||
* CSS classes for the cancel button
|
||||
*/
|
||||
get cancelButtonClasses(): string {
|
||||
return "block w-full text-center text-md uppercase bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-1.5 py-2 rounded-lg";
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize local values from props
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user