From 6425f8ba5eee7fa3341ff8a0ec1ee7918c392d4e Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Wed, 24 Jul 2024 14:59:54 +0200 Subject: [PATCH] :bug: Fixing build --- .../Components/DesignSystem/Alert/index.tsx | 2 +- .../FolderListContainer/index.tsx | 44 ------------------- .../DesignSystem/SearchBlockList/index.tsx | 2 +- .../CollaboratorListContainer/index.tsx | 5 ++- .../DeedTypeListContainer/index.tsx | 5 ++- .../DocumentTypeListContainer/index.tsx | 5 ++- .../OfficeListContainer/index.tsx | 5 ++- .../RoleListContainer/index.tsx | 5 ++- .../UserListContainer/index.tsx | 5 ++- .../ClientBox/DeleteCustomerModal/index.tsx | 2 +- .../ClientView/ClientBox/index.tsx | 2 +- .../DeleteAskedDocumentModal/index.tsx | 2 +- .../NoClientView/DeleteFolderModal/index.tsx | 2 +- .../elements/AnchoringModal/index.tsx | 4 +- .../elements/ArchiveModal/index.tsx | 2 +- .../DownloadAnchoringProofModal/index.tsx | 2 +- .../elements/RequireAnchoringModal/index.tsx | 2 +- .../Components/Layouts/SelectFolder/index.tsx | 5 ++- 18 files changed, 32 insertions(+), 69 deletions(-) diff --git a/src/front/Components/DesignSystem/Alert/index.tsx b/src/front/Components/DesignSystem/Alert/index.tsx index a00022bc..64d70a5c 100644 --- a/src/front/Components/DesignSystem/Alert/index.tsx +++ b/src/front/Components/DesignSystem/Alert/index.tsx @@ -49,7 +49,7 @@ export default function Alert(props: IProps) { {title} - + {description} diff --git a/src/front/Components/DesignSystem/FolderListContainer/index.tsx b/src/front/Components/DesignSystem/FolderListContainer/index.tsx index 3d04a58d..6b8c3e46 100644 --- a/src/front/Components/DesignSystem/FolderListContainer/index.tsx +++ b/src/front/Components/DesignSystem/FolderListContainer/index.tsx @@ -1,17 +1,11 @@ import Module from "@Front/Config/Module"; import { OfficeFolder } from "le-coffre-resources/dist/Notary"; import { EDocumentStatus } from "le-coffre-resources/dist/Notary/Document"; -import Link from "next/link"; import { useRouter } from "next/router"; import React, { useCallback, useEffect } from "react"; -import Button from "../Button"; -import SearchBar from "../SearchBar"; import classes from "./classes.module.scss"; -import Rules, { RulesMode } from "@Front/Components/Elements/Rules"; -import { AppRuleActions, AppRuleNames } from "@Front/Api/Entities/rule"; import { IBlock } from "../SearchBlockList/BlockList/Block"; -import BlockList from "../SearchBlockList/BlockList"; import SearchBlockList from "../SearchBlockList"; type IProps = { @@ -30,27 +24,6 @@ export default function FolderListContainer(props: IProps) { ? Module.getInstance().get().modules.pages.Folder.pages.FolderArchived.pages.FolderInformation.props.path : Module.getInstance().get().modules.pages.Folder.pages.FolderInformation.props.path; - const filterFolders = (value: string): void => { - const filteredFolders: OfficeFolder[] = folders.filter((folder) => { - const name = folder.name.toLowerCase(); - const number = folder.folder_number.toLowerCase(); - value = value.toLowerCase(); - if (folder.customers) { - const customerNames = folder.customers - .map((customer) => { - return `${customer.contact?.first_name.toLowerCase()} ${customer.contact?.last_name.toLowerCase()}`; - }) - .join(", "); - - return name.includes(value) || number.includes(value) || customerNames.includes(value); - } - - return name.includes(value) || number.includes(value); - }); - - setBlocks(getBlocks(filteredFolders)); - }; - const getBlocks = useCallback( (folders: OfficeFolder[]): IBlock[] => { const pendingFolders = folders @@ -102,7 +75,6 @@ export default function FolderListContainer(props: IProps) { setBlocks(getBlocks(folders)); }, [folders, getBlocks]); - //const navigatePath = Module.getInstance().get().modules.pages.Folder.pages.CreateFolder.props.path; return (
- {/* {!isArchived && ( -
- - - - - -
- )} */}
); } diff --git a/src/front/Components/DesignSystem/SearchBlockList/index.tsx b/src/front/Components/DesignSystem/SearchBlockList/index.tsx index 6ae408ec..46434edd 100644 --- a/src/front/Components/DesignSystem/SearchBlockList/index.tsx +++ b/src/front/Components/DesignSystem/SearchBlockList/index.tsx @@ -45,7 +45,7 @@ export default function SearchBlockList(props: IProps) { return { maxHeight: `calc(100% - ${heightToSubstract}px)`, }; - }, []); + }, [bottomButton]); useEffect(() => { setBlocksShowing(blocks); diff --git a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/CollaboratorListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/CollaboratorListContainer/index.tsx index 792c377e..9df33274 100644 --- a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/CollaboratorListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/CollaboratorListContainer/index.tsx @@ -3,9 +3,10 @@ import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import User from "le-coffre-resources/dist/Notary"; -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import { useRouter } from "next/router"; import Module from "@Front/Config/Module"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { collaborators: User[]; @@ -50,7 +51,7 @@ export default function CollaboratorListContainer(props: IProps) { { return { - name: user.contact?.first_name + " " + user.contact?.last_name, + primaryText: user.contact?.first_name + " " + user.contact?.last_name, id: user.uid!, selected: user.uid === collaboratorUid, rightIcon: user.seats?.some((seat) => new Date(seat.subscription!.end_date) >= new Date()) ? ( diff --git a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/DeedTypeListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/DeedTypeListContainer/index.tsx index a4889258..6dc34c85 100644 --- a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/DeedTypeListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/DeedTypeListContainer/index.tsx @@ -1,5 +1,4 @@ import DeedTypes from "@Front/Api/LeCoffreApi/Admin/DeedTypes/DeedTypes"; -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import Button from "@Front/Components/DesignSystem/Button"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import Module from "@Front/Config/Module"; @@ -9,6 +8,8 @@ import { useRouter } from "next/router"; import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { deedTypes: DeedType[]; @@ -50,7 +51,7 @@ export default function DeedListContainer(props: IProps) { { return { - name: deed.name, + primaryText: deed.name, id: deed.uid!, selected: deedTypeUid === deed.uid, }; diff --git a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/DocumentTypeListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/DocumentTypeListContainer/index.tsx index ada6b7a7..3e41b785 100644 --- a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/DocumentTypeListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/DocumentTypeListContainer/index.tsx @@ -1,4 +1,3 @@ -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import Button from "@Front/Components/DesignSystem/Button"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import Module from "@Front/Config/Module"; @@ -8,6 +7,8 @@ import { useRouter } from "next/router"; import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { documentTypes: DocumentType[]; @@ -49,7 +50,7 @@ export default function DocumentTypeListContainer(props: IProps) { { return { - name: documentType.name, + primaryText: documentType.name, id: documentType.uid!, selected: documentType.uid === documentTypeUid, }; diff --git a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/OfficeListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/OfficeListContainer/index.tsx index fec898d0..b6db9a28 100644 --- a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/OfficeListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/OfficeListContainer/index.tsx @@ -1,4 +1,3 @@ -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import Module from "@Front/Config/Module"; import { Office } from "le-coffre-resources/dist/SuperAdmin"; @@ -6,6 +5,8 @@ import { useRouter } from "next/router"; import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { offices: Office[]; @@ -49,7 +50,7 @@ export default function OfficeListContainer(props: IProps) { { return { - name: office.crpcen + " - " + office.name, + primaryText: office.crpcen + " - " + office.name, id: office.uid!, selected: office.uid === officeUid, }; diff --git a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/RoleListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/RoleListContainer/index.tsx index 1f52f6fb..1ee4c395 100644 --- a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/RoleListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/RoleListContainer/index.tsx @@ -1,4 +1,3 @@ -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import Module from "@Front/Config/Module"; import { OfficeRole } from "le-coffre-resources/dist/Admin"; @@ -8,6 +7,8 @@ import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; import Link from "next/link"; import Button from "@Front/Components/DesignSystem/Button"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { roles: OfficeRole[]; @@ -55,7 +56,7 @@ export default function RoleListContainer(props: IProps) { }) .map((role) => { return { - name: role.name, + primaryText: role.name, id: role.uid!, selected: role.uid === roleUid, }; diff --git a/src/front/Components/LayoutTemplates/DefaultUserDashboard/UserListContainer/index.tsx b/src/front/Components/LayoutTemplates/DefaultUserDashboard/UserListContainer/index.tsx index 8128b38d..f543cba6 100644 --- a/src/front/Components/LayoutTemplates/DefaultUserDashboard/UserListContainer/index.tsx +++ b/src/front/Components/LayoutTemplates/DefaultUserDashboard/UserListContainer/index.tsx @@ -1,4 +1,3 @@ -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import SearchBar from "@Front/Components/DesignSystem/SearchBar"; import Module from "@Front/Config/Module"; import User from "le-coffre-resources/dist/Notary"; @@ -6,6 +5,8 @@ import { useRouter } from "next/router"; import React, { useCallback, useState } from "react"; import classes from "./classes.module.scss"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; type IProps = { users: User[]; @@ -50,7 +51,7 @@ export default function UserListContainer(props: IProps) { { return { - name: user.contact?.first_name + " " + user.contact?.last_name, + primaryText: user.contact?.first_name + " " + user.contact?.last_name, id: user.uid!, selected: user.uid === userUid, }; diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/DeleteCustomerModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/DeleteCustomerModal/index.tsx index bdf407d9..7ea02fc7 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/DeleteCustomerModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/DeleteCustomerModal/index.tsx @@ -24,7 +24,7 @@ export default function DeleteCustomerModal(props: IProps) { title={"Êtes-vous sûr de vouloir supprimer ce client du dossier ?"} firstButton={{ children: "Annuler", onClick: onClose }} secondButton={{ children: "Supprimer le client", onClick: handleDelete }}> - + Cette action retirera le client de ce dossier. Vous ne pourrez plus récupérer les informations associées à ce client dans ce dossier une fois supprimées. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx index c0d1fd86..4cd16cce 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx @@ -131,7 +131,7 @@ export default function ClientBox(props: IProps) { onClose={closeErrorModal} title={"Suppression impossible"} secondButton={{ children: "Fermer", onClick: closeErrorModal, fullwidth: true }}> - + Ce client ne peut pas être supprimé car des documents sont associés à son dossier. Veuillez d'abord gérer ou supprimer ces documents avant de tenter de supprimer le client. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx index 901780d9..731bb4c9 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/DocumentTables/DeleteAskedDocumentModal/index.tsx @@ -31,7 +31,7 @@ export default function DeleteAskedDocumentModal(props: IProps) { title={"Êtes-vous sûr de vouloir supprimer cette demande de document ?"} firstButton={{ children: "Annuler", onClick: onClose }} secondButton={{ children: "Supprimer la demande", onClick: onDelete }}> - Cette action annulera la demande du document en cours. + Cette action annulera la demande du document en cours. ); } diff --git a/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx index 814f5d56..cf50489f 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/NoClientView/DeleteFolderModal/index.tsx @@ -34,7 +34,7 @@ export default function DeleteFolderModal(props: IProps) { title={"Êtes-vous sûr de vouloir supprimer ce dossier ?"} firstButton={{ children: "Annuler", onClick: onClose }} secondButton={{ children: "Supprimer le dossier", onClick: onDelete }}> - + Cette action est irréversible. En supprimant ce dossier, toutes les informations associées seront définitivement perdues. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringModal/index.tsx index 071ddc34..24cbecf9 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/AnchoringModal/index.tsx @@ -44,13 +44,13 @@ export default function AnchoringModal(props: IProps) { firstButton={!isAnchoring ? { children: "Non, Annuler", onClick: onClose } : undefined} secondButton={!isAnchoring ? { children: "Oui, certifier et ancrer", onClick: anchor } : undefined}> {!isAnchoring ? ( - + La certification et l'ancrage de ce dossier dans la blockchain sont des actions définitives et garantiront la sécurité et l'authenticité de tous les documents. Veuillez confirmer que vous souhaitez continuer. ) : (
- + Vos documents sont en train d'être ancrés dans la blockchain. Cela peut prendre quelques instants. Merci de votre patience. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx index 177ddf8e..ff1c6621 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/ArchiveModal/index.tsx @@ -37,7 +37,7 @@ export default function ArchiveModal(props: IProps) { firstButton={{ children: "Annuler", onClick: onClose }} secondButton={{ children: "Archiver le dossier", onClick: archive }}>
- + Archiver ce dossier le déplacera dans la section des dossiers archivés. Vous pouvez ajouter une note de dossier avant d'archiver si vous le souhaitez. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx index 910076a4..e9bd477a 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/DownloadAnchoringProofModal/index.tsx @@ -38,7 +38,7 @@ export default function DownloadAnchoringProofModal(props: IProps) { title={"Félicitations ! Dossier ancré avec succès"} firstButton={{ children: "Fermer", onClick: onClose }} secondButton={{ children: "Télécharger la preuve d’ancrage", onClick: downloadAnchoringProof }}> - + Votre dossier a été validé et ancré dans la blockchain. Vous pouvez maintenant télécharger la preuve d'ancrage pour vos archives. diff --git a/src/front/Components/Layouts/Folder/FolderInformation/elements/RequireAnchoringModal/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/elements/RequireAnchoringModal/index.tsx index d6273927..26e41eee 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/elements/RequireAnchoringModal/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/elements/RequireAnchoringModal/index.tsx @@ -23,7 +23,7 @@ export default function RequireAnchoringModal(props: IProps) { title={"Archiver le dossier, action requise : Ancrer et certifier le dossier"} firstButton={{ children: "Annuler", onClick: onClose }} secondButton={{ children: "Ancrer le dossier", onClick: onAnchor }}> - + Pour archiver ce dossier, il est nécessaire de l'ancrer dans la blockchain afin de garantir la sécurité et l'authenticité des documents. Veuillez procéder à l'ancrage avant de continuer. diff --git a/src/front/Components/Layouts/SelectFolder/index.tsx b/src/front/Components/Layouts/SelectFolder/index.tsx index e40b2a82..5d84f4bb 100644 --- a/src/front/Components/Layouts/SelectFolder/index.tsx +++ b/src/front/Components/Layouts/SelectFolder/index.tsx @@ -1,5 +1,4 @@ import Folders from "@Front/Api/LeCoffreApi/Customer/Folders/Folders"; -import BlockList, { IBlock } from "@Front/Components/DesignSystem/BlockList"; import Typography, { ETypo } from "@Front/Components/DesignSystem/Typography"; import DefaultDoubleSidePage from "@Front/Components/LayoutTemplates/DefaultDoubleSidePage"; import JwtService from "@Front/Services/JwtService/JwtService"; @@ -9,6 +8,8 @@ import { useCallback, useEffect, useState } from "react"; import LandingImage from "../Login/landing-connect.jpeg"; import classes from "./classes.module.scss"; +import { IBlock } from "@Front/Components/DesignSystem/SearchBlockList/BlockList/Block"; +import BlockList from "@Front/Components/DesignSystem/SearchBlockList/BlockList"; export default function SelectFolder() { const [folders, setFolders] = useState([]); @@ -66,7 +67,7 @@ export default function SelectFolder() { blocks={folders.map((folder) => { return { id: folder.uid!, - name: folder.name!, + primaryText: folder.name!, selected: false, }; })}