From d781d391241746be086db7dbef6d5361c735de6c Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 25 Apr 2021 00:19:38 +0300 Subject: fix: add missing accountId field --- src/services/transfers/TransferForm.tsx | 1 + src/services/types.ts | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/services/transfers/TransferForm.tsx b/src/services/transfers/TransferForm.tsx index a10630a..6092aa8 100644 --- a/src/services/transfers/TransferForm.tsx +++ b/src/services/transfers/TransferForm.tsx @@ -16,6 +16,7 @@ const TransferForm: React.FC> = ({ setFieldValue, values } if (!values.date) setFieldValue('date', moment().format('YYYY-MM-DD')); if (!values.contractorId && contractors?.length) setFieldValue('contractorId', contractors[0]._id); + if (!values.accountId && accounts?.length) setFieldValue('accountId', accounts[0]._id); return (
diff --git a/src/services/types.ts b/src/services/types.ts index 228bc4d..5c0ba55 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -28,6 +28,7 @@ export interface Transfer extends BaseModel { date: string; operation: 'in' | 'out'; contractorId: string; + accountId: string; amount: number; contractor?: Contractor; } -- cgit v1.2.3