UI: Portal-Dashboard nur Reseller-KPI

Plattform-Admin sah auf dem Dashboard auch Firmen/Mitarbeiter — jetzt nur noch
Reseller (konsistent zur Portal-Navi). Firmen-KPI nur Reseller, Mitarbeiter-KPI
nur Reseller/Firma.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Thomas Peterson 2026-06-08 17:22:23 +02:00
parent 366d57da9b
commit 183b7c10b0

View File

@ -27,13 +27,16 @@ async function count(resource: string): Promise<number> {
onMounted(async () => {
const result: Stat[] = []
// Plattform-Ebene: nur Reseller (Firmen/Mitarbeiter via Einloggen als")
if (auth.isPlatformAdmin) {
result.push({ label: 'Reseller', value: await count('resellers'), to: '/app/resellers', icon: ICON.reseller, tone: 'orange' })
}
if (auth.isResellerAdmin || auth.isPlatformAdmin) {
if (auth.isResellerAdmin) {
result.push({ label: 'Firmen', value: await count('companies'), to: '/app/companies', icon: ICON.company, tone: 'blue' })
}
result.push({ label: 'Mitarbeiter', value: await count('employees'), to: '/app/employees', icon: ICON.people, tone: 'orange' })
if (auth.isResellerAdmin || auth.isCompanyAdmin) {
result.push({ label: 'Mitarbeiter', value: await count('employees'), to: '/app/employees', icon: ICON.people, tone: 'orange' })
}
if (auth.isCompanyAdmin || auth.isResellerAdmin) {
result.push({ label: 'Standorte', value: await count('locations'), to: '/app/locations', icon: ICON.pin, tone: 'green' })
result.push({ label: 'Domains', value: await count('domains'), to: '/app/domains', icon: ICON.globe, tone: 'gray' })