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 2a54b013..891b7cd0 100644 --- a/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx +++ b/src/front/Components/Layouts/Folder/FolderInformation/ClientView/ClientBox/index.tsx @@ -1,17 +1,16 @@ import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button"; -import IconButton, { EIconButtonVariant } from "@Front/Components/DesignSystem/IconButton"; import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography"; import useOpenable from "@Front/Hooks/useOpenable"; -import { PencilSquareIcon, TrashIcon } from "@heroicons/react/24/outline"; +import { PencilSquareIcon, TrashIcon, UsersIcon } from "@heroicons/react/24/outline"; import { ICustomer } from ".."; import { AnchorStatus } from "../.."; import classes from "./classes.module.scss"; import DeleteCustomerModal from "./DeleteCustomerModal"; -import Link from "next/link"; import Module from "@Front/Config/Module"; import { useCallback } from "react"; import { Note } from "le-coffre-resources/dist/Customer"; +import ButtonWithSubMenu from "@Front/Components/Elements/ButtonWithSubMenu"; type IProps = { customer: ICustomer; @@ -33,6 +32,16 @@ export default function ClientBox(props: IProps) { [props], ); + let createOrUpdateNotePath = Module.getInstance() + .get() + .modules.pages.Notes.pages.EditNote.props.path.replace("[noteUid]", customerNote?.uid ?? ""); + if (!customerNote) { + createOrUpdateNotePath = Module.getInstance() + .get() + .modules.pages.Notes.pages.CreateNote.props.path.replace("[folderUid]", folderUid ?? ""); + createOrUpdateNotePath = createOrUpdateNotePath.replace("[customerUid]", customer.uid ?? ""); + } + return (