From 18d9c74635fad28897e6bf004db92ab13729282f Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Tue, 18 Apr 2023 12:02:22 +0200 Subject: [PATCH] :sparkles: Update folder informations --- .../FolderBoxInformation/classes.module.scss | 3 +- .../FolderBoxInformation/index.tsx | 18 ++-- .../UpdateFolderMetadata/classes.module.scss | 29 +++++++ .../Folder/UpdateFolderMetadata/index.tsx | 83 +++++++++++++++++++ src/pages/dossier/[uid]/modifier.tsx | 5 ++ 5 files changed, 132 insertions(+), 6 deletions(-) create mode 100644 src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss create mode 100644 src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx create mode 100644 src/pages/dossier/[uid]/modifier.tsx diff --git a/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss b/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss index c84963ed..80051bd9 100644 --- a/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss +++ b/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss @@ -38,7 +38,8 @@ } } - .edit-icon { + .edit-icon-container { + cursor: pointer; margin-left: 48px; } diff --git a/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx b/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx index a64126a0..0ef2e0ec 100644 --- a/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx +++ b/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx @@ -5,6 +5,7 @@ import Image from "next/image"; import PenICon from "@Assets/Icons/pen.svg"; import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; import Typography, { ITypo } from "../Typography"; +import Link from "next/link"; type IProps = { folder: IDashBoardFolder; @@ -13,15 +14,20 @@ type IProps = { export default function FolderBoxInformation(props: IProps) { const { isDescription = false } = props; + const path = isDescription + ? "/dossier/".concat(props.folder.uid).concat("/todo") + : "/dossier/".concat(props.folder.uid).concat("/modifier"); return (
{isDescription ? ( -
- Note dossier - {props.folder.description ?? "..."} -
+ <> +
+ Note dossier + {props.folder.description ?? "..."} +
+ ) : ( <>
@@ -43,7 +49,9 @@ export default function FolderBoxInformation(props: IProps) { )}
- edit informations + + edit informations +
); } diff --git a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss new file mode 100644 index 00000000..1e429b33 --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss @@ -0,0 +1,29 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + min-height: 100%; + align-items: flex-start; + + .back-arrow { + margin-bottom: 24px; + } + + .content { + margin-top: 32px; + + >:not(:last-child) { + margin-bottom: 24px; + } + + } + + .button-container { + margin-top: 24px; + + :first-child { + margin-right: 32px; + } + } +} \ No newline at end of file diff --git a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx new file mode 100644 index 00000000..c378ee41 --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx @@ -0,0 +1,83 @@ +import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; +import BasePage from "../../Base"; +import classes from "./classes.module.scss"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; + +import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import Select, { IOption } from "@Front/Components/DesignSystem/Select"; +import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; +import Form from "@Front/Components/DesignSystem/Form"; +import { useRouter } from "next/router"; +import BackArrow from "@Front/Components/Elements/BackArrow"; + +type IProps = { + selectedFolderUid: string; +}; +type IState = { + selectedFolder: IDashBoardFolder | null; + selectedOption?: IOption; +}; +class UpdateFolderMetadataClass extends BasePage { + constructor(props: IProps) { + super(props); + this.state = { + selectedFolder: null, + }; + this.onSelectedFolder = this.onSelectedFolder.bind(this); + this.onSelectedOption = this.onSelectedOption.bind(this); + } + public override render(): JSX.Element { + const selectOptions = [ + { value: "adazzdsqaad", label: "Acte de mariage" }, + { value: "adazzqsdaad", label: "Vente immobilière" }, + { value: "adazzqsdaad", label: "Acte de divorce" }, + ]; + + return ( + +
+
+ +
+ Modifier les informations du dossier + +
+
+ + +