Merge branch 'dev' into staging
This commit is contained in:
commit
d483d2d5f6
@ -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, 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 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";
|
||||||
|
|
||||||
@ -15,7 +15,7 @@ import Folders from "@Front/Api/LeCoffreApi/Customer/Folders/Folders";
|
|||||||
import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag";
|
import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag";
|
||||||
import DefaultCustomerDashboard from "@Front/Components/LayoutTemplates/DefaultCustomerDashboard";
|
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 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";
|
||||||
@ -23,7 +23,7 @@ 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";
|
||||||
|
|
||||||
type IProps = {};
|
type IProps = {};
|
||||||
|
|
||||||
@ -35,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;
|
||||||
@ -120,33 +120,33 @@ 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);
|
// console.log(folder!.office!.uid);
|
||||||
|
|
||||||
return (
|
// return (
|
||||||
<DepositOtherDocument
|
// <DepositOtherDocument
|
||||||
folder_uid={folderUid!}
|
// folder_uid={folderUid!}
|
||||||
customer_uid={customer!.uid!}
|
// customer_uid={customer!.uid!}
|
||||||
open={isAddDocumentModalVisible}
|
// open={isAddDocumentModalVisible}
|
||||||
onClose={onCloseModalAddDocument}
|
// onClose={onCloseModalAddDocument}
|
||||||
document={Document.hydrate<Document>({
|
// document={Document.hydrate<Document>({
|
||||||
document_type: DocumentType.hydrate<DocumentType>({
|
// document_type: DocumentType.hydrate<DocumentType>({
|
||||||
name: "Autres documents",
|
// name: "Autres documents",
|
||||||
office: folder!.office!,
|
// office: folder!.office!,
|
||||||
}),
|
// }),
|
||||||
})}
|
// })}
|
||||||
/>
|
// />
|
||||||
);
|
// );
|
||||||
}, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
// }, [customer, folderUid, isAddDocumentModalVisible, onCloseModalAddDocument]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DefaultCustomerDashboard>
|
<DefaultCustomerDashboard>
|
||||||
@ -238,14 +238,14 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
<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>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user