Skip to content

#191 [Frontend · Dispute system UI] Create RaiseDisputeModal — form and submission#219

Open
OluwapelumiElisha wants to merge 4 commits intoamina69:mainfrom
OluwapelumiElisha:create-raiseDisputeModal—form-submission

Hidden character warning

The head ref may contain hidden characters: "create-raiseDisputeModal\u2014form-submission"
Open

#191 [Frontend · Dispute system UI] Create RaiseDisputeModal — form and submission#219
OluwapelumiElisha wants to merge 4 commits intoamina69:mainfrom
OluwapelumiElisha:create-raiseDisputeModal—form-submission

Conversation

@OluwapelumiElisha
Copy link
Copy Markdown

📌 Summary

This PR implements the Raise Dispute Modal as part of the dispute system UI. It allows eligible users to submit a dispute with a reason and supporting evidence. #191


🚀 Features Implemented

  • Added "Raise a dispute" trigger button (visible when CUSTODY_ACTIVE and user is adopter/shelter)
  • Built modal with:
    • Reason textarea (min 30 characters + live counter)
    • Evidence upload (integrated with existing upload component)
  • Implemented useMutateRaiseDispute hook using FormData
  • Added per-file upload progress using XMLHttpRequest.onprogress
  • Disabled submit button during upload and invalid states

⚙️ Behavior

  • ✅ On success:
    • Modal closes
    • Success toast displayed: "Dispute raised. Escrow paused."
  • ❌ On error:
    • Inline error message is shown in the modal

🧪 Tests

  • Submit button is disabled during upload
  • Successful submission:
    • Closes modal
    • Triggers success toast

🎯 Acceptance Criteria

  • Reason validation (min 30 chars)
  • File upload with progress tracking
  • API integration via POST /disputes
  • Proper loading/disabled states
  • Success & error handling
  • Accessible and keyboard-friendly UI

🧩 Notes

  • Used FormData for file + payload submission
  • Followed existing project patterns for hooks and UI components
  • Components structured for reusability and maintainability

🔗 Related Issue

Closes #191

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 27, 2026

@OluwapelumiElisha Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@amina69
Copy link
Copy Markdown
Owner

amina69 commented Mar 27, 2026

@OluwapelumiElisha please check the ci pipiline is failing, probably lint error

@OluwapelumiElisha
Copy link
Copy Markdown
Author

@amina69

Please Kindly Check i have fixed all the Lint error, Thanks

@amina69
Copy link
Copy Markdown
Owner

amina69 commented Mar 28, 2026

@OluwapelumiElisha conflict

@OluwapelumiElisha
Copy link
Copy Markdown
Author

Hi @amina69

Kindly check this pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Frontend · Dispute system UI] Create RaiseDisputeModal — form and submission

2 participants