|
|
@ -1,17 +1,7 @@ |
|
|
|
import { UITypes } from 'nocodb-sdk' |
|
|
|
import { isNumericCol, numericUITypes, UITypes } from 'nocodb-sdk' |
|
|
|
|
|
|
|
|
|
|
|
const numericUITypes: UITypes[] = [ |
|
|
|
|
|
|
|
UITypes.Duration, |
|
|
|
|
|
|
|
UITypes.Currency, |
|
|
|
|
|
|
|
UITypes.Percent, |
|
|
|
|
|
|
|
UITypes.Number, |
|
|
|
|
|
|
|
UITypes.Decimal, |
|
|
|
|
|
|
|
UITypes.Rating, |
|
|
|
|
|
|
|
UITypes.Rollup, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getEqText = (fieldUiType: UITypes) => { |
|
|
|
const getEqText = (fieldUiType: UITypes) => { |
|
|
|
if (numericUITypes.includes(fieldUiType)) { |
|
|
|
if (isNumericCol(fieldUiType)) { |
|
|
|
return '=' |
|
|
|
return '=' |
|
|
|
} else if ([UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord].includes(fieldUiType)) { |
|
|
|
} else if ([UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord].includes(fieldUiType)) { |
|
|
|
return 'is' |
|
|
|
return 'is' |
|
|
@ -20,7 +10,7 @@ const getEqText = (fieldUiType: UITypes) => { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const getNeqText = (fieldUiType: UITypes) => { |
|
|
|
const getNeqText = (fieldUiType: UITypes) => { |
|
|
|
if (numericUITypes.includes(fieldUiType)) { |
|
|
|
if (isNumericCol(fieldUiType)) { |
|
|
|
return '!=' |
|
|
|
return '!=' |
|
|
|
} else if ([UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord].includes(fieldUiType)) { |
|
|
|
} else if ([UITypes.SingleSelect, UITypes.Collaborator, UITypes.LinkToAnotherRecord].includes(fieldUiType)) { |
|
|
|
return 'is not' |
|
|
|
return 'is not' |
|
|
|