Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POLIO-1740: Snack bars not showing correct status in supplychain #1819

Conversation

quang-le
Copy link
Member

@quang-le quang-le commented Nov 21, 2024

User didn't get error message in UI when trying to create/update prealert or VAR with duplicate PO

Related JIRA tickets : POLIO-1740

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

Bug fix: N/A

Changes

Explain the changes that were made.

  • Catch IntegrityError in the API and return a 400 instead
  • Fix error handling in the front-end:
    • remove nested Promises for saveAll button
    • refactor error handling code accordingly

How to test

  • Go to Vaccine module> Supplychain
  • Open an existing enty
  • Open a new tab and copy the url there, so you have 2 tabs open on the same page
  • In the first page, add a prealert.
  • Save
  • Go to the second tab
  • Try to add a prealert with teh same PO number
  • Save
  • The error snackbar should pop up and the data not be saved
  • Do the same with arrival reports

Print screen / video

Screen.Recording.2024-11-21.at.16.55.49.mov

Notes

Things that the reviewers should know:
HOTFIXABLE on v1.248a-polio

new tag: v1.248b-polio

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@quang-le quang-le added the hotfix Hot fix :fire: label Nov 21, 2024
@quang-le quang-le requested a review from beygorghor November 21, 2024 16:05
@quang-le quang-le changed the title POLIO-1740 supply chain successfully saved pre alerts and va rs are not appearing POLIO-1740: Snack bars not showing correct status in supplychain Nov 21, 2024
@beygorghor beygorghor merged commit d48b6d2 into main Nov 22, 2024
4 checks passed
@beygorghor beygorghor deleted the POLIO-1740-supply-chain-successfully-saved-pre-alerts-and-va-rs-are-not-appearing branch November 22, 2024 11:29
@beygorghor beygorghor added the user tested Has already been tested on staging label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix Hot fix :fire: Released user tested Has already been tested on staging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants