fix: 🚸 group all company cruds into only one navigation button
This commit is contained in:
parent
44ceafc1b0
commit
49ac5d540d
3 changed files with 9 additions and 57 deletions
|
|
@ -207,5 +207,4 @@ return [
|
|||
"placeholder" => "select your article's categories"
|
||||
]
|
||||
],
|
||||
"implantations" => "implantations",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -208,5 +208,4 @@ return [
|
|||
"placeholder" => "sélectionnez les catégories de votre article",
|
||||
]
|
||||
],
|
||||
"implantations" => "implantations",
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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 && (
|
||||
<CustomDropdownMenuItem
|
||||
key="create"
|
||||
route={route(`back.${model}.create`)}
|
||||
/>
|
||||
),
|
||||
authPolicies.companies.viewTrash && (
|
||||
<CustomDropdownMenuItem
|
||||
key="trash"
|
||||
route={route(`back.${model}.trash`)}
|
||||
icon={Views.ARCHIVATION.icon}
|
||||
trans={str(useTrans("back.archives")).ucFirst().value()}
|
||||
/>
|
||||
),
|
||||
]
|
||||
})
|
||||
},
|
||||
{
|
||||
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 && (
|
||||
<CustomDropdownMenuItem
|
||||
key="create"
|
||||
route={route(`back.${model}.create`)}
|
||||
icon={RollerCoasterIcon}
|
||||
trans={str(useTrans("models.classes.company-activity", { choice: 2 })).ucFirst().value()}
|
||||
route={route(`back.company-activities.index`)}
|
||||
/>
|
||||
),
|
||||
authPolicies.companyActivities.viewTrash && (
|
||||
authPolicies.companySectors.viewAny && (
|
||||
<CustomDropdownMenuItem
|
||||
key="trash"
|
||||
route={route(`back.${model}.trash`)}
|
||||
icon={Views.ARCHIVATION.icon}
|
||||
trans={str(useTrans("back.archives")).ucFirst().value()}
|
||||
/>
|
||||
),
|
||||
]
|
||||
})
|
||||
},
|
||||
{
|
||||
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 && (
|
||||
<CustomDropdownMenuItem
|
||||
key="create"
|
||||
route={route(`back.${model}.create`)}
|
||||
/>
|
||||
),
|
||||
authPolicies.companySectors.viewTrash && (
|
||||
<CustomDropdownMenuItem
|
||||
key="trash"
|
||||
route={route(`back.${model}.trash`)}
|
||||
icon={Views.ARCHIVATION.icon}
|
||||
trans={str(useTrans("back.archives")).ucFirst().value()}
|
||||
icon={RadarIcon}
|
||||
trans={str(useTrans("models.classes.company-sector", { choice: 2 })).ucFirst().value()}
|
||||
route={route(`back.company-sectors.index`)}
|
||||
/>
|
||||
),
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue