Compare commits
No commits in common. "3899cf1a5324a2f1f7bef5e58f5484b1a9b15a4a" and "87976783a352e85668268a25382de1091831cc39" have entirely different histories.
3899cf1a53
...
87976783a3
@ -438,11 +438,10 @@ export default function DocumentTables(props: IProps) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const progress = useMemo(() => {
|
const progress = useMemo(() => {
|
||||||
// Exclude refused documents from total - only count documents that are still in progress
|
const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length + refusedDocuments.length;
|
||||||
const total = askedDocuments.length + toValidateDocuments.length + validatedDocuments.length;
|
|
||||||
if (total === 0) return 0;
|
if (total === 0) return 0;
|
||||||
return (validatedDocuments.length / total) * 100;
|
return (validatedDocuments.length / total) * 100;
|
||||||
}, [askedDocuments.length, toValidateDocuments.length, validatedDocuments.length]);
|
}, [askedDocuments.length, refusedDocuments.length, toValidateDocuments.length, validatedDocuments.length]);
|
||||||
|
|
||||||
if (documents.length === 0 && documentsNotary.length === 0) return <NoDocument />;
|
if (documents.length === 0 && documentsNotary.length === 0) return <NoDocument />;
|
||||||
|
|
||||||
|
@ -48,11 +48,9 @@ export default function FolderInformation(props: IProps) {
|
|||||||
let total = 0;
|
let total = 0;
|
||||||
let validatedDocuments = 0;
|
let validatedDocuments = 0;
|
||||||
folder?.customers?.forEach((customer: any) => {
|
folder?.customers?.forEach((customer: any) => {
|
||||||
const documents = customer.documents;
|
const documents = customer.documents.filter((document: any) => document.depositor);
|
||||||
// Only count documents that are not refused (still in progress)
|
total += documents?.length ?? 0;
|
||||||
const activeDocuments = documents?.filter((document: any) => document.document_status !== EDocumentStatus.REFUSED) ?? [];
|
validatedDocuments += documents?.filter((document: any) => document.document_status === EDocumentStatus.VALIDATED).length ?? 0;
|
||||||
total += activeDocuments.length;
|
|
||||||
validatedDocuments += activeDocuments.filter((document: any) => document.document_status === EDocumentStatus.VALIDATED).length;
|
|
||||||
});
|
});
|
||||||
if (total === 0) return 0;
|
if (total === 0) return 0;
|
||||||
const percentage = (validatedDocuments / total) * 100;
|
const percentage = (validatedDocuments / total) * 100;
|
||||||
|
@ -89,7 +89,7 @@ export default function StepEmail(props: IProps) {
|
|||||||
<div className={classes["content"]}>
|
<div className={classes["content"]}>
|
||||||
<div className={classes["section"]}>
|
<div className={classes["section"]}>
|
||||||
<Typography typo={ETypo.TITLE_H6} color={ETypoColor.TEXT_ACCENT} className={classes["section-title"]}>
|
<Typography typo={ETypo.TITLE_H6} color={ETypoColor.TEXT_ACCENT} className={classes["section-title"]}>
|
||||||
Pour les notaires et les collaborateurs :
|
Pour les notaires et les colaborateurs :
|
||||||
</Typography>
|
</Typography>
|
||||||
<Button onClick={redirectUserOnConnection} rightIcon={<Image alt="id-not-logo" src={idNoteLogo} />}>
|
<Button onClick={redirectUserOnConnection} rightIcon={<Image alt="id-not-logo" src={idNoteLogo} />}>
|
||||||
S'identifier avec ID.not
|
S'identifier avec ID.not
|
||||||
|
Loading…
x
Reference in New Issue
Block a user