Temp removed add other document
This commit is contained in:
parent
cfe9601661
commit
0add92ca30
@ -3,7 +3,7 @@ import Documents, { IGetDocumentsparams } from "@Front/Api/LeCoffreApi/Customer/
|
||||
|
||||
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
|
||||
import Customer, { Document, DocumentType } from "le-coffre-resources/dist/Customer";
|
||||
import Customer, { Document } 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";
|
||||
|
||||
@ -15,7 +15,7 @@ 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 { 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";
|
||||
@ -23,7 +23,7 @@ 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 DepositOtherDocument from "@Front/Components/DesignSystem/DepositOtherDocument";
|
||||
|
||||
type IProps = {};
|
||||
|
||||
@ -35,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;
|
||||
@ -120,33 +120,33 @@ 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);
|
||||
// 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]);
|
||||
// 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>
|
||||
@ -238,14 +238,14 @@ export default function ClientDashboard(props: IProps) {
|
||||
<Typography typo={ETypo.TEXT_MD_REGULAR} className={classes["text"]}>
|
||||
Vous souhaitez envoyer d'autres documents à votre notaire ?
|
||||
</Typography>
|
||||
<Button
|
||||
{/* <Button
|
||||
variant={EButtonVariant.PRIMARY}
|
||||
styletype={EButtonstyletype.OUTLINED}
|
||||
className={classes["button"]}
|
||||
onClick={onOpenModalAddDocument}>
|
||||
Ajouter d'autres documents
|
||||
</Button>
|
||||
{isAddDocumentModalVisible && renderBox()}
|
||||
{isAddDocumentModalVisible && renderBox()} */}
|
||||
</div>
|
||||
</DefaultCustomerDashboard>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user