From b0e2aedddee6466bcc45f2a167555478fdf4009d Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Fri, 12 May 2023 14:32:27 +0200 Subject: [PATCH] :bug: Fix asked documents --- .../Components/Layouts/Folder/AskDocuments/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx index 6131e875..efd7ad66 100644 --- a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx @@ -275,7 +275,7 @@ class AskDocumentsClass extends BasePage { ) { try { const documentAsked: [] = values["document_types"] as []; - await documentAsked.forEach(async (document) => { + for(let i = 0; i < documentAsked.length; i++){ await Documents.getInstance().post({ folder: { uid: this.props.folderUid, @@ -284,11 +284,11 @@ class AskDocumentsClass extends BasePage { uid: this.props.customerUid, }, document_type: { - uid: document, + uid: documentAsked[i], }, }); - }); - + } + this.props.router.push( Module.getInstance() .get()