Skip to content

Show complete coupon metadata when user clicks on coupon card #55

@Josue19-08

Description

@Josue19-08

➡️ Title

Show complete coupon metadata when user clicks on coupon card

📘 Description

Create a detailed view that displays complete coupon metadata when users click on a coupon card. Show all tourism activity details, business information, terms and conditions from IPFS metadata.

Context: Users need to see full coupon details including business contact, discount terms, usage conditions, and redemption instructions before deciding to redeem.

✅ Acceptance Criteria

Modal component creation

  • Create components/coupons/coupon-details-modal.tsx for detailed view
  • Trigger modal from coupon card click
  • Display complete metadata fetched from IPFS
  • Handle modal open/close state management

Metadata display

  • Show business name, address, and contact information
  • Display activity type and detailed description
  • Show discount percentage or fixed amount
  • Display valid dates (from/until) with clear formatting
  • Show redemption conditions and terms
  • Display maximum guests and blackout dates if applicable

Data integration

  • Fetch metadata from IPFS URL stored in coupon
  • Handle IPFS loading states and failures
  • Parse and validate JSON metadata structure
  • Implement fallback for missing metadata fields

Design consistency (follow existing patterns)

  • Use same modal layout and styling as components/projects/project-modal.tsx
  • Apply same header/title styling patterns from existing modals
  • Use consistent card styling within modal content
  • Follow same close button and overlay patterns
  • Apply same typography hierarchy as project detail modals
  • Use existing badge components for status indicators

Error handling

  • Show loading spinner while fetching metadata
  • Display error message if IPFS fetch fails
  • Handle malformed JSON gracefully
  • Provide fallback content for missing fields

⚠ Use kebab-case for all file and folder names.
⚠ Do not use default alias imports or relative paths like ../../components/foo.
⚠ Use alias paths with @, e.g. @/components/foo.
⚠ Structure the code with reusable components and reuse existing ones.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions