add is not operand on numeric fields (#16299)
closes https://github.com/twentyhq/twenty/issues/16162
This commit is contained in:
+1
@@ -17,6 +17,7 @@ describe('getOperandsForFilterType', () => {
|
||||
|
||||
const numberOperands = [
|
||||
RecordFilterOperand.IS,
|
||||
RecordFilterOperand.IS_NOT,
|
||||
RecordFilterOperand.GREATER_THAN_OR_EQUAL,
|
||||
RecordFilterOperand.LESS_THAN_OR_EQUAL,
|
||||
];
|
||||
|
||||
+1
@@ -74,6 +74,7 @@ export const FILTER_OPERANDS_MAP = {
|
||||
],
|
||||
NUMBER: [
|
||||
RecordFilterOperand.IS,
|
||||
RecordFilterOperand.IS_NOT,
|
||||
RecordFilterOperand.GREATER_THAN_OR_EQUAL,
|
||||
RecordFilterOperand.LESS_THAN_OR_EQUAL,
|
||||
...emptyOperands,
|
||||
|
||||
+5
@@ -139,6 +139,11 @@ describe('buildValueFromFilter', () => {
|
||||
value: '5',
|
||||
expected: 5,
|
||||
},
|
||||
{
|
||||
operand: ViewFilterOperand.IS_NOT,
|
||||
value: '5',
|
||||
expected: undefined,
|
||||
},
|
||||
{
|
||||
operand: ViewFilterOperand.GREATER_THAN_OR_EQUAL,
|
||||
value: '5',
|
||||
|
||||
+2
@@ -159,6 +159,8 @@ const computeValueFromFilterNumber = (
|
||||
return Number(value);
|
||||
case ViewFilterOperand.IS:
|
||||
return Number(value);
|
||||
case ViewFilterOperand.IS_NOT:
|
||||
return undefined;
|
||||
case ViewFilterOperand.IS_EMPTY:
|
||||
return undefined;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user