summaryrefslogtreecommitdiff
path: root/src/services/waybills/WaybillForm.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/waybills/WaybillForm.tsx')
-rw-r--r--src/services/waybills/WaybillForm.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/services/waybills/WaybillForm.tsx b/src/services/waybills/WaybillForm.tsx
index c11ab9e..613989f 100644
--- a/src/services/waybills/WaybillForm.tsx
+++ b/src/services/waybills/WaybillForm.tsx
@@ -7,12 +7,13 @@ import Button from '../../components/Button';
import Select from '../../components/Select';
import Paper from '../../components/Paper';
import hooks from '../../hooks/useAPIClient';
+import { Product, Contractor, Waybill } from '../types';
-const mapper = (item: any) => ({ key: item._id, label: item.name });
+const mapper = (item: Product | Contractor) => ({ key: item._id, label: item.name });
-const WaybillForm: React.FC<FormikProps<any>> = ({ setFieldValue, values }) => {
+const WaybillForm: React.FC<FormikProps<Waybill>> = ({ setFieldValue, values }) => {
const { data: products } = hooks.products.useList();
const { data: contractors } = hooks.contractors.useList();
@@ -51,7 +52,7 @@ const WaybillForm: React.FC<FormikProps<any>> = ({ setFieldValue, values }) => {
/>
<Input name="date" type="date" label="Дата" />
</div>
- {values.records.map((record: any, index: number) => (
+ {values.records.map((record, index) => (
<Paper variant="outlined" className="my-4 md:mx-4" key={`${index}-${record.productId}`}>
<Select
name={`records.${index}.productId`}