add is not operand on numeric fields (#16299)

closes https://github.com/twentyhq/twenty/issues/16162
This commit is contained in:
nitin
2025-12-04 18:55:24 +05:30
committed by GitHub
parent 2f36c2e82e
commit f0f648181e
8 changed files with 47 additions and 0 deletions
@@ -17,6 +17,7 @@ describe('getOperandsForFilterType', () => {
const numberOperands = [
RecordFilterOperand.IS,
RecordFilterOperand.IS_NOT,
RecordFilterOperand.GREATER_THAN_OR_EQUAL,
RecordFilterOperand.LESS_THAN_OR_EQUAL,
];
@@ -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,
@@ -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',
@@ -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: