Fixes
This commit is contained in:
commit
dbeb164c95
@ -161,7 +161,7 @@ export default class DepositOtherDocument extends React.Component<IProps, IState
|
||||
onClick={this.addDocument}>
|
||||
<Typography
|
||||
typo={ETypo.TEXT_MD_SEMIBOLD}
|
||||
color={ETypoColor.COLOR_SECONDARY_500}
|
||||
color={ETypoColor.COLOR_PRIMARY_500}
|
||||
className={classes["add-document"]}>
|
||||
Ajouter un document <Image src={PlusIcon} alt="Plus icon" />
|
||||
</Typography>
|
||||
|
@ -75,6 +75,16 @@ export default function DepositDocumentComponent(props: IProps) {
|
||||
Demandé le :{" "}
|
||||
<a className={classes["date"]}>{document.created_at ? new Date(document.created_at).toLocaleDateString() : "_"}</a>
|
||||
</Typography>
|
||||
{document.document_status === "DEPOSITED" && (
|
||||
<div>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
|
||||
Déposé le :{" "}
|
||||
<a className={classes["date"]}>
|
||||
{document.updated_at ? new Date(document.updated_at).toLocaleDateString() : "_"}
|
||||
</a>
|
||||
</Typography>
|
||||
</div>
|
||||
)}
|
||||
{document.document_status === "REFUSED" && (
|
||||
<div>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
|
||||
|
@ -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<Customer | null>(null);
|
||||
const [folder, setFolder] = useState<OfficeFolderNotary | null>(null);
|
||||
const [documentsNotary, setDocumentsNotary] = useState<DocumentNotary[]>([]);
|
||||
// const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState<boolean>(false);
|
||||
const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState<boolean>(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 (
|
||||
// <DepositOtherDocument
|
||||
// folder_uid={folderUid!}
|
||||
// customer_uid={customer!.uid!}
|
||||
// open={isAddDocumentModalVisible}
|
||||
// onClose={onCloseModalAddDocument}
|
||||
// document={Document.hydrate<Document>({
|
||||
// document_type: DocumentType.hydrate<DocumentType>({
|
||||
// name: "Autres documents",
|
||||
// office: folder!.office!,
|
||||
// }),
|
||||
// })}
|
||||
// />
|
||||
// );
|
||||
// }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
||||
const renderBox = useCallback(() => {
|
||||
return (
|
||||
<DepositOtherDocument
|
||||
folder_uid={folderUid!}
|
||||
customer_uid={customer!.uid!}
|
||||
open={isAddDocumentModalVisible}
|
||||
onClose={onCloseModalAddDocument}
|
||||
document={Document.hydrate<Document>({
|
||||
document_type: DocumentType.hydrate<DocumentType>({
|
||||
name: "Autres documents",
|
||||
office: folder!.office!,
|
||||
}),
|
||||
})}
|
||||
/>
|
||||
);
|
||||
}, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
||||
|
||||
return (
|
||||
<DefaultCustomerDashboard>
|
||||
@ -236,18 +232,18 @@ export default function ClientDashboard(props: IProps) {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
{/*<Typography typo={ETypo.TITLE_H3}>Documents supplémentaires (facultatif)</Typography>*/}
|
||||
{/*<Typography typo={ETypo.TEXT_MD_REGULAR} className={classes["text"]}>
|
||||
<Typography typo={ETypo.TITLE_H3}>Documents supplémentaires (facultatif)</Typography>
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} className={classes["text"]}>
|
||||
Vous souhaitez envoyer d'autres documents à votre notaire ?
|
||||
</Typography>*/}
|
||||
{/* <Button
|
||||
</Typography>
|
||||
<Button
|
||||
variant={EButtonVariant.PRIMARY}
|
||||
styletype={EButtonstyletype.OUTLINED}
|
||||
className={classes["button"]}
|
||||
onClick={onOpenModalAddDocument}>
|
||||
Ajouter d'autres documents
|
||||
</Button>
|
||||
{isAddDocumentModalVisible && renderBox()} */}
|
||||
{isAddDocumentModalVisible && renderBox()}
|
||||
</div>
|
||||
</DefaultCustomerDashboard>
|
||||
);
|
||||
|
@ -4,4 +4,5 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--spacing-xl, 32px);
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -148,9 +148,13 @@ export default function InformationSection(props: IProps) {
|
||||
<IconButton icon={<PaperAirplaneIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
||||
</Link>
|
||||
|
||||
{/* If the folder is not archived, we can display the archive button */}
|
||||
{anchorStatus !== "VERIFIED_ON_CHAIN" && (
|
||||
<Menu items={menuItemsDekstop}>
|
||||
<IconButton icon={<EllipsisHorizontalIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
||||
</Menu>
|
||||
)}
|
||||
|
||||
{!isArchived && <IconButton onClick={onArchive} icon={<ArchiveBoxIcon />} variant={EIconButtonVariant.ERROR} />}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user