Fixes
This commit is contained in:
commit
dbeb164c95
@ -161,7 +161,7 @@ export default class DepositOtherDocument extends React.Component<IProps, IState
|
|||||||
onClick={this.addDocument}>
|
onClick={this.addDocument}>
|
||||||
<Typography
|
<Typography
|
||||||
typo={ETypo.TEXT_MD_SEMIBOLD}
|
typo={ETypo.TEXT_MD_SEMIBOLD}
|
||||||
color={ETypoColor.COLOR_SECONDARY_500}
|
color={ETypoColor.COLOR_PRIMARY_500}
|
||||||
className={classes["add-document"]}>
|
className={classes["add-document"]}>
|
||||||
Ajouter un document <Image src={PlusIcon} alt="Plus icon" />
|
Ajouter un document <Image src={PlusIcon} alt="Plus icon" />
|
||||||
</Typography>
|
</Typography>
|
||||||
|
@ -72,9 +72,19 @@ export default function DepositDocumentComponent(props: IProps) {
|
|||||||
{document.document_type?.name ?? "_"}
|
{document.document_type?.name ?? "_"}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
|
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
|
||||||
Demandé le:{" "}
|
Demandé le :{" "}
|
||||||
<a className={classes["date"]}>{document.created_at ? new Date(document.created_at).toLocaleDateString() : "_"}</a>
|
<a className={classes["date"]}>{document.created_at ? new Date(document.created_at).toLocaleDateString() : "_"}</a>
|
||||||
</Typography>
|
</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" && (
|
{document.document_status === "REFUSED" && (
|
||||||
<div>
|
<div>
|
||||||
<Typography typo={ETypo.TEXT_MD_REGULAR} color={ETypoColor.TEXT_SECONDARY}>
|
<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 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 React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import { DocumentNotary, type OfficeFolder as OfficeFolderNotary } from "le-coffre-resources/dist/Notary";
|
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 JwtService, { ICustomerJwtPayload } from "@Front/Services/JwtService/JwtService";
|
||||||
import Folders from "@Front/Api/LeCoffreApi/Customer/Folders/Folders";
|
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 Module from "@Front/Config/Module";
|
||||||
import Separator, { ESeperatorColor, ESeperatorDirection } from "@Front/Components/DesignSystem/Separator";
|
import Separator, { ESeperatorColor, ESeperatorDirection } from "@Front/Components/DesignSystem/Separator";
|
||||||
import NotificationBox from "@Front/Components/DesignSystem/NotificationBox";
|
import NotificationBox from "@Front/Components/DesignSystem/NotificationBox";
|
||||||
import ContactBox from "./ContactBox";
|
import ContactBox from "./ContactBox";
|
||||||
import DocumentsNotary from "@Front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary";
|
import DocumentsNotary from "@Front/Api/LeCoffreApi/Customer/DocumentsNotary/DocumentsNotary";
|
||||||
import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary";
|
import { EDocumentNotaryStatus } from "le-coffre-resources/dist/Notary/DocumentNotary";
|
||||||
// import DepositOtherDocument from "@Front/Components/DesignSystem/DepositOtherDocument";
|
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";
|
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
|
|
||||||
@ -37,7 +35,7 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
const [customer, setCustomer] = useState<Customer | null>(null);
|
const [customer, setCustomer] = useState<Customer | null>(null);
|
||||||
const [folder, setFolder] = useState<OfficeFolderNotary | null>(null);
|
const [folder, setFolder] = useState<OfficeFolderNotary | null>(null);
|
||||||
const [documentsNotary, setDocumentsNotary] = useState<DocumentNotary[]>([]);
|
const [documentsNotary, setDocumentsNotary] = useState<DocumentNotary[]>([]);
|
||||||
// const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState<boolean>(false);
|
const [isAddDocumentModalVisible, setIsAddDocumentModalVisible] = useState<boolean>(false);
|
||||||
|
|
||||||
const fetchFolderAndCustomer = useCallback(async () => {
|
const fetchFolderAndCustomer = useCallback(async () => {
|
||||||
let jwt: ICustomerJwtPayload | undefined;
|
let jwt: ICustomerJwtPayload | undefined;
|
||||||
@ -122,33 +120,31 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
[documentsNotary],
|
[documentsNotary],
|
||||||
);
|
);
|
||||||
|
|
||||||
// const onCloseModalAddDocument = useCallback(() => {
|
const onCloseModalAddDocument = useCallback(() => {
|
||||||
// setIsAddDocumentModalVisible(false);
|
setIsAddDocumentModalVisible(false);
|
||||||
// fetchFolderAndCustomer();
|
fetchFolderAndCustomer();
|
||||||
// }, [fetchFolderAndCustomer]);
|
}, [fetchFolderAndCustomer]);
|
||||||
|
|
||||||
// const onOpenModalAddDocument = useCallback(() => {
|
const onOpenModalAddDocument = useCallback(() => {
|
||||||
// setIsAddDocumentModalVisible(true);
|
setIsAddDocumentModalVisible(true);
|
||||||
// }, []);
|
}, []);
|
||||||
|
|
||||||
// const renderBox = useCallback(() => {
|
const renderBox = useCallback(() => {
|
||||||
// console.log(folder!.office!.uid);
|
return (
|
||||||
|
<DepositOtherDocument
|
||||||
// return (
|
folder_uid={folderUid!}
|
||||||
// <DepositOtherDocument
|
customer_uid={customer!.uid!}
|
||||||
// folder_uid={folderUid!}
|
open={isAddDocumentModalVisible}
|
||||||
// customer_uid={customer!.uid!}
|
onClose={onCloseModalAddDocument}
|
||||||
// open={isAddDocumentModalVisible}
|
document={Document.hydrate<Document>({
|
||||||
// onClose={onCloseModalAddDocument}
|
document_type: DocumentType.hydrate<DocumentType>({
|
||||||
// document={Document.hydrate<Document>({
|
name: "Autres documents",
|
||||||
// document_type: DocumentType.hydrate<DocumentType>({
|
office: folder!.office!,
|
||||||
// name: "Autres documents",
|
}),
|
||||||
// office: folder!.office!,
|
})}
|
||||||
// }),
|
/>
|
||||||
// })}
|
);
|
||||||
// />
|
}, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
||||||
// );
|
|
||||||
// }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DefaultCustomerDashboard>
|
<DefaultCustomerDashboard>
|
||||||
@ -236,18 +232,18 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/*<Typography typo={ETypo.TITLE_H3}>Documents supplémentaires (facultatif)</Typography>*/}
|
<Typography typo={ETypo.TITLE_H3}>Documents supplémentaires (facultatif)</Typography>
|
||||||
{/*<Typography typo={ETypo.TEXT_MD_REGULAR} className={classes["text"]}>
|
<Typography typo={ETypo.TEXT_MD_REGULAR} className={classes["text"]}>
|
||||||
Vous souhaitez envoyer d'autres documents à votre notaire ?
|
Vous souhaitez envoyer d'autres documents à votre notaire ?
|
||||||
</Typography>*/}
|
</Typography>
|
||||||
{/* <Button
|
<Button
|
||||||
variant={EButtonVariant.PRIMARY}
|
variant={EButtonVariant.PRIMARY}
|
||||||
styletype={EButtonstyletype.OUTLINED}
|
styletype={EButtonstyletype.OUTLINED}
|
||||||
className={classes["button"]}
|
className={classes["button"]}
|
||||||
onClick={onOpenModalAddDocument}>
|
onClick={onOpenModalAddDocument}>
|
||||||
Ajouter d'autres documents
|
Ajouter d'autres documents
|
||||||
</Button>
|
</Button>
|
||||||
{isAddDocumentModalVisible && renderBox()} */}
|
{isAddDocumentModalVisible && renderBox()}
|
||||||
</div>
|
</div>
|
||||||
</DefaultCustomerDashboard>
|
</DefaultCustomerDashboard>
|
||||||
);
|
);
|
||||||
|
@ -4,4 +4,5 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--spacing-xl, 32px);
|
gap: var(--spacing-xl, 32px);
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@ -148,9 +148,13 @@ export default function InformationSection(props: IProps) {
|
|||||||
<IconButton icon={<PaperAirplaneIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
<IconButton icon={<PaperAirplaneIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Menu items={menuItemsDekstop}>
|
{/* If the folder is not archived, we can display the archive button */}
|
||||||
<IconButton icon={<EllipsisHorizontalIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
{anchorStatus !== "VERIFIED_ON_CHAIN" && (
|
||||||
</Menu>
|
<Menu items={menuItemsDekstop}>
|
||||||
|
<IconButton icon={<EllipsisHorizontalIcon />} variant={EIconButtonVariant.NEUTRAL} />
|
||||||
|
</Menu>
|
||||||
|
)}
|
||||||
|
|
||||||
{!isArchived && <IconButton onClick={onArchive} icon={<ArchiveBoxIcon />} variant={EIconButtonVariant.ERROR} />}
|
{!isArchived && <IconButton onClick={onArchive} icon={<ArchiveBoxIcon />} variant={EIconButtonVariant.ERROR} />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user