From 44661d9b02c48f8c781a4d2be33d1d544343412c Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Sat, 6 Jun 2026 13:10:23 +0200 Subject: [PATCH] =?UTF-8?q?UI:=20Ebenen-Men=C3=BCs=20angepasst=20(Portal-M?= =?UTF-8?q?itarbeiter,=20Reseller=20=E2=80=9EEinloggen=20als")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Portal-Topnav: zusätzlich „Mitarbeiter" (firmenübergreifend, nur einloggbare Mitarbeiter; Firma-Spalte statt Standort, kein Hinzufügen, „Einloggen als"). - Reseller-Topnav: „Firmen" → „Einloggen als" (gleiche Firmen-&-Mitarbeiter- Ansicht). Plattform behält Label „Firmen". - EmployeesView: portalMode (isPlatformAdmin) filtert auf login=true. Co-Authored-By: Claude Opus 4.8 --- frontend/src/layouts/DashboardLayout.vue | 5 ++++- frontend/src/views/EmployeesView.vue | 21 ++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index 16e3790..90d6164 100644 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -15,7 +15,10 @@ const topNav = computed(() => { return [ { label: 'Dashboard', to: '/app', icon: 'M3 3h7v7H3zM14 3h7v7h-7zM14 14h7v7h-7zM3 14h7v7H3z', show: above }, { label: 'Reseller', to: '/app/resellers', icon: 'M3 21h18M5 21V7l8-4v18M19 21V11l-6-3', show: auth.isPlatformAdmin }, - { label: 'Firmen', to: '/app/companies', icon: 'M3 7h18v13H3zM8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', show: above }, + // Plattform: „Firmen" (alle); Reseller: „Einloggen als" (eigene Firmenkunden) + { label: auth.isPlatformAdmin ? 'Firmen' : 'Einloggen als', to: '/app/companies', icon: 'M3 7h18v13H3zM8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2', show: above }, + // Plattform: einloggbare Mitarbeiter (firmenübergreifend) + { label: 'Mitarbeiter', to: '/app/employees', icon: 'M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8z', show: auth.isPlatformAdmin }, { label: 'Produkte', to: '/app/products', icon: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16zM3.27 6.96 12 12.01l8.73-5.05M12 22.08V12', show: above }, { label: 'Bestellungen', to: '/app/orders', icon: 'M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4zM3 6h18M16 10a4 4 0 0 1-8 0', show: above }, { label: 'Einstellungen', to: '/app/settings', icon: 'M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6', show: above }, diff --git a/frontend/src/views/EmployeesView.vue b/frontend/src/views/EmployeesView.vue index 75d7636..aae4bc8 100644 --- a/frontend/src/views/EmployeesView.vue +++ b/frontend/src/views/EmployeesView.vue @@ -67,10 +67,17 @@ async function workAs(e: Employee) { } const companyMap = computed(() => Object.fromEntries(companies.value.map((c) => [c['@id'], c]))) +function companyName(iri: string) { return companyMap.value[iri]?.name ?? '–' } + +// Portal-Ebene (Plattform-Admin): firmenübergreifend, nur einloggbare Mitarbeiter +const portalMode = computed(() => auth.isPlatformAdmin) + const filtered = computed(() => { + let base = employees.value + if (portalMode.value) base = base.filter((e) => e.login) const q = search.value.toLowerCase().trim() - if (!q) return employees.value - return employees.value.filter((e) => + if (!q) return base + return base.filter((e) => `${e.firstName} ${e.lastName} ${e.position ?? ''} ${e.email ?? ''}`.toLowerCase().includes(q), ) }) @@ -206,9 +213,9 @@ onMounted(load)

Mitarbeiter

-

Profile als Single Source of Truth für alle Kanäle

+

{{ portalMode ? 'Alle einloggbaren Mitarbeiter der Plattform' : 'Profile als Single Source of Truth für alle Kanäle' }}

- +
@@ -218,7 +225,7 @@ onMounted(load)
- + @@ -238,9 +245,9 @@ onMounted(load) {{ GROUP_LABEL[groupOf(e)] }} · 🔑 - +
NamePositionRechtegruppeStandort
NamePositionRechtegruppe{{ portalMode ? 'Firma' : 'Standort' }}
Lädt…
{{ locName(e.location) }}{{ portalMode ? companyName(e.company) : locName(e.location) }} - + Profil ↗