Skip to content

Vincent/notifications#407

Open
vincent-serem wants to merge 16 commits intomasterfrom
vincent/notifications
Open

Vincent/notifications#407
vincent-serem wants to merge 16 commits intomasterfrom
vincent/notifications

Conversation

@vincent-serem
Copy link
Copy Markdown
Collaborator

@vincent-serem vincent-serem commented May 4, 2026

Description

This PR integrates the notification system with the live backend API and ensures full data synchronization between the server and the frontend. Key changes include:

Reverting frontend data mapping in notificationService.js to consume the raw backend response.
Updating all notification-related components (NotificationPanel, NotificationDrawer, and AdminLayout) to use the MongoDB _id field instead of the previous mock id.
Ensuring status flags (isRead) and timestamps (createdAt) are correctly parsed from the backend schema.
Implementing robust error handling for API interactions (Fetch, Mark as Read, Delete).

Todos

  • Tested and working locally
  • Code follows the style guidelines of this project
  • I have performed a self-review of my code
  • Code changes documented
  • Requested review from >= 2 devs on the team (one frontend and one backend recommended)

How to test

[Add detailed steps to test the changes that have been made]

Screenshots and/or Gifs

image image

Associated MS Planner Tasks

Known Issues

Notification Types: The current backend response does not include a type field (e.g., success, warning). As a result, all notifications currently default to the 'info' (primary color) styling.

vserem added 16 commits March 25, 2026 09:34
…nhanced UI feedback

- Added `TextInputLayout` with error messaging to `LoginActivity` and `RegisterActivity` for real-time validation feedback.
- Implemented text change listeners to clear validation errors dynamically.
- Refactored loading states to properly toggle button enablement and progress bar visibility during API calls.
- Improved error handling by parsing `ApiErrorResponse` and providing more descriptive error messages.
- Updated layouts (`activity_login.xml`, `account_creation.xml`) to include `TextInputLayout` containers and fix autofill hints.
- Added explicit password validation for the login process.
- Refactored `PinCodeActivity` to use a list for PIN digit inputs and streamlined digit concatenation.
- Implemented automatic focus shifting between PIN input fields using `TextWatcher`.
- Added a `KeyEventListener` to handle backspace navigation between input fields.
- Enhanced the loading state by disabling inputs and buttons, showing a progress bar, and hiding the keyboard during API calls.
- Integrated `InputMethodManager` to automatically show the keyboard on activity start and hide it during processing.
- Migrated hardcoded strings to `strings.xml` and added new string resources for validation errors and success toasts.
- Improved the "Resend PIN" button logic with better visual feedback during the cooldown period using alpha transparency.
- Removed the hardcoded "000000" dummy verification bypass.
- Fixed a minor XML tag syntax error in `strings.xml`.
- Refactored `toHomeScreenForRole` in `NavigationService` to use a cleaner `when` expression and implement `FLAG_ACTIVITY_CLEAR_TASK` to prevent navigating back to authentication screens.
- Updated `onSignOut` and `toLogin` to properly clear the activity back stack and finish the current activity.
- Simplified `Intent` instantiation across `NavigationService` by using `activity` context directly instead of `applicationContext`.
- Fixed a syntax error in `strings.xml` by correcting a malformed closing tag in `breathing_exercise2`.
- Minor formatting cleanup in `strings.xml`.
- Added `SplashActivity` as the new launcher activity to handle session-based navigation logic, routing users to their respective home screens or the login screen.
- Created `ForgotPasswordActivity` with a dedicated layout and logic for password reset requests, replacing the previous `AlertDialog` implementation in `LoginActivity`.
- Integrated `TextInputLayout` for email validation and real-time error feedback in the password reset flow.
- Updated `AndroidManifest.xml` to set `SplashActivity` as the main entry point and declared the new `ForgotPasswordActivity`.
- Refactored `LoginActivity` to navigate to the new `ForgotPasswordActivity` and removed the legacy `sendResetPasswordEmail` logic.
- Added a `NoActionBar` theme variation to `styles.xml` for splash screen support.
- Implemented loading states and API error parsing within the password reset flow.
… fetching, and confirmation modal in admin dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants