From 3348f3ddca3cec7b30167e7c8e928bc4e706337b Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Fri, 15 Dec 2023 15:32:31 +0100 Subject: [PATCH] :bug: Small fixes --- .../Document/DocumentNotary/index.tsx | 5 ++-- .../Layouts/Folder/AskDocuments/index.tsx | 23 +++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx index 974857fc..4e6e7c70 100644 --- a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx +++ b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx @@ -52,7 +52,6 @@ class DocumentNotaryClass extends React.Component { private getDocumentsTitle() { const documentFiles = this.props.document.files?.filter((file) => !file.archived_at); if (documentFiles) { - console.log(this.props.document); if ( documentFiles.length === 1 && (this.props.document.document_status === EDocumentStatus.VALIDATED || @@ -60,7 +59,7 @@ class DocumentNotaryClass extends React.Component { ) { const fileName = documentFiles[0]?.file_path?.split("/").pop(); if (fileName && fileName.length > 20) { - return `${fileName.substring(0, 7)}...${fileName.substring(fileName.length - 7, fileName.length)}`; + return `Nombre de documents : 1`; } else { return fileName; } @@ -74,7 +73,7 @@ class DocumentNotaryClass extends React.Component { return "Aucun document déposé"; } - return `${documentFileLength} documents déposés`; + return `Nombre de documents : ${documentFileLength}`; } } else { return "Aucun document déposé"; diff --git a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx index 9e62b3e3..6a6c75b8 100644 --- a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx @@ -59,14 +59,19 @@ class AskDocumentsClass extends BasePage {
- {this.state.documentTypes.map((documentType) => ( - - ))} + {this.state.documentTypes.map((documentType) => { + if (documentType.description && documentType.description.length > 1) { + return ( + + ); + } + return ; + })}