fix: add equal condition to number fields on bank rule

This commit is contained in:
Ahmed Bouhuolia
2024-08-12 20:16:18 +02:00
parent cf4bb3007e
commit c1b29c3f23
3 changed files with 5 additions and 2 deletions

View File

@@ -65,8 +65,10 @@ export interface IBankRuleConditionDTO {
| 'contains' | 'contains'
| 'equals' | 'equals'
| 'not_contains' | 'not_contains'
| 'smaller' | 'equal'
| 'bigger'
| 'bigger_or_equal' | 'bigger_or_equal'
| 'smaller'
| 'smaller_or_equal'; | 'smaller_or_equal';
value: number; value: number;
} }

View File

@@ -1,6 +1,7 @@
// @ts-nocheck // @ts-nocheck
import { useCallback, useMemo } from 'react'; import { useCallback, useMemo } from 'react';
import { Form, Formik, FormikHelpers, useFormikContext } from 'formik'; import { Form, Formik, FormikHelpers, useFormikContext } from 'formik';
import { get } from 'lodash';
import { Button, Classes, Intent, Radio, Tag } from '@blueprintjs/core'; import { Button, Classes, Intent, Radio, Tag } from '@blueprintjs/core';
import * as R from 'ramda'; import * as R from 'ramda';
import { CreateRuleFormSchema } from './RuleFormContentForm.schema'; import { CreateRuleFormSchema } from './RuleFormContentForm.schema';
@@ -34,7 +35,6 @@ import {
import withDialogActions from '@/containers/Dialog/withDialogActions'; import withDialogActions from '@/containers/Dialog/withDialogActions';
import { DialogsName } from '@/constants/dialogs'; import { DialogsName } from '@/constants/dialogs';
import { getAddMoneyInOptions, getAddMoneyOutOptions } from '@/constants'; import { getAddMoneyInOptions, getAddMoneyOutOptions } from '@/constants';
import { get } from 'lodash';
// Retrieves the add money in button options. // Retrieves the add money in button options.
const MoneyInOptions = getAddMoneyInOptions(); const MoneyInOptions = getAddMoneyInOptions();

View File

@@ -49,6 +49,7 @@ export const TextFieldConditions = [
{ value: 'not_contains', text: 'Not Contains' }, { value: 'not_contains', text: 'Not Contains' },
]; ];
export const NumberFieldConditions = [ export const NumberFieldConditions = [
{ value: 'equal', text: 'Equal' },
{ value: 'bigger', text: 'Bigger' }, { value: 'bigger', text: 'Bigger' },
{ value: 'bigger_or_equal', text: 'Bigger or Equal' }, { value: 'bigger_or_equal', text: 'Bigger or Equal' },
{ value: 'smaller', text: 'Smaller' }, { value: 'smaller', text: 'Smaller' },