Merge branch 'dev' of https://github.com/smart-chain-fr/leCoffre-front into dev
This commit is contained in:
commit
1d82962e6e
38
package-lock.json
generated
38
package-lock.json
generated
@ -16,11 +16,12 @@
|
||||
"@types/react-dom": "18.0.11",
|
||||
"class-validator": "^0.14.0",
|
||||
"classnames": "^2.3.2",
|
||||
"crypto-random-string": "^5.0.0",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "8.36.0",
|
||||
"eslint-config-next": "13.2.4",
|
||||
"form-data": "^4.0.0",
|
||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44",
|
||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.47",
|
||||
"next": "13.2.4",
|
||||
"prettier": "^2.8.7",
|
||||
"react": "18.2.0",
|
||||
@ -1535,6 +1536,20 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/crypto-random-string": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-5.0.0.tgz",
|
||||
"integrity": "sha512-KWjTXWwxFd6a94m5CdRGW/t82Tr8DoBc9dNnPCAbFI1EBweN6v1tv8y4Y1m7ndkp/nkIBRxUxAzpaBnR2k3bcQ==",
|
||||
"dependencies": {
|
||||
"type-fest": "^2.12.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/csstype": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz",
|
||||
@ -2551,6 +2566,17 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/globals/node_modules/type-fest": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
|
||||
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/globalthis": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
|
||||
@ -3202,7 +3228,7 @@
|
||||
}
|
||||
},
|
||||
"node_modules/le-coffre-resources": {
|
||||
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#30c8ee50b872a8bc6bec0f5d8c4626d8f4490177",
|
||||
"resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#467b34a484adbd6dfa3fd6082bb7677f6178da51",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"class-transformer": "^0.5.1",
|
||||
@ -4474,11 +4500,11 @@
|
||||
}
|
||||
},
|
||||
"node_modules/type-fest": {
|
||||
"version": "0.20.2",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
|
||||
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
|
||||
"integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": ">=12.20"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
|
@ -23,7 +23,7 @@
|
||||
"eslint": "8.36.0",
|
||||
"eslint-config-next": "13.2.4",
|
||||
"form-data": "^4.0.0",
|
||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44",
|
||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.47",
|
||||
"next": "13.2.4",
|
||||
"prettier": "^2.8.7",
|
||||
"react": "18.2.0",
|
||||
|
@ -10,8 +10,7 @@ export interface IGetDocumentTypesparams {
|
||||
|
||||
// TODO Type getbyuid query params
|
||||
|
||||
export type IPutDocumentTypesParams = {
|
||||
};
|
||||
export type IPutDocumentTypesParams = {};
|
||||
|
||||
export interface IPostDocumentTypesParams {
|
||||
name: string;
|
||||
@ -40,7 +39,8 @@ export default class DocumentTypes extends BaseSuperAdmin {
|
||||
|
||||
public async get(q: IGetDocumentTypesparams): Promise<DocumentType[]> {
|
||||
const url = new URL(this.baseURl);
|
||||
Object.entries(q).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
||||
const query = { q };
|
||||
if (q) Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
||||
try {
|
||||
return await this.getRequest<DocumentType[]>(url);
|
||||
} catch (err) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { File } from "le-coffre-resources/dist/SuperAdmin";
|
||||
import BaseSuperAdmin from "../BaseSuperAdmin";
|
||||
import CryptoService from "@Front/Services/CryptoService/CryptoService";
|
||||
|
||||
|
||||
// TODO Type get query params -> Where + inclue + orderby
|
||||
@ -19,7 +18,6 @@ export default class Files extends BaseSuperAdmin {
|
||||
private static instance: Files;
|
||||
private readonly baseURl = this.namespaceUrl.concat("/files");
|
||||
|
||||
private cryptoService: CryptoService = CryptoService.getInstance();
|
||||
private constructor() {
|
||||
super();
|
||||
}
|
||||
@ -34,9 +32,6 @@ export default class Files extends BaseSuperAdmin {
|
||||
if (q) Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
||||
try {
|
||||
const files = await this.getRequest<File[]>(url);
|
||||
files.forEach(async (file) => {
|
||||
file.file_path = await this.cryptoService.decrypt(file.file_path!, file.iv);
|
||||
});
|
||||
return files;
|
||||
} catch (err) {
|
||||
this.onError(err);
|
||||
@ -68,7 +63,6 @@ export default class Files extends BaseSuperAdmin {
|
||||
if (q) Object.entries(query).forEach(([key, value]) => url.searchParams.set(key, JSON.stringify(value)));
|
||||
try {
|
||||
const file = await this.getRequest<File>(url);
|
||||
file.file_path = await this.cryptoService.decrypt(file.file_path!, file.iv);
|
||||
return file;
|
||||
} catch (err) {
|
||||
this.onError(err);
|
||||
|
@ -26,6 +26,7 @@ type IFile = {
|
||||
index: number;
|
||||
file: File;
|
||||
uid: string;
|
||||
archived: Date | null;
|
||||
};
|
||||
|
||||
type IState = {
|
||||
@ -100,6 +101,7 @@ export default class DepositDocument extends React.Component<IProps, IState> {
|
||||
<div className={classes["documents-container"]}>
|
||||
{this.state.files.map((file) => {
|
||||
const fileObj = file.file;
|
||||
if (file.archived) return;
|
||||
return (
|
||||
<div className={classes["file-container"]} key={fileObj.name + file.index}>
|
||||
<div className={classes["left-part"]}>
|
||||
@ -144,7 +146,6 @@ export default class DepositDocument extends React.Component<IProps, IState> {
|
||||
<InputField textarea fakeplaceholder={"Description"} defaultValue={this.state.refusedReason} readOnly />
|
||||
</div>
|
||||
</Confirm>
|
||||
;
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -156,6 +157,7 @@ export default class DepositDocument extends React.Component<IProps, IState> {
|
||||
index: this.index++,
|
||||
file: new File([""], file.file_path ?? "", {}),
|
||||
uid: file.uid!,
|
||||
archived: file.archived_at ? new Date(file.archived_at) : null,
|
||||
})),
|
||||
});
|
||||
}
|
||||
@ -269,6 +271,7 @@ export default class DepositDocument extends React.Component<IProps, IState> {
|
||||
index: this.index++,
|
||||
file: file,
|
||||
uid: newFile.uid!,
|
||||
archived: null,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -58,7 +58,9 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
||||
return fileName;
|
||||
}
|
||||
} else {
|
||||
return `${documentFiles.length} documents déposés`;
|
||||
const archivedFilesLenght = documentFiles.filter((file) => file.archived_at).length;
|
||||
const documentFileLenght = documentFiles.length - archivedFilesLenght;
|
||||
return `${documentFileLenght} documents déposés`;
|
||||
}
|
||||
} else {
|
||||
return "Aucun document déposé";
|
||||
@ -66,7 +68,11 @@ class DocumentNotaryClass extends React.Component<IPropsClass, IState> {
|
||||
}
|
||||
|
||||
private onClick() {
|
||||
if (this.props.document.document_status !== EDocumentStatus.VALIDATED && this.props.document.document_status !== EDocumentStatus.DEPOSITED) return;
|
||||
if (
|
||||
this.props.document.document_status !== EDocumentStatus.VALIDATED &&
|
||||
this.props.document.document_status !== EDocumentStatus.DEPOSITED
|
||||
)
|
||||
return;
|
||||
this.props.router.push(`/folders/${this.props.folderUid}/documents/${this.props.document.uid}`);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,12 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&.single-information {
|
||||
.content {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
@ -17,7 +23,6 @@
|
||||
.text-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
> :first-child {
|
||||
margin-bottom: 12px;
|
||||
@ -33,9 +38,7 @@
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
&.single-information {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.edit-icon-container {
|
||||
|
@ -1,6 +1,9 @@
|
||||
@import "@Themes/constants.scss";
|
||||
|
||||
.root {
|
||||
height: calc(100vh - 290px);
|
||||
overflow: scroll;
|
||||
|
||||
.active {
|
||||
background-color: var(--grey-medium);
|
||||
}
|
||||
|
@ -26,11 +26,7 @@ class FolderListClass extends React.Component<IPropsClass, IState> {
|
||||
? Module.getInstance().get().modules.pages.Folder.pages.FolderArchived.pages.FolderInformation.props.path
|
||||
: Module.getInstance().get().modules.pages.Folder.pages.FolderInformation.props.path;
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<div className={classes["root"]}>
|
||||
{this.renderFolders()}
|
||||
</div>
|
||||
);
|
||||
return <div className={classes["root"]}>{this.renderFolders()}</div>;
|
||||
}
|
||||
|
||||
private renderFolders(): JSX.Element[] {
|
||||
|
@ -1,8 +1,7 @@
|
||||
@import "@Themes/constants.scss";
|
||||
|
||||
.root {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
width: calc(100vh - 83px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
@ -22,6 +22,7 @@ export type IOption = {
|
||||
value: unknown;
|
||||
label: string;
|
||||
icon?: ReactNode;
|
||||
description?: string;
|
||||
};
|
||||
|
||||
type IState = {
|
||||
|
@ -75,6 +75,7 @@ export default class UserFolderHeader extends React.Component<IProps, IState> {
|
||||
|
||||
private formatPhoneNumber(phoneNumber: string): string {
|
||||
if (!phoneNumber) return "";
|
||||
phoneNumber = phoneNumber.replace(/ /g, "");
|
||||
const output = phoneNumber.split("").map((char, index) => {
|
||||
if (index % 2) return char + " ";
|
||||
return char;
|
||||
|
@ -1,3 +1,4 @@
|
||||
import Documents, { IGetDocumentsparams } from "@Front/Api/LeCoffreApi/SuperAdmin/Documents/Documents";
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import DepositDocument from "@Front/Components/DesignSystem/DepositDocument";
|
||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||
@ -6,16 +7,18 @@ import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography";
|
||||
import Base from "@Front/Components/Layouts/Base";
|
||||
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
||||
import React from "react";
|
||||
import { documentDeposited } from "../DesignSystem/dummyData";
|
||||
import classes from "./classes.module.scss";
|
||||
import Documents, { IGetDocumentsparams } from "@Front/Api/LeCoffreApi/SuperAdmin/Documents/Documents";
|
||||
import { Document } from "le-coffre-resources/dist/Customer";
|
||||
import Users from "@Front/Api/LeCoffreApi/SuperAdmin/Users/Users";
|
||||
import Customers from "@Front/Api/LeCoffreApi/SuperAdmin/Customers/Customers";
|
||||
import Customer, { Document } from "le-coffre-resources/dist/Customer";
|
||||
import { document } from "./../../../Components/Layouts/DesignSystem/dummyData";
|
||||
|
||||
type IProps = {};
|
||||
type IProps = {
|
||||
targetedCustormer: string; // MOCK
|
||||
};
|
||||
type IState = {
|
||||
isAddDocumentModalVisible: boolean;
|
||||
documents: Document[];
|
||||
mockedCustomer: Customer | null;
|
||||
};
|
||||
|
||||
export default class ClientDashboard extends Base<IProps, IState> {
|
||||
@ -24,6 +27,7 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
this.state = {
|
||||
isAddDocumentModalVisible: false,
|
||||
documents: [],
|
||||
mockedCustomer: null,
|
||||
};
|
||||
this.onCloseModalAddDocument = this.onCloseModalAddDocument.bind(this);
|
||||
this.onOpenModalAddDocument = this.onOpenModalAddDocument.bind(this);
|
||||
@ -37,11 +41,7 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
<div className={classes["sub-container"]}>
|
||||
<div className={classes["content"]}>
|
||||
{this.state.documents?.map((document) => (
|
||||
<DepositDocument
|
||||
document={document}
|
||||
key={document.uid}
|
||||
defaultFiles={document.files ?? []}
|
||||
/>
|
||||
<DepositDocument document={document} key={document.uid} defaultFiles={document.files ?? []} />
|
||||
))}
|
||||
</div>
|
||||
<Typography typo={ITypo.H2}>Documents supplémentaires (facultatif)</Typography>
|
||||
@ -69,7 +69,7 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
Glissez / Déposez votre document dans la zone prévue à cet effet ou cliquez sur la zone puis sélectionnez le
|
||||
document correspondant.
|
||||
</Typography>
|
||||
<DepositDocument document={documentDeposited} />
|
||||
<DepositDocument document={document} />
|
||||
</div>
|
||||
</Confirm>
|
||||
</div>
|
||||
@ -83,7 +83,7 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
<div className={classes["text-container"]}>
|
||||
{/* TODO Get name from userStore */}
|
||||
<Typography typo={ITypo.H1} className={classes["title"]}>
|
||||
Bonjour John Doe
|
||||
Bonjour {this.state.mockedCustomer?.contact?.first_name.concat(" ", this.state.mockedCustomer?.contact?.last_name)}
|
||||
</Typography>
|
||||
|
||||
<Typography typo={ITypo.H2} className={classes["subtitle"]}>
|
||||
@ -97,7 +97,9 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
l’aide du bouton ci-dessus.
|
||||
</Typography>
|
||||
</div>
|
||||
<a href="mailto:g.texier@notaires.fr" target="_blank">
|
||||
<Button className={classes["button"]}>Contacter mon notaire</Button>
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -105,9 +107,11 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
public override async componentDidMount() {
|
||||
// TODO Get documents of the current customer according to userStore
|
||||
// REMOVE this mock
|
||||
const mockUsers = (await Users.getInstance().get({}))[2];
|
||||
const mockedCustomers = await Customers.getInstance().get({ where: { contact: { email: this.props.targetedCustormer } } });
|
||||
const mockedCustomer: Customer = mockedCustomers[0]!;
|
||||
|
||||
const query: IGetDocumentsparams = {
|
||||
where: { depositor: mockUsers?.uid },
|
||||
where: { depositor: { uid: mockedCustomer.uid } },
|
||||
include: {
|
||||
files: true,
|
||||
document_history: true,
|
||||
@ -115,7 +119,7 @@ export default class ClientDashboard extends Base<IProps, IState> {
|
||||
},
|
||||
};
|
||||
const documents: Document[] = await Documents.getInstance().get(query);
|
||||
this.setState({ documents });
|
||||
this.setState({ documents, mockedCustomer });
|
||||
}
|
||||
|
||||
private onCloseModalAddDocument() {
|
||||
|
@ -78,7 +78,7 @@ export const contact2: Contact = {
|
||||
};
|
||||
|
||||
export const docType: DocumentType = {
|
||||
name: "Acte de naissance",
|
||||
name: "Votre document",
|
||||
uid: "fezezfazegezrgrezg",
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
@ -146,7 +146,7 @@ export const fileMock: File = {
|
||||
file_name: "file_1",
|
||||
file_path:
|
||||
"https://minteed-stg-euwest3-s3.s3.eu-west-3.amazonaws.com/Qmf_Yb_Eh_X9st_F_Srq_Ve_Bj_Yb_Aj56xv_AV_Nj6_Wjypo_B4r5ubce_U_ae3303e7ab.pdf",
|
||||
iv: "1"
|
||||
archived_at: null,
|
||||
};
|
||||
|
||||
export const fileMock2: File = {
|
||||
@ -157,7 +157,7 @@ export const fileMock2: File = {
|
||||
file_name: "file_2",
|
||||
file_path:
|
||||
"https://minteed-prod-euwest3-s3.s3.eu-west-3.amazonaws.com/Qm_Wq_En1_DCA_8yt_RX_Qx_QFA_9_Fm_ZKZH_Qqb_VH_1_Q_Mnv_G_Jtt1_FS_Xp_2a35a36e19",
|
||||
iv: "2"
|
||||
archived_at: null,
|
||||
};
|
||||
|
||||
export const identityFile: File = {
|
||||
@ -167,7 +167,7 @@ export const identityFile: File = {
|
||||
document: document,
|
||||
file_name: "file_3",
|
||||
file_path: "https://minteed-stg-euwest3-s3.s3.eu-west-3.amazonaws.com/cni_fake_c7259d4923.png",
|
||||
iv: "3"
|
||||
archived_at: null,
|
||||
};
|
||||
|
||||
export const documentIdentity: Document = {
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import PlusIcon from "@Assets/Icons/plus.svg";
|
||||
import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
@ -71,7 +70,7 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
{this.state.documentTypes.map((documentType) => (
|
||||
<CheckBox
|
||||
name="document_types"
|
||||
toolTip="Checkbox with tooltip"
|
||||
toolTip={documentType.description}
|
||||
option={documentType}
|
||||
key={documentType.value as string}
|
||||
/>
|
||||
@ -172,6 +171,7 @@ class AskDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
return {
|
||||
label: documentType.document_type!.name!,
|
||||
value: documentType.document_type!.uid!,
|
||||
description: documentType.document_type!.private_description!,
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||
import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders";
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
@ -124,7 +123,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||
<div className={classes["choose-a-folder"]}>
|
||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||
Veuillez sélectionner un dossier.
|
||||
Vous n'avez aucun dossier archivés
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import LeftArrowIcon from "@Assets/Icons/left-arrow.svg";
|
||||
import RightArrowIcon from "@Assets/Icons/right-arrow.svg";
|
||||
import Documents from "@Front/Api/LeCoffreApi/SuperAdmin/Documents/Documents";
|
||||
@ -22,7 +21,6 @@ import classes from "./classes.module.scss";
|
||||
import OcrResult from "./OcrResult";
|
||||
import Files from "@Front/Api/LeCoffreApi/SuperAdmin/Files/Files";
|
||||
|
||||
|
||||
type IProps = {};
|
||||
type IPropsClass = {
|
||||
documentUid: string;
|
||||
@ -76,7 +74,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
{this.state.document && this.state.document.files && this.state.selectedFile && (
|
||||
<div className={classes["root"]}>
|
||||
<Typography typo={ITypo.H1} color={ITypoColor.BLACK} className={classes["title"]}>
|
||||
App 23 rue Torus Toulon
|
||||
{this.state.document.document_type?.name}
|
||||
</Typography>
|
||||
<Typography typo={ITypo.H3} color={ITypoColor.BLACK} className={classes["subtitle"]}>
|
||||
{this.state.document.document_type?.name}
|
||||
@ -91,7 +89,10 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
</div>
|
||||
)}
|
||||
<div className={classes["file-container"]}>
|
||||
<FilePreview href={Files.getInstance().getUploadLink(this.state.selectedFile?.uid as string)} key={this.state.selectedFile.uid} />
|
||||
<FilePreview
|
||||
href={Files.getInstance().getUploadLink(this.state.selectedFile?.uid as string)}
|
||||
key={this.state.selectedFile.uid}
|
||||
/>
|
||||
</div>
|
||||
{this.state.document.files.length > 1 && (
|
||||
<div
|
||||
@ -268,11 +269,11 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
return index < this.state.document!.files!.length;
|
||||
}
|
||||
|
||||
private async refuseDocument(){
|
||||
try{
|
||||
private async refuseDocument() {
|
||||
try {
|
||||
await Documents.getInstance().put(this.props.documentUid, {
|
||||
document_status: EDocumentStatus.REFUSED,
|
||||
refused_reason: this.state.refuseText
|
||||
refused_reason: this.state.refuseText,
|
||||
});
|
||||
|
||||
this.props.router.push(
|
||||
@ -280,7 +281,7 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
.get()
|
||||
.modules.pages.Folder.pages.FolderInformation.props.path.replace("[folderUid]", this.props.folderUid),
|
||||
);
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ export default class Folder extends BasePage<IProps, IState> {
|
||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||
<div className={classes["choose-a-folder"]}>
|
||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||
Veuillez sélectionner un dossier.
|
||||
Vous n'avez aucun dossier archivés
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import FolderBoxInformation, { EFolderBoxInformationType } from "@Front/Components/DesignSystem/FolderBoxInformation";
|
||||
@ -94,7 +93,7 @@ class FolderInformationClass extends BasePage<IPropsClass, IState> {
|
||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||
<div className={classes["choose-a-folder"]}>
|
||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||
Veuillez sélectionner un dossier.
|
||||
Vous n'avez aucun dossier archivés
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -21,13 +21,17 @@ export default class Folder extends BasePage<IProps, IState> {
|
||||
// TODO: Message if the user has not created any folder yet
|
||||
public override render(): JSX.Element {
|
||||
return (
|
||||
<DefaultNotaryDashboard title={"Dossier"} onSelectedFolder={this.onSelectedFolder} isArchived mobileBackText={"Liste des dossiers"}>
|
||||
<DefaultNotaryDashboard
|
||||
title={"Dossier"}
|
||||
onSelectedFolder={this.onSelectedFolder}
|
||||
isArchived
|
||||
mobileBackText={"Liste des dossiers"}>
|
||||
<div className={classes["root"]}>
|
||||
<div className={classes["no-folder-selected"]}>
|
||||
<Typography typo={ITypo.H1Bis}>Informations du dossier</Typography>
|
||||
<div className={classes["choose-a-folder"]}>
|
||||
<Typography typo={ITypo.P_18} color={ITypoColor.GREY}>
|
||||
Veuillez sélectionner un dossier.
|
||||
Vous n'avez aucun dossier archivés
|
||||
</Typography>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -25,10 +25,22 @@ export default class MyAccount extends Base<IProps, IState> {
|
||||
</Typography>
|
||||
<Form onSubmit={this.onFormSubmit}>
|
||||
<div className={classes["form-container"]}>
|
||||
<InputField name="name" fakeplaceholder="Nom" type="text" defaultValue={"TEXIER"} disabled />
|
||||
<InputField name="surname" fakeplaceholder="Prénom" type="text" defaultValue={"Gwendal"} disabled />
|
||||
<InputField name="email" fakeplaceholder="E-mail" type="email" defaultValue={"g.texier@notaires.fr"} disabled />
|
||||
<InputField name="phone" fakeplaceholder="Numéro de téléphone" type="tel" defaultValue={"06 74 83 90 23"} disabled />
|
||||
<InputField name="name" fakeplaceholder="Nom" type="text" defaultValue={"BIHR"} disabled />
|
||||
<InputField name="surname" fakeplaceholder="Prénom" type="text" defaultValue={"Nicolas"} disabled />
|
||||
<InputField
|
||||
name="email"
|
||||
fakeplaceholder="E-mail"
|
||||
type="email"
|
||||
defaultValue={"nicolas.bihr@notaires.fr"}
|
||||
disabled
|
||||
/>
|
||||
<InputField
|
||||
name="phone"
|
||||
fakeplaceholder="Numéro de téléphone"
|
||||
type="tel"
|
||||
defaultValue={"06 74 83 90 23"}
|
||||
disabled
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
@ -42,12 +54,24 @@ export default class MyAccount extends Base<IProps, IState> {
|
||||
name="office_denomination"
|
||||
fakeplaceholder="Dénomination de l'office"
|
||||
type="text"
|
||||
defaultValue="AP NOTAIRES"
|
||||
defaultValue="Etude Office notarial du Cormier"
|
||||
disabled
|
||||
/>
|
||||
<InputField name="crpcen" fakeplaceholder="CRPCEN" type="number" defaultValue="35137" disabled />
|
||||
<InputField
|
||||
name="cp_address"
|
||||
fakeplaceholder="Adresse CP"
|
||||
defaultValue="2 RUE DE RENNES"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
<InputField
|
||||
name="city"
|
||||
fakeplaceholder="Ville"
|
||||
type="text"
|
||||
defaultValue="35140 ST AUBIN DU CORMIER"
|
||||
disabled
|
||||
/>
|
||||
<InputField name="crpcen" fakeplaceholder="CRPCEN" type="number" defaultValue="04839284" disabled />
|
||||
<InputField name="cp_address" fakeplaceholder="Adresse CP" defaultValue="4 Avenue de La Forêt" type="text" disabled />
|
||||
<InputField name="city" fakeplaceholder="Ville" type="text" defaultValue="35340 LIFFRE" disabled />
|
||||
</div>
|
||||
</Form>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
import ClientDashboard from "@Front/Components/Layouts/ClientDashboard";
|
||||
|
||||
export default function Route() {
|
||||
return <ClientDashboard />;
|
||||
return <ClientDashboard targetedCustormer="kevin.hautefaye@gmail.com" />;
|
||||
}
|
||||
|
5
src/pages/client-dashboard1.tsx
Normal file
5
src/pages/client-dashboard1.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import ClientDashboard from "@Front/Components/Layouts/ClientDashboard";
|
||||
|
||||
export default function Route() {
|
||||
return <ClientDashboard targetedCustormer="manon.simon@gmail.com" />;
|
||||
}
|
5
src/pages/client-dashboard2.tsx
Normal file
5
src/pages/client-dashboard2.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import ClientDashboard from "@Front/Components/Layouts/ClientDashboard";
|
||||
|
||||
export default function Route() {
|
||||
return <ClientDashboard targetedCustormer="vincent.brognard@gmail.com" />;
|
||||
}
|
5
src/pages/client-dashboard3.tsx
Normal file
5
src/pages/client-dashboard3.tsx
Normal file
@ -0,0 +1,5 @@
|
||||
import ClientDashboard from "@Front/Components/Layouts/ClientDashboard";
|
||||
|
||||
export default function Route() {
|
||||
return <ClientDashboard targetedCustormer="maxime.lalo@gmail.com" />;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import ClientDashboard from "@Front/Components/Layouts/ClientDashboard";
|
||||
|
||||
export default function Route() {
|
||||
return <ClientDashboard />;
|
||||
return <ClientDashboard targetedCustormer="kevin.hautefaye@gmail.com" />;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user