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