Skip to content

Commit

Permalink
fix(dataset): Assures that catcombo and workflow do not have incompat…
Browse files Browse the repository at this point in the history
…ible values
  • Loading branch information
benguaraldi committed Jul 27, 2024
1 parent 480c84b commit ba88b2e
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/config/field-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,20 @@ export default new Map([
type: 'HIDE_FIELD',
}]
},
{
field: 'categoryCombo',
when: {
field: 'workflow',
operator: 'HAS_VALUE',
},
operations: [{
field: 'categoryCombo',
type: 'SET_PROP',
propName: 'disabled',
thenValue: true,
elseValue: false,
}]
},
{
field: 'workflow',
when: [{
Expand All @@ -956,21 +970,6 @@ export default new Map([
return;
}
}
}],
},
{
field: 'workflow',
when: {
field: 'categoryCombo',
operator: 'CHANGE_VALUE',
},
operations: [{
type: 'CHANGE_VALUE',
setValue: (model, fieldConfig) => {
if (fieldConfig) {
fieldConfig.value = model[fieldConfig.name] = {};
}
}
}]
},
]],
Expand Down

0 comments on commit ba88b2e

Please sign in to comment.