Rebrand Hub+Flux
This commit is contained in:
parent
0a3e52d603
commit
9b47296cea
130 changed files with 9357 additions and 3345 deletions
|
|
@ -229,14 +229,34 @@ new #[Layout('components.layouts.app'), Title('Benutzer anlegen')] class extends
|
|||
}
|
||||
}; ?>
|
||||
|
||||
<form wire:submit="save" class="space-y-6">
|
||||
<flux:card>
|
||||
<flux:heading size="lg">{{ __('Benutzer anlegen') }}</flux:heading>
|
||||
<flux:subheading>{{ __('Rollen, Firmen und optional Rechnungsadresse direkt mitsetzen.') }}</flux:subheading>
|
||||
</flux:card>
|
||||
<form wire:submit="save" class="space-y-8">
|
||||
{{-- ============== PAGE HEADER ============== --}}
|
||||
<header class="grid items-end gap-8" style="grid-template-columns:1fr auto;">
|
||||
<div class="min-w-0">
|
||||
<div class="flex items-center gap-3 mb-3 flex-nowrap whitespace-nowrap">
|
||||
<span class="badge hub dot">{{ __('Admin Backend') }}</span>
|
||||
<span class="eyebrow muted">{{ __('Administration · Benutzer · Neu') }}</span>
|
||||
</div>
|
||||
<h1 class="text-[30px] font-bold tracking-[-0.6px] leading-[1.15] m-0 text-[color:var(--color-ink)]">
|
||||
{{ __('Benutzer anlegen') }}
|
||||
</h1>
|
||||
<p class="text-[13px] leading-[1.55] mt-2 m-0 max-w-[640px] text-[color:var(--color-ink-2)]">
|
||||
{{ __('Rollen, Firmen und optional Rechnungsadresse direkt mitsetzen.') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Basisdaten') }}</flux:heading>
|
||||
<div class="flex items-center gap-2 flex-shrink-0">
|
||||
<flux:button variant="ghost" icon="arrow-left" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Basisdaten') }}</span>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
|
||||
<div class="grid gap-4 sm:grid-cols-2">
|
||||
<flux:field>
|
||||
|
|
@ -276,20 +296,28 @@ new #[Layout('components.layouts.app'), Title('Benutzer anlegen')] class extends
|
|||
<flux:checkbox wire:model="isActive" label="{{ __('Aktiv') }}" />
|
||||
<flux:checkbox wire:model="isSuperAdmin" label="{{ __('Super Admin') }}" />
|
||||
</div>
|
||||
</flux:card>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Rollenzuweisung') }}</flux:heading>
|
||||
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
@foreach($availableRoles as $role)
|
||||
<flux:checkbox wire:model="selectedRoles" value="{{ $role->name }}" label="{{ $role->name }}" />
|
||||
@endforeach
|
||||
</div>
|
||||
<flux:error name="selectedRoles" class="mt-4" />
|
||||
</flux:card>
|
||||
</article>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Firmenverknüpfung') }}</flux:heading>
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Rollenzuweisung') }}</span>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
<div class="grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
@foreach ($availableRoles as $role)
|
||||
<flux:checkbox wire:model="selectedRoles" value="{{ $role->name }}" label="{{ $role->name }}" />
|
||||
@endforeach
|
||||
</div>
|
||||
<flux:error name="selectedRoles" class="mt-4" />
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Firmenverknüpfung') }}</span>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
|
||||
<div class="mb-4">
|
||||
<flux:select
|
||||
|
|
@ -324,11 +352,11 @@ new #[Layout('components.layouts.app'), Title('Benutzer anlegen')] class extends
|
|||
</div>
|
||||
|
||||
<div class="space-y-3">
|
||||
@forelse($linkedCompanies as $company)
|
||||
<div class="grid gap-3 rounded-lg border border-zinc-200 p-3 dark:border-zinc-700 sm:grid-cols-[1fr,160px,auto] sm:items-center">
|
||||
@forelse ($linkedCompanies as $company)
|
||||
<div class="grid gap-3 rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3 sm:grid-cols-[1fr,160px,auto] sm:items-center">
|
||||
<div>
|
||||
<flux:text weight="semibold">{{ $company->name }}</flux:text>
|
||||
<flux:text class="text-sm text-zinc-500">{{ $company->slug }}</flux:text>
|
||||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)]">{{ $company->name }}</div>
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] font-mono">{{ $company->slug }}</div>
|
||||
</div>
|
||||
|
||||
<flux:select wire:model="companyRoles.{{ $company->id }}">
|
||||
|
|
@ -337,23 +365,23 @@ new #[Layout('components.layouts.app'), Title('Benutzer anlegen')] class extends
|
|||
<option value="owner">{{ __('Owner') }}</option>
|
||||
</flux:select>
|
||||
|
||||
<flux:button
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
icon="x-mark"
|
||||
wire:click="removeLinkedCompany({{ $company->id }})"
|
||||
>
|
||||
<flux:button size="sm" variant="ghost" icon="x-mark"
|
||||
wire:click="removeLinkedCompany({{ $company->id }})">
|
||||
{{ __('Entfernen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
@empty
|
||||
<flux:text class="text-sm text-zinc-500">{{ __('Noch keine Firma verknüpft.') }}</flux:text>
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">{{ __('Noch keine Firma verknüpft.') }}</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</flux:card>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Rechnungsadresse (optional)') }}</flux:heading>
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Rechnungsadresse (optional)') }}</span>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
|
||||
<div class="grid gap-3 sm:grid-cols-2">
|
||||
<flux:field>
|
||||
|
|
@ -400,22 +428,23 @@ new #[Layout('components.layouts.app'), Title('Benutzer anlegen')] class extends
|
|||
<flux:label>{{ __('Land') }}</flux:label>
|
||||
<flux:select wire:model="billing.country_code">
|
||||
<option value="">{{ __('Bitte wählen') }}</option>
|
||||
@foreach($countries as $countryCode => $countryName)
|
||||
@foreach ($countries as $countryCode => $countryName)
|
||||
<option value="{{ $countryCode }}">{{ $countryName }}</option>
|
||||
@endforeach
|
||||
</flux:select>
|
||||
</flux:field>
|
||||
</div>
|
||||
</flux:card>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<flux:card>
|
||||
<div class="flex justify-end gap-3">
|
||||
<article class="panel">
|
||||
<div class="p-5 flex justify-end gap-3">
|
||||
<flux:button variant="ghost" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Abbrechen') }}
|
||||
</flux:button>
|
||||
<flux:button type="submit" variant="primary">
|
||||
<flux:button type="submit" variant="primary" icon="check">
|
||||
{{ __('Benutzer anlegen') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</flux:card>
|
||||
</article>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -715,25 +715,40 @@ new #[Layout('components.layouts.app'), Title('Benutzer bearbeiten')] class exte
|
|||
}
|
||||
}; ?>
|
||||
|
||||
<form wire:submit="save" class="space-y-6">
|
||||
<flux:card>
|
||||
<div class="flex items-center justify-between">
|
||||
<div>
|
||||
<flux:heading size="lg">{{ __('Benutzer bearbeiten') }}</flux:heading>
|
||||
<flux:subheading>ID: {{ $id }}</flux:subheading>
|
||||
<form wire:submit="save" class="space-y-8">
|
||||
{{-- ============== PAGE HEADER ============== --}}
|
||||
<header class="grid items-end gap-8" style="grid-template-columns:1fr auto;">
|
||||
<div class="min-w-0">
|
||||
<div class="flex items-center gap-3 mb-3 flex-wrap">
|
||||
<span class="badge hub dot">{{ __('Admin Backend') }}</span>
|
||||
<span class="eyebrow muted">{{ __('Administration · Benutzer · Bearbeiten') }}</span>
|
||||
<span class="badge hub">ID #{{ $id }}</span>
|
||||
<span class="badge hub">{{ strtoupper($portal) }}</span>
|
||||
@if ($isActive)
|
||||
<span class="badge ok dot">{{ __('Aktiv') }}</span>
|
||||
@else
|
||||
<span class="badge err dot">{{ __('Inaktiv') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<flux:badge color="zinc" size="sm">{{ strtoupper($portal) }}</flux:badge>
|
||||
<h1 class="text-[30px] font-bold tracking-[-0.6px] leading-[1.15] m-0 text-[color:var(--color-ink)] break-words">
|
||||
{{ $name ?: __('Benutzer bearbeiten') }}
|
||||
</h1>
|
||||
<p class="text-[13px] leading-[1.55] mt-2 m-0 max-w-[640px] text-[color:var(--color-ink-2)]">
|
||||
{{ $email }}
|
||||
</p>
|
||||
</div>
|
||||
</flux:card>
|
||||
|
||||
@if($notification)
|
||||
<div
|
||||
x-data="{ show: true }"
|
||||
x-init="setTimeout(() => show = false, 3000)"
|
||||
x-show="show"
|
||||
x-transition
|
||||
class="rounded-md bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 px-4 py-3 text-sm text-green-800 dark:text-green-300"
|
||||
>
|
||||
<div class="flex items-center gap-2 flex-shrink-0">
|
||||
<flux:button variant="ghost" icon="arrow-left" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@if ($notification)
|
||||
<div x-data="{ show: true }" x-init="setTimeout(() => show = false, 4000)" x-show="show" x-transition
|
||||
class="rounded-[5px] border-l-[3px] px-4 py-3 text-[12.5px]"
|
||||
style="border-color: var(--color-ok); background: color-mix(in oklab, var(--color-ok) 10%, var(--color-bg)); color: var(--color-ink);">
|
||||
{{ $notification }}
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -754,70 +769,72 @@ new #[Layout('components.layouts.app'), Title('Benutzer bearbeiten')] class exte
|
|||
&& filled($billing['country_code']);
|
||||
@endphp
|
||||
|
||||
<flux:card>
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<flux:heading size="lg">{{ __('Bearbeitungsflow') }}</flux:heading>
|
||||
<flux:text class="mt-1 text-sm text-zinc-500">
|
||||
{{ __('Die wichtigsten Pflegebereiche sind hier zusammengefasst. Springe direkt in den Abschnitt, der noch Arbeit braucht.') }}
|
||||
</flux:text>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<flux:button size="sm" variant="ghost" href="#account">{{ __('Account') }}</flux:button>
|
||||
<flux:button size="sm" variant="ghost" href="#legacy-profile">{{ __('Profil') }}</flux:button>
|
||||
<flux:button size="sm" variant="ghost" href="#company-links">{{ __('Firmen') }}</flux:button>
|
||||
<flux:button size="sm" variant="ghost" href="#contact-links">{{ __('Kontakte') }}</flux:button>
|
||||
<flux:button size="sm" variant="ghost" href="#billing-address">{{ __('Rechnung') }}</flux:button>
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Bearbeitungsflow') }}</span>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
<a href="#account"
|
||||
class="px-2.5 py-1 text-[11px] font-medium rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] text-[color:var(--color-ink-2)] hover:text-[color:var(--color-hub)] hover:border-[color:var(--color-hub)]/40 transition">{{ __('Account') }}</a>
|
||||
<a href="#legacy-profile"
|
||||
class="px-2.5 py-1 text-[11px] font-medium rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] text-[color:var(--color-ink-2)] hover:text-[color:var(--color-hub)] hover:border-[color:var(--color-hub)]/40 transition">{{ __('Profil') }}</a>
|
||||
<a href="#company-links"
|
||||
class="px-2.5 py-1 text-[11px] font-medium rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] text-[color:var(--color-ink-2)] hover:text-[color:var(--color-hub)] hover:border-[color:var(--color-hub)]/40 transition">{{ __('Firmen') }}</a>
|
||||
<a href="#contact-links"
|
||||
class="px-2.5 py-1 text-[11px] font-medium rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] text-[color:var(--color-ink-2)] hover:text-[color:var(--color-hub)] hover:border-[color:var(--color-hub)]/40 transition">{{ __('Kontakte') }}</a>
|
||||
<a href="#billing-address"
|
||||
class="px-2.5 py-1 text-[11px] font-medium rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] text-[color:var(--color-ink-2)] hover:text-[color:var(--color-hub)] hover:border-[color:var(--color-hub)]/40 transition">{{ __('Rechnung') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0 mb-4">
|
||||
{{ __('Die wichtigsten Pflegebereiche sind hier zusammengefasst. Springe direkt in den Abschnitt, der noch Arbeit braucht.') }}
|
||||
</p>
|
||||
|
||||
<div class="mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="rounded-lg border border-zinc-200 p-3 dark:border-zinc-700">
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Account') }}</flux:text>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<flux:badge :color="$isActive ? 'green' : 'red'" size="sm">
|
||||
{{ $isActive ? __('Aktiv') : __('Inaktiv') }}
|
||||
</flux:badge>
|
||||
<flux:badge color="zinc" size="sm">{{ strtoupper($portal) }}</flux:badge>
|
||||
<div class="grid gap-3 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] mb-2 uppercase tracking-[0.04em]">{{ __('Account') }}</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@if ($isActive)
|
||||
<span class="badge ok dot">{{ __('Aktiv') }}</span>
|
||||
@else
|
||||
<span class="badge err dot">{{ __('Inaktiv') }}</span>
|
||||
@endif
|
||||
<span class="badge hub">{{ strtoupper($portal) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg border border-zinc-200 p-3 dark:border-zinc-700">
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Legacy-Profil') }}</flux:text>
|
||||
<div class="mt-2">
|
||||
@if($hasProfileInput)
|
||||
<flux:badge color="green" size="sm">{{ __('Profil vorhanden') }}</flux:badge>
|
||||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] mb-2 uppercase tracking-[0.04em]">{{ __('Legacy-Profil') }}</div>
|
||||
@if ($hasProfileInput)
|
||||
<span class="badge ok dot">{{ __('Profil vorhanden') }}</span>
|
||||
@else
|
||||
<flux:badge color="amber" size="sm">{{ __('Profil fehlt') }}</flux:badge>
|
||||
<span class="badge warn dot">{{ __('Profil fehlt') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg border border-zinc-200 p-3 dark:border-zinc-700">
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Verknüpfungen') }}</flux:text>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<flux:badge :color="count($linkedCompanyIds) > 0 ? 'green' : 'amber'" size="sm">
|
||||
{{ trans_choice(':count Firma|:count Firmen', count($linkedCompanyIds), ['count' => count($linkedCompanyIds)]) }}
|
||||
</flux:badge>
|
||||
<flux:badge :color="count($contactForms) > 0 ? 'blue' : 'zinc'" size="sm">
|
||||
{{ trans_choice(':count Kontakt|:count Kontakte', count($contactForms), ['count' => count($contactForms)]) }}
|
||||
</flux:badge>
|
||||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] mb-2 uppercase tracking-[0.04em]">{{ __('Verknüpfungen') }}</div>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span class="badge {{ count($linkedCompanyIds) > 0 ? 'ok' : 'warn' }} dot">
|
||||
{{ trans_choice(':count Firma|:count Firmen', count($linkedCompanyIds), ['count' => count($linkedCompanyIds)]) }}
|
||||
</span>
|
||||
<span class="badge hub">
|
||||
{{ trans_choice(':count Kontakt|:count Kontakte', count($contactForms), ['count' => count($contactForms)]) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="rounded-lg border border-zinc-200 p-3 dark:border-zinc-700">
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Rechnungsadresse') }}</flux:text>
|
||||
<div class="mt-2">
|
||||
@if($billingComplete)
|
||||
<flux:badge color="green" size="sm">{{ __('Vollständig') }}</flux:badge>
|
||||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-3">
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] mb-2 uppercase tracking-[0.04em]">{{ __('Rechnungsadresse') }}</div>
|
||||
@if ($billingComplete)
|
||||
<span class="badge ok dot">{{ __('Vollständig') }}</span>
|
||||
@else
|
||||
<flux:badge color="zinc" size="sm">{{ __('Unvollständig') }}</flux:badge>
|
||||
<span class="badge warn dot">{{ __('Unvollständig') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</flux:card>
|
||||
</article>
|
||||
|
||||
<flux:card id="account">
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Basisdaten') }}</flux:heading>
|
||||
|
|
@ -1211,14 +1228,14 @@ new #[Layout('components.layouts.app'), Title('Benutzer bearbeiten')] class exte
|
|||
</div>
|
||||
</flux:card>
|
||||
|
||||
<flux:card>
|
||||
<div class="flex justify-end gap-3">
|
||||
<article class="panel">
|
||||
<div class="p-5 flex justify-end gap-3">
|
||||
<flux:button variant="ghost" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Abbrechen') }}
|
||||
</flux:button>
|
||||
<flux:button type="submit" variant="primary">
|
||||
<flux:button type="submit" variant="primary" icon="check">
|
||||
{{ __('Speichern') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</flux:card>
|
||||
</article>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -57,112 +57,129 @@ new #[Layout('components.layouts.app'), Title('Benutzer anzeigen')] class extend
|
|||
}
|
||||
}; ?>
|
||||
|
||||
<div class="space-y-6">
|
||||
@if (!$user)
|
||||
<flux:card>
|
||||
<flux:heading size="lg">{{ __('Benutzer nicht gefunden') }}</flux:heading>
|
||||
<flux:button class="mt-4" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück zur Übersicht') }}
|
||||
</flux:button>
|
||||
</flux:card>
|
||||
@else
|
||||
<flux:card>
|
||||
<div class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div>
|
||||
<flux:heading size="xl">{{ $user->name }}</flux:heading>
|
||||
<flux:text class="text-sm text-zinc-500">{{ $user->email }}</flux:text>
|
||||
<flux:text class="text-xs text-zinc-500">ID: {{ $user->id }}</flux:text>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2">
|
||||
<flux:button variant="ghost" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück') }}
|
||||
</flux:button>
|
||||
<flux:button icon="pencil" href="{{ route('admin.users.edit', $user->id) }}" wire:navigate>
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
<div class="space-y-8">
|
||||
@if (! $user)
|
||||
<article class="panel">
|
||||
<div class="p-10 flex flex-col items-center justify-center text-center">
|
||||
<div class="w-14 h-14 rounded-[6px] flex items-center justify-center mb-3
|
||||
bg-[color:var(--color-hub-soft)] border border-[color:var(--color-hub-soft-2)] text-[color:var(--color-hub)]">
|
||||
<flux:icon.exclamation-triangle class="size-6" />
|
||||
</div>
|
||||
<div class="text-[16px] font-semibold text-[color:var(--color-ink)] mb-2">{{ __('Benutzer nicht gefunden') }}</div>
|
||||
<flux:button variant="primary" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück zur Übersicht') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</article>
|
||||
@else
|
||||
{{-- ============== PAGE HEADER ============== --}}
|
||||
<header class="grid items-end gap-8" style="grid-template-columns:1fr auto;">
|
||||
<div class="min-w-0">
|
||||
<div class="flex items-center gap-3 mb-3 flex-wrap">
|
||||
<span class="badge hub dot">{{ __('Admin Backend') }}</span>
|
||||
<span class="eyebrow muted">{{ __('Administration · Benutzer') }}</span>
|
||||
<span class="badge hub">ID #{{ $user->id }}</span>
|
||||
@if ($user->is_active)
|
||||
<span class="badge ok dot">{{ __('Aktiv') }}</span>
|
||||
@else
|
||||
<span class="badge err dot">{{ __('Inaktiv') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
<h1 class="text-[30px] font-bold tracking-[-0.6px] leading-[1.15] m-0 text-[color:var(--color-ink)] break-words">
|
||||
{{ $user->name }}
|
||||
</h1>
|
||||
<p class="text-[13px] leading-[1.55] mt-2 m-0 max-w-[640px] text-[color:var(--color-ink-2)]">{{ $user->email }}</p>
|
||||
</div>
|
||||
</flux:card>
|
||||
|
||||
<div class="grid grid-cols-1 gap-4 sm:grid-cols-4">
|
||||
<flux:card>
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Portal') }}</flux:text>
|
||||
<flux:text weight="semibold">{{ $user->portal?->label() ?? '-' }}</flux:text>
|
||||
</flux:card>
|
||||
<flux:card>
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Typ') }}</flux:text>
|
||||
<flux:text weight="semibold">{{ $user->registration_type?->label() ?? '-' }}</flux:text>
|
||||
</flux:card>
|
||||
<flux:card>
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Status') }}</flux:text>
|
||||
@if ($user->is_active)
|
||||
<flux:badge color="green" size="sm">{{ __('Aktiv') }}</flux:badge>
|
||||
@else
|
||||
<flux:badge color="red" size="sm">{{ __('Inaktiv') }}</flux:badge>
|
||||
@endif
|
||||
</flux:card>
|
||||
<flux:card>
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Letzter Login') }}</flux:text>
|
||||
<flux:text weight="semibold">{{ $user->last_login_at?->format('d.m.Y H:i') ?? __('Nie') }}</flux:text>
|
||||
@if ($user->last_login_ip)
|
||||
<flux:text class="text-xs text-zinc-500">{{ $user->last_login_ip }}</flux:text>
|
||||
@endif
|
||||
</flux:card>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 flex-shrink-0">
|
||||
<flux:button variant="ghost" icon="arrow-left" href="{{ route('admin.users.index') }}" wire:navigate>
|
||||
{{ __('Zurück') }}
|
||||
</flux:button>
|
||||
<flux:button variant="primary" icon="pencil" href="{{ route('admin.users.edit', $user->id) }}" wire:navigate>
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Rollen') }}</flux:heading>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
@forelse($user->roles as $role)
|
||||
<flux:badge color="zinc" size="sm">{{ $role->name }}</flux:badge>
|
||||
{{-- ============== KPI-Reihe ============== --}}
|
||||
<section class="grid grid-cols-1 gap-4 sm:grid-cols-4">
|
||||
<x-portal.stat-card variant="muted" :label="__('Portal')" :value="$user->portal?->label() ?? '-'">
|
||||
<x-slot:meta>{{ __('Zuordnung') }}</x-slot:meta>
|
||||
</x-portal.stat-card>
|
||||
<x-portal.stat-card variant="muted" :label="__('Typ')" :value="$user->registration_type?->label() ?? '-'">
|
||||
<x-slot:meta>{{ __('Registrierung') }}</x-slot:meta>
|
||||
</x-portal.stat-card>
|
||||
@if ($user->is_active)
|
||||
<x-portal.stat-card variant="ok" :label="__('Status')" :value="__('Aktiv')">
|
||||
<x-slot:meta>{{ __('Login möglich') }}</x-slot:meta>
|
||||
</x-portal.stat-card>
|
||||
@else
|
||||
<x-portal.stat-card variant="warn" :label="__('Status')" :value="__('Inaktiv')">
|
||||
<x-slot:meta>{{ __('gesperrt') }}</x-slot:meta>
|
||||
</x-portal.stat-card>
|
||||
@endif
|
||||
<x-portal.stat-card variant="primary" :label="__('Letzter Login')" :value="$user->last_login_at?->format('d.m.Y H:i') ?? __('Nie')">
|
||||
<x-slot:meta>{{ $user->last_login_ip ?? __('keine IP') }}</x-slot:meta>
|
||||
</x-portal.stat-card>
|
||||
</section>
|
||||
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Rollen') }}</span>
|
||||
</div>
|
||||
<div class="p-5 flex flex-wrap gap-2">
|
||||
@forelse ($user->roles as $role)
|
||||
<span class="badge hub">{{ $role->name }}</span>
|
||||
@empty
|
||||
<flux:text class="text-sm text-zinc-500">{{ __('Keine Rollen hinterlegt') }}</flux:text>
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">{{ __('Keine Rollen hinterlegt') }}</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</flux:card>
|
||||
</article>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Rechnungsadresse') }}</flux:heading>
|
||||
@if ($user->billingAddress)
|
||||
<div class="space-y-1">
|
||||
<flux:text>{{ $user->billingAddress->name }}</flux:text>
|
||||
<flux:text>{{ $user->billingAddress->address1 }}</flux:text>
|
||||
@if ($user->billingAddress->address2)
|
||||
<flux:text>{{ $user->billingAddress->address2 }}</flux:text>
|
||||
@endif
|
||||
<flux:text>{{ $user->billingAddress->postal_code }} {{ $user->billingAddress->city }}</flux:text>
|
||||
<flux:text>{{ $user->billingAddress->country_code }}</flux:text>
|
||||
</div>
|
||||
@else
|
||||
<flux:text class="text-sm text-zinc-500">{{ __('Keine Rechnungsadresse hinterlegt') }}</flux:text>
|
||||
@endif
|
||||
</flux:card>
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Rechnungsadresse') }}</span>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
@if ($user->billingAddress)
|
||||
<div class="space-y-1 text-[12.5px] text-[color:var(--color-ink)]">
|
||||
<div class="font-semibold">{{ $user->billingAddress->name }}</div>
|
||||
<div>{{ $user->billingAddress->address1 }}</div>
|
||||
@if ($user->billingAddress->address2)
|
||||
<div>{{ $user->billingAddress->address2 }}</div>
|
||||
@endif
|
||||
<div>{{ $user->billingAddress->postal_code }} {{ $user->billingAddress->city }}</div>
|
||||
<div>{{ $user->billingAddress->country_code }}</div>
|
||||
</div>
|
||||
@else
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">{{ __('Keine Rechnungsadresse hinterlegt') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<flux:card>
|
||||
<flux:heading size="lg" class="mb-4">{{ __('Verknüpfte Firmen und Kontakte') }}</flux:heading>
|
||||
<flux:subheading class="mb-4">
|
||||
{{ __('Kontakte sind die Ansprechpartner der verknüpften Firmen (wie in der Bearbeiten-Ansicht).') }}
|
||||
</flux:subheading>
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="section-eyebrow">{{ __('Verknüpfte Firmen und Kontakte') }}</span>
|
||||
</div>
|
||||
<div class="p-5 space-y-4">
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">
|
||||
{{ __('Kontakte sind die Ansprechpartner der verknüpften Firmen (wie in der Bearbeiten-Ansicht).') }}
|
||||
</p>
|
||||
|
||||
<div class="space-y-4">
|
||||
@forelse($user->companies as $company)
|
||||
<div class="rounded-lg border border-zinc-200 p-4 dark:border-zinc-700">
|
||||
@forelse ($user->companies as $company)
|
||||
<div class="rounded-[5px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-4">
|
||||
<div class="mb-3 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between">
|
||||
<div class="min-w-0 flex-1">
|
||||
@if (\Illuminate\Support\Facades\Route::has('admin.companies.show'))
|
||||
<a href="{{ route('admin.companies.show', $company->id) }}" wire:navigate
|
||||
class="block">
|
||||
<flux:text weight="semibold"
|
||||
class="text-blue-600 hover:underline dark:text-blue-400">
|
||||
{{ $company->name }}
|
||||
</flux:text>
|
||||
class="text-[13px] font-semibold text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">
|
||||
{{ $company->name }}
|
||||
</a>
|
||||
@else
|
||||
<flux:text weight="semibold">{{ $company->name }}</flux:text>
|
||||
<div class="text-[13px] font-semibold text-[color:var(--color-ink)]">{{ $company->name }}</div>
|
||||
@endif
|
||||
<flux:text class="text-xs text-zinc-500">{{ $company->slug }}</flux:text>
|
||||
<div class="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-zinc-500">
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)] font-mono">{{ $company->slug }}</div>
|
||||
<div class="mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11.5px] text-[color:var(--color-ink-3)]">
|
||||
@if ($company->email)
|
||||
<span>{{ $company->email }}</span>
|
||||
@endif
|
||||
|
|
@ -172,14 +189,10 @@ new #[Layout('components.layouts.app'), Title('Benutzer anzeigen')] class extend
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<flux:badge color="zinc" size="sm">
|
||||
{{ $this->companyUserRoleLabel($company->pivot?->role ?? 'member') }}
|
||||
</flux:badge>
|
||||
<flux:badge color="zinc" size="sm">
|
||||
{{ $company->portal?->label() ?? '—' }}
|
||||
</flux:badge>
|
||||
@if (!$company->is_active)
|
||||
<flux:badge color="red" size="sm">{{ __('Inaktiv') }}</flux:badge>
|
||||
<span class="badge hub">{{ $this->companyUserRoleLabel($company->pivot?->role ?? 'member') }}</span>
|
||||
<span class="badge hub">{{ $company->portal?->label() ?? '—' }}</span>
|
||||
@if (! $company->is_active)
|
||||
<span class="badge err dot">{{ __('Inaktiv') }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -187,19 +200,18 @@ new #[Layout('components.layouts.app'), Title('Benutzer anzeigen')] class extend
|
|||
@if ($company->contacts->isNotEmpty())
|
||||
<div class="space-y-2">
|
||||
@foreach ($company->contacts as $contact)
|
||||
<div
|
||||
class="flex flex-col gap-2 rounded-md bg-zinc-50 p-2 dark:bg-zinc-900 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="flex flex-col gap-2 rounded-[4px] border border-[color:var(--color-bg-rule)] bg-[color:var(--color-bg-elev)] p-2 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="min-w-0">
|
||||
<flux:text class="text-sm" weight="medium">
|
||||
{{ trim(($contact->first_name ?? '') . ' ' . ($contact->last_name ?? '')) ?: __('Kontakt ohne Name') }}
|
||||
</flux:text>
|
||||
<flux:text class="text-xs text-zinc-500">
|
||||
<div class="text-[12.5px] font-medium text-[color:var(--color-ink)]">
|
||||
{{ trim(($contact->first_name ?? '').' '.($contact->last_name ?? '')) ?: __('Kontakt ohne Name') }}
|
||||
</div>
|
||||
<div class="text-[11px] text-[color:var(--color-ink-3)]">
|
||||
{{ $contact->responsibility ?? __('Keine Rolle hinterlegt') }}
|
||||
</flux:text>
|
||||
<div class="mt-0.5 flex flex-wrap items-center gap-2 text-xs text-zinc-500">
|
||||
</div>
|
||||
<div class="mt-0.5 flex flex-wrap items-center gap-2 text-[11px] text-[color:var(--color-ink-3)]">
|
||||
@if ($contact->email)
|
||||
<a href="mailto:{{ $contact->email }}"
|
||||
class="text-blue-600 hover:underline dark:text-blue-400">{{ $contact->email }}</a>
|
||||
class="text-[color:var(--color-hub)] underline underline-offset-2 decoration-[color:var(--color-hub)]/40 hover:decoration-[color:var(--color-hub)]">{{ $contact->email }}</a>
|
||||
@endif
|
||||
@if ($contact->phone)
|
||||
<span>{{ $contact->phone }}</span>
|
||||
|
|
@ -207,8 +219,7 @@ new #[Layout('components.layouts.app'), Title('Benutzer anzeigen')] class extend
|
|||
</div>
|
||||
</div>
|
||||
<div class="flex shrink-0 items-center gap-2">
|
||||
<flux:badge color="zinc" size="sm">
|
||||
{{ $contact->portal?->label() ?? '—' }}</flux:badge>
|
||||
<span class="badge hub">{{ $contact->portal?->label() ?? '—' }}</span>
|
||||
@if (\Illuminate\Support\Facades\Route::has('admin.contacts.edit'))
|
||||
<flux:button size="sm" variant="ghost" icon="pencil"
|
||||
href="{{ route('admin.contacts.edit', $contact->id) }}"
|
||||
|
|
@ -220,20 +231,19 @@ new #[Layout('components.layouts.app'), Title('Benutzer anzeigen')] class extend
|
|||
</div>
|
||||
@endforeach
|
||||
@if ($company->contacts_count > $company->contacts->count())
|
||||
<flux:text class="text-xs text-zinc-500">
|
||||
<p class="text-[11.5px] text-[color:var(--color-ink-3)] m-0">
|
||||
{{ __(':count weitere Kontakte werden hier nicht geladen. Öffne die Firma, um alle Kontakte zu sehen.', ['count' => $company->contacts_count - $company->contacts->count()]) }}
|
||||
</flux:text>
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<flux:text class="text-xs text-zinc-500">{{ __('Keine Kontakte bei dieser Firma') }}
|
||||
</flux:text>
|
||||
<p class="text-[11.5px] text-[color:var(--color-ink-3)] m-0">{{ __('Keine Kontakte bei dieser Firma') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<flux:text class="text-sm text-zinc-500">{{ __('Keine Firmen verknüpft') }}</flux:text>
|
||||
<p class="text-[12.5px] text-[color:var(--color-ink-3)] m-0">{{ __('Keine Firmen verknüpft') }}</p>
|
||||
@endforelse
|
||||
</div>
|
||||
</flux:card>
|
||||
</article>
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue