Description:
Replace all default browser alert dialogs (e.g., alert(), “localhost says”) with a custom modal component to improve user experience and UI consistency across the system.
Goals:
- Remove all usage of alert() in the codebase.
- Replace with a reusable modal component (e.g., confirmation, success, error).
- Ensure consistent styling with the current UI theme.
- Support different message types:
- Success
- Error
- Warning
- Confirmation (Yes/No)
Acceptance Criteria:
- No “localhost says” alerts appear anywhere in the system.
- All alerts are replaced with styled modals.
- Modal can be triggered globally via JavaScript.
- Confirmation modals support callbacks (e.g., delete actions).
- Works across all pages (orders, menu, notifications, accounts).
- Responsive and accessible (keyboard + mobile-friendly).
Notes:
- Can reuse the “Something Went Wrong” modal component as a base.
- Suggested approach: create a global showModal(type, message, callback) function.
- Gradually refactor existing JS files (notif.js, order actions, etc.).
Description:
Replace all default browser alert dialogs (e.g., alert(), “localhost says”) with a custom modal component to improve user experience and UI consistency across the system.
Goals:
Acceptance Criteria:
Notes: