Add subusers management features and enhance department navigation

This commit is contained in:
Jeppe Bundgaard
2026-07-08 12:27:45 +02:00
parent 4cc2c3310c
commit d03f4d9aae
101 changed files with 8953 additions and 5179 deletions
@@ -7,8 +7,8 @@ import { departmentAdvanced, setDepartment, departmentId } from "@/views/dashboa
import { useRouter } from "vue-router";
import { computed, ref } from "vue";
import { useI18n } from "vue-i18n";
import ConfigurationCategory from "@/components/displays/superuser/configuration/ConfigurationCategory.vue";
import ConfigurationSelect from "@/components/displays/superuser/configuration/ConfigurationSelect.vue";
import SuperuserOverviewPanel from "@/components/displays/superuser/overview/SuperuserOverviewPanel.vue";
import SuperUserDashboardDepartmentModulesNavigation
from "@/views/dashboards/superUserDashboard/department/modules/SuperUserDashboardDepartmentModulesNavigation.vue";
import ConfigurationSwitch from "@/components/displays/superuser/configuration/ConfigurationSwitch.vue";
@@ -195,10 +195,13 @@ loadSelfServeEnabled();
<template #title>
<PageTitle :title="departmentTitle" :subtitle="pageSubtitle" />
</template>
<div>
<div class="department-modules">
<SuperUserDashboardDepartmentModulesNavigation />
<section class="box mb-4" data-testid="department-module-variables">
<h2 class="title is-6 mb-2">{{ $t('objects.columns.value') }}</h2>
<SuperuserOverviewPanel
:title="$t('objects.columns.value')"
:subtitle="$t('superuser_dashboard.department_pages.modules.subtitle')"
data-testid="department-module-variables"
>
<div v-if="departmentVariableRows.length === 0" class="has-text-grey">
{{ $t('common.none') }}
</div>
@@ -208,11 +211,9 @@ loadSelfServeEnabled();
<dd>{{ row.value || $t('common.none') }}</dd>
</div>
</dl>
</section>
<ConfigurationCategory
module="Department setup"
</SuperuserOverviewPanel>
<SuperuserOverviewPanel
:title="$t('superuser_dashboard.department_navigation.modules')"
icon="fas fa-cogs"
:subtitle="$t('superuser_dashboard.department_pages.modules.subtitle')"
>
<template #default>
@@ -259,12 +260,10 @@ loadSelfServeEnabled();
}"
></ConfigurationInput>
</template>
</ConfigurationCategory>
<ConfigurationCategory
module="Department setup"
:title="$t('superuser_dashboard.department_navigation.modules')"
icon="fas fa-cogs"
:subtitle="$t('superuser_dashboard.department_pages.modules.subtitle')"
</SuperuserOverviewPanel>
<SuperuserOverviewPanel
title="Invoicing"
:subtitle="$t('superuser_dashboard.department_pages.modules.variables.exclude_from_invoicing')"
>
<template #default>
<ConfigurationSwitch
@@ -282,11 +281,9 @@ loadSelfServeEnabled();
}"
></ConfigurationSwitch>
</template>
</ConfigurationCategory>
<ConfigurationCategory
module="Department setup"
:title="$t('superuser_dashboard.department_navigation.modules')"
icon="fas fa-soap"
</SuperuserOverviewPanel>
<SuperuserOverviewPanel
title="Self-serve"
:subtitle="$t('superuser_dashboard.department_pages.modules.subtitle')"
>
<template #default>
@@ -301,12 +298,10 @@ loadSelfServeEnabled();
{{ selfServeEnabledError }}
</p>
</template>
</ConfigurationCategory>
<ConfigurationCategory
module="Workfeed"
:title="$t('superuser_dashboard.department_navigation.modules')"
icon="fas fa-users-cog"
:subtitle="$t('superuser_dashboard.department_pages.modules.subtitle')"
</SuperuserOverviewPanel>
<SuperuserOverviewPanel
title="Workfeed"
:subtitle="$t('superuser_dashboard.department_pages.modules.variables.workfeed_department_id')"
>
<template #default>
<ConfigurationSelect
@@ -322,12 +317,16 @@ loadSelfServeEnabled();
{{ workfeedDepartmentOptionsError }}
</p>
</template>
</ConfigurationCategory>
</SuperuserOverviewPanel>
</div>
</DepartmentSubPageWrapper>
</RestrictedPageWrapper>
</template>
<style scoped>
.department-modules {
display: flex;
flex-direction: column;
gap: 1rem;
}
</style>