Compare commits

..

4 Commits

Author SHA1 Message Date
Sosthene
c422fef776 Log as client (no verification) 2025-08-11 10:09:00 +02:00
3899cf1a53 Merge pull request 'backport_legacy_fix' (#19) from backport_legacy_fix into dev
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 3m56s
Reviewed-on: #19
2025-08-11 08:07:51 +00:00
Sosthene
8aa82f3a9c [bug] Don't count refused documents on progress bar for a folder 2025-08-07 17:54:46 +02:00
Sosthene
6e86e65845 Fix typo on main page 2025-08-07 17:53:09 +02:00
3 changed files with 9 additions and 6 deletions

View File

@ -438,10 +438,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 />;

View File

@ -48,9 +48,11 @@ export default function FolderInformation(props: IProps) {
let total = 0;
let validatedDocuments = 0;
folder?.customers?.forEach((customer: any) => {
const documents = customer.documents.filter((document: any) => document.depositor);
total += documents?.length ?? 0;
validatedDocuments += documents?.filter((document: any) => document.document_status === EDocumentStatus.VALIDATED).length ?? 0;
const documents = customer.documents;
// Only count documents that are not refused (still in progress)
const activeDocuments = documents?.filter((document: any) => document.document_status !== EDocumentStatus.REFUSED) ?? [];
total += activeDocuments.length;
validatedDocuments += activeDocuments.filter((document: any) => document.document_status === EDocumentStatus.VALIDATED).length;
});
if (total === 0) return 0;
const percentage = (validatedDocuments / total) * 100;

View File

@ -89,7 +89,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