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

[frontend] Fix Add height / weight do not work (#7118) #7165

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

SarahBocognano
Copy link
Member

Proposed changes

  • Add a validator check to help the user knowing the field is mandatory
  • On edit form, when pushes a new height or weight line, put a value instead of null to avoid errors

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case (coverage and e2e)
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

@SarahBocognano SarahBocognano self-assigned this May 29, 2024
@SarahBocognano SarahBocognano added the filigran team use to identify PR from the Filigran team label May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.54%. Comparing base (e9dbebf) to head (e677fc3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7165      +/-   ##
==========================================
- Coverage   67.54%   67.54%   -0.01%     
==========================================
  Files         561      561              
  Lines       68727    68727              
  Branches     5835     5835              
==========================================
- Hits        46425    46420       -5     
- Misses      22302    22307       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Archidoit
Copy link
Member

Archidoit commented May 29, 2024

If we enter something else than a date for the height/weight, the error is not well formatted:
image

You can include this part of code in your dateSeenValidator:
image

@Archidoit
Copy link
Member

Archidoit commented May 29, 2024

What is the meaning for the (') unit (simple curiosity)? (I know 'lb' for weight but I don't know (') )

image

@SarahBocognano : this is how we define height in America everytime you'll see a height, I will be like: 5'7" (172cm)

@Archidoit
Copy link
Member

Archidoit commented May 31, 2024

Usually when a required field is not specified, there is only a red message in the form :
image

But for height/weight date or measure, a second message appears at the top of the screen "Validation against the schema... " :

image

image

@CelineSebe
Copy link
Member

CelineSebe commented Jun 4, 2024

When adding a height, after delete the previous date, this date is reinitialized automatically.

@SarahBocognano : Yes I did that on purpose to avoid any error for the user and to show that this field is indeed mandatory and has no sense of use without the date

@lndrtrbn lndrtrbn self-requested a review June 7, 2024 09:20
Copy link
Member

@lndrtrbn lndrtrbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can create TAI with null measure or date for height and weight, I suppose not intended but at least when setting real values it works well

@SarahBocognano SarahBocognano merged commit fb59229 into master Jun 7, 2024
5 checks passed
@SarahBocognano SarahBocognano deleted the issue/7118 branch June 7, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants