devstygian / devstygian/Resto-POS
Feat: Convert all “localhost says” alerts to modal dialogs
- Dominant language
- PHP
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### 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:
1. No “localhost says” alerts appear anywhere in the system.
2. All alerts are replaced with styled modals.
3. Modal can be triggered globally via JavaScript.
4. Confirmation modals support callbacks (e.g., delete actions).
5. Works across all pages (orders, menu, notifications, accounts).
6. 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.).
Contributor guide
Assessment
This issue has not been assessed yet.