diff --git a/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx b/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx index c91f55c9..e9b89df1 100644 --- a/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx +++ b/src/front/Components/DesignSystem/DepositOtherDocument/index.tsx @@ -161,7 +161,7 @@ export default class DepositOtherDocument extends React.Component Ajouter un document Plus icon diff --git a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx index 645c60a3..a9d3c824 100644 --- a/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/DepositDocumentComponent/index.tsx @@ -72,9 +72,19 @@ export default function DepositDocumentComponent(props: IProps) { {document.document_type?.name ?? "_"} - Demandé le:{" "} + Demandé le :{" "} {document.created_at ? new Date(document.created_at).toLocaleDateString() : "_"} + {document.document_status === "DEPOSITED" && ( +
+ + Déposé le :{" "} + + {document.updated_at ? new Date(document.updated_at).toLocaleDateString() : "_"} + + +
+ )} {document.document_status === "REFUSED" && (
diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index e1f8f535..d381df76 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -3,7 +3,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 Customer, { Document, DocumentType } from "le-coffre-resources/dist/Customer"; import React, { useCallback, useEffect, useMemo, useState } from "react"; import { DocumentNotary, type OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary"; @@ -12,20 +12,18 @@ import { useRouter } from "next/router"; import JwtService, { ICustomerJwtPayload } from "@Front/Services/JwtService/JwtService"; import Folders from "@Front/Api/LeCoffreApi/Customer/Folders/Folders"; +import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag"; +import DefaultCustomerDashboard from "@Front/Components/LayoutTemplates/DefaultCustomerDashboard"; + +import Button, { EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import DepositDocumentComponent from "./DepositDocumentComponent"; 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/Customer/DocumentsNotary/DocumentsNotary"; import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary"; -// import DepositOtherDocument from "@Front/Components/DesignSystem/DepositOtherDocument"; - -import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag"; -import DefaultCustomerDashboard from "@Front/Components/LayoutTemplates/DefaultCustomerDashboard"; - -import { EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; - -import DepositDocumentComponent from "./DepositDocumentComponent"; +import DepositOtherDocument from "@Front/Components/DesignSystem/DepositOtherDocument"; type IProps = {}; @@ -37,7 +35,7 @@ export default function ClientDashboard(props: IProps) { const [customer, setCustomer] = useState(null); const [folder, setFolder] = useState(null); const [documentsNotary, setDocumentsNotary] = useState([]); - // const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState(false); + const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState(false); const fetchFolderAndCustomer = useCallback(async () => { let jwt: ICustomerJwtPayload | undefined; @@ -122,33 +120,31 @@ export default function ClientDashboard(props: IProps) { [documentsNotary], ); - // const onCloseModalAddDocument = useCallback(() => { - // setIsAddDocumentModalVisible(false); - // fetchFolderAndCustomer(); - // }, [fetchFolderAndCustomer]); + const onCloseModalAddDocument = useCallback(() => { + setIsAddDocumentModalVisible(false); + fetchFolderAndCustomer(); + }, [fetchFolderAndCustomer]); - // const onOpenModalAddDocument = useCallback(() => { - // setIsAddDocumentModalVisible(true); - // }, []); + const onOpenModalAddDocument = useCallback(() => { + setIsAddDocumentModalVisible(true); + }, []); - // const renderBox = useCallback(() => { - // console.log(folder!.office!.uid); - - // return ( - // ({ - // document_type: DocumentType.hydrate({ - // name: "Autres documents", - // office: folder!.office!, - // }), - // })} - // /> - // ); - // }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]); + const renderBox = useCallback(() => { + return ( + ({ + document_type: DocumentType.hydrate({ + name: "Autres documents", + office: folder!.office!, + }), + })} + /> + ); + }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]); return ( @@ -236,18 +232,18 @@ export default function ClientDashboard(props: IProps) { ))}
- {/*Documents supplémentaires (facultatif)*/} - {/* + Documents supplémentaires (facultatif) + Vous souhaitez envoyer d'autres documents à votre notaire ? - */} - {/* - {isAddDocumentModalVisible && renderBox()} */} + {isAddDocumentModalVisible && renderBox()} ); diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/NoDocument/classes.module.scss b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/NoDocument/classes.module.scss index 0594b1b7..5c3c3336 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/NoDocument/classes.module.scss +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/NoDocument/classes.module.scss @@ -4,4 +4,5 @@ display: flex; flex-direction: column; gap: var(--spacing-xl, 32px); + width: 100%; } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx index 75d9e95e..6dff266c 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx @@ -148,9 +148,13 @@ export default function InformationSection(props: IProps) { } variant={EIconButtonVariant.NEUTRAL} /> - - } variant={EIconButtonVariant.NEUTRAL} /> - + {/* If the folder is not archived, we can display the archive button */} + {anchorStatus !== "VERIFIED_ON_CHAIN" && ( + + } variant={EIconButtonVariant.NEUTRAL} /> + + )} + {!isArchived && } variant={EIconButtonVariant.ERROR} />}