From 3e757ce427e26e3cdbeae53fd4ee1a997e0e6118 Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Wed, 19 Apr 2023 11:50:13 +0200 Subject: [PATCH] renaming url and page modify-description --- .../FolderBoxInformation/classes.module.scss | 3 +- .../FolderBoxInformation/index.tsx | 4 +- .../DesignSystem/FolderList/index.tsx | 2 +- .../FolderListContainer/index.tsx | 3 +- .../Folder/AddClientToFolder/index.tsx | 3 +- .../FolderInformation/ClientSection/index.tsx | 5 +- .../classes.module.scss | 56 ++++++++++++++++ .../Folder/UpdateFolderDescription/index.tsx | 64 +++++++++++++++++++ .../UpdateFolderMetadata/classes.module.scss | 45 ++++++++++--- .../Folder/UpdateFolderMetadata/index.tsx | 11 ++-- .../[uid]/add-client.tsx} | 0 src/pages/{dossier => folder}/[uid]/index.tsx | 0 src/pages/folder/[uid]/update-description.tsx | 5 ++ .../[uid]/update-metadata.tsx} | 0 .../creer-dossier.tsx => folder/create.tsx} | 0 src/pages/{dossier => folder}/index.tsx | 0 16 files changed, 180 insertions(+), 21 deletions(-) create mode 100644 src/front/Components/Layouts/Folder/UpdateFolderDescription/classes.module.scss create mode 100644 src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx rename src/pages/{dossier/[uid]/ajouter-client.tsx => folder/[uid]/add-client.tsx} (100%) rename src/pages/{dossier => folder}/[uid]/index.tsx (100%) create mode 100644 src/pages/folder/[uid]/update-description.tsx rename src/pages/{dossier/[uid]/modifier.tsx => folder/[uid]/update-metadata.tsx} (100%) rename src/pages/{dossier/creer-dossier.tsx => folder/create.tsx} (100%) rename src/pages/{dossier => folder}/index.tsx (100%) diff --git a/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss b/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss index 80051bd9..323dc0d5 100644 --- a/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss +++ b/src/front/Components/DesignSystem/FolderBoxInformation/classes.module.scss @@ -46,9 +46,10 @@ @media (max-width: $screen-s) { flex-wrap: wrap; - .edit-icon { + .edit-icon-container { margin-left: 0px; margin-top: 24px; } } + } \ No newline at end of file diff --git a/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx b/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx index 0ef2e0ec..d350b6e2 100644 --- a/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx +++ b/src/front/Components/DesignSystem/FolderBoxInformation/index.tsx @@ -15,8 +15,8 @@ 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"); + ? "/folder/".concat(props.folder.uid).concat("/update-description") + : "/folder/".concat(props.folder.uid).concat("/update-metadata"); return (
diff --git a/src/front/Components/DesignSystem/FolderList/index.tsx b/src/front/Components/DesignSystem/FolderList/index.tsx index c709db3f..8eb7f12a 100644 --- a/src/front/Components/DesignSystem/FolderList/index.tsx +++ b/src/front/Components/DesignSystem/FolderList/index.tsx @@ -19,7 +19,7 @@ export default class FolderList extends React.Component { {this.props.folders.map((folder) => { return (
- + ;
diff --git a/src/front/Components/DesignSystem/FolderListContainer/index.tsx b/src/front/Components/DesignSystem/FolderListContainer/index.tsx index 031193c4..acdf0c67 100644 --- a/src/front/Components/DesignSystem/FolderListContainer/index.tsx +++ b/src/front/Components/DesignSystem/FolderListContainer/index.tsx @@ -26,6 +26,7 @@ export default class FolderListContainer extends React.Component } public override render(): JSX.Element { + const navigatePath = "/folder/create"; return (
@@ -39,7 +40,7 @@ export default class FolderListContainer extends React.Component />
- +
diff --git a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx index 79ebff97..eaf06e4e 100644 --- a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx @@ -42,11 +42,12 @@ class AddClientToFolderClass extends BasePage { { value: "rijgreipgje", label: "jane Doe" }, { value: "gipjerpogkzfe", label: "Marcelino Doe" }, ]; + const backwardPath = "/folder/".concat(this.props.selectedFolderUid); return (
- +
Associer un ou plusieurs client(s)
diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientSection/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientSection/index.tsx index bd602156..fec80847 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientSection/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientSection/index.tsx @@ -14,12 +14,13 @@ type IState = {}; export default class ClientSection extends React.Component { public override render(): JSX.Element { + const navigatePath = "/folder/".concat(this.props.folder.uid).concat("/ajouter-client"); return (
{this.doesFolderHaveCustomer() ? ( <>
{this.renderCustomerFolders()}
- + @@ -32,7 +33,7 @@ export default class ClientSection extends React.Component { Aucun client n’est associé au dossier.
- + diff --git a/src/front/Components/Layouts/Folder/UpdateFolderDescription/classes.module.scss b/src/front/Components/Layouts/Folder/UpdateFolderDescription/classes.module.scss new file mode 100644 index 00000000..4724e9d9 --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateFolderDescription/classes.module.scss @@ -0,0 +1,56 @@ +@import "@Themes/constants.scss"; + +.root { + display: flex; + flex-direction: column; + min-height: 100%; + align-items: flex-start; + width: fit-content; + + .back-arrow { + margin-bottom: 24px; + } + + .form { + width: 100%; + + .content { + margin-top: 32px; + + >:not(:last-child) { + margin-bottom: 24px; + } + + } + + .button-container { + width: 100%; + display: flex; + text-align: center; + margin-top: 24px; + + .cancel-button { + display: flex; + margin-right: 12px; + } + + @media (max-width: $screen-m) { + display: flex; + flex-direction: column-reverse; + + .cancel-button { + margin-left: 0; + margin-top: 12px; + + >* { + flex: 1; + } + } + + >* { + width: 100%; + } + } + } + } +} \ No newline at end of file diff --git a/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx b/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx new file mode 100644 index 00000000..1f37a6a9 --- /dev/null +++ b/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx @@ -0,0 +1,64 @@ +import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; +import Form from "@Front/Components/DesignSystem/Form"; +import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; +import Typography, { ITypo } from "@Front/Components/DesignSystem/Typography"; +import BackArrow from "@Front/Components/Elements/BackArrow"; +import DefaultNotaryDashboard, { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard"; +import { useRouter } from "next/router"; + +import BasePage from "../../Base"; +import classes from "./classes.module.scss"; +import Link from "next/link"; + +type IProps = { + selectedFolderUid: string; +}; +type IState = { + selectedFolder: IDashBoardFolder | null; +}; +class UpdateFolderDescriptionClass extends BasePage { + constructor(props: IProps) { + super(props); + this.state = { + selectedFolder: null, + }; + this.onSelectedFolder = this.onSelectedFolder.bind(this); + } + public override render(): JSX.Element { + const backwardPath = "/folder/".concat(this.props.selectedFolderUid); + return ( + +
+
+ +
+ Modifier la note du dossier + + +
+ +
+ +
+ + + + +
+ +
+
+ ); + } + + private onSelectedFolder(folder: IDashBoardFolder): void { + this.setState({ selectedFolder: folder }); + } +} + +export default function UpdateFolderDescription() { + const router = useRouter(); + let { uid } = router.query; + uid = uid as string; + return ; +} diff --git a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss index 1e429b33..4724e9d9 100644 --- a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/classes.module.scss @@ -5,25 +5,52 @@ flex-direction: column; min-height: 100%; align-items: flex-start; + width: fit-content; .back-arrow { margin-bottom: 24px; } - .content { - margin-top: 32px; + .form { + width: 100%; + + .content { + margin-top: 32px; + + >:not(:last-child) { + margin-bottom: 24px; + } - >:not(:last-child) { - margin-bottom: 24px; } - } + .button-container { + width: 100%; + display: flex; + text-align: center; + margin-top: 24px; - .button-container { - margin-top: 24px; + .cancel-button { + display: flex; + margin-right: 12px; + } - :first-child { - margin-right: 32px; + @media (max-width: $screen-m) { + display: flex; + flex-direction: column-reverse; + + .cancel-button { + margin-left: 0; + margin-top: 12px; + + >* { + flex: 1; + } + } + + >* { + width: 100%; + } + } } } } \ 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 index e0a0259e..aad61a82 100644 --- a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx @@ -9,6 +9,7 @@ import { useRouter } from "next/router"; import BasePage from "../../Base"; import classes from "./classes.module.scss"; +import Link from "next/link"; type IProps = { selectedFolderUid: string; @@ -32,16 +33,16 @@ class UpdateFolderMetadataClass extends BasePage { { value: "adazzqsdaad", label: "Vente immobilière" }, { value: "adazzqsdaad", label: "Acte de divorce" }, ]; - + const backwardPath = "/folder/".concat(this.props.selectedFolderUid); return (
- +
Modifier les informations du dossier -
+
@@ -55,7 +56,9 @@ class UpdateFolderMetadataClass extends BasePage {
- + + +
diff --git a/src/pages/dossier/[uid]/ajouter-client.tsx b/src/pages/folder/[uid]/add-client.tsx similarity index 100% rename from src/pages/dossier/[uid]/ajouter-client.tsx rename to src/pages/folder/[uid]/add-client.tsx diff --git a/src/pages/dossier/[uid]/index.tsx b/src/pages/folder/[uid]/index.tsx similarity index 100% rename from src/pages/dossier/[uid]/index.tsx rename to src/pages/folder/[uid]/index.tsx diff --git a/src/pages/folder/[uid]/update-description.tsx b/src/pages/folder/[uid]/update-description.tsx new file mode 100644 index 00000000..074f361f --- /dev/null +++ b/src/pages/folder/[uid]/update-description.tsx @@ -0,0 +1,5 @@ +import UpdateFolderDescription from "@Front/Components/Layouts/Folder/UpdateFolderDescription"; + +export default function Route() { + return ; +} diff --git a/src/pages/dossier/[uid]/modifier.tsx b/src/pages/folder/[uid]/update-metadata.tsx similarity index 100% rename from src/pages/dossier/[uid]/modifier.tsx rename to src/pages/folder/[uid]/update-metadata.tsx diff --git a/src/pages/dossier/creer-dossier.tsx b/src/pages/folder/create.tsx similarity index 100% rename from src/pages/dossier/creer-dossier.tsx rename to src/pages/folder/create.tsx diff --git a/src/pages/dossier/index.tsx b/src/pages/folder/index.tsx similarity index 100% rename from src/pages/dossier/index.tsx rename to src/pages/folder/index.tsx