devstygian / devstygian/Resto-POS
Feat: Add “Something Went Wrong” Modal Component for Error Handling
- Dominant language
- PHP
- Stars
- 4
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
### Description:
Create a reusable modal component to display a friendly error message whenever something goes wrong in the system (e.g., failed API calls, server errors, unexpected exceptions). The modal should:
- Be visually consistent with the current UI.
- Include a clear title (e.g., “Something Went Wrong”) and a brief description.
- Provide a Close button to dismiss the modal.
- Be easily triggerable from JavaScript for frontend errors or AJAX/API call failures.
- Optional: allow logging the error details in the console for debugging.
### Acceptance Criteria:
1. Modal can be triggered programmatically from any page.
2. Error messages are displayed dynamically.
3. Modal overlays the current content but doesn’t break the page layout.
4. Works on desktop and mobile screens.
5. Example integration in view.php or notif.js for testing purposes.
Contributor guide
Assessment
This issue has not been assessed yet.