-
Notifications
You must be signed in to change notification settings - Fork 0
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
validation custom forms #21
base: development
Are you sure you want to change the base?
Conversation
src/webapp/reports/validate-custom-forms/ValidateCustomFormsReport.tsx
Outdated
Show resolved
Hide resolved
src/domain/validatecustomforms/repositories/CustomFormErrorsRepository.ts
Outdated
Show resolved
Hide resolved
src/webapp/reports/validate-custom-forms/ValidateCustomFormsReport.tsx
Outdated
Show resolved
Hide resolved
We have a false positive in dev: its due we have a piece of old code commented that points Ybz3qUCWYKC to Xr12mI7VPn3, but that dataelement is related with their valid categorycombo in the custom form. |
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.
Code looking very good after the last refactors! Code-wise, it's mergeable by me.
categoryCombos: { fields: { id: true, categoryOptionCombos: { id: true } } }, | ||
}); | ||
|
||
const data = await metadata$.getData(); |
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.
const { dataSets } = ...
if (groups) { | ||
return { dataElementId: groups[2], categoryOptionComboId: groups[4] }; | ||
} | ||
}); |
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.
map + compact to remove undefined values.
i18n.t("does not exist in dataset with UID:") + | ||
" " + | ||
id | ||
); |
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.
i18n.t interpolation with {{ var }}
@@ -0,0 +1,3 @@ | |||
export interface DataSetsRepository { | |||
validate(id: string): Promise<string[]>; |
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.
validateCustomForm
<Typography variant="h5">{i18n.t("Result:")}</Typography> | ||
</div> | ||
|
||
{_.map(errors, item => { |
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.
errors.map is ok to use
📌 References
📝 Implementation
🎨 Screenshots
🔥 Notes to the tester
To see some errors you could deassign some dataelements from the modules, and change the categoryoptioncombo of some dataelements