Skip to content

Commit

Permalink
fix: allow select input for comparison value on Checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Oct 7, 2024
1 parent 806f2ec commit bcec227
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/admin/ppom-admin.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// @ts-check
"use strict";

const FIELD_COMPATIBLE_WITH_SELECT_OPTIONS = [ 'select', 'radio', 'switcher', 'image','conditional_meta'];
const FIELD_COMPATIBLE_WITH_SELECT_OPTIONS = [ 'select', 'radio', 'switcher', 'image', 'conditional_meta' ];
const OPERATOR_COMPARISON_VALUE_FIELD_TYPE = {
'select': FIELD_COMPATIBLE_WITH_SELECT_OPTIONS,
'select': [...FIELD_COMPATIBLE_WITH_SELECT_OPTIONS, 'checkbox'],
}
const COMPARISON_VALUE_CAN_USE_SELECT = [ 'is', 'not', 'greater than', 'less than' ];
const HIDE_COMPARISON_INPUT_FIELD = ['any', 'empty', 'odd-number', 'even-number'];
const FIELDS_COMPATIBLE_WITH_TEXT = [ 'text', 'textarea', 'date', 'email' ]
const FIELDS_COMPATIBLE_WITH_NUMBERS = [ ...FIELD_COMPATIBLE_WITH_SELECT_OPTIONS, 'number' ];
const OPERATORS_FIELD_COMPATIBILITY = {
'is': [...FIELD_COMPATIBLE_WITH_SELECT_OPTIONS, ...FIELDS_COMPATIBLE_WITH_TEXT, ...FIELDS_COMPATIBLE_WITH_NUMBERS, 'checkbox',],
'is': [...FIELD_COMPATIBLE_WITH_SELECT_OPTIONS, ...FIELDS_COMPATIBLE_WITH_TEXT, ...FIELDS_COMPATIBLE_WITH_NUMBERS, 'checkbox'],
'not': [...FIELD_COMPATIBLE_WITH_SELECT_OPTIONS, ...FIELDS_COMPATIBLE_WITH_TEXT, ...FIELDS_COMPATIBLE_WITH_NUMBERS, 'checkbox'],
'greater than': FIELDS_COMPATIBLE_WITH_NUMBERS,
'less than': FIELDS_COMPATIBLE_WITH_NUMBERS,
Expand Down

0 comments on commit bcec227

Please sign in to comment.