From 486eacf686ae7fec1da1e5125a76dab99360936c Mon Sep 17 00:00:00 2001 From: Max S Date: Wed, 18 Sep 2024 14:37:31 +0200 Subject: [PATCH 1/5] :sparkles: refonte client dashboard + responsive --- .../DesignSystem/Button/classes.module.scss | 1 - .../NotificationBox/classes.module.scss | 29 ++++ .../DesignSystem/NotificationBox/index.tsx | 40 +++++ .../Components/Elements/ContactBox/index.tsx | 3 +- .../ContactBox/classes.module.scss | 37 +++++ .../ClientDashboard/ContactBox/index.tsx | 116 +++++++++++++ .../classes.module.scss | 6 + .../ClientDashboard/classes.module.scss | 54 ++++-- .../Layouts/ClientDashboard/index.tsx | 157 ++++++++---------- 9 files changed, 334 insertions(+), 109 deletions(-) create mode 100644 src/front/Components/DesignSystem/NotificationBox/classes.module.scss create mode 100644 src/front/Components/DesignSystem/NotificationBox/index.tsx create mode 100644 src/front/Components/Layouts/ClientDashboard/ContactBox/classes.module.scss create mode 100644 src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx diff --git a/src/front/Components/DesignSystem/Button/classes.module.scss b/src/front/Components/DesignSystem/Button/classes.module.scss index 1ef3abbf..b651239d 100644 --- a/src/front/Components/DesignSystem/Button/classes.module.scss +++ b/src/front/Components/DesignSystem/Button/classes.module.scss @@ -700,7 +700,6 @@ */ &[fullwidthattr="true"] { width: 100%; - flex: 1; } &[fullwidthattr="false"] { diff --git a/src/front/Components/DesignSystem/NotificationBox/classes.module.scss b/src/front/Components/DesignSystem/NotificationBox/classes.module.scss new file mode 100644 index 00000000..f562eedb --- /dev/null +++ b/src/front/Components/DesignSystem/NotificationBox/classes.module.scss @@ -0,0 +1,29 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + align-items: center; + gap: var(--spacing-md, 16px); + + width: 355px; + padding: var(--spacing-sm, 8px) var(--spacing-md, 16px); + + border-radius: var(--notification-radius, 8px); + + .content { + display: flex; + flex-direction: column; + gap: var(--spacing-md, 16px); + } + + &:hover { + background: var(--neutral-weak-higlight, #f7f8f8); + } + + &.unread { + background: var(--notification-unread-default, #fff3ed); + &:hover { + background: var(--notification-unread-hovered, #ffe4d4); + } + } +} diff --git a/src/front/Components/DesignSystem/NotificationBox/index.tsx b/src/front/Components/DesignSystem/NotificationBox/index.tsx new file mode 100644 index 00000000..7c4299a4 --- /dev/null +++ b/src/front/Components/DesignSystem/NotificationBox/index.tsx @@ -0,0 +1,40 @@ +import classNames from "classnames"; +import React from "react"; + +import Typography, { ETypo, ETypoColor } from "../Typography"; +import classes from "./classes.module.scss"; +import Button, { EButtonSize, EButtonstyletype, EButtonVariant, IButtonProps } from "../Button"; + +type IProps = { + text: string; + read: boolean; + button: IButtonProps; + className?: string; +}; + +export default function NotificationBox(props: IProps) { + const { className, text, button, read } = props; + + return ( +
+
+ + {text} + + +
+ + {!read && ( + + + + )} +
+ ); +} diff --git a/src/front/Components/Elements/ContactBox/index.tsx b/src/front/Components/Elements/ContactBox/index.tsx index a898e169..73dd1842 100644 --- a/src/front/Components/Elements/ContactBox/index.tsx +++ b/src/front/Components/Elements/ContactBox/index.tsx @@ -1,11 +1,10 @@ import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import { Contact as ContactCustomer, Note } from "le-coffre-resources/dist/Customer"; -import { Contact as ContactNotary } from "le-coffre-resources/dist/Notary"; import classes from "./classes.module.scss"; type IProps = { - contact: ContactCustomer | ContactNotary; + contact: ContactCustomer; note: Note | null; }; diff --git a/src/front/Components/Layouts/ClientDashboard/ContactBox/classes.module.scss b/src/front/Components/Layouts/ClientDashboard/ContactBox/classes.module.scss new file mode 100644 index 00000000..f6b53440 --- /dev/null +++ b/src/front/Components/Layouts/ClientDashboard/ContactBox/classes.module.scss @@ -0,0 +1,37 @@ +@import "@Themes/constants.scss"; + +.root { + width: 100%; + display: flex; + justify-content: space-between; + + padding: var(--spacing-md, 16px); + gap: var(--spacing-md, 16px); + + background: var(--primary-weak-higlight, #e5eefa); + + .left { + display: flex; + flex-direction: column; + gap: var(--spacing-md, 16px); + + .note-and-rib-button { + display: none; + + @media screen and (max-width: $screen-s) { + display: block; + } + } + } + + .right { + margin-right: var(--spacing-xl, 32px); + display: flex; + flex-direction: column; + gap: var(--spacing-md, 16px); + + @media screen and (max-width: $screen-s) { + display: none; + } + } +} diff --git a/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx b/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx new file mode 100644 index 00000000..03ad6bc8 --- /dev/null +++ b/src/front/Components/Layouts/ClientDashboard/ContactBox/index.tsx @@ -0,0 +1,116 @@ +import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; +import { ArrowDownTrayIcon } from "@heroicons/react/24/outline"; +import Customer from "le-coffre-resources/dist/Customer"; +import { OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary"; +import { useCallback, useEffect, useMemo, useState } from "react"; + +import classes from "./classes.module.scss"; +import OfficeRib from "@Front/Api/LeCoffreApi/Customer/OfficeRib/OfficeRib"; + +type IProps = { + folder: OfficeFolderNotary; + customer: Customer; +}; + +export default function ContactBox(props: IProps) { + const { folder, customer } = props; + + const [ribUrl, setRibUrl] = useState(null); + + const notaryContact = useMemo( + () => + folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Collaborateur")?.contact ?? + folder?.stakeholders![0]!.contact, + [folder], + ); + + const note = useMemo( + () => + folder?.notes?.find((note) => note.customer?.uid === customer?.uid) ?? { + content: "Aucune note", + created_at: new Date(), + updated_at: new Date(), + }, + [customer?.uid, folder?.notes], + ); + + useEffect(() => { + if (!folder?.office?.uid) return; + OfficeRib.getInstance() + .getRibStream(folder.office.uid) + .then((blob) => setRibUrl(URL.createObjectURL(blob))); + }, [folder]); + + const downloadRib = useCallback(async () => { + if (!ribUrl) return; + const a = document.createElement("a"); + a.style.display = "none"; + a.href = ribUrl; + a.download = ""; + document.body.appendChild(a); + a.click(); + }, [ribUrl]); + + return ( +
+
+
+ + Votre notaire + + + {notaryContact?.first_name} {notaryContact?.last_name} + +
+
+ + Numéro de téléphone + + + {notaryContact?.cell_phone_number ?? notaryContact?.phone_number ?? "_"} + +
+
+ + E-mail + + + {notaryContact?.email ?? "_"} + +
+
+ {noteAndRibButton()} +
+
+ +
{noteAndRibButton()}
+
+ ); + + function noteAndRibButton() { + return ( + <> +
+ + Note dossier + + + {note?.content ?? "-"} + +
+ {ribUrl && ( + + )} + + ); + } +} diff --git a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/classes.module.scss b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/classes.module.scss index cde520cf..c13c6a35 100644 --- a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/classes.module.scss +++ b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/classes.module.scss @@ -12,4 +12,10 @@ flex-direction: column; gap: var(--spacing-sm, 8px); } + + @media screen and (max-width: $screen-s) { + flex-direction: column; + gap: var(--spacing-md, 16px); + align-items: flex-start; + } } diff --git a/src/front/Components/Layouts/ClientDashboard/classes.module.scss b/src/front/Components/Layouts/ClientDashboard/classes.module.scss index 584a4e5c..3fd3e298 100644 --- a/src/front/Components/Layouts/ClientDashboard/classes.module.scss +++ b/src/front/Components/Layouts/ClientDashboard/classes.module.scss @@ -5,36 +5,54 @@ flex-direction: column; gap: var(--spacing-xl, 32px); - .title-container { - flex-direction: column; + .top { display: flex; - gap: var(--spacing-sm, 8px); + gap: var(--spacing-lg, 24px); - .office-container { + .folder-info-container { + flex-direction: column; display: flex; - align-items: center; - gap: var(--spacing-md, 16px); + width: 100%; + gap: var(--spacing-sm, 8px); + + .office-container { + display: flex; + align-items: center; + gap: var(--spacing-md, 16px); + } + } + + @media screen and (max-width: $screen-s) { + .desktop-separator { + display: none; + } + + flex-direction: column; } } - .content { + .documents { display: flex; - gap: var(--spacing-lg, 24px); - align-items: flex-start; + flex-direction: column; + gap: var(--spacing-xl, 32px); - .notary { - display: flex; - width: 300px; - flex-direction: column; - align-items: flex-start; - gap: var(--spacing-lg, 24px); - } - - .documents { + .content { display: flex; flex-direction: column; gap: var(--spacing-xl, 32px); width: 100%; + + @media screen and (max-width: $screen-s) { + display: grid; + grid-template-columns: 1fr 1fr; + gap: var(--spacing-md, 16px); + } + + @media screen and (max-width: 734px) { + display: grid; + grid-template-columns: 1fr; + gap: var(--spacing-xl, 32px); + } } } } diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index da2fb194..3808b83b 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -4,23 +4,24 @@ import Documents, { IGetDocumentsparams } from "@Front/Api/LeCoffreApi/Customer/ import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import Customer, { Document } from "le-coffre-resources/dist/Customer"; -import React, { useCallback, useEffect, useMemo, useState } from "react"; -import { type OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary"; +import React, { useCallback, useEffect, useState } from "react"; +import { DocumentNotary, type OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary"; import classes from "./classes.module.scss"; import { useRouter } from "next/router"; import JwtService, { ICustomerJwtPayload } from "@Front/Services/JwtService/JwtService"; import Folders from "@Front/Api/LeCoffreApi/Customer/Folders/Folders"; -import OfficeRib from "@Front/Api/LeCoffreApi/Customer/OfficeRib/OfficeRib"; import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag"; import DefaultCustomerDashboard from "@Front/Components/LayoutTemplates/DefaultCustomerDashboard"; -import ContactBox from "@Front/Components/Elements/ContactBox"; -import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; -import { ArrowDownTrayIcon } from "@heroicons/react/24/outline"; + +import { EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; import DepositDocumentComponent from "./DepositDocumentComponent"; -import Link from "next/link"; import Module from "@Front/Config/Module"; +import Separator, { ESeperatorColor, ESeperatorDirection } from "@Front/Components/DesignSystem/Separator"; +import NotificationBox from "@Front/Components/DesignSystem/NotificationBox"; +import ContactBox from "./ContactBox"; +import DocumentsNotary from "@Front/Api/LeCoffreApi/Notary/DocumentsNotary/DocumentsNotary"; type IProps = {}; @@ -31,8 +32,7 @@ export default function ClientDashboard(props: IProps) { const [customer, setCustomer] = useState(null); const [folder, setFolder] = useState(null); - - const [ribUrl, setRibUrl] = useState(null); + const [documentsNotary, setDocumentsNotary] = useState([]); const fetchFolderAndCustomer = useCallback(async () => { let jwt: ICustomerJwtPayload | undefined; @@ -55,6 +55,11 @@ export default function ClientDashboard(props: IProps) { office_role: true, }, }, + deed: { + include: { + deed_type: true, + }, + }, }, }); @@ -99,95 +104,71 @@ export default function ClientDashboard(props: IProps) { fetchFolderAndCustomer().then(({ customer }) => fetchDocuments(customer.uid)); }, [fetchDocuments, fetchFolderAndCustomer]); - const notaryContact = useMemo( - () => - folder?.stakeholders!.find((stakeholder) => stakeholder.office_role?.name === "Collaborateur")?.contact ?? - folder?.stakeholders![0]!.contact, - [folder], - ); - - const note = useMemo( - () => - folder?.notes?.find((note) => note.customer?.uid === customer?.uid) ?? { - content: "Aucune note", - created_at: new Date(), - updated_at: new Date(), - }, - [customer?.uid, folder?.notes], - ); - useEffect(() => { - if (!folder?.office?.uid) return; - OfficeRib.getInstance() - .getRibStream(folder.office.uid) - .then((blob) => setRibUrl(URL.createObjectURL(blob))); - }, [folder]); - - const downloadRib = useCallback(async () => { - if (!ribUrl) return; - const a = document.createElement("a"); - a.style.display = "none"; - a.href = ribUrl; - a.download = ""; - document.body.appendChild(a); - a.click(); - }, [ribUrl]); + const customerUid = JwtService.getInstance().decodeCustomerJwt()?.customerId; + if (!folderUid || !customerUid) return; + DocumentsNotary.getInstance() + .get({ where: { folder: { uid: folderUid }, customer: { uid: customerUid } }, include: { files: true } }) + .then((documentsNotary) => setDocumentsNotary(documentsNotary)); + }, [folderUid]); return (
-
- - Dossier {folder?.folder_number} - {folder?.name} - - - Bonjour {customer?.contact?.first_name.concat(" ", customer?.contact?.last_name)} - - -
+
+
- Office + Dossier {folder?.folder_number} - {folder?.name} + + Bonjour {customer?.contact?.first_name.concat(" ", customer?.contact?.last_name)} + + +
+ + Office + - - {folder?.office?.name} - + + {folder?.office?.name} + +
+ + {(documentsNotary?.length ?? 0) > 0 && ( + + router.push( + Module.getInstance() + .get() + .modules.pages.ClientDashboard.pages.ReceiveDocuments.props.path.replace( + "[folderUid]", + folderUid as string, + ), + ), + }} + read={false} + /> + )}
-
-
- - Votre Notaire - - {notaryContact && } - {ribUrl && ( - - )} - - - -
-
- - Documents à envoyer - + + {customer && folder && } + +
+ + Documents à envoyer + +
{documents?.map((document) => ( Date: Fri, 20 Sep 2024 13:12:28 +0200 Subject: [PATCH 2/5] =?UTF-8?q?:sparkles=20add=20status=20t=C3=A9l=C3=A9ch?= =?UTF-8?q?arg=C3=A9=20in=20documents=20notary=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 434 +++++++----------- package.json | 2 +- .../DocumentsNotary/DocumentsNotary.ts | 38 ++ .../LeCoffreApi/Customer/FilesNotary/Files.ts | 33 ++ .../ReceivedDocuments/index.tsx | 20 +- .../Layouts/ClientDashboard/index.tsx | 34 +- .../ClientView/DocumentTables/index.tsx | 15 +- 7 files changed, 300 insertions(+), 276 deletions(-) create mode 100644 src/front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary.ts create mode 100644 src/front/Api/LeCoffreApi/Customer/FilesNotary/Files.ts diff --git a/package-lock.json b/package-lock.json index 7f22076c..6aa1a024 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "heroicons": "^2.1.5", "jszip": "^3.10.1", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.160", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.167", "next": "^14.2.3", "prettier": "^2.8.7", "react": "18.2.0", @@ -331,9 +331,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -394,26 +394,26 @@ } }, "node_modules/@floating-ui/core": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.7.tgz", - "integrity": "sha512-yDzVT/Lm101nQ5TCVeK65LtdN7Tj4Qpr9RTXJ2vPFLqtLxwOrpoxAHAJI8J3yYWUc40J0BDBheaitK5SJmno2g==", + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.8.tgz", + "integrity": "sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==", "dependencies": { - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.10", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.10.tgz", - "integrity": "sha512-fskgCFv8J8OamCmyun8MfjB1Olfn+uZKjOKZ0vhYF3gRmEUXcGOjxWL8bBr7i4kIuPZ2KD2S3EUIOxnjC8kl2A==", + "version": "1.6.11", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.11.tgz", + "integrity": "sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ==", "dependencies": { "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.7" + "@floating-ui/utils": "^0.2.8" } }, "node_modules/@floating-ui/utils": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.7.tgz", - "integrity": "sha512-X8R8Oj771YRl/w+c1HqAC1szL8zWQRwFvgDwT129k9ACdBoud/+/rX9V0qiMl6LWUdP9voC2nDVZYPMQQsb6eA==" + "version": "0.2.8", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz", + "integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==" }, "node_modules/@heroicons/react": { "version": "2.1.5", @@ -648,9 +648,9 @@ } }, "node_modules/@mui/types": { - "version": "7.2.16", - "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.16.tgz", - "integrity": "sha512-qI8TV3M7ShITEEc8Ih15A2vLzZGLhD+/UPNwck/hcls2gwg7dyRjNGXcQYHKLB5Q7PuTRfrTkAoPa2VV1s67Ag==", + "version": "7.2.17", + "resolved": "https://registry.npmjs.org/@mui/types/-/types-7.2.17.tgz", + "integrity": "sha512-oyumoJgB6jDV8JFzRqjBo2daUuHpzDjoO/e3IrRhhHo/FxJlaVhET6mcNrKHUq2E+R+q3ql0qAtvQ4rfWHhAeQ==", "peerDependencies": { "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0" }, @@ -690,9 +690,9 @@ } }, "node_modules/@next/env": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.8.tgz", - "integrity": "sha512-L44a+ynqkolyNBnYfF8VoCiSrjSZWgEHYKkKLGcs/a80qh7AkfVUD/MduVPgdsWZ31tgROR+yJRA0PZjSVBXWQ==" + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.13.tgz", + "integrity": "sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.2.4", @@ -703,9 +703,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.8.tgz", - "integrity": "sha512-1VrQlG8OzdyvvGZhGJFnaNE2P10Jjy/2FopnqbY0nSa/gr8If3iINxvOEW3cmVeoAYkmW0RsBazQecA2dBFOSw==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.13.tgz", + "integrity": "sha512-IkAmQEa2Htq+wHACBxOsslt+jMoV3msvxCn0WFSfJSkv/scy+i/EukBKNad36grRxywaXUYJc9mxEGkeIs8Bzg==", "cpu": [ "arm64" ], @@ -718,9 +718,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.8.tgz", - "integrity": "sha512-87t3I86rNRSOJB1gXIUzaQWWSWrkWPDyZGsR0Z7JAPtLeX3uUOW2fHxl7dNWD2BZvbvftctTQjgtfpp7nMtmWg==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.13.tgz", + "integrity": "sha512-Dv1RBGs2TTjkwEnFMVL5XIfJEavnLqqwYSD6LXgTPdEy/u6FlSrLBSSfe1pcfqhFEXRAgVL3Wpjibe5wXJzWog==", "cpu": [ "x64" ], @@ -733,9 +733,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.8.tgz", - "integrity": "sha512-ta2sfVzbOpTbgBrF9HM5m+U58dv6QPuwU4n5EX4LLyCJGKc433Z0D9h9gay/HSOjLEXJ2fJYrMP5JYYbHdxhtw==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.13.tgz", + "integrity": "sha512-yB1tYEFFqo4ZNWkwrJultbsw7NPAAxlPXURXioRl9SdW6aIefOLS+0TEsKrWBtbJ9moTDgU3HRILL6QBQnMevg==", "cpu": [ "arm64" ], @@ -748,9 +748,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.8.tgz", - "integrity": "sha512-+IoLTPK6Z5uIgDhgeWnQF5/o5GBN7+zyUNrs4Bes1W3g9++YELb8y0unFybS8s87ntAKMDl6jeQ+mD7oNwp/Ng==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.13.tgz", + "integrity": "sha512-v5jZ/FV/eHGoWhMKYrsAweQ7CWb8xsWGM/8m1mwwZQ/sutJjoFaXchwK4pX8NqwImILEvQmZWyb8pPTcP7htWg==", "cpu": [ "arm64" ], @@ -763,9 +763,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.8.tgz", - "integrity": "sha512-pO+hVXC+mvzUOQJJRG4RX4wJsRJ5BkURSf6dD6EjUXAX4Ml9es1WsEfkaZ4lcpmFzFvY47IkDaffks/GdCn9ag==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.13.tgz", + "integrity": "sha512-aVc7m4YL7ViiRv7SOXK3RplXzOEe/qQzRA5R2vpXboHABs3w8vtFslGTz+5tKiQzWUmTmBNVW0UQdhkKRORmGA==", "cpu": [ "x64" ], @@ -778,9 +778,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.8.tgz", - "integrity": "sha512-bCat9izctychCtf3uL1nqHq31N5e1VxvdyNcBQflkudPMLbxVnlrw45Vi87K+lt1CwrtVayHqzo4ie0Szcpwzg==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.13.tgz", + "integrity": "sha512-4wWY7/OsSaJOOKvMsu1Teylku7vKyTuocvDLTZQq0TYv9OjiYYWt63PiE1nTuZnqQ4RPvME7Xai+9enoiN0Wrg==", "cpu": [ "x64" ], @@ -793,9 +793,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.8.tgz", - "integrity": "sha512-gbxfUaSPV7EyUobpavida2Hwi62GhSJaSg7iBjmBWoxkxlmETOD7U4tWt763cGIsyE6jM7IoNavq0BXqwdW2QA==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.13.tgz", + "integrity": "sha512-uP1XkqCqV2NVH9+g2sC7qIw+w2tRbcMiXFEbMihkQ8B1+V6m28sshBwAB0SDmOe0u44ne1vFU66+gx/28RsBVQ==", "cpu": [ "arm64" ], @@ -808,9 +808,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.8.tgz", - "integrity": "sha512-PUXzEzjTTlUh3b5VAn1nlpwvujTnuCMMwbiCnaTazoVlN1nA3kWjlmp42IfURA2N/nyrlVEw7pURa/o4Qxj1cw==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.13.tgz", + "integrity": "sha512-V26ezyjPqQpDBV4lcWIh8B/QICQ4v+M5Bo9ykLN+sqeKKBxJVDpEc6biDVyluTXTC40f5IqCU0ttth7Es2ZuMw==", "cpu": [ "ia32" ], @@ -823,9 +823,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.8.tgz", - "integrity": "sha512-EnPKv0ttq02E9/1KZ/8Dn7kuutv6hy1CKc0HlNcvzOQcm4/SQtvfws5gY0zrG9tuupd3HfC2L/zcTrnBhpjTuQ==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.13.tgz", + "integrity": "sha512-WwzOEAFBGhlDHE5Z73mNU8CO8mqMNLqaG+AO9ETmzdCQlJhVtWZnOl2+rqgVQS+YHunjOWptdFmNfbpwcUuEsw==", "cpu": [ "x64" ], @@ -838,9 +838,9 @@ } }, "node_modules/@next/third-parties": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.2.8.tgz", - "integrity": "sha512-Vus4MYsb+7B2X4Mks9aCztZwgnzTxU9sHEm1Y35z7Vw1seh43ummniD9CBk7A8dVJZf8NGpx8re6YSZLkaSQiQ==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/@next/third-parties/-/third-parties-14.2.13.tgz", + "integrity": "sha512-OSqD2E9JO0/GE8HT5QAUsYVXwjWtPLScAX70kO2xopwDAdRzakrsQS55Cihd862X/4bUB37ApVZ9DlHcExzeOg==", "dependencies": { "third-party-capital": "1.0.20" }, @@ -944,9 +944,9 @@ "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==" }, "node_modules/@types/prop-types": { - "version": "15.7.12", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", - "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==" + "version": "15.7.13", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", + "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==" }, "node_modules/@types/react": { "version": "18.0.28", @@ -991,9 +991,9 @@ "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" }, "node_modules/@types/validator": { - "version": "13.12.1", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.1.tgz", - "integrity": "sha512-w0URwf7BQb0rD/EuiG12KP0bailHKHP5YVviJG9zw3ykAokL0TuxU2TUqMB7EwZ59bDHYdeTIvjI5m0S7qHfOA==" + "version": "13.12.2", + "resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.12.2.tgz", + "integrity": "sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==" }, "node_modules/@typescript-eslint/parser": { "version": "5.62.0", @@ -1156,18 +1156,6 @@ "node": ">=4" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1402,9 +1390,9 @@ "optional": true }, "node_modules/bare-fs": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.3.tgz", - "integrity": "sha512-7RYKL+vZVCyAsMLi5SPu7QGauGGT8avnP/HO571ndEuV4MYdGXvLhtW67FuLPeEI8EiIY7zbbRR9x7x7HU0kgw==", + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", "optional": true, "dependencies": { "bare-events": "^2.0.0", @@ -1413,9 +1401,9 @@ } }, "node_modules/bare-os": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.2.tgz", - "integrity": "sha512-HZoJwzC+rZ9lqEemTMiO0luOePoGYNBgsLLgegKR/cljiJvcDNhDZQkzC+NC5Oh0aHbdBNSOHpghwMuB5tqhjg==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", "optional": true }, "node_modules/bare-path": { @@ -1428,13 +1416,13 @@ } }, "node_modules/bare-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.2.1.tgz", - "integrity": "sha512-YTB47kHwBW9zSG8LD77MIBAAQXjU2WjAkMHeeb7hUplVs6+IoM5I7uEVQNPMB7lj9r8I76UMdoMkGnCodHOLqg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", + "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", "optional": true, "dependencies": { "b4a": "^1.6.6", - "streamx": "^2.18.0" + "streamx": "^2.20.0" } }, "node_modules/base64-js": { @@ -1456,17 +1444,6 @@ } ] }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", - "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", @@ -1477,6 +1454,19 @@ "readable-stream": "^3.4.0" } }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1558,9 +1548,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001659", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001659.tgz", - "integrity": "sha512-Qxxyfv3RdHAfJcXelgf0hU4DFUVXBGTjqrBUZLUh8AtlGnsDo+CnncYtTd95+ZKfnANUOzxyIQCuU/UeBZBYoA==", + "version": "1.0.30001662", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz", + "integrity": "sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==", "funding": [ { "type": "opencollective", @@ -1598,37 +1588,17 @@ } }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.0.tgz", + "integrity": "sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==", "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" } }, "node_modules/chownr": { @@ -2467,9 +2437,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.35.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.35.2.tgz", - "integrity": "sha512-Rbj2R9zwP2GYNcIak4xoAMV57hrBh3hTaR0k7hVjwCQgryE/pw5px4b13EYjduOI0hfXyZhwBxaGpOTbWSGzKQ==", + "version": "7.36.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.36.1.tgz", + "integrity": "sha512-/qwbqNXZoq+VP30s1d4Nc1C5GTxjJQjk4Jzs4Wq2qzxFM7dSmuG2UkIjg2USMLh3A/aVcUNrK7v0J5U1XEGGwA==", "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", @@ -2870,19 +2840,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -2951,9 +2908,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.0.tgz", - "integrity": "sha512-Pgba6TExTZ0FJAn1qkJAjIeKoDJ3CsI2ChuLohJnZl/tTU8MVrq3b+2t5UOPfRa4RMsorClBjJALkJUMjG1PAw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", "dependencies": { "resolve-pkg-maps": "^1.0.0" }, @@ -3305,17 +3262,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/is-boolean-object": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", @@ -3721,38 +3667,6 @@ "setimmediate": "^1.0.5" } }, - "node_modules/jszip/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" - }, - "node_modules/jszip/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/jszip/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/jszip/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -3783,7 +3697,7 @@ } }, "node_modules/le-coffre-resources": { - "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#6c3cb06f1dc5307bf491e5f17289379c8e0b8ffc", + "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#2684918e1b3a18a3746218f452e75e0a6153544c", "license": "MIT", "dependencies": { "class-transformer": "^0.5.1", @@ -3804,9 +3718,9 @@ } }, "node_modules/libphonenumber-js": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.7.tgz", - "integrity": "sha512-x2xON4/Qg2bRIS11KIN9yCNYUjhtiEjNyptjX0mX+pyKHecxuJVLIpfX1lq9ZD6CrC/rB+y4GBi18c6CEcUR+A==" + "version": "1.11.8", + "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.11.8.tgz", + "integrity": "sha512-0fv/YKpJBAgXKy0kaS3fnqoUVN8901vUYAKIGD/MWZaDfhJt1nZjPL3ZzdZBt/G8G8Hw2J1xOIrXWdNHFHPAvg==" }, "node_modules/lie": { "version": "3.3.0", @@ -3963,11 +3877,11 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" }, "node_modules/next": { - "version": "14.2.8", - "resolved": "https://registry.npmjs.org/next/-/next-14.2.8.tgz", - "integrity": "sha512-EyEyJZ89r8C5FPlS/401AiF3O8jeMtHIE+bLom9MwcdWJJFBgRl+MR/2VgO0v5bI6tQORNY0a0DR5sjpFNrjbg==", + "version": "14.2.13", + "resolved": "https://registry.npmjs.org/next/-/next-14.2.13.tgz", + "integrity": "sha512-BseY9YNw8QJSwLYD7hlZzl6QVDoSFHL/URN5K64kVEVpCsSOWeyjbIGK+dZUaRViHTaMQX8aqmnn0PHBbGZezg==", "dependencies": { - "@next/env": "14.2.8", + "@next/env": "14.2.13", "@swc/helpers": "0.5.5", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001579", @@ -3982,15 +3896,15 @@ "node": ">=18.17.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "14.2.8", - "@next/swc-darwin-x64": "14.2.8", - "@next/swc-linux-arm64-gnu": "14.2.8", - "@next/swc-linux-arm64-musl": "14.2.8", - "@next/swc-linux-x64-gnu": "14.2.8", - "@next/swc-linux-x64-musl": "14.2.8", - "@next/swc-win32-arm64-msvc": "14.2.8", - "@next/swc-win32-ia32-msvc": "14.2.8", - "@next/swc-win32-x64-msvc": "14.2.8" + "@next/swc-darwin-arm64": "14.2.13", + "@next/swc-darwin-x64": "14.2.13", + "@next/swc-linux-arm64-gnu": "14.2.13", + "@next/swc-linux-arm64-musl": "14.2.13", + "@next/swc-linux-x64-gnu": "14.2.13", + "@next/swc-linux-x64-musl": "14.2.13", + "@next/swc-win32-arm64-msvc": "14.2.13", + "@next/swc-win32-ia32-msvc": "14.2.13", + "@next/swc-win32-x64-msvc": "14.2.13" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -4012,9 +3926,9 @@ } }, "node_modules/node-abi": { - "version": "3.67.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.67.0.tgz", - "integrity": "sha512-bLn/fU/ALVBE9wj+p4Y21ZJWYFjUXLXPi/IewyLZkx3ApxKDNBWCKdReeKOtD8dWpOdDCeMyLh6ZewzcLsG2Nw==", + "version": "3.68.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.68.0.tgz", + "integrity": "sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==", "dependencies": { "semver": "^7.3.5" }, @@ -4027,14 +3941,6 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-6.1.0.tgz", "integrity": "sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==" }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4351,6 +4257,19 @@ "node": ">=10" } }, + "node_modules/prebuild-install/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/prebuild-install/node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", @@ -4420,9 +4339,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -4521,9 +4440,9 @@ "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" }, "node_modules/react-select": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/react-select/-/react-select-5.8.0.tgz", - "integrity": "sha512-TfjLDo58XrhP6VG5M/Mi56Us0Yt8X7xD6cDybC7yoRMUNm7BGO7qk8J0TLQOua/prb8vUOtsfnXZwfm30HGsAA==", + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/react-select/-/react-select-5.8.1.tgz", + "integrity": "sha512-RT1CJmuc+ejqm5MPgzyZujqDskdvB9a9ZqrdnVLsvAHjJ3Tj0hELnLeVPQlmYdVKCdCpxanepl6z7R5KhXhWzg==", "dependencies": { "@babel/runtime": "^7.12.0", "@emotion/cache": "^11.4.0", @@ -4576,27 +4495,34 @@ } }, "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dependencies": { - "picomatch": "^2.2.1" - }, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", + "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", "engines": { - "node": ">=8.10.0" + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/reflect-metadata": { @@ -4742,23 +4668,9 @@ } }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-regex-test": { "version": "1.0.3", @@ -4777,11 +4689,11 @@ } }, "node_modules/sass": { - "version": "1.78.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.78.0.tgz", - "integrity": "sha512-AaIqGSrjo5lA2Yg7RvFZrlXDBCp3nV4XP73GrLGvdRWWwk+8H3l0SDvq/5bA4eF+0RFPLuWUk3E+P1U/YqnpsQ==", + "version": "1.79.2", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.79.2.tgz", + "integrity": "sha512-YmT1aoF1MwHsZEu/eXhbAJNsPGAhNP4UixW9ckEwWCvPcVdVF0/C104OGDVEqtoctKq0N+wM20O/rj+sSPsWeg==", "dependencies": { - "chokidar": ">=3.0.0 <4.0.0", + "chokidar": "^4.0.0", "immutable": "^4.0.0", "source-map-js": ">=0.6.2 <2.0.0" }, @@ -5004,9 +4916,9 @@ } }, "node_modules/streamx": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.0.tgz", - "integrity": "sha512-ZGd1LhDeGFucr1CUCTBOS58ZhEendd0ttpGT3usTvosS4ntIwKN9LJFp+OeCSprsCPL14BXVRZlHGRY1V9PVzQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.1.tgz", + "integrity": "sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==", "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", @@ -5017,11 +4929,11 @@ } }, "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dependencies": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, "node_modules/string.prototype.includes": { @@ -5224,9 +5136,9 @@ } }, "node_modules/text-decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.1.1.tgz", - "integrity": "sha512-8zll7REEv4GDD3x4/0pW+ppIxSNs7H1J10IKFZsuOMscumCdM2a+toDGLPA3T+1+fLBql4zbt5z83GEQGGV5VA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", + "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", "dependencies": { "b4a": "^1.6.4" } diff --git a/package.json b/package.json index 50e41004..fe4f4409 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "heroicons": "^2.1.5", "jszip": "^3.10.1", "jwt-decode": "^3.1.2", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.160", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.167", "next": "^14.2.3", "prettier": "^2.8.7", "react": "18.2.0", diff --git a/src/front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary.ts b/src/front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary.ts new file mode 100644 index 00000000..508ffd71 --- /dev/null +++ b/src/front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary.ts @@ -0,0 +1,38 @@ +import DocumentNotary from "le-coffre-resources/dist/Notary/DocumentNotary"; + +import BaseCustomer from "../BaseCustomer"; + +export interface IGetDocumentNotaryparams { + where?: {}; + include?: {}; + orderBy?: {}; +} + +export default class DocumentsNotary extends BaseCustomer { + private static instance: DocumentsNotary; + private readonly baseURl = this.namespaceUrl.concat("/documents_notary"); + + private constructor() { + super(); + } + + public static getInstance() { + if (!this.instance) { + return new this(); + } else { + return this.instance; + } + } + + public async get(q: IGetDocumentNotaryparams): Promise { + const url = new URL(this.baseURl); + const query = { q }; + Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value))); + try { + return await this.getRequest(url); + } catch (err) { + this.onError(err); + return Promise.reject(err); + } + } +} diff --git a/src/front/Api/LeCoffreApi/Customer/FilesNotary/Files.ts b/src/front/Api/LeCoffreApi/Customer/FilesNotary/Files.ts new file mode 100644 index 00000000..ba830290 --- /dev/null +++ b/src/front/Api/LeCoffreApi/Customer/FilesNotary/Files.ts @@ -0,0 +1,33 @@ +import BaseCustomer from "../BaseCustomer"; + +export interface IGetFilesparams { + where?: {}; + include?: {}; +} + +export type IPutFilesParams = {}; + +export interface IPostFilesParams {} + +export default class FilesNotary extends BaseCustomer { + private static instance: FilesNotary; + private readonly baseURl = this.namespaceUrl.concat("/files-notary"); + + private constructor() { + super(); + } + + public static getInstance() { + return (this.instance ??= new this()); + } + + public async download(filesNotaryUid: string, documentsNotaryUid: string): Promise { + const url = new URL(this.baseURl.concat(`/${filesNotaryUid}/documents-notary/${documentsNotaryUid}/download`)); + try { + return await this.getRequest(url); + } catch (err) { + this.onError(err); + return Promise.reject(err); + } + } +} diff --git a/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx b/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx index 25af1c60..7c7f49fd 100644 --- a/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/ReceivedDocuments/index.tsx @@ -1,5 +1,5 @@ -import DocumentsNotary from "@Front/Api/LeCoffreApi/Notary/DocumentsNotary/DocumentsNotary"; -import FilesNotary from "@Front/Api/LeCoffreApi/Notary/FilesNotary/Files"; +import DocumentsNotary from "@Front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary"; +import FilesNotary from "@Front/Api/LeCoffreApi/Customer/FilesNotary/Files"; import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; import IconButton from "@Front/Components/DesignSystem/IconButton"; import Table from "@Front/Components/DesignSystem/Table"; @@ -12,7 +12,7 @@ import JwtService from "@Front/Services/JwtService/JwtService"; import { ArrowDownTrayIcon } from "@heroicons/react/24/outline"; import { saveAs } from "file-saver"; import JSZip from "jszip"; -import { DocumentNotary } from "le-coffre-resources/dist/Notary"; +import DocumentNotary from "le-coffre-resources/dist/Notary/DocumentNotary"; import { useRouter } from "next/router"; import React, { useCallback, useEffect, useState } from "react"; @@ -48,10 +48,10 @@ export default function ReceivedDocuments() { const onDownload = useCallback((doc: DocumentNotary) => { const file = doc.files?.[0]; - if (!file || !file?.uid) return; + if (!file || !file?.uid || !doc.uid) return; return FilesNotary.getInstance() - .download(file.uid) + .download(file.uid, doc.uid) .then((blob) => { const url = URL.createObjectURL(blob); const a = document.createElement("a"); @@ -71,8 +71,8 @@ export default function ReceivedDocuments() { const downloadPromises = documentsNotary.map(async (doc) => { const file = doc.files?.[0]; - if (file && file.uid) { - const blob = await FilesNotary.getInstance().download(file.uid); + if (file && file.uid && doc.uid) { + const blob = await FilesNotary.getInstance().download(file.uid, doc.uid); folder.file(file.file_name ?? "file", blob); } }); @@ -117,8 +117,12 @@ export default function ReceivedDocuments() { function buildRows(documentsNotary: DocumentNotary[], onDownloadFileNotary: (doc: DocumentNotary) => void): IRowProps[] { return documentsNotary.map((documentNotary) => ({ key: documentNotary.uid ?? "", - name: documentNotary.files?.[0]?.file_name?.split(".")?.[0] ?? "_", + name: formatName(documentNotary.files?.[0]?.file_name?.split(".")?.[0] ?? "") || "_", sentAt: new Date(documentNotary.created_at!).toLocaleDateString(), actions: onDownloadFileNotary(documentNotary)} icon={} />, })); } + +function formatName(text: string): string { + return text.replace(/[^a-zA-Z0-9 ]/g, ""); +} diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index 3808b83b..69a36c32 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -4,7 +4,7 @@ import Documents, { IGetDocumentsparams } from "@Front/Api/LeCoffreApi/Customer/ import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import Customer, { Document } from "le-coffre-resources/dist/Customer"; -import React, { useCallback, useEffect, useState } from "react"; +import React, { useCallback, useEffect, useMemo, useState } from "react"; import { DocumentNotary, type OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary"; import classes from "./classes.module.scss"; @@ -21,7 +21,8 @@ import Module from "@Front/Config/Module"; import Separator, { ESeperatorColor, ESeperatorDirection } from "@Front/Components/DesignSystem/Separator"; import NotificationBox from "@Front/Components/DesignSystem/NotificationBox"; import ContactBox from "./ContactBox"; -import DocumentsNotary from "@Front/Api/LeCoffreApi/Notary/DocumentsNotary/DocumentsNotary"; +import DocumentsNotary from "@Front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary"; +import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; type IProps = {}; @@ -112,6 +113,11 @@ export default function ClientDashboard(props: IProps) { .then((documentsNotary) => setDocumentsNotary(documentsNotary)); }, [folderUid]); + const documentsNotaryNotRead = useMemo( + () => documentsNotary.filter((doc) => doc.document_status === EDocumentNotaryStatus.SENT), + [documentsNotary], + ); + return (
@@ -140,9 +146,9 @@ export default function ClientDashboard(props: IProps) { size={142} color={ESeperatorColor.LIGHT} /> - {(documentsNotary?.length ?? 0) > 0 && ( + {(documentsNotaryNotRead?.length ?? 0) > 0 && ( )} + {(documentsNotaryNotRead?.length ?? 0) === 0 && (documentsNotary?.length ?? 0) > 0 && ( + + router.push( + Module.getInstance() + .get() + .modules.pages.ClientDashboard.pages.ReceiveDocuments.props.path.replace( + "[folderUid]", + folderUid as string, + ), + ), + }} + read={true} + /> + )}
{customer && folder && } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx index e52b7adf..66f3ec71 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx @@ -14,7 +14,7 @@ import { ArrowDownTrayIcon, EyeIcon, TrashIcon } from "@heroicons/react/24/outli import { useMediaQuery } from "@mui/material"; import { Document } from "le-coffre-resources/dist/Customer"; import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document"; -import { DocumentNotary } from "le-coffre-resources/dist/Notary"; +import DocumentNotary, { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; import Link from "next/link"; import { useCallback, useEffect, useMemo, useState } from "react"; @@ -35,6 +35,11 @@ const tradDocumentStatus: Record = { [EDocumentStatus.REFUSED]: "Refusé", }; +const tradDocumentsNotaryStatus: Record = { + [EDocumentNotaryStatus.SENT]: "Envoyé", + [EDocumentNotaryStatus.DOWNLOADED]: "Téléchargé", +}; + export default function DocumentTables(props: IProps) { const { folderUid, customerUid } = props; const [documents, setDocuments] = useState([]); @@ -286,7 +291,13 @@ export default function DocumentTables(props: IProps) { }, document_status: { sx: { width: 107 }, - content: , + content: ( + + ), }, date: { sx: { width: 107 }, From 842edcd4c278127d90db5724c17552aa26237f5e Mon Sep 17 00:00:00 2001 From: Max S Date: Fri, 20 Sep 2024 13:19:51 +0200 Subject: [PATCH 3/5] Refactor document status tag rendering in DocumentTables component --- .../ClientView/DocumentTables/index.tsx | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx index 66f3ec71..ebcf0bb4 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/index.tsx @@ -291,13 +291,7 @@ export default function DocumentTables(props: IProps) { }, document_status: { sx: { width: 107 }, - content: ( - - ), + content: getTagForSentDocument(document.document_status as EDocumentNotaryStatus), }, date: { sx: { width: 107 }, @@ -399,3 +393,30 @@ function getHeader(dateColumnTitle: string, isMobile: boolean): IHead[] { function formatName(text: string): string { return text.replace(/[^a-zA-Z0-9 ]/g, ""); } + +function getTagForSentDocument(status: EDocumentNotaryStatus) { + if (status === EDocumentNotaryStatus.SENT) { + return ( + + ); + } else if (status === EDocumentNotaryStatus.DOWNLOADED) { + return ( + + ); + } + return ( + + ); +} From a99ad0dc948446e8da4b43df732fd572305132c5 Mon Sep 17 00:00:00 2001 From: Max S Date: Mon, 23 Sep 2024 11:32:04 +0200 Subject: [PATCH 4/5] Refactor DownloadAnchoringProofModal component --- .../elements/DownloadAnchoringProofModal/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx index 460c6538..10022d04 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx @@ -20,7 +20,6 @@ export default function DownloadAnchoringProofModal(props: IProps) { const downloadAnchoringProof = useCallback(async () => { if (!folder?.uid) return; try { - debugger; setError(null); setIsLoading(true); const file = await OfficeFolderAnchors.getInstance().download(folder.uid); From 96ab9ac08a1ea6b4d715e283d711cec4475cebdb Mon Sep 17 00:00:00 2001 From: Max S Date: Mon, 23 Sep 2024 15:03:22 +0200 Subject: [PATCH 5/5] wording --- .../Layouts/ClientDashboard/DepositDocumentComponent/index.tsx | 2 +- .../Folder/FolderInformation/ClientView/EmailReminder/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx index 37448dbd..46ef2cec 100644 --- a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx @@ -62,7 +62,7 @@ export default function DepositDocumentComponent(props: IProps) {
- Dernière relance: {reminders && remindersLength > 0 ? formatDateWithHours(reminders[0]!.reminder_date) : "-"} + Dernière relance manuelle: {reminders && remindersLength > 0 ? formatDateWithHours(reminders[0]!.reminder_date) : "-"} Nombre de relance: {remindersLength}