diff --git a/package-lock.json b/package-lock.json index 383aea2d..76839135 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,15 +20,13 @@ "eslint": "8.36.0", "eslint-config-next": "13.2.4", "form-data": "^4.0.0", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44", "next": "13.2.4", "prettier": "^2.8.7", "react": "18.2.0", "react-dom": "18.2.0", "react-select": "^5.7.2", - "reflect-metadata": "^0.1.13", "sass": "^1.59.2", - "typedi": "^0.10.0", "typescript": "4.9.5" } }, @@ -3204,11 +3202,12 @@ } }, "node_modules/le-coffre-resources": { - "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#62639b8bfcd0f779357554a04cd40e8a3ba4e62b", + "resolved": "git+ssh://git@github.com/smart-chain-fr/leCoffre-resources.git#30c8ee50b872a8bc6bec0f5d8c4626d8f4490177", "license": "MIT", "dependencies": { "class-transformer": "^0.5.1", - "class-validator": "^0.14.0" + "class-validator": "^0.14.0", + "reflect-metadata": "^0.1.13" } }, "node_modules/levn": { @@ -4498,11 +4497,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typedi": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/typedi/-/typedi-0.10.0.tgz", - "integrity": "sha512-v3UJF8xm68BBj6AF4oQML3ikrfK2c9EmZUyLOfShpJuItAqVBHWP/KtpGinkSsIiP6EZyyb6Z3NXyW9dgS9X1w==" - }, "node_modules/typescript": { "version": "4.9.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", diff --git a/package.json b/package.json index eac9c138..8f6f84e7 100644 --- a/package.json +++ b/package.json @@ -21,16 +21,14 @@ "dotenv": "^16.0.3", "eslint": "8.36.0", "eslint-config-next": "13.2.4", - "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.40", "form-data": "^4.0.0", + "le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.44", "next": "13.2.4", "prettier": "^2.8.7", "react": "18.2.0", "react-dom": "18.2.0", "react-select": "^5.7.2", - "reflect-metadata": "^0.1.13", "sass": "^1.59.2", - "typedi": "^0.10.0", "typescript": "4.9.5" } } diff --git a/src/front/Api/Auth/IdNot/index.ts b/src/front/Api/Auth/IdNot/index.ts index d82c0a17..32f10aee 100644 --- a/src/front/Api/Auth/IdNot/index.ts +++ b/src/front/Api/Auth/IdNot/index.ts @@ -1,8 +1,6 @@ -import { Service } from "typedi"; import BaseApiService from "@Front/Api/BaseApiService"; import { FrontendVariables } from "@Front/Config/VariablesFront"; -@Service() export default class Auth extends BaseApiService { private static instance: Auth; diff --git a/src/front/Api/BaseApiService.ts b/src/front/Api/BaseApiService.ts index fc1b55cc..f3786452 100644 --- a/src/front/Api/BaseApiService.ts +++ b/src/front/Api/BaseApiService.ts @@ -17,7 +17,7 @@ export default abstract class BaseApiService { } protected getBaseUrl() { - console.log("BaseApiService.baseUrl", BaseApiService.baseUrl); + console.log("BaseApiService.baseUrl >>> ", BaseApiService.baseUrl); return BaseApiService.baseUrl; } diff --git a/src/front/Api/LeCoffreApi/Customer/Users/Users.ts b/src/front/Api/LeCoffreApi/Customer/Users/Users.ts index 9b23e782..e64928bc 100644 --- a/src/front/Api/LeCoffreApi/Customer/Users/Users.ts +++ b/src/front/Api/LeCoffreApi/Customer/Users/Users.ts @@ -1,8 +1,6 @@ -import { Service } from "typedi"; import BaseNotary from "../BaseCustomer"; import User from "le-coffre-resources/dist/Notary"; -@Service() export default class Users extends BaseNotary { private static instance: Users; private readonly baseURl = this.namespaceUrl.concat("/Users"); diff --git a/src/front/Api/LeCoffreApi/Notary/Users/Users.ts b/src/front/Api/LeCoffreApi/Notary/Users/Users.ts index a3fea677..15da8be9 100644 --- a/src/front/Api/LeCoffreApi/Notary/Users/Users.ts +++ b/src/front/Api/LeCoffreApi/Notary/Users/Users.ts @@ -1,8 +1,6 @@ -import { Service } from "typedi"; import BaseNotary from "../BaseNotary"; import User from "le-coffre-resources/dist/Notary"; -@Service() export default class Users extends BaseNotary { private static instance: Users; private readonly baseURl = this.namespaceUrl.concat("/Users"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Customers/Customers.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Customers/Customers.ts index ac7fa867..a345d13b 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Customers/Customers.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Customers/Customers.ts @@ -1,5 +1,4 @@ import { Contact, Customer } from "le-coffre-resources/dist/SuperAdmin"; -import { Service } from "typedi"; import BaseSuperAdmin from "../BaseSuperAdmin"; import { ECivility } from "le-coffre-resources/dist/Customer/Contact"; @@ -26,7 +25,6 @@ export interface IPostCustomersParams { address?: Contact["address"]; } -@Service() export default class Customers extends BaseSuperAdmin { private static instance: Customers; private readonly baseURl = this.namespaceUrl.concat("/customers"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/DeedTypes/DeedTypes.ts b/src/front/Api/LeCoffreApi/SuperAdmin/DeedTypes/DeedTypes.ts index cdaa4e3d..548a95ff 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/DeedTypes/DeedTypes.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/DeedTypes/DeedTypes.ts @@ -1,4 +1,3 @@ -import { Service } from "typedi"; import { DeedType } from "le-coffre-resources/dist/Notary"; import BaseSuperAdmin from "../BaseSuperAdmin"; @@ -19,7 +18,6 @@ export type IPutDeedTypesParams = { deed_type_has_document_types?: DeedType["deed_type_has_document_types"]; }; -@Service() export default class DeedTypes extends BaseSuperAdmin { private static instance: DeedTypes; private readonly baseURl = this.namespaceUrl.concat("/deed-types"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Deeds/Deeds.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Deeds/Deeds.ts index bb51d0e0..3953781f 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Deeds/Deeds.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Deeds/Deeds.ts @@ -1,4 +1,3 @@ -import { Service } from "typedi"; import { Deed, OfficeFolder } from "le-coffre-resources/dist/Notary"; import BaseSuperAdmin from "../BaseSuperAdmin"; @@ -19,7 +18,6 @@ export type IPutDeedsParams = { deed_has_document_types?: Deed["deed_has_document_types"]; }; -@Service() export default class Deeds extends BaseSuperAdmin { private static instance: Deeds; private readonly baseURl = this.namespaceUrl.concat("/deeds"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/DocumentTypes/DocumentTypes.ts b/src/front/Api/LeCoffreApi/SuperAdmin/DocumentTypes/DocumentTypes.ts index 55746b8f..7904e6e5 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/DocumentTypes/DocumentTypes.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/DocumentTypes/DocumentTypes.ts @@ -1,5 +1,4 @@ import { DocumentType } from "le-coffre-resources/dist/SuperAdmin"; -import { Service } from "typedi"; import BaseSuperAdmin from "../BaseSuperAdmin"; @@ -23,7 +22,6 @@ export interface IPostDocumentTypesParams { }; } -@Service() export default class DocumentTypes extends BaseSuperAdmin { private static instance: DocumentTypes; private readonly baseURl = this.namespaceUrl.concat("/document-types"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts index e15c4f7e..d7c0a95a 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Documents/Documents.ts @@ -1,5 +1,4 @@ import { Document } from "le-coffre-resources/dist/SuperAdmin"; -import { Service } from "typedi"; import BaseSuperAdmin from "../BaseSuperAdmin"; import { EDocumentStatus } from "le-coffre-resources/dist/Customer/Document"; @@ -19,7 +18,6 @@ export type IPutDocumentsParams = { export interface IPostDocumentsParams {} -@Service() export default class Documents extends BaseSuperAdmin { private static instance: Documents; private readonly baseURl = this.namespaceUrl.concat("/documents"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Files/Files.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Files/Files.ts index 63cc47ed..219e507c 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Files/Files.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Files/Files.ts @@ -1,9 +1,9 @@ import { File } from "le-coffre-resources/dist/SuperAdmin"; -import Container, { Service } from "typedi"; import BaseSuperAdmin from "../BaseSuperAdmin"; import CryptoService from "@Front/Services/CryptoService/CryptoService"; + // TODO Type get query params -> Where + inclue + orderby export interface IGetFilesparams { where?: {}; @@ -16,21 +16,17 @@ export type IPutFilesParams = {}; export interface IPostFilesParams {} -@Service() export default class Files extends BaseSuperAdmin { private static instance: Files; private readonly baseURl = this.namespaceUrl.concat("/files"); - private constructor(private cryptoService: CryptoService) { + private cryptoService: CryptoService = CryptoService.getInstance(); + private constructor() { super(); } public static getInstance() { - if (!this.instance) { - return new this(Container.get(CryptoService)); - } else { - return this.instance; - } + return (this.instance ??= new this()); } public async get(q: IGetFilesparams): Promise { diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Folders/Folders.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Folders/Folders.ts index 393cb400..cc188375 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Folders/Folders.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Folders/Folders.ts @@ -1,4 +1,3 @@ -import { Service } from "typedi"; import User, { Customer, DeedType, Office, OfficeFolder } from "le-coffre-resources/dist/Notary"; import BaseSuperAdmin from "../BaseSuperAdmin"; import { EFolderStatus } from "le-coffre-resources/dist/Customer/OfficeFolder"; @@ -42,7 +41,6 @@ export type IPutFoldersParams = { office_folder_has_customers?: { customer: { uid: Customer["uid"] } }[]; }; -@Service() export default class Folders extends BaseSuperAdmin { private static instance: Folders; private readonly baseURl = this.namespaceUrl.concat("/folders"); diff --git a/src/front/Api/LeCoffreApi/SuperAdmin/Users/Users.ts b/src/front/Api/LeCoffreApi/SuperAdmin/Users/Users.ts index f08f26f1..17432643 100644 --- a/src/front/Api/LeCoffreApi/SuperAdmin/Users/Users.ts +++ b/src/front/Api/LeCoffreApi/SuperAdmin/Users/Users.ts @@ -1,4 +1,3 @@ -import { Service } from "typedi"; import User from "le-coffre-resources/dist/SuperAdmin"; import BaseSuperAdmin from "../BaseSuperAdmin"; @@ -20,7 +19,6 @@ export type IPutUsersParams = { documents?: User["documents"]; }; -@Service() export default class Users extends BaseSuperAdmin { private static instance: Users; private readonly baseURl = this.namespaceUrl.concat("/users"); diff --git a/src/front/Assets/Icons/id-note-logo.svg b/src/front/Assets/Icons/id-note-logo.svg new file mode 100644 index 00000000..caee423d --- /dev/null +++ b/src/front/Assets/Icons/id-note-logo.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/front/Components/DesignSystem/DepositDocument/index.tsx b/src/front/Components/DesignSystem/DepositDocument/index.tsx index a977cb76..fae00235 100644 --- a/src/front/Components/DesignSystem/DepositDocument/index.tsx +++ b/src/front/Components/DesignSystem/DepositDocument/index.tsx @@ -63,7 +63,6 @@ export default class DepositDocument extends React.Component { } public override render(): JSX.Element { - console.log("Reason in state : ", this.state.refusedReason); return (
{ + private redirectPath: string = this.props.isArchived + ? Module.getInstance().get().modules.pages.Folder.pages.FolderArchived.pages.FolderInformation.props.path + : Module.getInstance().get().modules.pages.Folder.pages.FolderInformation.props.path; public override render(): JSX.Element { - const redirectPath: string = this.props.isArchived - ? Module.getInstance().get().modules.pages.Folder.pages.FolderArchived.pages.FolderInformation.props.path - : Module.getInstance().get().modules.pages.Folder.pages.FolderInformation.props.path; return (
- {this.props.folders.sort((folder) => { - const pendingDocuments = (folder.documents ?? []).filter((document) => document.document_status === EDocumentStatus.DEPOSITED); - return pendingDocuments.length >= 1 ? -1 : 1; - }).sort((folder1, folder2) => { - return folder1.created_at! < folder2.created_at! ? -1 : 1; - }).sort((folder1, folder2) => { - return folder1.folder_number! < folder2.folder_number! ? -1 : 1; - }).map((folder) => { - return ( -
- - ; - -
- ); - })} - ; + {this.renderFolders()}
); } + + private renderFolders(): JSX.Element[] { + const pendingFolders = this.props.folders + .filter((folder) => { + const pendingDocuments = (folder.documents ?? []).filter( + (document) => document.document_status === EDocumentStatus.DEPOSITED, + ); + return pendingDocuments.length >= 1; + }) + .sort((folder1, folder2) => { + return folder1.created_at! > folder2.created_at! ? -1 : 1; + }); + + const otherFolders = this.props.folders + .filter((folder) => { + const pendingDocuments = (folder.documents ?? []).filter( + (document) => document.document_status === EDocumentStatus.DEPOSITED, + ); + return pendingDocuments.length === 0; + }) + .sort((folder1, folder2) => { + return folder1.created_at! > folder2.created_at! ? -1 : 1; + }); + + return [...pendingFolders, ...otherFolders].map((folder) => { + return ( +
+ + ; + +
+ ); + }); + } } export default function FolderList(props: IProps) { diff --git a/src/front/Components/DesignSystem/FolderListContainer/classes.module.scss b/src/front/Components/DesignSystem/FolderListContainer/classes.module.scss index 3fa26504..588e1a18 100644 --- a/src/front/Components/DesignSystem/FolderListContainer/classes.module.scss +++ b/src/front/Components/DesignSystem/FolderListContainer/classes.module.scss @@ -7,7 +7,16 @@ flex-direction: column; justify-content: space-between; + .header { + flex: 1; + } + .searchbar { padding: 40px 24px 24px 24px; } -} + + .folderlist-container { + height: 100%; + border-right: 1px solid var(--grey-medium); + } +} \ No newline at end of file diff --git a/src/front/Components/DesignSystem/FolderListContainer/index.tsx b/src/front/Components/DesignSystem/FolderListContainer/index.tsx index 70ac65bf..521122ba 100644 --- a/src/front/Components/DesignSystem/FolderListContainer/index.tsx +++ b/src/front/Components/DesignSystem/FolderListContainer/index.tsx @@ -31,16 +31,18 @@ export default class FolderListContainer extends React.Component const navigatePath = Module.getInstance().get().modules.pages.Folder.pages.CreateFolder.props.path; return (
-
+
- +
+ +
{!this.props.isArchived && ( diff --git a/src/front/Components/DesignSystem/Form/Elements/InputField/index.tsx b/src/front/Components/DesignSystem/Form/Elements/InputField/index.tsx index 9c3d8838..7c91b6d1 100644 --- a/src/front/Components/DesignSystem/Form/Elements/InputField/index.tsx +++ b/src/front/Components/DesignSystem/Form/Elements/InputField/index.tsx @@ -52,9 +52,7 @@ export default class InputField extends BaseField { this.props.className ? [classes["textarea"], classes[this.props.className]].join(" ") : classes["textarea"] } value={value} - readOnly={this.props.readOnly}> - {value.toString()} - + readOnly={this.props.readOnly} />
{this.props.fakeplaceholder} {!this.props.required && " (Facultatif)"}
diff --git a/src/front/Components/DesignSystem/Header/classes.module.scss b/src/front/Components/DesignSystem/Header/classes.module.scss index 89f3b93d..3c51f7f6 100644 --- a/src/front/Components/DesignSystem/Header/classes.module.scss +++ b/src/front/Components/DesignSystem/Header/classes.module.scss @@ -31,10 +31,6 @@ .profile-section { display: inline-flex; - > :first-child { - margin-right: 32px; - } - @media (max-width: $screen-ls) { display: none; } @@ -61,4 +57,4 @@ } } } -} +} \ No newline at end of file diff --git a/src/front/Components/DesignSystem/Modal/index.tsx b/src/front/Components/DesignSystem/Modal/index.tsx index 3a9624e2..d1ba8b86 100644 --- a/src/front/Components/DesignSystem/Modal/index.tsx +++ b/src/front/Components/DesignSystem/Modal/index.tsx @@ -106,7 +106,7 @@ export default class Modal extends React.Component { private handleKeyDown = (e: KeyboardEvent): void => { - if (e.key === "Escape" || e.key === "Esc" || e.key === "Backspace") { + if (e.key === "Escape" || e.key === "Esc") { this.props.onClose(); } } diff --git a/src/front/Components/DesignSystem/UserFolder/index.tsx b/src/front/Components/DesignSystem/UserFolder/index.tsx index 9cd68c3c..b3ce9b9d 100644 --- a/src/front/Components/DesignSystem/UserFolder/index.tsx +++ b/src/front/Components/DesignSystem/UserFolder/index.tsx @@ -63,7 +63,7 @@ export default class UserFolder extends React.Component { onAccept={this.deleteAskedDocument} closeBtn header={"Supprimer la demande de document ?"} - cancelText={"Cancel"} + cancelText={"Annuler"} confirmText={"Confirmer"}> Êtes-vous vous de vouloir supprimer la demande de document ? diff --git a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/index.tsx b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/index.tsx index ce0192fb..e76a0821 100644 --- a/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDoubleSidePage/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Header from "@Front/Components/DesignSystem/Header"; import Version from "@Front/Components/DesignSystem/Version"; import classNames from "classnames"; diff --git a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx index c7405edb..e13833f1 100644 --- a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import ChevronIcon from "@Assets/Icons/chevron.svg"; import Folders, { IGetFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders"; diff --git a/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx b/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx index bbb87f0a..f6dbe5a2 100644 --- a/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultTemplate/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import React, { ReactNode } from "react"; import classes from "./classes.module.scss"; diff --git a/src/front/Components/Layouts/ClientDashboard/index.tsx b/src/front/Components/Layouts/ClientDashboard/index.tsx index ba7e0bae..6fe77df4 100644 --- a/src/front/Components/Layouts/ClientDashboard/index.tsx +++ b/src/front/Components/Layouts/ClientDashboard/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import DepositDocument from "@Front/Components/DesignSystem/DepositDocument"; import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx index c8bed0ce..c12ec94f 100644 --- a/src/front/Components/Layouts/DesignSystem/index.tsx +++ b/src/front/Components/Layouts/DesignSystem/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import CheckBox from "@Front/Components/DesignSystem/CheckBox"; diff --git a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx index b9449f9f..fa658d25 100644 --- a/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/AddClientToFolder/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Customers from "@Front/Api/LeCoffreApi/SuperAdmin/Customers/Customers"; import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders"; diff --git a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx index d83ea240..9f718dac 100644 --- a/src/front/Components/Layouts/Folder/AskDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/AskDocuments/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import PlusIcon from "@Assets/Icons/plus.svg"; import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders"; diff --git a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx index dcdcd315..205c61af 100644 --- a/src/front/Components/Layouts/Folder/CreateFolder/index.tsx +++ b/src/front/Components/Layouts/Folder/CreateFolder/index.tsx @@ -13,7 +13,7 @@ import { ActionMeta, MultiValue } from "react-select"; import BasePage from "../../Base"; import classes from "./classes.module.scss"; -import { DeedType, OfficeFolder, OfficeFolderHasStakeholder } from "le-coffre-resources/dist/Notary"; +import { DeedType, OfficeFolderHasStakeholder } from "le-coffre-resources/dist/Notary"; import DeedTypes from "@Front/Api/LeCoffreApi/SuperAdmin/DeedTypes/DeedTypes"; import Users from "@Front/Api/LeCoffreApi/SuperAdmin/Users/Users"; import User from "le-coffre-resources/dist/Notary"; @@ -284,7 +284,6 @@ class CreateFolderClass extends BasePage { let office_folder_has_stakeholders = collaborators.map((collaborator) => { return OfficeFolderHasStakeholder.hydrate({ - office_folder: new OfficeFolder(), user_stakeholder: collaborator, }); }); diff --git a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx index a9efa69d..176f61f3 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import ChevronIcon from "@Assets/Icons/chevron.svg"; import Folders, { IPutFoldersParams } from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders"; diff --git a/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx b/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx index 33e8fa64..bb2cbb72 100644 --- a/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx +++ b/src/front/Components/Layouts/Folder/UpdateFolderDescription/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; import Form from "@Front/Components/DesignSystem/Form"; import InputField from "@Front/Components/DesignSystem/Form/Elements/InputField"; diff --git a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx index dd06cdc1..6e898dd9 100644 --- a/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx +++ b/src/front/Components/Layouts/Folder/UpdateFolderMetadata/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import Folders from "@Front/Api/LeCoffreApi/SuperAdmin/Folders/Folders"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; diff --git a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx index 7dcea4f7..c8a51fb9 100644 --- a/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx +++ b/src/front/Components/Layouts/Folder/ViewDocuments/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import LeftArrowIcon from "@Assets/Icons/left-arrow.svg"; import RightArrowIcon from "@Assets/Icons/right-arrow.svg"; diff --git a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx index 840adf24..fa34a49d 100644 --- a/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx +++ b/src/front/Components/Layouts/FolderArchived/FolderInformation/index.tsx @@ -1,4 +1,3 @@ -import "reflect-metadata"; import ChevronIcon from "@Assets/Icons/chevron.svg"; import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button"; diff --git a/src/front/Components/Layouts/Login/classes.module.scss b/src/front/Components/Layouts/Login/classes.module.scss index 8fc12a31..b1f43eee 100644 --- a/src/front/Components/Layouts/Login/classes.module.scss +++ b/src/front/Components/Layouts/Login/classes.module.scss @@ -1,13 +1,21 @@ +@import "@Themes/constants.scss"; + .root { display: flex; align-items: center; justify-content: center; flex-direction: column; height: 100%; + max-width: 530px; + margin: auto; .title { margin: 32px 0; text-align: center; + + @media (max-width: $screen-s) { + font-family: 48px; + } } .forget-password { diff --git a/src/front/Components/Layouts/Login/index.tsx b/src/front/Components/Layouts/Login/index.tsx index 196dd836..5b5be2e8 100644 --- a/src/front/Components/Layouts/Login/index.tsx +++ b/src/front/Components/Layouts/Login/index.tsx @@ -7,6 +7,7 @@ import LandingImage from "./landing-connect.png"; import Image from "next/image"; import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage"; import { FrontendVariables } from "@Front/Config/VariablesFront"; +import idNoteLogo from "@Assets/Icons/id-note-logo.svg"; export default class LoginClass extends BasePage { public override render(): JSX.Element { @@ -17,7 +18,9 @@ export default class LoginClass extends BasePage {
Connexion espace professionnel
- +
Vous n'arrivez pas à vous connecter ?
diff --git a/src/front/Services/CryptoService/CryptoService.ts b/src/front/Services/CryptoService/CryptoService.ts index 281d7023..870c8dee 100644 --- a/src/front/Services/CryptoService/CryptoService.ts +++ b/src/front/Services/CryptoService/CryptoService.ts @@ -1,20 +1,24 @@ -import { Service } from "typedi"; import { FrontendVariables } from "@Front/Config/VariablesFront"; import crypto from "crypto"; -@Service() + export default class CryptoService { private jwkKey: JsonWebKey; private subtle: SubtleCrypto = window.crypto.subtle; - constructor(protected variables: FrontendVariables) { + private static instance: CryptoService; + private constructor() { this.jwkKey = { kty: "oct", - k: variables.KEY_DATA, + k: FrontendVariables.getInstance().KEY_DATA, alg: "A256GCM", ext: true, }; } + public static getInstance() { + return (this.instance ??= new this()); + } + private async getKey() { return await this.subtle.importKey("jwk", this.jwkKey, { name: "AES-GCM" }, false, ["encrypt", "decrypt"]); }