[survey_accounts]Add French Language To Survey Accounts#10696
Closed
GeorgeMurad wants to merge 7 commits into
Closed
[survey_accounts]Add French Language To Survey Accounts#10696GeorgeMurad wants to merge 7 commits into
GeorgeMurad wants to merge 7 commits into
Conversation
**Situation:** In the LORIS `user_accounts` module (`edit_user` interface), clicking the "Reject User" button triggers an immediate AJAX call to reject the account. There is no confirmation dialog, making it extremely easy for an administrator to accidentally reject a user with a misclick. **Task:** My objective was to introduce a confirmation step before executing the rejection AJAX call, ensuring a better and safer user experience. The implementation needed to adhere strictly to modern LORIS framework standards, specifically utilizing the SweetAlert2 library. **Action:** - **Refactored Legacy Code:** Converted the plain jQuery script `modules/user_accounts/js/rejectUser.js` into a modern proper source file at `modules/user_accounts/jsx/rejectUser.js`. - **Integrated SweetAlert2:** Used modern Webpack imports (`import swal from 'sweetalert2';`) to implement a `swal.fire()` confirmation modal with a 'warning' type, standardizing the UI with other LORIS modules. - **Updated Webpack Entry Point:** Registered the new `rejectUser` file in `webpack.config.ts` under the `user_accounts` entry. - **Compiled Bundle:** Built the new asset via `npm run compile`, resulting in a self-contained Webpack JS bundle that replaces the old jQuery file. **Result:** Administrators can now see SweetAlert2 warning dialog when attempting to reject a user. The AJAX call is correctly blocked until the user explicitly clicks "Yes, reject user!", completely preventing accidental rejections and fixes aces#10474. <img width="1706" height="972" alt="image" src="https://github.com/user-attachments/assets/686cbb68-072d-4d50-80d7-f7e91a9e7e51" />
…s#10685) ## Brief summary of changes The dataquery TestPlan specifies that queries should only be able to be pinned by users with "Data Query Tool: Admin dataquery queries" permission. - [x] Have you updated related documentation? #### Testing instructions (if applicable) 1. Verify the TestPlan #### Link(s) to related issue(s) * Resolves [10602](aces#10602). Co-authored-by: Michael Lapadula <michael.lapadula@mcin.ca>
## Brief summary of changes No notifications were being sent out because the "Active_to" condition in the query for users to be notified had the opposite logic than it should (it was checking users who have already had their access expired instead of users who are still active). - [ ] Have you updated related documentation? #### Testing instructions (if applicable) 1. Create a user and grant the user each permission from the my_preferences page. Make sure the user is active and does not have an active_to date set 2. Test each operation that sends notifications to make sure the notifications are properly sent 3. Edit the user to have an active_to date set before now 4. Make sure the notifications are not sent 5. Edit the user to have an active_to date set after now 6. Make sure the notifications are sent 7. Remove all of the notification settings from my_preferences page 8. Make sure that the notifications are not sent #### Link(s) to related issue(s) * Resolves aces#10588
3d67b9e to
fe6eedb
Compare
Contributor
Author
|
Closing this PR because it has been recreated against the 29.0-release branch: #10697. |
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.
Testing instructions (if applicable)
fr_CAis added to the language table.Link(s) to related issue(s)