Skip to content

Commit

Permalink
Merge pull request #1276 from shraddha761/durationOption
Browse files Browse the repository at this point in the history
Update FormDetails.js
  • Loading branch information
himeshr authored Jul 3, 2024
2 parents f118a4d + 04b2460 commit 4c40486
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/formDesigner/views/FormDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,16 +713,14 @@ class FormDetails extends Component {
if (!_.isEmpty(validationError)) {
fe.errorMessage.ruleError = validationError;
}
} else if (
(fe.concept.dataType === "Date" || fe.concept.dataType === "Duration") &&
(!fe.keyValues.durationOptions || fe.keyValues.durationOptions.length === 0)
) {
fe.error = true;
fe.expanded = true;
fe.errorMessage.durationOptions = true;
flag = groupError = true;
numberElementError += 1;
} else if (!declarativeRuleHolder.isEmpty()) {
} else if (fe.concept.dataType === "Duration") {
if (!fe.keyValues.durationOptions || fe.keyValues.durationOptions.length === 0) {
fe.error = true;
fe.expanded = true;
fe.errorMessage.durationOptions = true;
flag = groupError = true;
numberElementError += 1;
}} else if (!declarativeRuleHolder.isEmpty()) {
fe.rule = declarativeRuleHolder.generateViewFilterRule(this.getEntityNameForRules());
}
});
Expand Down

0 comments on commit 4c40486

Please sign in to comment.