-
-
-
-
- {isSubMenuOpened && (
-
- {props.subElements.map((element, index) => {
- return ;
- })}
-
- )}
-
- );
-}
diff --git a/src/front/Components/Elements/Rules/index.tsx b/src/front/Components/Elements/Rules/index.tsx
index ecf66840..7f0defba 100644
--- a/src/front/Components/Elements/Rules/index.tsx
+++ b/src/front/Components/Elements/Rules/index.tsx
@@ -26,7 +26,7 @@ export default function Rules(props: IProps) {
if (props.mode === RulesMode.NECESSARY) {
return props.rules.every((rule) => JwtService.getInstance().hasRule(rule.name, rule.action));
}
- return !!props.rules.find((rule) => JwtService.getInstance().hasRule(rule.name, rule.action));
+ return props.rules.length === 0 || !!props.rules.find((rule) => JwtService.getInstance().hasRule(rule.name, rule.action));
}, [props.mode, props.rules]);
useEffect(() => {
diff --git a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/classes.module.scss
index 9b23977b..c4e19f2a 100644
--- a/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultCollaboratorDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/classes.module.scss
index 9b23977b..c4e19f2a 100644
--- a/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultDeedTypeDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/classes.module.scss
index 9b23977b..c4e19f2a 100644
--- a/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultDocumentTypesDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss
index c14e500d..69cef63d 100644
--- a/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultNotaryDashboard/classes.module.scss
@@ -31,8 +31,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -43,8 +43,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -87,7 +87,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -95,7 +95,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/classes.module.scss
index 9b23977b..c4e19f2a 100644
--- a/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultOfficeDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/classes.module.scss
index 9b23977b..c4e19f2a 100644
--- a/src/front/Components/LayoutTemplates/DefaultRoleDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultRoleDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/LayoutTemplates/DefaultUserDashboard/classes.module.scss b/src/front/Components/LayoutTemplates/DefaultUserDashboard/classes.module.scss
index 356d936e..f4e58c6d 100644
--- a/src/front/Components/LayoutTemplates/DefaultUserDashboard/classes.module.scss
+++ b/src/front/Components/LayoutTemplates/DefaultUserDashboard/classes.module.scss
@@ -30,8 +30,8 @@
background-color: var(--color-generic-white);
z-index: 3;
display: flex;
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
transition: all 0.3s $custom-easing;
overflow: hidden;
@@ -42,8 +42,8 @@
&.opened {
transform: translateX(0px);
- width: 389px;
- min-width: 389px;
+ width: 336px;
+ min-width: 336px;
}
}
@@ -86,7 +86,7 @@
.right-side {
min-width: calc(100vw - 389px);
- padding: 64px 48px;
+ padding: 24px;
overflow-y: auto;
@media (max-width: ($screen-m - 1px)) {
@@ -94,7 +94,6 @@
}
@media (max-width: $screen-s) {
- padding: 40px 16px 64px 16px;
flex: 1;
min-width: unset;
}
diff --git a/src/front/Components/Layouts/DesignSystem/index.tsx b/src/front/Components/Layouts/DesignSystem/index.tsx
index 4da7b128..13d4ae9f 100644
--- a/src/front/Components/Layouts/DesignSystem/index.tsx
+++ b/src/front/Components/Layouts/DesignSystem/index.tsx
@@ -27,7 +27,7 @@ import {
import { useCallback, useMemo, useState } from "react";
import classes from "./classes.module.scss";
-import ButtonWithSubMenu from "@Front/Components/Elements/ButtonWithSubMenu";
+import Menu from "@Front/Components/DesignSystem/Menu";
export default function DesignSystem() {
const { isOpen, open, close } = useOpenable();
@@ -80,9 +80,8 @@ export default function DesignSystem() {
Button icon with menu
- }
- subElements={[
+
,
text: "Modifier les collaborateurs",
@@ -101,8 +100,9 @@ export default function DesignSystem() {
link: "/",
color: ETypoColor.ERROR_WEAK_CONTRAST,
},
- ]}
- />
+ ]}>
+ } variant={EIconButtonVariant.NEUTRAL} />
+
Inputs
Number picker avec min à 1 et max à 10
{}} min={1} max={10} />
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 4cd16cce..882aaaaf 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,18 @@
import Button, { EButtonSize, EButtonstyletype, EButtonVariant } from "@Front/Components/DesignSystem/Button";
+import IconButton, { EIconButtonVariant } from "@Front/Components/DesignSystem/IconButton";
+import Menu from "@Front/Components/DesignSystem/Menu";
+import Modal from "@Front/Components/DesignSystem/Modal";
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
+import Module from "@Front/Config/Module";
import useOpenable from "@Front/Hooks/useOpenable";
import { PencilSquareIcon, TrashIcon, UsersIcon } from "@heroicons/react/24/outline";
+import { Note } from "le-coffre-resources/dist/Customer";
+import { useCallback } from "react";
import { ICustomer } from "..";
import { AnchorStatus } from "../..";
import classes from "./classes.module.scss";
import DeleteCustomerModal from "./DeleteCustomerModal";
-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";
-import Modal from "@Front/Components/DesignSystem/Modal";
type IProps = {
customer: ICustomer;
@@ -56,10 +57,9 @@ export default function ClientBox(props: IProps) {
{customer.contact?.first_name} {customer.contact?.last_name}
{anchorStatus === AnchorStatus.NOT_ANCHORED && (
- }
+ ,
text: "Modifier les informations",
@@ -74,12 +74,9 @@ export default function ClientBox(props: IProps) {
text: "Modifier la note",
link: createOrUpdateNotePath,
},
- ]}
- />
- //
- //
- //
+ ]}>
+ } variant={EIconButtonVariant.NEUTRAL} />
+
)}
diff --git a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx
index 4e60f216..ef264e44 100644
--- a/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx
+++ b/src/front/Components/Layouts/Folder/FolderInformation/InformationSection/index.tsx
@@ -1,15 +1,16 @@
import CircleProgress from "@Front/Components/DesignSystem/CircleProgress";
+import IconButton, { EIconButtonVariant } from "@Front/Components/DesignSystem/IconButton";
+import Menu, { IItem } from "@Front/Components/DesignSystem/Menu";
import Tag, { ETagColor } from "@Front/Components/DesignSystem/Tag";
import Typography, { ETypo, ETypoColor } from "@Front/Components/DesignSystem/Typography";
import Module from "@Front/Config/Module";
import { ArchiveBoxIcon, EllipsisHorizontalIcon, PencilSquareIcon, UsersIcon } from "@heroicons/react/24/outline";
import { OfficeFolder } from "le-coffre-resources/dist/Notary";
-
-import classes from "./classes.module.scss";
-import { AnchorStatus } from "..";
-import ButtonWithSubMenu, { ISubElement } from "@Front/Components/Elements/ButtonWithSubMenu";
import { useCallback } from "react";
+import { AnchorStatus } from "..";
+import classes from "./classes.module.scss";
+
type IProps = {
folder: OfficeFolder | null;
progress: number;
@@ -22,7 +23,7 @@ export default function InformationSection(props: IProps) {
const { folder, progress, onArchive, anchorStatus, isArchived } = props;
const getSubMenuElement = useCallback(() => {
- let elements: ISubElement[] = [];
+ let elements: IItem[] = [];
// Creating the three elements and adding them conditionnally
const modifyCollaboratorsElement = {
@@ -86,7 +87,9 @@ export default function InformationSection(props: IProps) {
- } subElements={getSubMenuElement()} />
+
+ } variant={EIconButtonVariant.NEUTRAL} />
+