From 5f742dc6eae90152e241b4ec7d7c8429131d7a10 Mon Sep 17 00:00:00 2001 From: Vins Date: Tue, 20 Feb 2024 09:29:53 +0100 Subject: [PATCH] Rules fix + rules PUT rib --- src/front/Api/Entities/rule.ts | 1 + .../Header/BurgerMenu/BurgerModal/index.tsx | 19 ++++++++++++++----- .../Header/Profile/ProfileModal/index.tsx | 19 ++++++++++++++----- .../Layouts/Roles/RolesInformations/index.tsx | 10 +++++++++- src/pages/offices/rib/index.tsx | 15 ++++++++++++++- 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/src/front/Api/Entities/rule.ts b/src/front/Api/Entities/rule.ts index ac4a0282..764f4720 100644 --- a/src/front/Api/Entities/rule.ts +++ b/src/front/Api/Entities/rule.ts @@ -17,4 +17,5 @@ export enum AppRuleNames { deedTypes = "deed-types", offices = "offices", documents = "documents", + rib = "rib", } diff --git a/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx b/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx index f39145a9..b498cc7e 100644 --- a/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx +++ b/src/front/Components/DesignSystem/Header/BurgerMenu/BurgerModal/index.tsx @@ -122,11 +122,20 @@ export default class BurgerModal extends React.Component { ]} /> - + + +
diff --git a/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx b/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx index c829f34b..a3a45e61 100644 --- a/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx +++ b/src/front/Components/DesignSystem/Header/Profile/ProfileModal/index.tsx @@ -96,11 +96,20 @@ export default class ProfileModal extends React.Component { ]} /> - + + +
diff --git a/src/front/Components/Layouts/Roles/RolesInformations/index.tsx b/src/front/Components/Layouts/Roles/RolesInformations/index.tsx index 88f55e1e..04ebe346 100644 --- a/src/front/Components/Layouts/Roles/RolesInformations/index.tsx +++ b/src/front/Components/Layouts/Roles/RolesInformations/index.tsx @@ -47,9 +47,17 @@ export default function RolesInformations(props: IProps) { const rules = await Rules.getInstance().get({ where: { - namespace: "notary", + OR: [ + { + namespace: "notary", + }, + { + namespace: "collaborator", + }, + ], }, }); + if (!role) return; setRoleSelected(role); if (!role.rules) return; diff --git a/src/pages/offices/rib/index.tsx b/src/pages/offices/rib/index.tsx index e168971a..eeef1931 100644 --- a/src/pages/offices/rib/index.tsx +++ b/src/pages/offices/rib/index.tsx @@ -1,5 +1,18 @@ +import { AppRuleActions, AppRuleNames } from "@Front/Api/Entities/rule"; +import Rules, { RulesMode } from "@Front/Components/Elements/Rules"; import Rib from "@Front/Components/Layouts/Rib"; export default function Route() { - return ; + return ( + + + + ); }