From 584ba9088407ef3154d8c15c2f8a452c6868a9e1 Mon Sep 17 00:00:00 2001 From: luciatugui Date: Fri, 20 Sep 2024 11:54:30 +0300 Subject: [PATCH] fix: ContractTemplatePreview --- .../common/interfaces/document-contract.interface.ts | 1 - frontend/src/common/interfaces/template.interface.ts | 1 - .../components/contracts/ContractTemplatePreview.tsx | 10 +++++++++- frontend/src/pages/GenerateContract.tsx | 2 -- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/common/interfaces/document-contract.interface.ts b/frontend/src/common/interfaces/document-contract.interface.ts index dd41497d..944a84a0 100644 --- a/frontend/src/common/interfaces/document-contract.interface.ts +++ b/frontend/src/common/interfaces/document-contract.interface.ts @@ -5,5 +5,4 @@ export interface IAddDocumentContractDTO { documentEndDate: Date; volunteerId: string; documentTemplateId: string; - status: 'CREATED'; } diff --git a/frontend/src/common/interfaces/template.interface.ts b/frontend/src/common/interfaces/template.interface.ts index adc2f6f8..5587a076 100644 --- a/frontend/src/common/interfaces/template.interface.ts +++ b/frontend/src/common/interfaces/template.interface.ts @@ -1,4 +1,3 @@ -import { IOrganization } from './organization.interface'; import { IUser } from './user.interface'; export interface ITemplate { diff --git a/frontend/src/components/contracts/ContractTemplatePreview.tsx b/frontend/src/components/contracts/ContractTemplatePreview.tsx index e3b5c5c6..dd25fde4 100644 --- a/frontend/src/components/contracts/ContractTemplatePreview.tsx +++ b/frontend/src/components/contracts/ContractTemplatePreview.tsx @@ -158,7 +158,15 @@ export const ContractTemplatePreview = ({ getValues={getValues} formErrors={formErrors} /> - + ); }; diff --git a/frontend/src/pages/GenerateContract.tsx b/frontend/src/pages/GenerateContract.tsx index 51d6e699..bdbc2ce1 100644 --- a/frontend/src/pages/GenerateContract.tsx +++ b/frontend/src/pages/GenerateContract.tsx @@ -119,8 +119,6 @@ export const GenerateContract = () => { documentDate: volunteersData[volunteer.id].documentDate, documentStartDate: volunteersData[volunteer.id].documentPeriod[0], documentEndDate: volunteersData[volunteer.id].documentPeriod[1], - // todo: delete - status: volunteer.id === '907e1016-2d76-45d5-b274-549ae5b3ca13' ? 'CREATED' : '', // TODO: change to status enum value }); success.push(volunteer.id); setSentContractsCount((prev) => prev + 1);