-
Notifications
You must be signed in to change notification settings - Fork 249
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
(feat) O3-4342: Split allergy form fields #2193
base: main
Are you sure you want to change the base?
Conversation
@Muppasanipraneeth could you add screenshots to support your changes? |
@@ -45,7 +45,7 @@ const AllergiesDetailedSummary: React.FC<AllergiesDetailedSummaryProps> = ({ pat | |||
{ key: 'reaction', header: t('reaction', 'Reaction') }, | |||
{ | |||
key: 'note', | |||
header: t('onsetDateAndComments', 'Onset date and comments'), | |||
header: t('onsetDate', 'Onset date '), |
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.
header: t('onsetDate', 'Onset date '), | |
header: t('onsetDate', 'Onset date'), |
return currentDate <= new Date(); | ||
}, | ||
{ | ||
message: 'Date cannot be in the future', |
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.
Wrap this in a t
function for i18n.
@@ -410,7 +443,7 @@ function AllergyForm(props: AllergyFormProps) { | |||
<TextArea | |||
id="comments" | |||
invalidText={t('invalidComment', 'Invalid comment, try again')} |
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.
invalidText={t('invalidComment', 'Invalid comment, try again')} | |
invalid={Boolean(errors?.comments)} | |
invalidText={errors?.comments?.message)} |
Requirements
Summary
This PR separates the 'Onset date' and 'Additional comments' fields in the allergy form. Presently, the two are combined in a single field. Separating them aligns them with the designs and allows for proper validation of the individual fields.
Screenshots
Related Issue
https://issues.openmrs.org/browse/O3-4342
Other