Vincent/notifications#407
Open
vincent-serem wants to merge 16 commits intomasterfrom
Open
Conversation
…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
…ervice integration in admin layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
How to test
[Add detailed steps to test the changes that have been made]
Screenshots and/or Gifs
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.