condition修正

This commit is contained in:
2025-01-26 21:16:34 +09:00
parent e927b9d5af
commit defc671ad3

View File

@@ -23,16 +23,17 @@ type ConditionItem = {
};
export const conditionList: ConditionItem[] = [
{ value: 'eq', label: '=(等しい)', type: 'input' },
{ value: 'ne', label: '≠ (等しくない)', type: 'input' },
{ value: 'le', label: (field) => isDateTimeType(field) ? '≦ (以前)' : '≦ (以下)', type: 'input' },
{ value: 'lt', label: '< (より前)', type: 'input' },
{ value: 'gt', label: '> (より後)', type: 'input' },
{ value: 'ge', label: (field) => isDateTimeType(field) ? '≧ (以降)' : '≧ (以上)', type: 'input' },
{ value: 'contains', label: '次のいずれかを含む', type: 'input' },
{ value: 'not_contain', label: '次のいずれも含まない', type: 'input' },
{ value: '=', label: '=(等しい)', type: 'input' },
{ value: '!=', label: '≠ (等しくない)', type: 'input' },
{ value: '<=', label: (field) => isDateTimeType(field) ? '≦ (以前)' : '≦ (以下)', type: 'input' },
{ value: '<', label: '< (より前)', type: 'input' },
{ value: '>', label: '> (より後)', type: 'input' },
{ value: '>=', label: (field) => isDateTimeType(field) ? '≧ (以降)' : '≧ (以上)', type: 'input' },
{ value: 'like', label: '次のキーワードを含む', type: 'input' },
{ value: 'not like', label: '次のキーワードを含まない', type: 'input' },
{ value: 'in', label: '次のいずれかを含む', type: 'input' },
{ value: 'not in', label: '次のいずれも含まない', type: 'input' },
];
// search from conditionList
// conditionItem = conditionMap[conditionValue]
export const conditionMap: Record<ConditionValue, ConditionItem> = conditionList.reduce(