Compare commits
2 Commits
b6da6db0fe
...
bb370900bd
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bb370900bd | ||
![]() |
7065f07373 |
@ -313,10 +313,11 @@ export default function DocumentTables(props: IProps) {
|
||||
);
|
||||
|
||||
const progress = useMemo(() => {
|
||||
const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length + refusedDocuments.length;
|
||||
// Exclude refused documents from total - only count documents that are still in progress
|
||||
const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length;
|
||||
if (total === 0) return 0;
|
||||
return (validatedDocuments.length / total) * 100;
|
||||
}, [askedDocuments.length, refusedDocuments.length, toValidateDocuments.length, validatedDocuments.length]);
|
||||
}, [askedDocuments.length, toValidateDocuments.length, validatedDocuments.length]);
|
||||
|
||||
if (documents.length === 0 && documentsNotary.length === 0) return <NoDocument />;
|
||||
|
||||
|
@ -47,8 +47,10 @@ export default function FolderInformation(props: IProps) {
|
||||
let validatedDocuments = 0;
|
||||
folder?.customers?.forEach((customer) => {
|
||||
const documents = customer.documents;
|
||||
total += documents?.length ?? 0;
|
||||
validatedDocuments += documents?.filter((document) => document.document_status === EDocumentStatus.VALIDATED).length ?? 0;
|
||||
// Only count documents that are not refused (still in progress)
|
||||
const activeDocuments = documents?.filter((document) => document.document_status !== EDocumentStatus.REFUSED) ?? [];
|
||||
total += activeDocuments.length;
|
||||
validatedDocuments += activeDocuments.filter((document) => document.document_status === EDocumentStatus.VALIDATED).length;
|
||||
});
|
||||
if (total === 0) return 0;
|
||||
const percentage = (validatedDocuments / total) * 100;
|
||||
|
@ -83,7 +83,7 @@ export default function StepEmail(props: IProps) {
|
||||
<div className={classes["content"]}>
|
||||
<div className={classes["section"]}>
|
||||
<Typography typo={ETypo.TITLE_H6} color={ETypoColor.TEXT_ACCENT} className={classes["section-title"]}>
|
||||
Pour les notaires et les colaborateurs :
|
||||
Pour les notaires et les collaborateurs :
|
||||
</Typography>
|
||||
<Button onClick={redirectUserOnConnection} rightIcon={<Image alt="id-not-logo" src={idNoteLogo} />}>
|
||||
S'identifier avec ID.not
|
||||
|
Loading…
x
Reference in New Issue
Block a user