From 49ac5d540d05ecd2c4154dec20247ec4120d16bd Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Mon, 15 Dec 2025 15:47:21 +0100 Subject: [PATCH] fix: :children_crossing: group all company cruds into only one navigation button --- lang/en/back.php | 1 - lang/fr/back.php | 1 - .../ts/back/Components/Layout/AppSidebar.tsx | 64 +++---------------- 3 files changed, 9 insertions(+), 57 deletions(-) diff --git a/lang/en/back.php b/lang/en/back.php index 603f2b88..03924be2 100644 --- a/lang/en/back.php +++ b/lang/en/back.php @@ -207,5 +207,4 @@ return [ "placeholder" => "select your article's categories" ] ], - "implantations" => "implantations", ]; diff --git a/lang/fr/back.php b/lang/fr/back.php index e4e708eb..1d3c0a2c 100644 --- a/lang/fr/back.php +++ b/lang/fr/back.php @@ -208,5 +208,4 @@ return [ "placeholder" => "sélectionnez les catégories de votre article", ] ], - "implantations" => "implantations", ]; diff --git a/resources/ts/back/Components/Layout/AppSidebar.tsx b/resources/ts/back/Components/Layout/AppSidebar.tsx index 99b6b72e..faee4951 100644 --- a/resources/ts/back/Components/Layout/AppSidebar.tsx +++ b/resources/ts/back/Components/Layout/AppSidebar.tsx @@ -106,7 +106,7 @@ export default function AppSidebar() { icon: SquareArrowOutUpRightIcon, }, { - title: str(useTrans("models.classes.dynamic-pages", { choice: 2 })).ucFirst().value(), + title: str(useTrans("models.classes.dynamic-page", { choice: 2 })).ucFirst().value(), model: "dynamic-pages", show: authPolicies.dynamicPages.viewAny, icon: StickyNoteIcon, @@ -207,12 +207,6 @@ export default function AppSidebar() { ] }) }, - ], - }, - { - title: str(useTrans("back.implantations")).ucFirst().value(), - show: auth.policies.companies.viewAny || auth.policies.companyActivities.viewAny || auth.policies.companySectors.viewAny, - links: [ { title: str(useTrans("models.classes.company", { choice: 2 })) .ucFirst() @@ -225,68 +219,28 @@ export default function AppSidebar() { items: [ authPolicies.companies.create && ( ), authPolicies.companies.viewTrash && ( ), - ] - }) - }, - { - title: str(useTrans("models.classes.company-activity", { choice: 2 })) - .ucFirst() - .value(), - model: "company-activities", - icon: RollerCoasterIcon, - show: auth.policies.companyActivities.viewAny, - actions: (model: string) => filterActions({ - items: [ - authPolicies.companyActivities.create && ( + authPolicies.companyActivities.viewAny && ( ), - authPolicies.companyActivities.viewTrash && ( + authPolicies.companySectors.viewAny && ( - ), - ] - }) - }, - { - title: str(useTrans("models.classes.company-sector", { choice: 2 })) - .ucFirst() - .value(), - model: "company-sectors", - icon: RadarIcon, - show: auth.policies.companySectors.viewAny, - actions: (model: string) => filterActions({ - items: [ - authPolicies.companySectors.create && ( - - ), - authPolicies.companySectors.viewTrash && ( - ), ]