fix form field create wallet rule
This commit is contained in:
@ -55,7 +55,16 @@ const AddDialog = () => {
|
||||
show: false,
|
||||
message: ''
|
||||
});
|
||||
const initialState = {
|
||||
const initialState: {
|
||||
id_wallet: string;
|
||||
id_group: string;
|
||||
max_transaction_per_day: number | null;
|
||||
balance_minimum: number | null;
|
||||
balance_maximum: number | null;
|
||||
credit_limit: number | null;
|
||||
monthly_limit: number | null;
|
||||
status: string;
|
||||
} = {
|
||||
id_wallet: '',
|
||||
id_group: '',
|
||||
max_transaction_per_day: null,
|
||||
@ -182,9 +191,7 @@ const AddDialog = () => {
|
||||
</label>
|
||||
<Select
|
||||
value={formField.id_wallet}
|
||||
onValueChange={(value) =>
|
||||
setFormField({ ...formField, id_wallet: value })
|
||||
}
|
||||
onValueChange={(value) => setFormField({ ...formField, id_wallet: value })}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select Transaction Type" />
|
||||
@ -249,7 +256,7 @@ const AddDialog = () => {
|
||||
<Input
|
||||
className="input"
|
||||
type="number"
|
||||
value={formField.max_transaction_per_day}
|
||||
value={formField.max_transaction_per_day ?? ''}
|
||||
onChange={(e) =>
|
||||
setFormField({
|
||||
...formField,
|
||||
@ -268,7 +275,7 @@ const AddDialog = () => {
|
||||
<Input
|
||||
className="input"
|
||||
type="number"
|
||||
value={formField.balance_minimum}
|
||||
value={formField.balance_minimum ?? ''}
|
||||
onChange={(e) =>
|
||||
setFormField({ ...formField, balance_minimum: parseInt(e.target.value) })
|
||||
}
|
||||
@ -284,7 +291,7 @@ const AddDialog = () => {
|
||||
<Input
|
||||
className="input"
|
||||
type="number"
|
||||
value={formField.balance_maximum}
|
||||
value={formField.balance_maximum ?? ''}
|
||||
onChange={(e) =>
|
||||
setFormField({ ...formField, balance_maximum: parseInt(e.target.value) })
|
||||
}
|
||||
@ -300,7 +307,7 @@ const AddDialog = () => {
|
||||
<Input
|
||||
className="input"
|
||||
type="number"
|
||||
value={formField.credit_limit}
|
||||
value={formField.credit_limit ?? ''}
|
||||
onChange={(e) =>
|
||||
setFormField({ ...formField, credit_limit: parseInt(e.target.value) })
|
||||
}
|
||||
@ -316,7 +323,7 @@ const AddDialog = () => {
|
||||
<Input
|
||||
className="input"
|
||||
type="number"
|
||||
value={formField.monthly_limit}
|
||||
value={formField.monthly_limit ?? ''}
|
||||
onChange={(e) =>
|
||||
setFormField({ ...formField, monthly_limit: parseInt(e.target.value) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user