fix create Wallet
- change `currency_id` to `id_currency`
This commit is contained in:
@ -55,13 +55,13 @@ const AddDialog = () => {
|
|||||||
description: string;
|
description: string;
|
||||||
status: string;
|
status: string;
|
||||||
group: string[];
|
group: string[];
|
||||||
currency_id: string;
|
id_currency: string;
|
||||||
} = {
|
} = {
|
||||||
name: '',
|
name: '',
|
||||||
description: '',
|
description: '',
|
||||||
status: '',
|
status: '',
|
||||||
group: [],
|
group: [],
|
||||||
currency_id: ''
|
id_currency: ''
|
||||||
};
|
};
|
||||||
const [formField, setFormField] = useState(initialState);
|
const [formField, setFormField] = useState(initialState);
|
||||||
const [currencies, setCurrencies] = useState<CurrencyProps[]>([]);
|
const [currencies, setCurrencies] = useState<CurrencyProps[]>([]);
|
||||||
@ -126,7 +126,7 @@ const AddDialog = () => {
|
|||||||
formField.description.trim() === '' ||
|
formField.description.trim() === '' ||
|
||||||
formField.status.trim() === '' ||
|
formField.status.trim() === '' ||
|
||||||
formField.group.length === 0 ||
|
formField.group.length === 0 ||
|
||||||
formField.currency_id.trim() === ''
|
formField.id_currency.trim() === ''
|
||||||
) {
|
) {
|
||||||
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
setAlert({ show: true, message: 'Please fill in all required fields.' });
|
||||||
return;
|
return;
|
||||||
@ -251,8 +251,8 @@ const AddDialog = () => {
|
|||||||
Currency<span className="text-red-500">*</span>
|
Currency<span className="text-red-500">*</span>
|
||||||
</label>
|
</label>
|
||||||
<Select
|
<Select
|
||||||
value={formField.currency_id}
|
value={formField.id_currency}
|
||||||
onValueChange={(value) => setFormField({ ...formField, currency_id: value })}
|
onValueChange={(value) => setFormField({ ...formField, id_currency: value })}
|
||||||
>
|
>
|
||||||
<SelectTrigger>
|
<SelectTrigger>
|
||||||
<SelectValue placeholder="Select Currency Type" />
|
<SelectValue placeholder="Select Currency Type" />
|
||||||
|
|||||||
Reference in New Issue
Block a user