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

Vaccine course - Issue filling Age Range for doses #4884

Open regotaina opened 3 days ago

regotaina commented 3 days ago

What went wrong? 😲

When creating a new Vaccine Course, if you try to edit the age range starting with 'From age' the field won't accept any number smaller than the 'To age'. This causes a problem when the default value for 'To age' is pre-filled with 0Y 2M.

Considering the design, the user is lead to start filling the form by 'From age', but with this restriction, for now the user needs to edit 'To age' first.

For example, if the interval is supposed to be "From age" = 5Y ", To age"= 10Y, the only way to make it work is inputting 10Y first. See video below:

https://github.com/user-attachments/assets/32bea7b8-08b4-48a7-bdca-b9437d2b0194

If not done in this order, the system will not accept the number 5Y, as the default value for 'To age' is 0Y 2M Screenshot 2024-09-26 at 4 19 49 PM

Expected behaviour 🤔

If 'To age' < ' From age', error message appears.

How to Reproduce 🔨

Steps to reproduce the behaviour:

  1. Go to 'Programs' >Immunisations
  2. Click on 'Add Vaccine course'
  3. Scroll down to '+ Dose'
  4. Try typing 'From age' = 3Y
  5. See error

Your environment 🌱

lache-melvin commented 2 days ago

Yep agree this is pretty unusable - would appear the usability is at least somewhat constrained by the points outlined in #4874, solution for now can be to remove any limits on the inputs while typing, and validate on save 👍

CarlosNZ commented 2 days ago

I would just add, when you add a new dose, the default minimum is going to one month after the previous minimum, whereas if should be whatever the previous maximum was. Just noting so we can fix here as well.