diff options
Diffstat (limited to 'src/services/transfers')
-rw-r--r-- | src/services/transfers/TransferForm.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/services/transfers/TransferForm.tsx b/src/services/transfers/TransferForm.tsx index 92846a3..a10630a 100644 --- a/src/services/transfers/TransferForm.tsx +++ b/src/services/transfers/TransferForm.tsx @@ -12,20 +12,27 @@ const mapper = (item: Contractor) => ({ key: item._id, label: item.name }); const TransferForm: React.FC<FormikProps<Transfer>> = ({ setFieldValue, values }) => { const { data: contractors } = hooks.contractors.useList(); + const { data: accounts } = hooks.accounts.useList(); if (!values.date) setFieldValue('date', moment().format('YYYY-MM-DD')); if (!values.contractorId && contractors?.length) setFieldValue('contractorId', contractors[0]._id); return ( <Form id="form"> + <Input name="date" type="date" label="Дата" required /> <div className="grid grid-cols-2"> <Select + name="accountId" + label="Счёт" + options={accounts?.map(mapper)} + required + /> + <Select name="contractorId" label="Контрагент" options={contractors?.map(mapper)} required /> - <Input name="date" type="date" label="Дата" required /> </div> <div className="grid grid-cols-2"> <Select |