+ {this.props.informations.map((information, key) => {
+ const output =
{information.label}
{information.value}
;
diff --git a/src/front/Components/DesignSystem/SearchBar/classes.module.scss b/src/front/Components/DesignSystem/SearchBar/classes.module.scss
new file mode 100644
index 00000000..c7f1a739
--- /dev/null
+++ b/src/front/Components/DesignSystem/SearchBar/classes.module.scss
@@ -0,0 +1,31 @@
+@import "@Themes/constants.scss";
+
+.root {
+ display: flex;
+ align-items: center;
+ padding-left: 24px;
+ background-color: $white;
+ border: 1px solid $grey-medium;
+ position: relative;
+
+ .fake-placeholder {
+ position: absolute;
+ left: 47px;
+ top: 24px;
+ color: $grey;
+ pointer-events: none;
+ }
+
+ .input {
+ border: 0;
+ margin-left: 8px;
+ padding: 24px 0;
+ width: 100%;
+ font-family: 'Inter';
+ font-style: normal;
+ font-weight: 400;
+ font-size: 18px;
+ line-height: 22px;
+ color: $grey;
+ }
+}
\ No newline at end of file
diff --git a/src/front/Components/DesignSystem/SearchBar/index.tsx b/src/front/Components/DesignSystem/SearchBar/index.tsx
new file mode 100644
index 00000000..f6503f19
--- /dev/null
+++ b/src/front/Components/DesignSystem/SearchBar/index.tsx
@@ -0,0 +1,53 @@
+import React from "react";
+import classes from "./classes.module.scss";
+import LoopIcon from "@Assets/Icons/loop.svg";
+import Image from "next/image";
+import Typography, { ITypo } from "../Typography";
+import { OfficeFolder } from "le-coffre-resources/dist/Customer";
+
+type IProps = {
+ folders: IFolder[];
+ onChange?: (folders: IFolder[]) => IFolder[];
+};
+type IState = {
+ hasValue: boolean;
+};
+
+export type IFolder = {
+ folder_number: OfficeFolder["folder_number"];
+ documents?: OfficeFolder["documents"];
+};
+
+export default class SearchBar extends React.Component
{
+ public constructor(props: IProps) {
+ super(props);
+ this.state = {
+ hasValue: false,
+ };
+ this.doesInputHaveValue = this.doesInputHaveValue.bind(this);
+ this.onChange = this.onChange.bind(this);
+ }
+ public override render(): JSX.Element {
+ return
+
+ {!this.state.hasValue &&
Select
}
+
+
;
+ }
+
+ private onChange(event: React.ChangeEvent) {
+ const hasValue = event.target.value.length > 0
+ this.doesInputHaveValue(hasValue);
+ if (!this.props.onChange) return;
+ this.props.onChange(this.filterFolders(event));
+ }
+
+ private doesInputHaveValue(hasValue: boolean) {
+ this.setState({ hasValue });
+ }
+
+ private filterFolders(event: React.ChangeEvent) {
+ const filteredFolders: IFolder[] = this.props.folders.filter((folder) => folder.folder_number.includes(event.target.value));
+ return filteredFolders;
+ }
+}
diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx
index 4f68f05a..1c3089fe 100644
--- a/src/front/Components/DesignSystem/UserFolder/index.tsx
+++ b/src/front/Components/DesignSystem/UserFolder/index.tsx
@@ -130,7 +130,6 @@ export default class UserFolder extends React.Component {
}
private openDeletionModal(uid: string): void {
- console.log("Delete item > ", uid);
// TODO: call API to delete document
this.setState({
isOpenDeletionModal: true
diff --git a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss
new file mode 100644
index 00000000..2d1cece8
--- /dev/null
+++ b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss
@@ -0,0 +1,14 @@
+@import "@Themes/constants.scss";
+
+.root {
+ .content {
+ .left-side {
+ max-width: 389px;
+ height: calc(100vh - 83px);
+ }
+
+ .right-side {
+ width: 100%;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx
new file mode 100644
index 00000000..2f22ea21
--- /dev/null
+++ b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx
@@ -0,0 +1,42 @@
+import 'reflect-metadata';
+import React, { ReactNode } from "react";
+import classes from "./classes.module.scss";
+import { IFolder } from "@Front/Components/DesignSystem/SearchBar";
+import { folders } from "@Front/Components/Layouts/DesignSystem/dummyData"
+import FolderListContainer from "@Front/Components/DesignSystem/FolderListContainer";
+import Header from "@Front/Components/DesignSystem/Header";
+import Version from "@Front/Components/DesignSystem/Version";
+
+type IProps = {
+ title: string;
+ children?: ReactNode;
+};
+type IState = {
+ folders: IFolder[];
+};
+
+export default class DefaultNotaryDashboard extends React.Component {
+ public static defaultProps = {
+ scrollTop: 0,
+ };
+
+ public constructor(props: IProps) {
+ super(props);
+ this.state = {
+ folders: folders,
+ };
+ }
+
+ public override render(): JSX.Element {
+ return (
+
+
+
+
+
{this.props.children}
+
+
+
+ );
+ }
+}
diff --git a/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx b/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx
index c7ecd3e4..e05d1e15 100644
--- a/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx
+++ b/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx
@@ -2,6 +2,7 @@ import React, { ReactNode } from "react";
import classes from "./classes.module.scss";
import Header from "@Front/Components/DesignSystem/Header";
import Version from "@Front/Components/DesignSystem/Version";
+import 'reflect-metadata';
type IProps = {
title: string;
@@ -21,7 +22,7 @@ export default class DefaultTemplate extends React.Component {
public override render(): JSX.Element {
return (
<>
-
+
diff --git a/src/front/Components/Layouts/DesignSystem/dummyData.ts b/src/front/Components/Layouts/DesignSystem/dummyData.ts
index a5c04efd..ce25c07f 100644
--- a/src/front/Components/Layouts/DesignSystem/dummyData.ts
+++ b/src/front/Components/Layouts/DesignSystem/dummyData.ts
@@ -48,19 +48,6 @@ export const deed: Deed = {
updated_at: new Date(),
};
-export const folder: OfficeFolder = {
- uid: "11123312",
- folder_number: "12331",
- name: "Mon dossier",
- status: EFolderStatus.ARCHIVED,
- deed: deed,
- office: office,
- created_at: new Date(),
- updated_at: new Date(),
- description: "Description",
- archived_description: "Archived description",
-};
-
export const contact: Contact = {
uid: "123123",
first_name: "John",
@@ -90,6 +77,18 @@ export const customer: Customer = {
updated_at: new Date(),
status: ECustomerStatus.VALIDATED,
};
+export const folder: OfficeFolder = {
+ uid: "11123312",
+ folder_number: "12331",
+ name: "Mon dossier",
+ status: EFolderStatus.ARCHIVED,
+ deed: deed,
+ office: office,
+ created_at: new Date(),
+ updated_at: new Date(),
+ description: "Description",
+ archived_description: "Archived description",
+};
export const document: Document = {
uid: "0",
@@ -140,9 +139,11 @@ export const customer2: Customer = {
documents: [document, document2, documentPending, documentDeposited],
};
+
+
export const folderWithPendingDocument: OfficeFolder = {
uid: "11123312",
- folder_number: "12332",
+ folder_number: "00001",
name: "Mon dossier",
status: EFolderStatus.ARCHIVED,
deed: deed,
@@ -151,5 +152,45 @@ export const folderWithPendingDocument: OfficeFolder = {
updated_at: new Date(),
description: "Description",
archived_description: "Archived description",
- documents: [documentPending],
+ documents: [document, document2, documentPending, documentDeposited],
};
+export const folderWithPendingDocument1: OfficeFolder = {
+ uid: "11123312",
+ folder_number: "00002",
+ name: "Mon dossier",
+ status: EFolderStatus.ARCHIVED,
+ deed: deed,
+ office: office,
+ created_at: new Date(),
+ updated_at: new Date(),
+ description: "Description",
+ archived_description: "Archived description",
+ documents: [documentDeposited],
+};
+export const folderWithPendingDocument2: OfficeFolder = {
+ uid: "11123312",
+ folder_number: "00003",
+ name: "Mon dossier",
+ status: EFolderStatus.ARCHIVED,
+ deed: deed,
+ office: office,
+ created_at: new Date(),
+ updated_at: new Date(),
+ description: "Description",
+ archived_description: "Archived description",
+ documents: [document, document2],
+};
+export const folderWithPendingDocument3: OfficeFolder = {
+ uid: "11123312",
+ folder_number: "00014",
+ name: "Mon dossier",
+ status: EFolderStatus.ARCHIVED,
+ deed: deed,
+ office: office,
+ created_at: new Date(),
+ updated_at: new Date(),
+ description: "Description",
+ archived_description: "Archived description",
+ documents: [document, document2, documentDeposited, documentPending],
+};
+export const folders : OfficeFolder[] = [folderWithPendingDocument, folderWithPendingDocument1, folderWithPendingDocument2, folderWithPendingDocument3]
diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx
index 89793f90..bfb71a74 100644
--- a/src/front/Components/Layouts/DesignSystem/index.tsx
+++ b/src/front/Components/Layouts/DesignSystem/index.tsx
@@ -13,11 +13,13 @@ import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"
import QuantityProgressBar from "@Front/Components/DesignSystem/QuantityProgressBar";
import "reflect-metadata";
import FolderContainer from "@Front/Components/DesignSystem/FolderContainer";
-import { customer2, document, documentDeposited, documentPending, folder, folderWithPendingDocument } from "./dummyData"
+import { customer2, document, documentDeposited, documentPending, folder, folderWithPendingDocument, folders } from "./dummyData"
import DocumentNotary from "@Front/Components/DesignSystem/Document/DocumentNotary";
import Select, { IOption } from "@Front/Components/DesignSystem/Select";
import UserFolder from "@Front/Components/DesignSystem/UserFolder";
import MultiSelect from "@Front/Components/DesignSystem/Materials/MultiSelect";
+import SearchBar from "@Front/Components/DesignSystem/SearchBar";
+import FolderList from "@Front/Components/DesignSystem/FolderListContainer";
type IState = {
isModalDisplayed: boolean;
@@ -37,7 +39,7 @@ export default class DesignSystem extends BasePage {
this.onSelectedOption = this.onSelectedOption.bind(this);
}
-
+
public override render(): JSX.Element {
const selectOptions: IOption[] = [
@@ -65,8 +67,6 @@ export default class DesignSystem extends BasePage {