-
Notifications
You must be signed in to change notification settings - Fork 46
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
front: fix none display when no study type in operational studies #6746
front: fix none display when no study type in operational studies #6746
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #6746 +/- ##
============================================
- Coverage 28.65% 28.65% -0.01%
Complexity 2235 2235
============================================
Files 1063 1063
Lines 131643 131643
Branches 2647 2647
============================================
- Hits 37723 37722 -1
- Misses 92399 92400 +1
Partials 1521 1521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
0adfff1
to
85eca69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to change anything in AddOrEditStudyModal.tsx. To solve the issue, you can just hide the study_type div if study_type === 'nothingSelected' in StudyCard.tsx and Study.tsx
Edit : as discussed with @RomainValls and @clarani, we are going to handle the issue by putting an empty string for the "none" study_type and see with the back-end if they can avoid letting the front send undefined or null for the study_type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the changes, everything works great. Just one last comment for me.
72cf6c3
to
f3e6604
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, good job !
To go further, I think we could, in another PR, do the same logic for the study_states by putting them in an array with as const
and maybe we could reuse the createSelectOptions function for both states and types.
What do you think @clarani ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM, only a small comment :)
Yes agree with @SharglutDev for studyStates, we should create an issue for that 🙏 |
f3e6604
to
0a90248
Compare
0a90248
to
7fad5bf
Compare
closes #6655