You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PIMS-2347
Initial concern was that the Received On date field wasn't being saved.
In fixing this, I noticed two additional problems:
If an agency is already in the response list but then becomes disabled, it's still possible to change its response to Subscribed.
If an agency is already in the response list but then opts out of emails system-wide, it's still possible to change its response to Subscribed.
Changes
Now sending Received On date with the Agency Responses.
Backend logic that prevents agency responses from getting that Subscribed status if the agency is disabled, missing an email, or has opted out of emails.
Frontend UI changes for better viewing of agency responses.
Frontend styling to clearly display that an agency response cannot be changed to Subscribe and prevent the user from doing so.
Testing
Check that you can now save the Received On date
Check if you cannot set an agency response to Subscribed when it shouldn't be able to. AKA agency is disabled or opted out of emails.
Check that you can still subscribe and unsubscribe other agencies as expected.
🔰 Checklist
I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
I have performed a self-review of my code.
I have commented my code, particularly in hard-to-understand areas.
I have made corresponding changes to the documentation where required.
I have tested my changes to the best of my ability.
The Express API Image has been built with the tag: 3027. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.
The React APP Image has been built with the tag: 3027. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the APP deployment. For more updates please monitor Image Tags Page on Wiki.
@Sharala-Perumal
I think I found what was causing the issue with our testing.
When an agency's notification settings were changed, it wasn't immediately reflected in the browser-side lookup table about the agency. Therefore, when the notifications were set to be off (false), the lookup data still showed it as on (true).
I added a call to refresh the lookup data when an agency is edited like this.
The result is the option is greyed out with the tooltip like so:
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
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.
🎯 Summary
PIMS-2347
Initial concern was that the Received On date field wasn't being saved.
In fixing this, I noticed two additional problems:
Changes
Testing
🔰 Checklist