✨ Mocking documents
This commit is contained in:
parent
e3114f29c1
commit
cacbfcc706
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -1,6 +1,5 @@
|
||||
{
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"editor.formatOnSave": true,
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
|
@ -1,17 +1,6 @@
|
||||
import {
|
||||
Address,
|
||||
Office,
|
||||
DeedType,
|
||||
Deed,
|
||||
OfficeFolder,
|
||||
Contact,
|
||||
Customer,
|
||||
DocumentType,
|
||||
Document,
|
||||
OfficeFolderHasCustomer,
|
||||
} from "le-coffre-resources/dist/Notary";
|
||||
import { ECustomerStatus } from "le-coffre-resources/dist/Customer/Customer";
|
||||
import { EFolderStatus } from "le-coffre-resources/dist/Customer/OfficeFolder";
|
||||
import { Address, Contact, Customer, Deed, DeedType, Document, DocumentType, File, Office, OfficeFolder, OfficeFolderHasCustomer } from "le-coffre-resources/dist/Notary";
|
||||
|
||||
export const address: Address = {
|
||||
uid: "a&2azedzaa3",
|
||||
@ -124,6 +113,15 @@ export const documentPending: Document = {
|
||||
created_at: new Date(),
|
||||
};
|
||||
|
||||
export const fileMock: File = {
|
||||
uid: "super_file_uid",
|
||||
created_at: new Date(),
|
||||
updated_at: new Date(),
|
||||
document: document,
|
||||
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",
|
||||
};
|
||||
|
||||
export const documentDeposited: Document = {
|
||||
uid: "uè§u§htfgrthytrgr",
|
||||
depositor: customer,
|
||||
@ -132,6 +130,7 @@ export const documentDeposited: Document = {
|
||||
document_type: docType,
|
||||
updated_at: new Date(),
|
||||
created_at: new Date(),
|
||||
files: [fileMock],
|
||||
};
|
||||
|
||||
export const customer2: Customer = {
|
||||
|
@ -1,3 +1,5 @@
|
||||
import "reflect-metadata";
|
||||
|
||||
import ValidateAnchoringGif from "@Front/Assets/images/validate_anchoring.gif";
|
||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
import CheckBox from "@Front/Components/DesignSystem/CheckBox";
|
||||
@ -5,14 +7,21 @@ import FilePreview from "@Front/Components/DesignSystem/FilePreview";
|
||||
import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||
import Confirm from "@Front/Components/DesignSystem/Modal/Confirm";
|
||||
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
import { folders } from "@Front/Components/Layouts/DesignSystem/dummyData";
|
||||
import DefaultNotaryDashboard from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||
import Image from "next/image";
|
||||
import { useRouter } from "next/router";
|
||||
import React from "react";
|
||||
|
||||
import BasePage from "../../Base";
|
||||
import classes from "./classes.module.scss";
|
||||
import { Document } from "le-coffre-resources/dist/Customer";
|
||||
|
||||
|
||||
type IProps = {};
|
||||
type IPropsClass = {
|
||||
selectedDocument: Document;
|
||||
};
|
||||
type IState = {
|
||||
isRefuseModalVisible: boolean;
|
||||
isValidateModalVisible: boolean;
|
||||
@ -20,8 +29,8 @@ type IState = {
|
||||
hasValidateAnchoring: boolean;
|
||||
};
|
||||
|
||||
export default class ViewDocuments extends BasePage<IProps, IState> {
|
||||
public constructor(props: IProps) {
|
||||
class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
public constructor(props: IPropsClass) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
@ -42,7 +51,6 @@ export default class ViewDocuments extends BasePage<IProps, IState> {
|
||||
return (
|
||||
<DefaultNotaryDashboard
|
||||
title={"Demander des documents"}
|
||||
onSelectedFolder={() => {}}
|
||||
hasBackArrow
|
||||
mobileBackText="Retour aux documents">
|
||||
<div className={classes["root"]}>
|
||||
@ -50,10 +58,12 @@ export default class ViewDocuments extends BasePage<IProps, IState> {
|
||||
App 23 rue Torus Toulon
|
||||
</Typography>
|
||||
<Typography typo={ITypo.H3} color={ITypoColor.PURPLE_FLASH} className={classes["subtitle"]}>
|
||||
Diagnostic électricité
|
||||
{this.props.selectedDocument.document_type.name}
|
||||
</Typography>
|
||||
<div className={classes["file-container"]}>
|
||||
<FilePreview href="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" />
|
||||
{this.props.selectedDocument.files?.map((file) => (
|
||||
<FilePreview href={file.file_path as string} key={file.uid} />
|
||||
))}
|
||||
</div>
|
||||
<div className={classes["buttons-container"]}>
|
||||
<Button variant={EButtonVariant.GHOST} onClick={this.openRefuseModal}>
|
||||
@ -144,3 +154,14 @@ export default class ViewDocuments extends BasePage<IProps, IState> {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default function ViewDocuments(props: IProps) {
|
||||
const router = useRouter();
|
||||
let { folderUid } = router.query;
|
||||
folderUid = folderUid as string;
|
||||
|
||||
const folder = folders[0]!;
|
||||
const documents = folder.documents!;
|
||||
const selecteDocument = documents[2]!;
|
||||
return <ViewDocumentsClass {...props} selectedDocument={selecteDocument}/>;
|
||||
}
|
||||
|
@ -1,14 +1,8 @@
|
||||
import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||
import BasePage from "../Base";
|
||||
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||
import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";
|
||||
|
||||
import BasePage from "../Base";
|
||||
import classes from "./classes.module.scss";
|
||||
// import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||
// import FolderBoxInformation from "@Front/Components/DesignSystem/FolderBoxInformation";
|
||||
// import QuantityProgressBar from "@Front/Components/DesignSystem/QuantityProgressBar";
|
||||
// import ClientSection from "./ClientSection";
|
||||
// import ChevronIcon from "@Assets/Icons/chevron.svg";
|
||||
// import Confirm from "@Front/Components/DesignSystem/Modal/Confirm";
|
||||
// import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField";
|
||||
|
||||
type IProps = {};
|
||||
type IState = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user