Skip to content

Commit

Permalink
avniproject#1219|DEA fail if no duration option is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
shraddha761 committed Jun 17, 2024
1 parent 33a6591 commit 04b51cc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/formDesigner/views/FormDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,15 @@ 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()) {
fe.rule = declarativeRuleHolder.generateViewFilterRule(this.getEntityNameForRules());
}
Expand Down

0 comments on commit 04b51cc

Please sign in to comment.