devstygian / devstygian/Resto-POS

Feat: Convert all “localhost says” alerts to modal dialogs

Open
#59 0 comments 0 reactions 0 assignees View on GitHub
enhancement frontend help wanted UI/UX
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.