From c09a494abbdd1fc797412c44a29503f31bba2420 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 20 Apr 2023 14:38:52 +0200 Subject: [PATCH 1/4] :sparkles: My account done (#12) --- .../Layouts/MyAccount/classes.module.scss | 27 ++++++++ .../Components/Layouts/MyAccount/index.tsx | 61 +++++++++++++++++++ src/pages/my-account/index.tsx | 5 ++ 3 files changed, 93 insertions(+) create mode 100644 src/front/Components/Layouts/MyAccount/classes.module.scss create mode 100644 src/front/Components/Layouts/MyAccount/index.tsx create mode 100644 src/pages/my-account/index.tsx diff --git a/src/front/Components/Layouts/MyAccount/classes.module.scss b/src/front/Components/Layouts/MyAccount/classes.module.scss new file mode 100644 index 00000000..7e5b5fbd --- /dev/null +++ b/src/front/Components/Layouts/MyAccount/classes.module.scss @@ -0,0 +1,27 @@ +@import "@Themes/constants.scss"; + +.root { + .title { + margin-top: 24px; + } + + .parts-container { + display: flex; + gap: 64px; + margin-top: 32px; + + @media (max-width: $screen-m) { + flex-direction: column; + } + .part { + flex: 1; + + .form-container { + display: flex; + flex-direction: column; + gap: 24px; + margin-top: 32px; + } + } + } +} diff --git a/src/front/Components/Layouts/MyAccount/index.tsx b/src/front/Components/Layouts/MyAccount/index.tsx new file mode 100644 index 00000000..2eaa1316 --- /dev/null +++ b/src/front/Components/Layouts/MyAccount/index.tsx @@ -0,0 +1,61 @@ +import Form, { IApiFormErrors } from "@Front/Components/DesignSystem/Form"; +import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; +import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography"; +import Base from "@Front/Components/Layouts/Base"; +import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate"; +import React from "react"; + +import classes from "./classes.module.scss"; + +type IProps = {}; +type IState = {}; + +export default class MyAccount extends Base { + public override render(): JSX.Element { + return ( + +
+ + Mon compte + +
+
+ + Mes informations + +
+
+ + + + +
+
+
+
+ + Mon office + +
+
+ + + + +
+
+
+
+
+
+ ); + } + + private onFormSubmit( + e: React.FormEvent | null, + values: { + [key: string]: string; + }, + onApiErrors: (apiFormErrors: IApiFormErrors | null) => void, + ) {} +} diff --git a/src/pages/my-account/index.tsx b/src/pages/my-account/index.tsx new file mode 100644 index 00000000..cb91f1aa --- /dev/null +++ b/src/pages/my-account/index.tsx @@ -0,0 +1,5 @@ +import MyAccount from "@Front/Components/Layouts/MyAccount"; + +export default function Route() { + return ; +} From 22d680e6d2207031c93ab2772062ea3753c34ab1 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 20 Apr 2023 15:39:36 +0200 Subject: [PATCH 2/4] :sparkles: Preview file (#13) --- .../FilePreview/classes.module.scss | 16 ++++++++++ .../DesignSystem/FilePreview/index.tsx | 32 +++++++++++++++++++ .../Components/Layouts/DesignSystem/index.tsx | 13 ++++++++ 3 files changed, 61 insertions(+) create mode 100644 src/front/Components/DesignSystem/FilePreview/classes.module.scss create mode 100644 src/front/Components/DesignSystem/FilePreview/index.tsx diff --git a/src/front/Components/DesignSystem/FilePreview/classes.module.scss b/src/front/Components/DesignSystem/FilePreview/classes.module.scss new file mode 100644 index 00000000..95b916b2 --- /dev/null +++ b/src/front/Components/DesignSystem/FilePreview/classes.module.scss @@ -0,0 +1,16 @@ +.root { + height: inherit; + .file-container { + height: inherit; + .image { + width: 100%; + height: inherit; + object-fit: contain; + } + + .pdf { + width: 100%; + height: inherit; + } + } +} diff --git a/src/front/Components/DesignSystem/FilePreview/index.tsx b/src/front/Components/DesignSystem/FilePreview/index.tsx new file mode 100644 index 00000000..37ad48e0 --- /dev/null +++ b/src/front/Components/DesignSystem/FilePreview/index.tsx @@ -0,0 +1,32 @@ +import React from "react"; + +import Typography, { ITypo, ITypoColor } from "../Typography"; +import classes from "./classes.module.scss"; + +type IProps = { + href: string; +}; +type IState = {}; + +export default class FilePreview extends React.Component { + override render() { + const type = this.props.href.split(".").pop(); + return ( +
+ {!type && ( + + Erreur lors du chargement du fichier + + )} + {type && ( +
+ {type === "pdf" && ( + + )} + {type !== "pdf" && File preview} +
+ )} +
+ ); + } +} diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx index 20445c3f..57aa28fa 100644 --- a/src/front/Components/Layouts/DesignSystem/index.tsx +++ b/src/front/Components/Layouts/DesignSystem/index.tsx @@ -1,6 +1,7 @@ import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import CheckBox from "@Front/Components/DesignSystem/CheckBox"; import DocumentNotary from "@Front/Components/DesignSystem/Document/DocumentNotary"; +import FilePreview from "@Front/Components/DesignSystem/FilePreview"; import FolderContainer from "@Front/Components/DesignSystem/FolderContainer"; import FolderList from "@Front/Components/DesignSystem/FolderListContainer"; import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; @@ -268,6 +269,18 @@ export default class DesignSystem extends BasePage { + +
+
+ Preview Image/Pdf +
+
+
+ +
+ +
+
); From 326b1e0d8598379f0702a942c63fd2dce83350e1 Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Thu, 20 Apr 2023 15:44:48 +0200 Subject: [PATCH 3/4] fix responsiv on login page --- .../DefaultDoubleSidePage/classes.module.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss index 39f28879..c93fd0b1 100644 --- a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss +++ b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/classes.module.scss @@ -13,19 +13,25 @@ max-height: 100vh; overflow: auto; } + .sides { width: 50%; + @media (max-width: $screen-m) { width: 100%; } + &.image-container { display: flex; align-items: center; justify-content: center; + @media (max-width: $screen-m) { display: none; } + background: var(--grey-soft); + .image { width: 100%; height: 100%; @@ -38,6 +44,10 @@ align-items: center; justify-content: center; + @media (max-width: $screen-m) { + display: none; + } + .background-image { height: 100%; width: 100%; @@ -46,4 +56,4 @@ } } } -} +} \ No newline at end of file From 3f1bc4cd0721dc18e38fadd54a8700c080446096 Mon Sep 17 00:00:00 2001 From: Hugo Lextrait Date: Thu, 20 Apr 2023 16:07:19 +0200 Subject: [PATCH 4/4] fix post presentation --- .../Components/DesignSystem/UserFolder/index.tsx | 2 +- .../Layouts/Folder/CreateFolder/index.tsx | 2 +- .../Layouts/Folder/FolderInformation/index.tsx | 2 +- .../Folder/UpdateFolderDescription/index.tsx | 2 +- src/front/index.scss | 16 +++++++++++++++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index d3cf9451..dfd1108e 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -73,7 +73,7 @@ export default class UserFolder extends React.Component { {this.state.isOpen && (
diff --git a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx index 51d2a622..150cb298 100644 --- a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx @@ -89,7 +89,7 @@ export default class CreateFolder extends BasePage {