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