msupply-foundation / open-msupply

Open mSupply represents our most recent advancement in the Logistics Management Information System (LMIS), expanding on more than two decades of development inherited from the well-established legacy of the original mSupply.
https://msupply.foundation/open-msupply/
Other
20 stars 12 forks source link

Clicking on a datetime picker in Prescriptions shows the warning straight away, warning appears again after clicking anywhere on the screen #5164

Open marthakeezy opened 5 days ago

marthakeezy commented 5 days ago

What went wrong? šŸ˜²

Issue 1 - the warning the lines will be removed appears straight away, without giving users a chance to even see the datetime picker. Should the flow be user clicking on the datetime picker -> seeing the window -> clicking on the past date -> clicking Ok to confirm -> then only seeing the warning?

Or if the warning should appear before any actions are taken by users, then it shouldn't overlrap the datetime picker -> they should appear one by one.

Issue 2 - after cancelling out of the warning and clicking anywhere on the screen, the warning appears again

The video of the behaviour can be found ->>> here

Expected behaviour šŸ¤”

Issue 1 - user clicking on the datetime picker -> seeing the window -> clicking on the past date -> clicking Ok to confirm -> then only seeing the warning

Issue 2 - the warning should not appear twice if you cancel out of it earlier

How to Reproduce šŸ”Ø

Steps to reproduce the behaviour:

  1. Go to Dispensary -> Prescriptions
  2. Create a new prescription and add an item to it
  3. Click on the datetime picker to see the first issue
  4. Click Ok or Cancel and then click anywhere else on the screen to see the second issue

Your environment šŸŒ±

lache-melvin commented 4 days ago

Checked in with @mark-prins - agree not ideal, but should affect a fairly small circle (only if you try to change the date after adding items, which is not the recommended workflow)

We can fix for 2.4 šŸ™

FYI this is due to the onBlur being called when you click into the date picker on android, but not on desktop šŸ¤·ā€ā™€ļø