diff --git a/src/front/Assets/Icons/document-check.svg b/src/front/Assets/Icons/document-check.svg new file mode 100644 index 00000000..09925cc3 --- /dev/null +++ b/src/front/Assets/Icons/document-check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/front/Components/DesignSystem/DepositDocument/classes.module.scss b/src/front/Components/DesignSystem/DepositDocument/classes.module.scss index cbe37af9..75681546 100644 --- a/src/front/Components/DesignSystem/DepositDocument/classes.module.scss +++ b/src/front/Components/DesignSystem/DepositDocument/classes.module.scss @@ -13,7 +13,7 @@ .separator { background-color: #939393; width: 1px; - align-self: stretch; + align-self: stretch; } .right { @@ -27,13 +27,33 @@ } } + .documents-container { + display: flex; + flex-direction: column; + gap: 16px; + margin-top: 16px; + + .file-container { + display: flex; + align-items: center; + justify-content: space-between; + + .left-part { + display: flex; + align-items: center; + gap: 8px; + } + } + } + .bottom-container { - .add-button{ - .add-document{ - display: flex; - align-items: center; - gap: 14px; - } - } + margin-top: 16px; + .add-button { + .add-document { + display: flex; + align-items: center; + gap: 14px; + } + } } } diff --git a/src/front/Components/DesignSystem/DepositDocument/index.tsx b/src/front/Components/DesignSystem/DepositDocument/index.tsx index 3bef2c68..f7c1b220 100644 --- a/src/front/Components/DesignSystem/DepositDocument/index.tsx +++ b/src/front/Components/DesignSystem/DepositDocument/index.tsx @@ -1,5 +1,7 @@ import DepositDocumentIcon from "@Assets/Icons/deposit-document.svg"; import PlusIcon from "@Assets/Icons/plus.svg"; +import CrossIcon from "@Assets/Icons/cross.svg"; +import DocumentCheckIcon from "@Assets/Icons/document-check.svg"; import Image from "next/image"; import React from "react"; @@ -7,17 +9,43 @@ import Button, { EButtonVariant } from "../Button"; import Tooltip from "../ToolTip"; import Typography, { ITypo, ITypoColor } from "../Typography"; import classes from "./classes.module.scss"; +import { Document } from "le-coffre-resources/dist/Customer"; type IProps = { title: string; dateAsked: Date; + defaultDocuments?: Document[]; +}; + +type IFile = { + index: number; + file: File; +}; + +type IState = { + files: IFile[]; }; -type IState = {}; export default class DepositDocument extends React.Component { + private inputRef = React.createRef(); + private index = 0; + + public constructor(props: IProps) { + super(props); + + this.state = { + files: [], + }; + + this.addDocument = this.addDocument.bind(this); + this.onFileChange = this.onFileChange.bind(this); + this.removeFile = this.removeFile.bind(this); + } + public override render(): JSX.Element { return (
+
Deposit document @@ -32,6 +60,31 @@ export default class DepositDocument extends React.Component {
+ {this.state.files.length > 0 && ( +
+ {this.state.files.map((file) => { + const fileObj = file.file; + return ( +
+
+ Document check + + {fileObj.name} + +
+ Cross icon +
+ ); + })} +
+ )} +