diff --git a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx index 0ae10ec5..986d573e 100644 --- a/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx +++ b/src/front/Components/DesignSystem/Document/DocumentNotary/index.tsx @@ -58,7 +58,9 @@ class DocumentNotaryClass extends React.Component { return fileName; } } else { - return `${documentFiles.length} documents déposés`; + const archivedFilesLenght = documentFiles.filter((file) => file.archived_at).length; + const documentFileLenght = documentFiles.length - archivedFilesLenght; + return `${documentFileLenght} documents déposés`; } } else { return "Aucun document déposé"; @@ -66,7 +68,11 @@ class DocumentNotaryClass extends React.Component { } private onClick() { - if (this.props.document.document_status !== EDocumentStatus.VALIDATED && this.props.document.document_status !== EDocumentStatus.DEPOSITED) return; + if ( + this.props.document.document_status !== EDocumentStatus.VALIDATED && + this.props.document.document_status !== EDocumentStatus.DEPOSITED + ) + return; this.props.router.push(`/folders/${this.props.folderUid}/documents/${this.props.document.uid}`); }