Skip to content

Add ConfirmationModal component and unified toast utility#954

Merged
mftee merged 1 commit into
CodeGirlsInc:mainfrom
harouns-ux:fix/issues-899-900-modal-toast
Jun 1, 2026
Merged

Add ConfirmationModal component and unified toast utility#954
mftee merged 1 commit into
CodeGirlsInc:mainfrom
harouns-ux:fix/issues-899-900-modal-toast

Conversation

@harouns-ux
Copy link
Copy Markdown
Contributor

Destructive actions (cancel shipment, reject bid, delete document) executed immediately on click with no confirmation. ConfirmationModal provides a reusable dialog with danger/warning/info variants, an async onConfirm handler with built-in loading state, and a backdrop overlay to prevent accidental irreversible actions.

API feedback was inconsistent across the app — some mutations used browser alert(), others had no feedback, and Sonner was only called in a few places. The toast utility wraps Sonner with preset methods (success, error, info, warning, apiError, promise) and a shared extractMessage helper that unwraps NestJS validation error arrays, giving the whole frontend a single import for user feedback.

Closes #899
Closes #900

Destructive actions (cancel shipment, reject bid, delete document)
executed immediately on click with no confirmation. ConfirmationModal
provides a reusable dialog with danger/warning/info variants, an async
onConfirm handler with built-in loading state, and a clean backdrop
overlay so accidental clicks no longer trigger irreversible actions.

API feedback was inconsistent across the app: some mutations used
browser alert(), others showed no feedback, and Sonner was only called
in a few places. The toast utility wraps Sonner with preset methods
(success, error, info, warning, apiError, promise) and a shared
extractMessage helper that unwrites NestJS validation error arrays,
giving the whole frontend a single import for user feedback.

Closes CodeGirlsInc#899
Closes CodeGirlsInc#900
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@harouns-ux is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@harouns-ux 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

@mftee mftee merged commit abbb315 into CodeGirlsInc:main Jun 1, 2026
1 of 4 checks passed
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.

[FE-32] Build unified toast notification utility [FE-31] Build reusable confirmation modal component

2 participants