From 56bc8d6113ad81ecfefd7408a699ad0ede0ce62a Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 11 May 2023 19:32:32 +0200 Subject: [PATCH] :bug: Minor fixes --- .../DesignSystem/Document/DocumentNotary/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx index 986d573e..5e4bfbf3 100644 --- a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx +++ b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx @@ -58,9 +58,13 @@ class DocumentNotaryClass extends React.Component { return fileName; } } else { - const archivedFilesLenght = documentFiles.filter((file) => file.archived_at).length; - const documentFileLenght = documentFiles.length - archivedFilesLenght; - return `${documentFileLenght} documents déposés`; + const archivedFilesLength = documentFiles.filter((file) => file.archived_at).length; + const documentFileLength = documentFiles.length - archivedFilesLength; + if(this.props.document.document_status === EDocumentStatus.ASKED || this.props.document.document_status === EDocumentStatus.REFUSED){ + return 'Aucun document déposé'; + } + + return `${documentFileLength} documents déposés`; } } else { return "Aucun document déposé";