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:
- Modal can be triggered programmatically from any page.
- Error messages are displayed dynamically.
- Modal overlays the current content but doesn’t break the page layout.
- Works on desktop and mobile screens.
- Example integration in view.php or notif.js for testing purposes.
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:
Acceptance Criteria: