diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts index 72188423..2f74e8fd 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts @@ -1,4 +1,4 @@ -import { Document } from "le-coffre-resources/dist/SuperAdmin"; +import { Document, DocumentHistory } from "le-coffre-resources/dist/SuperAdmin"; import { Service } from "typedi"; import BaseSuperAdmin from "../BaseSuperAdmin"; @@ -14,7 +14,7 @@ export interface IGetDocumentsparams { export type IPutDocumentsParams = { document_status?: EDocumentStatus; - refused_reason?: string; + document_history?: Partial; }; export interface IPostDocumentsParams {} diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index 0c76aa41..a266ad95 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -249,7 +249,9 @@ class ViewDocumentsClass extends BasePage { try{ await Documents.getInstance().put(this.props.documentUid, { document_status: EDocumentStatus.REFUSED, - refused_reason: this.state.refuseText, + document_history: { + refused_reason: this.state.refuseText, + } }); this.props.router.push(