Open
Conversation
Contributor
|
🚀 Deployed on https://pr-538--dhis2-data-entry.netlify.app |
|
tomzemp
commented
Mar 26, 2026
| error || (isRequired && !value && completeAttempted) | ||
| error || | ||
| (isRequired && | ||
| (!value || value?.value === '') && |
Member
Author
There was a problem hiding this comment.
this change is necessary because the value from useValueStore is not actually just a value but also metadata. The intention is that something should be marked as "red" if there's no value, not if the store has metadata details about the value. I think it was probably just a mistake in this file to process the value in this way, but I don't want to go back and review the code in extensive detail in the context of this PR, hence this quick fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



See https://dhis2.atlassian.net/browse/DHIS2-21165
Discussed this from a product behaviour standpoint with Karoline.
Mandatory fields: now highlighted by default after you click "complete" or "run validation" if they are missing values

Warning message for completion with missing mandatory values: even when data sets did not require mandatory fields to be filled out in order to be completed, the old app showed a warning about these missing values for mandatory fields. The new app is also updated to behave in this way:
From a code standpoint, this required a bunch of reorganisation of some code and some logic updates on how errors get reset (so they don't get lost when changing sections), hence scope of code changes is a bit larger than what one might expect from the request.