Refactor checkbox condition logic with new operators
- Replace legacy 'equals' and 'does_not_equal' checkbox operators with 'is_checked' and 'is_not_checked' - Update FormLogicConditionChecker in PHP and JavaScript to handle new operators - Modify open_filters.json to reflect new checkbox comparator structure - Add migration logic in ColumnCondition.vue to support legacy operator conversion - Improve checkbox condition handling with explicit true/false checks
This commit is contained in:
@@ -332,10 +332,15 @@ function numberConditionMet(propertyCondition, value) {
|
||||
|
||||
function checkboxConditionMet(propertyCondition, value) {
|
||||
switch (propertyCondition.operator) {
|
||||
case "is_checked":
|
||||
return value === true
|
||||
case "is_not_checked":
|
||||
return value === false
|
||||
// Legacy operators
|
||||
case "equals":
|
||||
return checkEquals(propertyCondition, value)
|
||||
return value === true
|
||||
case "does_not_equal":
|
||||
return !checkEquals(propertyCondition, value)
|
||||
return value === false
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user