Phase 0: Fundament + Neuigkeiten & Termine #2
112 changed files with 2408 additions and 267 deletions
|
|
@ -6,6 +6,11 @@ Der Self-Updater zeigt diese Abschnitte bei neuen Versionen an.
|
|||
|
||||
## 0.3.0
|
||||
|
||||
- Rollen und Rechte: eigene Rollen anlegen, Rechte global oder für einzelne Kategorien vergeben – z. B. darf die MAV nur in „MAV-Info“ schreiben
|
||||
- Veröffentlichen ist ein eigenes Recht; ohne dieses Recht bleiben Beiträge Entwürfe
|
||||
- Sichtbarkeit: Kategorien und Termine lassen sich auf Rollen, Abteilungen oder Standorte beschränken
|
||||
- „Rechte prüfen“ zeigt, was eine Person darf und warum
|
||||
- Redaktion und Sichtbarkeit direkt an der Kategorie einstellen
|
||||
- Plugins: Funktionen lassen sich einzeln aktivieren und deaktivieren, eigene Plugins per ZIP installieren
|
||||
- Neuigkeiten und Termine sind jetzt mitgelieferte Plugins
|
||||
|
||||
|
|
|
|||
|
|
@ -9,3 +9,6 @@
|
|||
- UI-Texte Deutsch mit Umlauten, Schlüssel/Routen ASCII. Kein Node/Shell auf dem Kundenserver voraussetzen.
|
||||
- Design: Tailwind + shadcn-vue (`resources/js/components/ui`), Lucide-Icons, Inter. Farben nur über Tokens
|
||||
(`brand`, `brand-text`, `card`, `muted-foreground` …); Markenfarbe kommt serverseitig als CSS-Variable.
|
||||
- Funktionen als Plugins: mitgeliefert in `plugins-core/<slug>` (Namespace `Inhaus\Plugins\…`), Kunden in `plugins/`. Kern stellt
|
||||
Registries bereit (Navigation, Dashboard\\Widgets, Abilities) – siehe `docs/PLUGINS.md`.
|
||||
- Rechte immer über `$user->can('ability', ['typ', id])` bzw. Policies; Sichtbarkeit über `Audiences::constrain`.
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ shadcn-vue im Portal, MySQL/MariaDB, Apache.
|
|||
|
||||
- Projektplan: [`docs/PLAN.md`](docs/PLAN.md)
|
||||
- Installation beim Kunden (auch Shared Hosting): [`docs/INSTALLATION.md`](docs/INSTALLATION.md)
|
||||
- Plugins entwickeln: [`docs/PLUGINS.md`](docs/PLUGINS.md)
|
||||
- Mitarbeit, Entwicklungsumgebung und Release-Ablauf: [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
||||
- Änderungen: [`CHANGELOG.md`](CHANGELOG.md)
|
||||
|
||||
|
|
|
|||
53
app/Filament/Components/AudienceSection.php
Normal file
53
app/Filament/Components/AudienceSection.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Components;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use App\Support\Permissions\Audiences;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Formularbereich „Sichtbarkeit“ für Objekte mit Zielgruppen.
|
||||
*/
|
||||
class AudienceSection
|
||||
{
|
||||
public static function make(string $type, string $description = 'Leer lassen = für alle sichtbar. Sonst sehen es nur Personen, die mindestens eine Angabe erfüllen.'): Section
|
||||
{
|
||||
$field = fn (string $rule, string $label, callable $options) => Select::make("audience_{$rule}")
|
||||
->label($label)
|
||||
->multiple()
|
||||
->searchable()
|
||||
->options($options)
|
||||
->afterStateHydrated(fn (Select $component, ?Model $record) => $component->state($record ? Audiences::get($type, $record->getKey())[$rule] : []))
|
||||
->saveRelationshipsUsing(function (Model $record, Select $component) use ($type) {
|
||||
// Alle drei Felder zusammen speichern (einmal pro Formular reicht, aber schadet nicht).
|
||||
$state = $component->getContainer()->getRawState();
|
||||
Audiences::sync($type, $record->getKey(), [
|
||||
'role' => $state['audience_role'] ?? [],
|
||||
'department' => $state['audience_department'] ?? [],
|
||||
'location' => $state['audience_location'] ?? [],
|
||||
]);
|
||||
})
|
||||
->dehydrated(false);
|
||||
|
||||
return Section::make('Sichtbarkeit')
|
||||
->description($description)
|
||||
->collapsible()
|
||||
->schema([
|
||||
$field('role', 'Rollen', fn () => Role::query()->orderBy('name')->pluck('name', 'id')->mapWithKeys(fn ($name, $id) => [(string) $id => $name])->all()),
|
||||
$field('department', 'Abteilungen', fn () => self::distinct('department')),
|
||||
$field('location', 'Standorte', fn () => self::distinct('location')),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
private static function distinct(string $column): array
|
||||
{
|
||||
return User::query()->whereNotNull($column)->distinct()->orderBy($column)->pluck($column, $column)->all();
|
||||
}
|
||||
}
|
||||
38
app/Filament/Components/RoleGrantSelect.php
Normal file
38
app/Filament/Components/RoleGrantSelect.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Components;
|
||||
|
||||
use App\Models\Grant;
|
||||
use App\Models\Role;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* „Welche Rollen haben dieses Recht auf diesem Objekt?“ – direkt am Objekt
|
||||
* gepflegt, z. B. am Formular einer Kategorie. Speichert Grants.
|
||||
*/
|
||||
class RoleGrantSelect
|
||||
{
|
||||
public static function make(string $name, string $label, string $ability, string $resourceType): Select
|
||||
{
|
||||
return Select::make($name)
|
||||
->label($label)
|
||||
->multiple()
|
||||
->preload()
|
||||
->options(fn () => Role::query()->where('slug', '!=', Role::ADMINISTRATION)->orderBy('name')->pluck('name', 'id')->all())
|
||||
->afterStateHydrated(fn (Select $component, ?Model $record) => $component->state($record
|
||||
? Grant::query()->where('ability', $ability)->where('resource_type', $resourceType)->where('resource_id', $record->getKey())->pluck('role_id')->all()
|
||||
: []))
|
||||
->saveRelationshipsUsing(function (Model $record, ?array $state) use ($ability, $resourceType) {
|
||||
$roleIds = array_map('intval', $state ?? []);
|
||||
$existing = Grant::query()->where('ability', $ability)->where('resource_type', $resourceType)->where('resource_id', $record->getKey());
|
||||
|
||||
(clone $existing)->whereNotIn('role_id', $roleIds)->get()->each->delete();
|
||||
|
||||
foreach (array_diff($roleIds, (clone $existing)->pluck('role_id')->all()) as $roleId) {
|
||||
Grant::query()->create(['role_id' => $roleId, 'ability' => $ability, 'resource_type' => $resourceType, 'resource_id' => $record->getKey()]);
|
||||
}
|
||||
})
|
||||
->dehydrated(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -32,6 +32,11 @@ class Appearance extends Page
|
|||
|
||||
protected static ?string $title = 'Erscheinungsbild';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('appearance.manage') ?? false;
|
||||
}
|
||||
|
||||
protected static ?string $slug = 'erscheinungsbild';
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ class Feedback extends Page
|
|||
|
||||
protected static ?string $title = 'Rückmeldung geben';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('feedback.send') ?? false;
|
||||
}
|
||||
|
||||
protected static ?string $slug = 'rueckmeldung';
|
||||
|
||||
public string $type = '';
|
||||
|
|
|
|||
102
app/Filament/Pages/PermissionChecker.php
Normal file
102
app/Filament/Pages/PermissionChecker.php
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Models\Grant;
|
||||
use App\Models\User;
|
||||
use App\Support\Abilities;
|
||||
use BackedEnum;
|
||||
use Filament\Pages\Page;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use UnitEnum;
|
||||
|
||||
/**
|
||||
* „Was darf Person X – und warum?“ Zeigt Rollen samt Herkunft und alle Rechte
|
||||
* mit der Rolle, aus der sie stammen.
|
||||
*/
|
||||
class PermissionChecker extends Page
|
||||
{
|
||||
protected string $view = 'filament.pages.permission-checker';
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedMagnifyingGlassCircle;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Benutzer & Rechte';
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
protected static ?string $title = 'Rechte prüfen';
|
||||
|
||||
protected static ?string $slug = 'rechte-pruefen';
|
||||
|
||||
public ?int $userId = null;
|
||||
|
||||
public string $search = '';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('roles.manage') ?? false;
|
||||
}
|
||||
|
||||
public function mount(): void
|
||||
{
|
||||
$this->userId = request()->integer('person') ?: null;
|
||||
}
|
||||
|
||||
public function selectUser(int $id): void
|
||||
{
|
||||
$this->userId = $id;
|
||||
$this->search = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
protected function getViewData(): array
|
||||
{
|
||||
$abilities = app(Abilities::class);
|
||||
$user = $this->userId ? User::query()->find($this->userId) : null;
|
||||
|
||||
$results = strlen($this->search) >= 2
|
||||
? User::query()->where(fn ($q) => $q->where('name', 'like', "%{$this->search}%")->orWhere('email', 'like', "%{$this->search}%"))->orderBy('name')->limit(8)->get()
|
||||
: collect();
|
||||
|
||||
$roles = collect();
|
||||
$global = collect();
|
||||
$objects = collect();
|
||||
|
||||
if ($user) {
|
||||
$roles = DB::table('role_user')->join('roles', 'roles.id', '=', 'role_user.role_id')
|
||||
->where('role_user.user_id', $user->id)
|
||||
->orderBy('roles.name')
|
||||
->get(['roles.id', 'roles.name', 'role_user.source', 'role_user.source_ref']);
|
||||
|
||||
$grants = Grant::query()->with('role')->whereIn('role_id', $roles->pluck('id')->unique())->get();
|
||||
$types = $abilities->resourceTypes();
|
||||
|
||||
$global = $grants->whereNull('resource_type')->map(fn (Grant $g) => [
|
||||
'label' => $g->ability === '*' ? 'Alle Rechte (voller Zugriff)' : $abilities->label($g->ability),
|
||||
'role' => $g->role->name,
|
||||
])->sortBy('label')->values();
|
||||
|
||||
$objects = $grants->whereNotNull('resource_type')->map(function (Grant $g) use ($abilities, $types) {
|
||||
$options = isset($types[$g->resource_type]) ? ($types[$g->resource_type]['options'])() : [];
|
||||
|
||||
return [
|
||||
'label' => $abilities->label($g->ability),
|
||||
'object' => ($types[$g->resource_type]['label'] ?? $g->resource_type).': '.($g->resource_id === null ? 'alle' : ($options[$g->resource_id] ?? '#'.$g->resource_id)),
|
||||
'role' => $g->role->name,
|
||||
];
|
||||
})->sortBy('label')->values();
|
||||
}
|
||||
|
||||
return [
|
||||
'user' => $user,
|
||||
'results' => $results,
|
||||
'roles' => $roles,
|
||||
'global' => $global,
|
||||
'objects' => $objects,
|
||||
'canAdmin' => $user?->canAccessAdmin() ?? false,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -28,6 +28,11 @@ class QuickLinksSettings extends Page
|
|||
|
||||
protected static ?string $title = 'Schnellzugriffe';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('appearance.manage') ?? false;
|
||||
}
|
||||
|
||||
protected static ?string $slug = 'schnellzugriffe';
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
|
|
|
|||
|
|
@ -23,6 +23,11 @@ class SystemHealth extends Page
|
|||
|
||||
protected static ?string $title = 'Systemzustand';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('updates.manage') ?? false;
|
||||
}
|
||||
|
||||
protected static ?string $slug = 'systemzustand';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@ class Updates extends Page
|
|||
|
||||
protected static ?string $title = 'Aktualisierung';
|
||||
|
||||
public static function canAccess(): bool
|
||||
{
|
||||
return auth()->user()?->can('updates.manage') ?? false;
|
||||
}
|
||||
|
||||
protected static ?string $slug = 'aktualisierung';
|
||||
|
||||
public string $licenseEmail = '';
|
||||
|
|
|
|||
17
app/Filament/Resources/Roles/Pages/CreateRole.php
Normal file
17
app/Filament/Resources/Roles/Pages/CreateRole.php
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles\Pages;
|
||||
|
||||
use App\Filament\Resources\Roles\RoleResource;
|
||||
use App\Support\Audit;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateRole extends CreateRecord
|
||||
{
|
||||
protected static string $resource = RoleResource::class;
|
||||
|
||||
protected function afterCreate(): void
|
||||
{
|
||||
Audit::log('role.created', ['role' => $this->record->name]);
|
||||
}
|
||||
}
|
||||
30
app/Filament/Resources/Roles/Pages/EditRole.php
Normal file
30
app/Filament/Resources/Roles/Pages/EditRole.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles\Pages;
|
||||
|
||||
use App\Filament\Resources\Roles\RoleResource;
|
||||
use App\Support\Audit;
|
||||
use App\Support\Permissions\Permissions;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditRole extends EditRecord
|
||||
{
|
||||
protected static string $resource = RoleResource::class;
|
||||
|
||||
protected function afterSave(): void
|
||||
{
|
||||
Permissions::flush();
|
||||
Audit::log('role.updated', [
|
||||
'role' => $this->record->name,
|
||||
'grants' => $this->record->grants()->get(['ability', 'resource_type', 'resource_id'])->toArray(),
|
||||
]);
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make()->visible(fn () => ! $this->record->is_system),
|
||||
];
|
||||
}
|
||||
}
|
||||
22
app/Filament/Resources/Roles/Pages/ListRoles.php
Normal file
22
app/Filament/Resources/Roles/Pages/ListRoles.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles\Pages;
|
||||
|
||||
use App\Filament\Pages\PermissionChecker;
|
||||
use App\Filament\Resources\Roles\RoleResource;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListRoles extends ListRecords
|
||||
{
|
||||
protected static string $resource = RoleResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('checker')->label('Rechte prüfen')->color('gray')->url(PermissionChecker::getUrl()),
|
||||
CreateAction::make()->label('Neue Rolle'),
|
||||
];
|
||||
}
|
||||
}
|
||||
208
app/Filament/Resources/Roles/RoleResource.php
Normal file
208
app/Filament/Resources/Roles/RoleResource.php
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Roles;
|
||||
|
||||
use App\Filament\Resources\Roles\Pages\CreateRole;
|
||||
use App\Filament\Resources\Roles\Pages\EditRole;
|
||||
use App\Filament\Resources\Roles\Pages\ListRoles;
|
||||
use App\Models\Grant;
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use App\Support\Abilities;
|
||||
use App\Support\Permissions\Permissions;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\CheckboxList;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class RoleResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Role::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedShieldCheck;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Benutzer & Rechte';
|
||||
|
||||
protected static ?string $modelLabel = 'Rolle';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Rollen';
|
||||
|
||||
protected static ?string $slug = 'rollen';
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
$abilities = app(Abilities::class);
|
||||
|
||||
return $schema
|
||||
->columns(1)
|
||||
->components([
|
||||
Section::make('Rolle')
|
||||
->columns(2)
|
||||
->schema([
|
||||
TextInput::make('name')->label('Name')->required()->maxLength(100)->disabled(fn (?Role $record) => $record?->is_system),
|
||||
Textarea::make('description')->label('Beschreibung')->rows(2)->maxLength(500),
|
||||
]),
|
||||
|
||||
Section::make('Globale Rechte')
|
||||
->description('Gelten im ganzen Portal.')
|
||||
->visible(fn (?Role $record) => ! $record?->isAdministration())
|
||||
->schema([
|
||||
CheckboxList::make('global_abilities')
|
||||
->hiddenLabel()
|
||||
->columns(2)
|
||||
->options(fn () => collect($abilities->global())->map(fn (array $a) => $a['label'])->all())
|
||||
->descriptions(fn () => collect($abilities->global())->map(fn (array $a) => $a['group'])->all())
|
||||
->bulkToggleable()
|
||||
->afterStateHydrated(fn (CheckboxList $component, ?Role $record) => $component->state(
|
||||
$record?->grants()->whereNull('resource_type')->pluck('ability')->all() ?? []
|
||||
))
|
||||
->saveRelationshipsUsing(function (Role $record, ?array $state) {
|
||||
$record->grants()->whereNull('resource_type')->where('ability', '!=', '*')->delete();
|
||||
|
||||
foreach (array_unique($state ?? []) as $ability) {
|
||||
$record->grants()->create(['ability' => $ability]);
|
||||
}
|
||||
})
|
||||
->dehydrated(false),
|
||||
]),
|
||||
|
||||
Section::make('Rechte für einzelne Objekte')
|
||||
->description('Zum Beispiel: Beiträge schreiben nur in der Kategorie „MAV-Info“.')
|
||||
->visible(fn (?Role $record) => ! $record?->isAdministration() && $abilities->resourceTypes() !== [])
|
||||
->schema([
|
||||
Repeater::make('object_grants')
|
||||
->hiddenLabel()
|
||||
->columns(2)
|
||||
->addActionLabel('Recht hinzufügen')
|
||||
->defaultItems(0)
|
||||
->schema([
|
||||
Select::make('ability')
|
||||
->label('Recht')
|
||||
->required()
|
||||
->live()
|
||||
->options(fn () => collect($abilities->all())
|
||||
->filter(fn (array $a) => $a['resource'] !== null)
|
||||
->map(fn (array $a) => $a['group'].': '.$a['label'])
|
||||
->all()),
|
||||
Select::make('resource_ids')
|
||||
->label('Für')
|
||||
->multiple()
|
||||
->required()
|
||||
->options(function (Get $get) use ($abilities) {
|
||||
$type = $abilities->all()[$get('ability')]['resource'] ?? null;
|
||||
$options = $type ? ($abilities->resourceTypes()[$type]['options'])() : [];
|
||||
|
||||
return ['*' => 'Alle'] + $options;
|
||||
}),
|
||||
])
|
||||
->afterStateHydrated(fn (Repeater $component, ?Role $record) => $component->state(
|
||||
$record?->grants()->whereNotNull('resource_type')->get()
|
||||
->groupBy('ability')
|
||||
->map(fn ($grants, $ability) => [
|
||||
'ability' => $ability,
|
||||
'resource_ids' => $grants->map(fn (Grant $g) => $g->resource_id === null ? '*' : (string) $g->resource_id)->values()->all(),
|
||||
])->values()->all() ?? []
|
||||
))
|
||||
->saveRelationshipsUsing(function (Role $record, ?array $state) use ($abilities) {
|
||||
$record->grants()->whereNotNull('resource_type')->delete();
|
||||
|
||||
foreach ($state ?? [] as $item) {
|
||||
$type = $abilities->all()[$item['ability'] ?? '']['resource'] ?? null;
|
||||
|
||||
if (! $type) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ids = in_array('*', (array) $item['resource_ids'], true) ? [null] : array_map('intval', (array) $item['resource_ids']);
|
||||
|
||||
foreach (array_unique($ids) as $id) {
|
||||
$record->grants()->create(['ability' => $item['ability'], 'resource_type' => $type, 'resource_id' => $id]);
|
||||
}
|
||||
}
|
||||
})
|
||||
->dehydrated(false),
|
||||
]),
|
||||
|
||||
Section::make('Mitglieder')
|
||||
->description('Manuell zugewiesene Personen. Personen aus Identity-Provider-Gruppen kommen automatisch dazu.')
|
||||
->schema([
|
||||
Select::make('members')
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->searchable()
|
||||
->getSearchResultsUsing(fn (string $search) => User::query()
|
||||
->where(fn ($q) => $q->where('name', 'like', "%{$search}%")->orWhere('email', 'like', "%{$search}%"))
|
||||
->orderBy('name')->limit(50)->pluck('name', 'id')->all())
|
||||
->getOptionLabelsUsing(fn (array $values) => User::query()->whereIn('id', $values)->pluck('name', 'id')->all())
|
||||
->afterStateHydrated(fn (Select $component, ?Role $record) => $component->state(
|
||||
$record?->users()->wherePivot('source', 'manual')->pluck('users.id')->all() ?? []
|
||||
))
|
||||
->rule(fn (?Role $record) => function (string $attribute, mixed $value, \Closure $fail) use ($record) {
|
||||
if ($record?->isAdministration() && ! in_array(auth()->id(), array_map('intval', (array) $value), true)) {
|
||||
$fail('Sie können sich nicht selbst aus der Rolle „Administration“ entfernen.');
|
||||
}
|
||||
})
|
||||
->saveRelationshipsUsing(function (Role $record, ?array $state) {
|
||||
$ids = array_map('intval', $state ?? []);
|
||||
$current = $record->users()->wherePivot('source', 'manual')->pluck('users.id')->all();
|
||||
|
||||
foreach (array_diff($current, $ids) as $userId) {
|
||||
$record->users()->wherePivot('source', 'manual')->detach($userId);
|
||||
}
|
||||
|
||||
foreach (array_diff($ids, $current) as $userId) {
|
||||
$record->users()->attach($userId, ['source' => 'manual', 'created_at' => now()]);
|
||||
}
|
||||
|
||||
Permissions::flush();
|
||||
})
|
||||
->dehydrated(false),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->defaultSort('name')
|
||||
->modifyQueryUsing(fn ($query) => $query->withCount(['users', 'grants']))
|
||||
->columns([
|
||||
TextColumn::make('name')->label('Name')->searchable()->weight('medium')
|
||||
->description(fn (Role $record) => $record->description),
|
||||
IconColumn::make('is_system')->label('System')->boolean()->trueIcon(Heroicon::LockClosed)->falseIcon(false),
|
||||
TextColumn::make('users_count')->label('Mitglieder'),
|
||||
TextColumn::make('grants_count')->label('Rechte')
|
||||
->formatStateUsing(fn (Role $record, $state) => $record->isAdministration() ? 'alle' : $state),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make()->visible(fn (Role $record) => ! $record->is_system),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListRoles::route('/'),
|
||||
'create' => CreateRole::route('/neu'),
|
||||
'edit' => EditRole::route('/{record}/bearbeiten'),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
namespace App\Filament\Resources\Users\Schemas;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
|
|
@ -47,10 +49,26 @@ class UserForm
|
|||
->label('Aktiv')
|
||||
->helperText('Deaktivierte Konten können sich nicht anmelden und erscheinen nicht im Portal.')
|
||||
->default(true),
|
||||
Toggle::make('is_admin')
|
||||
->label('Administrator')
|
||||
->helperText('Zugriff auf diesen Admin-Bereich. Wird später durch Rollen ersetzt.')
|
||||
->disabled(fn (?User $record) => $record?->is(auth()->user()) ?? false),
|
||||
Select::make('manual_roles')
|
||||
->label('Rollen')
|
||||
->helperText('Rollen sind additiv. Rollen aus Identity-Provider-Gruppen werden automatisch vergeben.')
|
||||
->multiple()
|
||||
->preload()
|
||||
->options(fn () => Role::query()->orderByDesc('is_system')->orderBy('name')->pluck('name', 'id')->all())
|
||||
->afterStateHydrated(function (Select $component, ?User $record) {
|
||||
$component->state($record?->roles()->wherePivot('source', 'manual')->pluck('roles.id')->all() ?? []);
|
||||
})
|
||||
->rule(function (?User $record) {
|
||||
// Die eigene Administrationsrolle kann man sich nicht selbst entziehen.
|
||||
return function (string $attribute, mixed $value, \Closure $fail) use ($record) {
|
||||
if ($record?->is(auth()->user()) && $record->hasRole(Role::ADMINISTRATION)
|
||||
&& ! in_array(Role::administration()->id, array_map('intval', (array) $value), true)) {
|
||||
$fail('Die eigene Rolle „Administration“ kann nicht entfernt werden.');
|
||||
}
|
||||
};
|
||||
})
|
||||
->saveRelationshipsUsing(fn (User $record, ?array $state) => $record->syncManualRoles(array_map('intval', $state ?? [])))
|
||||
->dehydrated(false),
|
||||
TextInput::make('password')
|
||||
->label(fn (string $operation) => $operation === 'create' ? 'Passwort' : 'Neues Passwort')
|
||||
->helperText(fn (string $operation) => $operation === 'create'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class UsersTable
|
|||
TextColumn::make('job_title')->label('Funktion')->toggleable(),
|
||||
TextColumn::make('department')->label('Abteilung')->sortable()->toggleable(),
|
||||
TextColumn::make('location')->label('Standort')->sortable()->toggleable(isToggledHiddenByDefault: true),
|
||||
IconColumn::make('is_admin')->label('Admin')->boolean(),
|
||||
TextColumn::make('roles.name')->label('Rollen')->badge()->color('gray'),
|
||||
IconColumn::make('is_active')->label('Aktiv')->boolean(),
|
||||
TextColumn::make('last_login_at')
|
||||
->label('Letzte Anmeldung')
|
||||
|
|
@ -38,7 +38,7 @@ class UsersTable
|
|||
])
|
||||
->filters([
|
||||
TernaryFilter::make('is_active')->label('Aktiv'),
|
||||
TernaryFilter::make('is_admin')->label('Administrator'),
|
||||
SelectFilter::make('roles')->label('Rolle')->relationship('roles', 'name'),
|
||||
SelectFilter::make('department')
|
||||
->label('Abteilung')
|
||||
->options(fn () => User::query()->whereNotNull('department')->distinct()->orderBy('department')->pluck('department', 'department')->all()),
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ use Filament\Resources\Resource;
|
|||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class UserResource extends Resource
|
||||
{
|
||||
|
|
@ -20,6 +21,10 @@ class UserResource extends Resource
|
|||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedUsers;
|
||||
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'Benutzer & Rechte';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected static ?string $modelLabel = 'Benutzer';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Benutzer';
|
||||
|
|
@ -28,6 +33,11 @@ class UserResource extends Resource
|
|||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getEloquentQuery()->with('roles');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return UserForm::configure($schema);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use App\Support\Audit;
|
||||
use App\Support\EnvFile;
|
||||
|
|
@ -130,10 +131,10 @@ class InstallController extends Controller
|
|||
'first_name' => $data['first_name'],
|
||||
'last_name' => $data['last_name'],
|
||||
'password' => $data['password'],
|
||||
'is_admin' => true,
|
||||
'is_active' => true,
|
||||
]);
|
||||
|
||||
$admin->syncManualRoles([Role::administration()->id]);
|
||||
$settings->set('branding.portal_name', $data['portal_name']);
|
||||
|
||||
if (filled($data['license_email'] ?? null)) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class HandleInertiaRequests extends Middleware
|
|||
'job_title' => $user->job_title,
|
||||
'avatar_url' => $user->avatarUrl(96),
|
||||
'theme' => $user->theme,
|
||||
'is_admin' => $user->is_admin,
|
||||
'can_admin' => $user->canAccessAdmin(),
|
||||
] : null,
|
||||
],
|
||||
'navigation' => fn () => $user ? $this->navigation->items($request) : [],
|
||||
|
|
|
|||
18
app/Models/Audience.php
Normal file
18
app/Models/Audience.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Zielgruppen-Regel: Objekt X ist sichtbar für Rolle/Abteilung/Standort Y.
|
||||
* Objekte ohne Regel sind für alle sichtbar; mehrere Regeln verknüpft ODER.
|
||||
*/
|
||||
#[Fillable(['resource_type', 'resource_id', 'rule_type', 'rule_value'])]
|
||||
class Audience extends Model
|
||||
{
|
||||
public const TYPES = ['role' => 'Rolle', 'department' => 'Abteilung', 'location' => 'Standort'];
|
||||
|
||||
public $timestamps = false;
|
||||
}
|
||||
35
app/Models/Grant.php
Normal file
35
app/Models/Grant.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Support\Permissions\Permissions;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* Ein Recht einer Rolle: global (resource_type = null) oder für ein Objekt
|
||||
* (resource_id = null bedeutet: alle Objekte dieses Typs).
|
||||
*/
|
||||
#[Fillable(['role_id', 'ability', 'resource_type', 'resource_id', 'include_children'])]
|
||||
class Grant extends Model
|
||||
{
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::saved(fn () => Permissions::flush());
|
||||
static::deleted(fn () => Permissions::flush());
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['include_children' => 'boolean', 'resource_id' => 'integer'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsTo<Role, $this>
|
||||
*/
|
||||
public function role(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Role::class);
|
||||
}
|
||||
}
|
||||
70
app/Models/Role.php
Normal file
70
app/Models/Role.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Support\Permissions\Permissions;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
#[Fillable(['name', 'slug', 'description', 'is_system'])]
|
||||
class Role extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public const ADMINISTRATION = 'administration';
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::saving(function (Role $role) {
|
||||
$role->slug = $role->slug ?: Str::slug($role->name, language: 'de');
|
||||
});
|
||||
|
||||
static::saved(fn () => Permissions::flush());
|
||||
static::deleted(fn () => Permissions::flush());
|
||||
}
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['is_system' => 'boolean'];
|
||||
}
|
||||
|
||||
public static function administration(): self
|
||||
{
|
||||
$role = static::query()->firstOrCreate(['slug' => self::ADMINISTRATION], [
|
||||
'name' => 'Administration',
|
||||
'description' => 'Voller Zugriff auf alle Bereiche und Einstellungen.',
|
||||
'is_system' => true,
|
||||
]);
|
||||
|
||||
if (! $role->grants()->where('ability', '*')->exists()) {
|
||||
$role->grants()->create(['ability' => '*']);
|
||||
}
|
||||
|
||||
return $role;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsToMany<User, $this>
|
||||
*/
|
||||
public function users(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(User::class)->withPivot('source', 'source_ref', 'created_at');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<Grant, $this>
|
||||
*/
|
||||
public function grants(): HasMany
|
||||
{
|
||||
return $this->hasMany(Grant::class);
|
||||
}
|
||||
|
||||
public function isAdministration(): bool
|
||||
{
|
||||
return $this->slug === self::ADMINISTRATION;
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,8 @@
|
|||
namespace App\Models;
|
||||
|
||||
use App\Support\Avatars;
|
||||
use App\Support\Permissions\Permissions;
|
||||
use App\Support\Permissions\PermissionSet;
|
||||
use Database\Factories\UserFactory;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
use Filament\Models\Contracts\HasAvatar;
|
||||
|
|
@ -12,6 +14,7 @@ use Illuminate\Database\Eloquent\Attributes\Hidden;
|
|||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Support\Str;
|
||||
|
|
@ -19,7 +22,7 @@ use Illuminate\Support\Str;
|
|||
#[Fillable([
|
||||
'name', 'first_name', 'last_name', 'email', 'password',
|
||||
'job_title', 'department', 'location', 'phone', 'mobile', 'about',
|
||||
'is_admin', 'is_active', 'theme',
|
||||
'is_active', 'theme',
|
||||
])]
|
||||
#[Hidden(['password', 'remember_token'])]
|
||||
class User extends Authenticatable implements FilamentUser, HasAvatar
|
||||
|
|
@ -47,18 +50,68 @@ class User extends Authenticatable implements FilamentUser, HasAvatar
|
|||
'email_verified_at' => 'datetime',
|
||||
'last_login_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
'is_admin' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Vorläufig: Zugriff auf das Admin-Backend über das Flag is_admin.
|
||||
* Wird in Phase 2 durch das Rollen- und Rechtesystem ersetzt.
|
||||
* Admin-Backend: für alle mit irgendeinem Recht (z. B. Redaktion einer
|
||||
* Kategorie). Was sie dort sehen, regeln die Policies der einzelnen Seiten.
|
||||
*/
|
||||
public function canAccessPanel(Panel $panel): bool
|
||||
{
|
||||
return $this->is_admin && $this->is_active;
|
||||
return $this->canAccessAdmin();
|
||||
}
|
||||
|
||||
public function canAccessAdmin(): bool
|
||||
{
|
||||
$permissions = $this->permissions();
|
||||
|
||||
return $this->is_active && ($permissions->global !== [] || $permissions->hasAnyObjectGrant());
|
||||
}
|
||||
|
||||
public function permissions(): PermissionSet
|
||||
{
|
||||
return app(Permissions::class)->for($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return BelongsToMany<Role, $this>
|
||||
*/
|
||||
public function roles(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Role::class)->withPivot('source', 'source_ref', 'created_at');
|
||||
}
|
||||
|
||||
public function hasRole(string $slug): bool
|
||||
{
|
||||
return $this->roles()->where('slug', $slug)->exists();
|
||||
}
|
||||
|
||||
public function isAdministrator(): bool
|
||||
{
|
||||
return $this->permissions()->isSuperuser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Manuell vergebene Rollen setzen. Rollen aus Identity-Provider-Gruppen
|
||||
* (Quelle „idp“) bleiben unberührt – Rollen sind additiv.
|
||||
*
|
||||
* @param list<int> $roleIds
|
||||
*/
|
||||
public function syncManualRoles(array $roleIds): void
|
||||
{
|
||||
$current = $this->roles()->wherePivot('source', 'manual')->pluck('roles.id')->all();
|
||||
|
||||
foreach (array_diff($current, $roleIds) as $roleId) {
|
||||
$this->roles()->wherePivot('source', 'manual')->detach($roleId);
|
||||
}
|
||||
|
||||
foreach (array_diff($roleIds, $current) as $roleId) {
|
||||
$this->roles()->attach($roleId, ['source' => 'manual', 'created_at' => now()]);
|
||||
}
|
||||
|
||||
Permissions::flush();
|
||||
}
|
||||
|
||||
public function getFilamentAvatarUrl(): ?string
|
||||
|
|
|
|||
37
app/Policies/RolePolicy.php
Normal file
37
app/Policies/RolePolicy.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
|
||||
class RolePolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->can('roles.manage');
|
||||
}
|
||||
|
||||
public function view(User $user, Role $role): bool
|
||||
{
|
||||
return $user->can('roles.manage');
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->can('roles.manage');
|
||||
}
|
||||
|
||||
public function update(User $user, Role $role): bool
|
||||
{
|
||||
return $user->can('roles.manage');
|
||||
}
|
||||
|
||||
/**
|
||||
* Systemrollen (Administration) lassen sich nicht löschen.
|
||||
*/
|
||||
public function delete(User $user, Role $role): bool
|
||||
{
|
||||
return $user->can('roles.manage') && ! $role->is_system;
|
||||
}
|
||||
}
|
||||
33
app/Policies/UserPolicy.php
Normal file
33
app/Policies/UserPolicy.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class UserPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->can('users.manage');
|
||||
}
|
||||
|
||||
public function view(User $user, User $model): bool
|
||||
{
|
||||
return $user->can('users.manage');
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->can('users.manage');
|
||||
}
|
||||
|
||||
public function update(User $user, User $model): bool
|
||||
{
|
||||
return $user->can('users.manage');
|
||||
}
|
||||
|
||||
public function delete(User $user, User $model): bool
|
||||
{
|
||||
return $user->can('users.manage') && ! $model->is($user);
|
||||
}
|
||||
}
|
||||
|
|
@ -5,11 +5,14 @@ namespace App\Providers;
|
|||
use App\Dashboard\CoreWidgets;
|
||||
use App\Dashboard\Widgets;
|
||||
use App\Models\User;
|
||||
use App\Support\Abilities;
|
||||
use App\Support\Avatars;
|
||||
use App\Support\BackgroundTasks;
|
||||
use App\Support\Branding;
|
||||
use App\Support\Installation;
|
||||
use App\Support\License\LicenseStore;
|
||||
use App\Support\Permissions\PermissionResource;
|
||||
use App\Support\Permissions\Permissions;
|
||||
use App\Support\QuickLinks;
|
||||
use App\Support\Settings;
|
||||
use App\Support\Update\InstalledVersion;
|
||||
|
|
@ -39,6 +42,7 @@ class AppServiceProvider extends ServiceProvider
|
|||
$this->app->singleton(Avatars::class);
|
||||
$this->app->singleton(QuickLinks::class);
|
||||
$this->app->singleton(LicenseStore::class);
|
||||
$this->app->singleton(Permissions::class);
|
||||
$this->app->singleton(BackgroundTasks::class);
|
||||
$this->app->singleton(InstalledVersion::class);
|
||||
$this->app->singleton(UpdateProgress::class);
|
||||
|
|
@ -52,9 +56,22 @@ class AppServiceProvider extends ServiceProvider
|
|||
// N+1-Abfragen in Entwicklung und Tests sofort sichtbar machen (docs/PLAN.md, Performance).
|
||||
Model::preventLazyLoading(! $this->app->isProduction());
|
||||
|
||||
// Vorläufig: Administratoren über is_admin – wird in Phase 2 durch Rollen ersetzt.
|
||||
Gate::define('admin', fn (User $user) => $user->is_admin && $user->is_active);
|
||||
Gate::before(fn (User $user) => $user->is_admin && $user->is_active ? true : null);
|
||||
// Rechte aus Rollen (App\Support\Abilities) entscheidet das Rechtesystem – Administration
|
||||
// hat sie alle. Alles andere (z. B. „delete“ auf einem Modell) entscheiden die Policies,
|
||||
// damit Regeln wie „Systemrollen nie löschen“ auch für Administratoren gelten.
|
||||
Gate::before(function (User $user, string $ability, array $arguments) {
|
||||
if (! $user->is_active) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (! $this->app->make(Abilities::class)->exists($ability)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
[$type, $id] = PermissionResource::from($arguments);
|
||||
|
||||
return $user->permissions()->can($ability, $type, $id);
|
||||
});
|
||||
|
||||
Password::defaults(fn () => Password::min(10)->letters()->numbers());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ namespace App\Providers\Filament;
|
|||
|
||||
use App\Filament\AvatarProviders\InitialsAvatarProvider;
|
||||
use App\Filament\Pages\Feedback;
|
||||
use App\Filament\Resources\Roles\RoleResource;
|
||||
use App\Filament\Resources\Users\UserResource;
|
||||
use App\Plugins\PluginManager;
|
||||
use App\Support\Branding;
|
||||
use Filament\Actions\Action;
|
||||
|
|
@ -40,7 +42,7 @@ class AdminPanelProvider extends PanelProvider
|
|||
->colors(fn () => [
|
||||
'primary' => app(Branding::class)->palette(),
|
||||
])
|
||||
->navigationGroups(['Inhalte', 'Portal', 'System', 'Hilfe'])
|
||||
->navigationGroups(['Inhalte', 'Benutzer & Rechte', 'Portal', 'System', 'Hilfe'])
|
||||
->databaseNotifications()
|
||||
->userMenuItems([
|
||||
Action::make('feedback')
|
||||
|
|
@ -54,7 +56,13 @@ class AdminPanelProvider extends PanelProvider
|
|||
->icon(Heroicon::OutlinedArrowTopRightOnSquare)
|
||||
->sort(100),
|
||||
])
|
||||
->discoverResources(in: app_path('Filament/Resources'), for: 'App\Filament\Resources')
|
||||
// Kern-Ressourcen ausdrücklich registrieren statt das Verzeichnis zu durchsuchen:
|
||||
// Der Self-Updater löscht nie Dateien, verschobene Ressourcen (z. B. nach
|
||||
// plugins-core/) blieben sonst als Doppelgänger liegen und würden mitgeladen.
|
||||
->resources([
|
||||
UserResource::class,
|
||||
RoleResource::class,
|
||||
])
|
||||
->discoverPages(in: app_path('Filament/Pages'), for: 'App\Filament\Pages')
|
||||
->pages([
|
||||
Dashboard::class,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ class Abilities
|
|||
|
||||
public function __construct()
|
||||
{
|
||||
$this->define('admin.access', 'Administrationsbereich öffnen', 'System');
|
||||
$this->define('users.manage', 'Benutzer verwalten', 'System');
|
||||
$this->define('roles.manage', 'Rollen und Rechte verwalten', 'System');
|
||||
$this->define('plugins.manage', 'Plugins verwalten und installieren', 'System');
|
||||
|
|
|
|||
93
app/Support/Permissions/Audiences.php
Normal file
93
app/Support/Permissions/Audiences.php
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
|
||||
namespace App\Support\Permissions;
|
||||
|
||||
use App\Models\Audience;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Query\Builder as QueryBuilder;
|
||||
|
||||
/**
|
||||
* Zielgruppen: Ein Objekt ohne Regeln sehen alle. Mit Regeln sieht es, wer
|
||||
* mindestens eine erfüllt (Rolle, Abteilung oder Standort). Die Prüfung ist eine
|
||||
* indizierte SQL-Bedingung – auch bei tausenden Personen schnell.
|
||||
*/
|
||||
class Audiences
|
||||
{
|
||||
/**
|
||||
* Schränkt eine Abfrage auf Objekte ein, die die Person sehen darf.
|
||||
*
|
||||
* @param Builder<Model> $query
|
||||
* @param string $column Spalte mit der ID des Objekts, dessen Zielgruppe gilt
|
||||
*/
|
||||
public static function constrain(Builder $query, string $type, string $column, ?User $user): void
|
||||
{
|
||||
$query->where(function (Builder $q) use ($type, $column, $user) {
|
||||
$q->whereNotExists(fn (QueryBuilder $sub) => $sub->from('audiences')
|
||||
->where('audiences.resource_type', $type)
|
||||
->whereColumn('audiences.resource_id', $column));
|
||||
|
||||
if ($user) {
|
||||
$q->orWhereExists(fn (QueryBuilder $sub) => $sub->from('audiences')
|
||||
->where('audiences.resource_type', $type)
|
||||
->whereColumn('audiences.resource_id', $column)
|
||||
->where(fn (QueryBuilder $rules) => self::matching($rules, $user)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static function allows(string $type, int $id, ?User $user): bool
|
||||
{
|
||||
$rules = Audience::query()->where('resource_type', $type)->where('resource_id', $id);
|
||||
|
||||
if (! (clone $rules)->exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user !== null && $rules->where(fn ($q) => self::matching($q->getQuery(), $user))->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array{role?: list<int|string>, department?: list<string>, location?: list<string>} $rules
|
||||
*/
|
||||
public static function sync(string $type, int $id, array $rules): void
|
||||
{
|
||||
Audience::query()->where('resource_type', $type)->where('resource_id', $id)->delete();
|
||||
|
||||
foreach (array_keys(Audience::TYPES) as $ruleType) {
|
||||
foreach (array_unique(array_filter((array) ($rules[$ruleType] ?? []), fn ($v) => $v !== null && $v !== '')) as $value) {
|
||||
Audience::query()->create(['resource_type' => $type, 'resource_id' => $id, 'rule_type' => $ruleType, 'rule_value' => (string) $value]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{role: list<string>, department: list<string>, location: list<string>}
|
||||
*/
|
||||
public static function get(string $type, int $id): array
|
||||
{
|
||||
$rules = ['role' => [], 'department' => [], 'location' => []];
|
||||
|
||||
foreach (Audience::query()->where('resource_type', $type)->where('resource_id', $id)->get() as $audience) {
|
||||
$rules[$audience->rule_type][] = $audience->rule_value;
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
|
||||
private static function matching(QueryBuilder $rules, User $user): void
|
||||
{
|
||||
$roleIds = array_map('strval', $user->permissions()->roleIds);
|
||||
|
||||
$rules->where(fn (QueryBuilder $q) => $q->where('audiences.rule_type', 'role')->whereIn('audiences.rule_value', $roleIds ?: ['-']));
|
||||
|
||||
if (filled($user->department)) {
|
||||
$rules->orWhere(fn (QueryBuilder $q) => $q->where('audiences.rule_type', 'department')->where('audiences.rule_value', $user->department));
|
||||
}
|
||||
|
||||
if (filled($user->location)) {
|
||||
$rules->orWhere(fn (QueryBuilder $q) => $q->where('audiences.rule_type', 'location')->where('audiences.rule_value', $user->location));
|
||||
}
|
||||
}
|
||||
}
|
||||
36
app/Support/Permissions/PermissionResource.php
Normal file
36
app/Support/Permissions/PermissionResource.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace App\Support\Permissions;
|
||||
|
||||
/**
|
||||
* Übersetzt die Argumente eines Rechte-Checks in Objekttyp und ID:
|
||||
* $user->can('news.post.create', $category) – Modell mit permissionResource()
|
||||
* $user->can('news.post.create', ['news_category', 5]) – Laravel reicht das als zwei Argumente durch
|
||||
*/
|
||||
final class PermissionResource
|
||||
{
|
||||
/**
|
||||
* @param array<int, mixed> $arguments
|
||||
* @return array{0: string|null, 1: int|null}
|
||||
*/
|
||||
public static function from(array $arguments): array
|
||||
{
|
||||
$first = $arguments[0] ?? null;
|
||||
|
||||
if (is_object($first) && method_exists($first, 'permissionResource')) {
|
||||
return $first->permissionResource();
|
||||
}
|
||||
|
||||
if (is_array($first)) {
|
||||
return self::from($first);
|
||||
}
|
||||
|
||||
if (is_string($first)) {
|
||||
$id = $arguments[1] ?? null;
|
||||
|
||||
return [$first, is_numeric($id) ? (int) $id : null];
|
||||
}
|
||||
|
||||
return [null, null];
|
||||
}
|
||||
}
|
||||
75
app/Support/Permissions/PermissionSet.php
Normal file
75
app/Support/Permissions/PermissionSet.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace App\Support\Permissions;
|
||||
|
||||
/**
|
||||
* Vorberechnete Rechte einer Person (gecacht, siehe Permissions).
|
||||
*/
|
||||
final class PermissionSet
|
||||
{
|
||||
/**
|
||||
* @param list<int> $roleIds
|
||||
* @param array<string, true> $global Ability => true („*“ = alles)
|
||||
* @param array<string, array<string, list<int>|true>> $objects Ability => Typ => IDs oder true (alle)
|
||||
*/
|
||||
public function __construct(
|
||||
public readonly array $roleIds,
|
||||
public readonly array $global,
|
||||
public readonly array $objects,
|
||||
) {}
|
||||
|
||||
public function isSuperuser(): bool
|
||||
{
|
||||
return isset($this->global['*']);
|
||||
}
|
||||
|
||||
public function can(string $ability, ?string $resourceType = null, ?int $resourceId = null): bool
|
||||
{
|
||||
if ($this->isSuperuser() || isset($this->global[$ability])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($resourceType === null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$ids = $this->objects[$ability][$resourceType] ?? null;
|
||||
|
||||
return $ids === true || ($ids !== null && ($resourceId === null ? $ids !== [] : in_array($resourceId, $ids, true)));
|
||||
}
|
||||
|
||||
/**
|
||||
* IDs der Objekte, für die das Recht gilt – für Abfragen („nur meine Kategorien“).
|
||||
*
|
||||
* @return list<int>|true true = alle
|
||||
*/
|
||||
public function ids(string $ability, string $resourceType): array|true
|
||||
{
|
||||
if ($this->isSuperuser() || isset($this->global[$ability])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->objects[$ability][$resourceType] ?? [];
|
||||
}
|
||||
|
||||
public function hasAnyObjectGrant(): bool
|
||||
{
|
||||
return $this->objects !== [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function toArray(): array
|
||||
{
|
||||
return ['roleIds' => $this->roleIds, 'global' => $this->global, 'objects' => $this->objects];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string, mixed> $data
|
||||
*/
|
||||
public static function fromArray(array $data): self
|
||||
{
|
||||
return new self($data['roleIds'], $data['global'], $data['objects']);
|
||||
}
|
||||
}
|
||||
72
app/Support/Permissions/Permissions.php
Normal file
72
app/Support/Permissions/Permissions.php
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
<?php
|
||||
|
||||
namespace App\Support\Permissions;
|
||||
|
||||
use App\Models\Grant;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
/**
|
||||
* Löst die effektiven Rechte einer Person auf: Vereinigung aller Rollen (manuell
|
||||
* und über IdP-Gruppen) – es gibt keine Verbote. Das Ergebnis wird je Person
|
||||
* gecacht; jede Änderung an Rollen, Rechten oder Zuweisungen erhöht die
|
||||
* Version und macht damit alle Caches auf einen Schlag ungültig.
|
||||
*/
|
||||
class Permissions
|
||||
{
|
||||
private const VERSION_KEY = 'permissions.version';
|
||||
|
||||
/** @var array<int, PermissionSet> */
|
||||
private array $resolved = [];
|
||||
|
||||
public function for(User $user): PermissionSet
|
||||
{
|
||||
if (! $user->is_active) {
|
||||
return new PermissionSet([], [], []);
|
||||
}
|
||||
|
||||
return $this->resolved[$user->id] ??= PermissionSet::fromArray(Cache::rememberForever(
|
||||
'permissions.user.'.$user->id.'.'.self::version(),
|
||||
fn () => $this->resolve($user)->toArray(),
|
||||
));
|
||||
}
|
||||
|
||||
public static function flush(): void
|
||||
{
|
||||
Cache::forever(self::VERSION_KEY, self::version() + 1);
|
||||
app(self::class)->resolved = [];
|
||||
}
|
||||
|
||||
public static function version(): int
|
||||
{
|
||||
return (int) Cache::get(self::VERSION_KEY, 1);
|
||||
}
|
||||
|
||||
private function resolve(User $user): PermissionSet
|
||||
{
|
||||
$roleIds = DB::table('role_user')->where('user_id', $user->id)->distinct()->pluck('role_id')->map(fn ($id) => (int) $id)->all();
|
||||
$global = [];
|
||||
$objects = [];
|
||||
|
||||
foreach (Grant::query()->whereIn('role_id', $roleIds)->get(['ability', 'resource_type', 'resource_id']) as $grant) {
|
||||
if ($grant->resource_type === null) {
|
||||
$global[$grant->ability] = true;
|
||||
} elseif ($grant->resource_id === null) {
|
||||
$objects[$grant->ability][$grant->resource_type] = true;
|
||||
} elseif (($objects[$grant->ability][$grant->resource_type] ?? null) !== true) {
|
||||
$objects[$grant->ability][$grant->resource_type][] = $grant->resource_id;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($objects as $ability => $types) {
|
||||
foreach ($types as $type => $ids) {
|
||||
if (is_array($ids)) {
|
||||
$objects[$ability][$type] = array_values(array_unique($ids));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new PermissionSet($roleIds, $global, $objects);
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
|
@ -31,14 +32,21 @@ class UserFactory extends Factory
|
|||
'department' => fake()->randomElement(['Verwaltung', 'Pflege', 'IT', 'Personal', 'Buchhaltung', 'Technik']),
|
||||
'location' => fake()->city(),
|
||||
'phone' => fake()->phoneNumber(),
|
||||
'is_admin' => false,
|
||||
'is_active' => true,
|
||||
];
|
||||
}
|
||||
|
||||
public function admin(): static
|
||||
{
|
||||
return $this->state(fn () => ['is_admin' => true]);
|
||||
return $this->afterCreating(fn (User $user) => $user->roles()->attach(Role::administration()->id, ['source' => 'manual', 'created_at' => now()]));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param list<int|Role> $roles
|
||||
*/
|
||||
public function withRoles(array $roles): static
|
||||
{
|
||||
return $this->afterCreating(fn (User $user) => $user->syncManualRoles(array_map(fn ($r) => $r instanceof Role ? $r->id : $r, $roles)));
|
||||
}
|
||||
|
||||
public function inactive(): static
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Rollen und Rechte (docs/PLAN.md, Abschnitt 7).
|
||||
*
|
||||
* roles – Rollen, z. B. „MAV“ oder „Redaktion Hamburg“
|
||||
* role_user – Zuweisungen mit Herkunft: manuell oder über eine IdP-Gruppe (Phase 3)
|
||||
* grants – Rechte einer Rolle, global (resource_type = null) oder für ein Objekt
|
||||
* audiences – Zielgruppen: wer ein Objekt sehen darf (Rolle, Abteilung, Standort)
|
||||
*
|
||||
* Ersetzt das bisherige Feld users.is_admin durch die Systemrolle „Administration“.
|
||||
*/
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('roles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 100);
|
||||
$table->string('slug', 100)->unique();
|
||||
$table->string('description', 500)->nullable();
|
||||
$table->boolean('is_system')->default(false);
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('role_user', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('role_id')->constrained()->cascadeOnDelete();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('source', 20)->default('manual');
|
||||
$table->string('source_ref', 191)->nullable();
|
||||
$table->timestamp('created_at')->nullable();
|
||||
|
||||
$table->unique(['role_id', 'user_id', 'source', 'source_ref']);
|
||||
$table->index(['user_id', 'role_id']);
|
||||
});
|
||||
|
||||
Schema::create('grants', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('role_id')->constrained()->cascadeOnDelete();
|
||||
$table->string('ability', 100);
|
||||
$table->string('resource_type', 50)->nullable();
|
||||
$table->unsignedBigInteger('resource_id')->nullable();
|
||||
$table->boolean('include_children')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['resource_type', 'resource_id']);
|
||||
$table->index(['role_id', 'ability']);
|
||||
});
|
||||
|
||||
Schema::create('audiences', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('resource_type', 50);
|
||||
$table->unsignedBigInteger('resource_id');
|
||||
$table->string('rule_type', 20);
|
||||
$table->string('rule_value', 191);
|
||||
|
||||
$table->index(['resource_type', 'resource_id']);
|
||||
$table->index(['rule_type', 'rule_value']);
|
||||
});
|
||||
|
||||
$now = now();
|
||||
$adminRole = DB::table('roles')->insertGetId([
|
||||
'name' => 'Administration',
|
||||
'slug' => 'administration',
|
||||
'description' => 'Voller Zugriff auf alle Bereiche und Einstellungen.',
|
||||
'is_system' => true,
|
||||
'created_at' => $now,
|
||||
'updated_at' => $now,
|
||||
]);
|
||||
|
||||
DB::table('grants')->insert(['role_id' => $adminRole, 'ability' => '*', 'created_at' => $now, 'updated_at' => $now]);
|
||||
|
||||
DB::table('users')->where('is_admin', true)->pluck('id')->each(fn (int $userId) => DB::table('role_user')->insert([
|
||||
'role_id' => $adminRole, 'user_id' => $userId, 'source' => 'manual', 'created_at' => $now,
|
||||
]));
|
||||
|
||||
Schema::table('users', fn (Blueprint $table) => $table->dropColumn('is_admin'));
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', fn (Blueprint $table) => $table->boolean('is_admin')->default(false));
|
||||
|
||||
$adminRole = DB::table('roles')->where('slug', 'administration')->value('id');
|
||||
|
||||
if ($adminRole) {
|
||||
DB::table('users')->whereIn('id', DB::table('role_user')->where('role_id', $adminRole)->pluck('user_id'))->update(['is_admin' => true]);
|
||||
}
|
||||
|
||||
Schema::dropIfExists('audiences');
|
||||
Schema::dropIfExists('grants');
|
||||
Schema::dropIfExists('role_user');
|
||||
Schema::dropIfExists('roles');
|
||||
}
|
||||
};
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\Role;
|
||||
use App\Models\User;
|
||||
use App\Support\Branding;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
|
@ -24,7 +25,7 @@ class DemoContentSeeder extends Seeder
|
|||
$authors = User::query()->inRandomOrder()->limit(5)->get();
|
||||
|
||||
$categories = collect([
|
||||
'Unternehmen', 'Arbeit & Bildung', 'Menschen', 'Nachhaltigkeit', 'Freizeit & Kultur', 'Verwaltung',
|
||||
'Unternehmen', 'Arbeit & Bildung', 'Menschen', 'Nachhaltigkeit', 'Freizeit & Kultur', 'Verwaltung', 'MAV-Info',
|
||||
])->mapWithKeys(fn (string $name, int $i) => [$name => NewsCategory::query()->create([
|
||||
'name' => $name,
|
||||
'slug' => Str::slug($name, language: 'de'),
|
||||
|
|
@ -59,6 +60,24 @@ class DemoContentSeeder extends Seeder
|
|||
]);
|
||||
}
|
||||
|
||||
// Beispiel für das Rechtesystem: Die MAV schreibt nur in „MAV-Info“.
|
||||
$mav = Role::query()->create(['name' => 'MAV', 'description' => 'Mitarbeitervertretung – schreibt in „MAV-Info“.']);
|
||||
$mav->grants()->create(['ability' => 'news.post.create', 'resource_type' => 'news_category', 'resource_id' => $categories['MAV-Info']->id]);
|
||||
$mav->grants()->create(['ability' => 'news.post.publish', 'resource_type' => 'news_category', 'resource_id' => $categories['MAV-Info']->id]);
|
||||
$mavMember = User::factory()->withRoles([$mav])->create([
|
||||
'first_name' => 'Grete', 'last_name' => 'Hoffmann', 'email' => 'mav@example.com',
|
||||
'job_title' => 'Vorsitzende der MAV', 'department' => 'Mitarbeitervertretung',
|
||||
]);
|
||||
|
||||
NewsPost::query()->create([
|
||||
'category_id' => $categories['MAV-Info']->id,
|
||||
'author_id' => $mavMember->id,
|
||||
'title' => 'MAV-Sprechstunde ab sofort jeden Dienstag',
|
||||
'teaser' => 'Wir sind für Ihre Fragen da – persönlich oder per Videoanruf.',
|
||||
'body' => $this->body('Wir sind für Ihre Fragen da – persönlich oder per Videoanruf.'),
|
||||
'published_at' => now()->subHours(30),
|
||||
]);
|
||||
|
||||
NewsPost::query()->create([
|
||||
'category_id' => $categories['Unternehmen']->id,
|
||||
'title' => 'Entwurf: Ausblick auf das zweite Halbjahr',
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ plugins/mav-kalender/
|
|||
Einstellungsseiten, Admin-Ressourcen, Routen, Suche, Benachrichtigungen,
|
||||
geplante Jobs.
|
||||
- Stabile, versionierte Plugin-API (SemVer); Deprecations mit Vorlauf.
|
||||
- Entwickleranleitung: [`docs/PLUGINS.md`](PLUGINS.md).
|
||||
|
||||
### 4.4 Frontend von Plugins
|
||||
|
||||
|
|
@ -476,7 +477,7 @@ Kantinenplan, Ideenbox, Urlaubsanträge.
|
|||
| **0 – Fundament** ✅ | Laravel-Skeleton, Docker-Dev, CI-Matrix, `VERSION` + `CHANGELOG.md` + Build-Workflow (Assets/`vendor` mitversioniert), lokaler Login, User & Profil, Header mit Avatar, Design-System (Tailwind/shadcn-vue) mit Design-Tokens, **Basis-Branding (Portalname, Logo, Markenfarbe)**, Personenverzeichnis, Schnellzugriffe, Filament-Grundgerüst |
|
||||
| **0b – News & Termine (vorgezogen)** ✅ | Neuigkeiten mit Kategorien, Titelbild, Planung, Hervorhebung (Slider); Termine mit .ics-Export; Startseite nach Intranet-Vorbild. Redaktion vorerst nur im Admin-Backend – Rechte pro Kategorie, Redaktion im Portal und Umzug in Plugins folgen mit Phase 2 |
|
||||
| **1 – Betrieb & Lizenz** ✅ | **Self-Updater** (inkl. Wartungsmodus, Auto-Migration, Kanäle), **Lizenz-Speicher & -Client** (rotierendes Token), Seite „Aktualisierung“, **Rückmeldungen**, Web-Installer, Site Health, Cron-Varianten |
|
||||
| **2 – Plugin-System & Rechte** | Plugin-Loader, Hooks/Filter, Registries, Recovery-Modus, Import-Map-Frontend; Rollen, Grants, Zielgruppen, Rechte-Cache, Rechte-Prüfer |
|
||||
| **2 – Plugin-System & Rechte** ✅ | Plugin-Loader, Hooks/Filter, Registries, Recovery-Modus, Import-Map-Frontend; Rollen, Grants, Zielgruppen, Rechte-Cache, Rechte-Prüfer |
|
||||
| **3 – Entra ID** | OIDC-Login, JIT, Gruppen-/App-Rollen-Mapping (additiv), Graph-Profil- & Foto-Sync, Delta-Sync |
|
||||
| **4 – CMS** | Seitenbaum, Pagebuilder, Versionen; News-Freigabe-Workflow und Redaktion im Portal |
|
||||
| **5 – Branding & Theming** | Vollständige Seite „Erscheinungsbild“: Logo-Varianten, Farben inkl. Farbtreue & Kontrastprüfung, Schriften, Form, Login-Seite, E-Mails, Live-Vorschau, Entwurf/Veröffentlichen, Export/Import |
|
||||
|
|
|
|||
105
docs/PLUGINS.md
Normal file
105
docs/PLUGINS.md
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
# Plugins entwickeln
|
||||
|
||||
Inhaus lässt sich wie WordPress über Plugins erweitern. Auch die mitgelieferten
|
||||
Funktionen „Neuigkeiten“ und „Termine“ sind Plugins (`plugins-core/news`,
|
||||
`plugins-core/events`) – sie sind die beste Vorlage.
|
||||
|
||||
## Aufbau
|
||||
|
||||
```
|
||||
mein-plugin/
|
||||
plugin.json Manifest (Pflicht)
|
||||
src/Plugin.php Einstiegsklasse, erbt von App\Plugins\Plugin
|
||||
src/… weiterer PHP-Code (PSR-4 unter „namespace“)
|
||||
src/Filament/Resources/ Admin-Seiten (werden automatisch gefunden)
|
||||
src/Filament/Pages/
|
||||
database/migrations/ laufen bei Aktivierung und nach Updates
|
||||
routes/web.php Routen (Middleware „web“ ist gesetzt)
|
||||
resources/views/ Blade-Views, Namespace = Kürzel: view('mein-plugin::seite')
|
||||
vendor/ eigene Abhängigkeiten – bitte gescoped (Strauss/PHP-Scoper)
|
||||
```
|
||||
|
||||
### plugin.json
|
||||
|
||||
```json
|
||||
{
|
||||
"slug": "mein-plugin",
|
||||
"name": "Mein Plugin",
|
||||
"version": "1.0.0",
|
||||
"description": "Wofür das Plugin da ist.",
|
||||
"author": "Firma GmbH",
|
||||
"namespace": "Firma\\MeinPlugin\\",
|
||||
"class": "Firma\\MeinPlugin\\Plugin",
|
||||
"requires": { "core": ">=0.3.0", "php": ">=8.3", "plugins": ["news"] }
|
||||
}
|
||||
```
|
||||
|
||||
- `slug`: Kleinbuchstaben, Ziffern, Bindestriche; eindeutig. Kürzel mitgelieferter
|
||||
Plugins sind vergeben.
|
||||
- `namespace`: darf nicht mit `App\` beginnen.
|
||||
- `requires.core` / `requires.php`: Versionsbedingungen (`>=`, `<`, `^`, `~`, exakt).
|
||||
- `requires.plugins`: Plugins, die aktiv sein müssen.
|
||||
|
||||
### Einstiegsklasse
|
||||
|
||||
```php
|
||||
namespace Firma\MeinPlugin;
|
||||
|
||||
use App\Dashboard\Widgets;
|
||||
use App\Plugins\Hooks;
|
||||
use App\Plugins\Plugin as BasePlugin;
|
||||
use App\Support\Abilities;
|
||||
use App\Support\Navigation;
|
||||
|
||||
class Plugin extends BasePlugin
|
||||
{
|
||||
public function register(): void
|
||||
{
|
||||
// Menüpunkt im Portal
|
||||
$this->app->make(Navigation::class)->add('mein-plugin', 'Mein Bereich', '/mein-bereich', active: 'mein-plugin.*', sort: 40);
|
||||
|
||||
// Rechte, die im Rollen-Formular erscheinen
|
||||
$this->app->make(Abilities::class)->define('mein-plugin.manage', 'Mein Bereich verwalten', 'Mein Plugin');
|
||||
}
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
Hooks::on('news.post.published', fn ($post) => /* … */ null);
|
||||
Hooks::filter('navigation.items', fn (array $items) => $items);
|
||||
}
|
||||
|
||||
public function activate(): void {} // nach „Aktivieren“ (Migrationen sind schon gelaufen)
|
||||
public function deactivate(): void {} // vor „Deaktivieren“
|
||||
public function uninstall(): void {} // bei „Mit Daten löschen“ (Tabellen entfernt der Kern)
|
||||
}
|
||||
```
|
||||
|
||||
## Rechte und Sichtbarkeit
|
||||
|
||||
- Globale Rechte: `$abilities->define('schluessel', 'Bezeichnung', 'Gruppe')`,
|
||||
prüfen mit `$user->can('schluessel')`.
|
||||
- Objekt-Rechte: `define(..., resource: 'mein_typ')` plus
|
||||
`$abilities->resourceType('mein_typ', 'Bezeichnung', fn () => [id => 'Name'])`;
|
||||
prüfen mit `$user->can('schluessel', ['mein_typ', $id])` oder einem Modell mit
|
||||
`permissionResource()`.
|
||||
- Zielgruppen: `App\Support\Permissions\Audiences::constrain($query, 'mein_typ', 'tabelle.id', $user)`
|
||||
und im Admin-Formular `App\Filament\Components\AudienceSection::make('mein_typ')`.
|
||||
- Admin-Seiten: Policies registrieren (`Gate::policy(Model::class, Policy::class)`)
|
||||
bzw. `canAccess()` an Filament-Seiten.
|
||||
|
||||
## Installation und Betrieb
|
||||
|
||||
- Als ZIP unter **Administration → Plugins** hochladen (ein gemeinsamer
|
||||
Ordner im Archiv ist erlaubt), dann aktivieren.
|
||||
- Kunden-Plugins liegen in `plugins/` und werden von Aktualisierungen nie verändert.
|
||||
- Wirft ein Plugin beim Laden einen Fehler – oder bringt es den PHP-Prozess zum
|
||||
Absturz –, wird es automatisch deaktiviert; der Grund steht auf der Plugins-Seite.
|
||||
- `INHAUS_DISALLOW_FILE_MODS=true` in der `.env` verbietet Hochladen und Löschen.
|
||||
|
||||
## Derzeit noch nicht für Kunden-Plugins
|
||||
|
||||
Vue-Seiten und Startseiten-Kacheln werden beim Build des Kerns mitkompiliert –
|
||||
das geht nur für mitgelieferte Plugins. Für Kunden-Plugins folgt mit dem
|
||||
öffentlichen Plugin-SDK (Phase 7) ein Weg über vorkompilierte ES-Module und
|
||||
eine Import-Map. Bis dahin können Kunden-Plugins Blade-Seiten, Admin-Seiten,
|
||||
Hooks, Rechte und Menüpunkte beitragen.
|
||||
|
|
@ -7,8 +7,10 @@ use App\Models\User;
|
|||
use App\Plugins\Plugin;
|
||||
use App\Support\Abilities;
|
||||
use App\Support\Navigation;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Inhaus\Plugins\Events\Http\Resources\EventResource;
|
||||
use Inhaus\Plugins\Events\Models\Event;
|
||||
use Inhaus\Plugins\Events\Policies\EventPolicy;
|
||||
|
||||
class EventsPlugin extends Plugin
|
||||
{
|
||||
|
|
@ -16,6 +18,7 @@ class EventsPlugin extends Plugin
|
|||
{
|
||||
$this->app->make(Navigation::class)->add('events', 'Termine', '/termine', active: 'events.*', sort: 30);
|
||||
$this->app->make(Abilities::class)->define('events.manage', 'Termine verwalten', 'Termine');
|
||||
Gate::policy(Event::class, EventPolicy::class);
|
||||
|
||||
$this->app->make(Widgets::class)->add('events.upcoming', 'events::Upcoming', 'aside', sort: 20, props: fn (User $user) => [
|
||||
'events' => EventResource::collection(Event::query()->upcoming()->visibleTo($user)->limit(4)->get())->resolve(),
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Inhaus\Plugins\Events\Filament\Resources\Events;
|
||||
|
||||
use App\Filament\Components\AudienceSection;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
|
|
@ -83,6 +84,7 @@ class EventResource extends Resource
|
|||
Section::make('Anzeige')
|
||||
->columnSpan(1)
|
||||
->schema([
|
||||
AudienceSection::make('event', 'Wer den Termin sieht. Leer lassen = alle.'),
|
||||
Toggle::make('is_published')->label('Veröffentlicht')->default(true),
|
||||
FileUpload::make('image_path')
|
||||
->label('Bild')
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@ class EventController extends Controller
|
|||
{
|
||||
return Inertia::render('events::Index', [
|
||||
'events' => EventResource::collection(
|
||||
Event::query()->upcoming()->limit(200)->get()
|
||||
Event::query()->upcoming()->visibleTo(request()->user())->limit(200)->get()
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
public function show(Event $event): Response
|
||||
{
|
||||
abort_unless($event->is_published, 404);
|
||||
abort_unless($event->is_published && $event->isVisibleTo(request()->user()), 404);
|
||||
|
||||
return Inertia::render('events::Show', [
|
||||
'event' => [
|
||||
|
|
@ -36,7 +36,7 @@ class EventController extends Controller
|
|||
|
||||
public function ics(Event $event, Calendar $calendar, Branding $branding): HttpResponse
|
||||
{
|
||||
abort_unless($event->is_published, 404);
|
||||
abort_unless($event->is_published && $event->isVisibleTo(request()->user()), 404);
|
||||
|
||||
return response($calendar->toIcs($event, $branding->portalName()), 200, [
|
||||
'Content-Type' => 'text/calendar; charset=utf-8',
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Inhaus\Plugins\Events\Models;
|
|||
|
||||
use App\Models\User;
|
||||
use App\Support\Images;
|
||||
use App\Support\Permissions\Audiences;
|
||||
use App\Support\RichText;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
|
@ -91,9 +92,21 @@ class Event extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Nur Einträge, die diese Person sehen darf (Zielgruppen). Platzhalter bis Phase 2c.
|
||||
* Nur Termine, die diese Person sehen darf (Zielgruppe des Termins).
|
||||
*
|
||||
* @param Builder<Event> $query
|
||||
*/
|
||||
public function scopeVisibleTo(Builder $query, ?User $user): void {}
|
||||
public function scopeVisibleTo(Builder $query, ?User $user): void
|
||||
{
|
||||
if ($user?->can('events.manage')) {
|
||||
return;
|
||||
}
|
||||
|
||||
Audiences::constrain($query, 'event', 'events.id', $user);
|
||||
}
|
||||
|
||||
public function isVisibleTo(?User $user): bool
|
||||
{
|
||||
return (bool) $user?->can('events.manage') || Audiences::allows('event', $this->id, $user);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
29
plugins-core/events/src/Policies/EventPolicy.php
Normal file
29
plugins-core/events/src/Policies/EventPolicy.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\Events\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Inhaus\Plugins\Events\Models\Event;
|
||||
|
||||
class EventPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->can('events.manage');
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->can('events.manage');
|
||||
}
|
||||
|
||||
public function update(User $user, Event $event): bool
|
||||
{
|
||||
return $user->can('events.manage');
|
||||
}
|
||||
|
||||
public function delete(User $user, Event $event): bool
|
||||
{
|
||||
return $user->can('events.manage');
|
||||
}
|
||||
}
|
||||
|
|
@ -2,11 +2,14 @@
|
|||
|
||||
namespace Inhaus\Plugins\News\Filament\Resources\NewsCategories;
|
||||
|
||||
use App\Filament\Components\AudienceSection;
|
||||
use App\Filament\Components\RoleGrantSelect;
|
||||
use BackedEnum;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
|
|
@ -50,6 +53,15 @@ class NewsCategoryResource extends Resource
|
|||
->unique(ignoreRecord: true),
|
||||
TextInput::make('description')->label('Beschreibung')->maxLength(500)->columnSpanFull(),
|
||||
TextInput::make('sort')->label('Reihenfolge')->numeric()->default(0),
|
||||
Section::make('Redaktion')
|
||||
->description('Welche Rollen in dieser Kategorie Beiträge schreiben und veröffentlichen dürfen – z. B. die MAV in „MAV-Info“.')
|
||||
->columnSpanFull()
|
||||
->columns(2)
|
||||
->schema([
|
||||
RoleGrantSelect::make('writers', 'Dürfen schreiben', 'news.post.create', 'news_category'),
|
||||
RoleGrantSelect::make('publishers', 'Dürfen veröffentlichen', 'news.post.publish', 'news_category'),
|
||||
]),
|
||||
AudienceSection::make('news_category', 'Wer Beiträge dieser Kategorie sieht. Leer lassen = alle.')->columnSpanFull(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use Filament\Forms\Components\TextInput;
|
|||
use Filament\Forms\Components\Toggle;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
|
|
@ -22,10 +23,13 @@ use Filament\Tables\Columns\ImageColumn;
|
|||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Inhaus\Plugins\News\Filament\Resources\NewsPosts\Pages\CreateNewsPost;
|
||||
use Inhaus\Plugins\News\Filament\Resources\NewsPosts\Pages\EditNewsPost;
|
||||
use Inhaus\Plugins\News\Filament\Resources\NewsPosts\Pages\ListNewsPosts;
|
||||
use Inhaus\Plugins\News\Models\NewsCategory;
|
||||
use Inhaus\Plugins\News\Models\NewsPost;
|
||||
use Inhaus\Plugins\News\Policies\NewsPostPolicy;
|
||||
use UnitEnum;
|
||||
|
||||
class NewsPostResource extends Resource
|
||||
|
|
@ -80,17 +84,27 @@ class NewsPostResource extends Resource
|
|||
->schema([
|
||||
Select::make('category_id')
|
||||
->label('Kategorie')
|
||||
->relationship('category', 'name')
|
||||
->relationship('category', 'name', fn (Builder $query) => static::onlyWritableCategories($query))
|
||||
->required(fn () => ! auth()->user()->can('news.manage'))
|
||||
->rule(fn () => function (string $attribute, mixed $value, \Closure $fail) {
|
||||
if ($value && ! static::onlyWritableCategories(NewsCategory::query())->whereKey($value)->exists()) {
|
||||
$fail('In dieser Kategorie dürfen Sie keine Beiträge schreiben.');
|
||||
}
|
||||
})
|
||||
->live()
|
||||
->preload()
|
||||
->searchable(),
|
||||
DateTimePicker::make('published_at')
|
||||
->label('Veröffentlichen am')
|
||||
->disabled(fn (Get $get) => ! static::canPublishIn($get('category_id')))
|
||||
->hint(fn (Get $get) => static::canPublishIn($get('category_id')) ? null : 'Veröffentlichung durch die Redaktion')
|
||||
->helperText('Leer lassen = Entwurf. Ein Datum in der Zukunft plant den Beitrag.')
|
||||
->seconds(false)
|
||||
->native(false)
|
||||
->displayFormat('d.m.Y H:i'),
|
||||
Toggle::make('is_featured')
|
||||
->label('Auf der Startseite hervorheben')
|
||||
->disabled(fn (Get $get) => ! static::canPublishIn($get('category_id')))
|
||||
->helperText('Hervorgehobene Beiträge mit Titelbild erscheinen groß im Slider.'),
|
||||
FileUpload::make('cover_path')
|
||||
->label('Titelbild')
|
||||
|
|
@ -106,6 +120,33 @@ class NewsPostResource extends Resource
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Redakteure sehen nur Beiträge aus Kategorien, in denen sie schreiben dürfen.
|
||||
*/
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
$query = parent::getEloquentQuery();
|
||||
$ids = auth()->user()?->permissions()->ids('news.post.create', 'news_category') ?? [];
|
||||
|
||||
return $ids === true || auth()->user()?->can('news.manage') ? $query : $query->whereIn('category_id', $ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<NewsCategory> $query
|
||||
* @return Builder<NewsCategory>
|
||||
*/
|
||||
public static function onlyWritableCategories(Builder $query): Builder
|
||||
{
|
||||
$ids = auth()->user()?->permissions()->ids('news.post.create', 'news_category') ?? [];
|
||||
|
||||
return $ids === true || auth()->user()?->can('news.manage') ? $query : $query->whereIn('id', $ids);
|
||||
}
|
||||
|
||||
public static function canPublishIn(mixed $categoryId): bool
|
||||
{
|
||||
return app(NewsPostPolicy::class)->publish(auth()->user(), $categoryId ? (int) $categoryId : null);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ class CreateNewsPost extends CreateRecord
|
|||
{
|
||||
$data['author_id'] = auth()->id();
|
||||
|
||||
if (! NewsPostResource::canPublishIn($data['category_id'] ?? null)) {
|
||||
$data['published_at'] = null;
|
||||
$data['is_featured'] = false;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,16 @@ class EditNewsPost extends EditRecord
|
|||
{
|
||||
protected static string $resource = NewsPostResource::class;
|
||||
|
||||
protected function mutateFormDataBeforeSave(array $data): array
|
||||
{
|
||||
if (! NewsPostResource::canPublishIn($data['category_id'] ?? $this->record->category_id)) {
|
||||
$data['published_at'] = $this->record->published_at;
|
||||
$data['is_featured'] = $this->record->is_featured;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
|
|
|
|||
|
|
@ -14,11 +14,12 @@ class NewsController extends Controller
|
|||
{
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$categories = NewsCategory::query()->orderBy('sort')->orderBy('name')->get(['id', 'name', 'slug']);
|
||||
$categories = NewsCategory::query()->visibleTo($request->user())->orderBy('sort')->orderBy('name')->get(['id', 'name', 'slug']);
|
||||
$category = $categories->firstWhere('slug', $request->query('kategorie'));
|
||||
|
||||
$posts = NewsPost::query()
|
||||
->published()
|
||||
->visibleTo($request->user())
|
||||
->with('category')
|
||||
->when($category, fn ($query) => $query->where('category_id', $category->id))
|
||||
->latest('published_at')
|
||||
|
|
@ -34,7 +35,7 @@ class NewsController extends Controller
|
|||
|
||||
public function show(NewsPost $post): Response
|
||||
{
|
||||
abort_unless($post->isPublished(), 404);
|
||||
abort_unless($post->isPublished() && $post->isVisibleTo(request()->user()), 404);
|
||||
|
||||
$post->load(['category', 'author']);
|
||||
|
||||
|
|
@ -53,6 +54,7 @@ class NewsController extends Controller
|
|||
'related' => NewsPostResource::collection(
|
||||
NewsPost::query()
|
||||
->published()
|
||||
->visibleTo(request()->user())
|
||||
->with('category')
|
||||
->whereKeyNot($post->id)
|
||||
->when($post->category_id, fn ($query) => $query->where('category_id', $post->category_id))
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
|
||||
namespace Inhaus\Plugins\News\Models;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Support\Permissions\Audiences;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
|
@ -18,6 +21,26 @@ class NewsCategory extends Model
|
|||
return NewsCategoryFactory::new();
|
||||
}
|
||||
|
||||
/**
|
||||
* Für Rechte-Checks: $user->can('news.post.create', $category)
|
||||
*
|
||||
* @return array{0: string, 1: int}
|
||||
*/
|
||||
public function permissionResource(): array
|
||||
{
|
||||
return ['news_category', $this->id];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Builder<NewsCategory> $query
|
||||
*/
|
||||
public function scopeVisibleTo(Builder $query, ?User $user): void
|
||||
{
|
||||
if (! $user?->can('news.manage')) {
|
||||
Audiences::constrain($query, 'news_category', 'news_categories.id', $user);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasMany<NewsPost, $this>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Inhaus\Plugins\News\Models;
|
|||
|
||||
use App\Models\User;
|
||||
use App\Support\Images;
|
||||
use App\Support\Permissions\Audiences;
|
||||
use App\Support\RichText;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
|
@ -117,9 +118,24 @@ class NewsPost extends Model
|
|||
}
|
||||
|
||||
/**
|
||||
* Nur Einträge, die diese Person sehen darf (Zielgruppen). Platzhalter bis Phase 2c.
|
||||
* Nur Beiträge, die diese Person sehen darf – die Zielgruppe hängt an der Kategorie.
|
||||
*
|
||||
* @param Builder<NewsPost> $query
|
||||
*/
|
||||
public function scopeVisibleTo(Builder $query, ?User $user): void {}
|
||||
public function scopeVisibleTo(Builder $query, ?User $user): void
|
||||
{
|
||||
if ($user?->can('news.manage')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$query->where(function (Builder $q) use ($user) {
|
||||
$q->whereNull('news_posts.category_id');
|
||||
$q->orWhere(fn (Builder $inner) => Audiences::constrain($inner, 'news_category', 'news_posts.category_id', $user));
|
||||
});
|
||||
}
|
||||
|
||||
public function isVisibleTo(?User $user): bool
|
||||
{
|
||||
return $this->category_id === null || $user?->can('news.manage') || Audiences::allows('news_category', $this->category_id, $user);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,12 @@ use App\Support\Abilities;
|
|||
use App\Support\Navigation;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Inhaus\Plugins\News\Http\Resources\NewsPostResource;
|
||||
use Inhaus\Plugins\News\Models\NewsCategory;
|
||||
use Inhaus\Plugins\News\Models\NewsPost;
|
||||
use Inhaus\Plugins\News\Policies\NewsCategoryPolicy;
|
||||
use Inhaus\Plugins\News\Policies\NewsPostPolicy;
|
||||
|
||||
class NewsPlugin extends Plugin
|
||||
{
|
||||
|
|
@ -25,6 +28,9 @@ class NewsPlugin extends Plugin
|
|||
$abilities->define('news.post.publish', 'Beiträge veröffentlichen', 'Neuigkeiten', resource: 'news_category');
|
||||
$abilities->resourceType('news_category', 'Kategorie', fn () => NewsCategory::query()->orderBy('sort')->pluck('name', 'id')->all());
|
||||
|
||||
Gate::policy(NewsCategory::class, NewsCategoryPolicy::class);
|
||||
Gate::policy(NewsPost::class, NewsPostPolicy::class);
|
||||
|
||||
$this->registerWidgets($this->app->make(Widgets::class));
|
||||
}
|
||||
|
||||
|
|
|
|||
29
plugins-core/news/src/Policies/NewsCategoryPolicy.php
Normal file
29
plugins-core/news/src/Policies/NewsCategoryPolicy.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\News\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Inhaus\Plugins\News\Models\NewsCategory;
|
||||
|
||||
class NewsCategoryPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->can('news.manage');
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $user->can('news.manage');
|
||||
}
|
||||
|
||||
public function update(User $user, NewsCategory $category): bool
|
||||
{
|
||||
return $user->can('news.manage');
|
||||
}
|
||||
|
||||
public function delete(User $user, NewsCategory $category): bool
|
||||
{
|
||||
return $user->can('news.manage');
|
||||
}
|
||||
}
|
||||
38
plugins-core/news/src/Policies/NewsPostPolicy.php
Normal file
38
plugins-core/news/src/Policies/NewsPostPolicy.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
namespace Inhaus\Plugins\News\Policies;
|
||||
|
||||
use App\Models\User;
|
||||
use Inhaus\Plugins\News\Models\NewsPost;
|
||||
|
||||
/**
|
||||
* Redaktion nach Kategorie: Wer in einer Kategorie schreiben darf, bearbeitet
|
||||
* dort alle Beiträge. Veröffentlichen ist ein eigenes Recht.
|
||||
*/
|
||||
class NewsPostPolicy
|
||||
{
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
return $user->can('news.manage') || $user->permissions()->ids('news.post.create', 'news_category') !== [];
|
||||
}
|
||||
|
||||
public function create(User $user): bool
|
||||
{
|
||||
return $this->viewAny($user);
|
||||
}
|
||||
|
||||
public function update(User $user, NewsPost $post): bool
|
||||
{
|
||||
return $user->can('news.manage') || ($post->category_id && $user->can('news.post.create', ['news_category', $post->category_id]));
|
||||
}
|
||||
|
||||
public function delete(User $user, NewsPost $post): bool
|
||||
{
|
||||
return $this->update($user, $post);
|
||||
}
|
||||
|
||||
public function publish(User $user, ?int $categoryId): bool
|
||||
{
|
||||
return $user->can('news.manage') || ($categoryId && $user->can('news.post.publish', ['news_category', $categoryId]));
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,q as o}from"./app-DJnl8SxL.js";import{t as s}from"./Panel-D5zuY1_v.js";import{t as c}from"./NewsCard-B-l5uZ4h.js";var l={class:`-mx-5 flex snap-x scroll-px-5 gap-4 overflow-x-auto px-5 pb-1 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:pb-0 xl:grid-cols-4 [&::-webkit-scrollbar]:hidden`},u={__name:`Areas`,props:{posts:{type:Array,required:!0}},setup(u){return(d,f)=>(r(),n(s,{title:`Aktuelles aus den Bereichen`,"action-label":`Alle`,"action-href":`/neuigkeiten`},{default:e(()=>[o(`div`,l,[(r(!0),i(t,null,a(u.posts,e=>(r(),n(c,{key:e.id,post:e,class:`w-[78%] shrink-0 snap-start sm:w-auto`},null,8,[`post`]))),128))])]),_:1}))}};export{u as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,q as o}from"./app-D9PUXL84.js";import{t as s}from"./Panel-BEYQbw9Y.js";import{t as c}from"./NewsCard-JuwhjoRm.js";var l={class:`-mx-5 flex snap-x scroll-px-5 gap-4 overflow-x-auto px-5 pb-1 [scrollbar-width:none] sm:mx-0 sm:grid sm:grid-cols-2 sm:overflow-visible sm:px-0 sm:pb-0 xl:grid-cols-4 [&::-webkit-scrollbar]:hidden`},u={__name:`Areas`,props:{posts:{type:Array,required:!0}},setup(u){return(d,f)=>(r(),n(s,{title:`Aktuelles aus den Bereichen`,"action-label":`Alle`,"action-href":`/neuigkeiten`},{default:e(()=>[o(`div`,l,[(r(!0),i(t,null,a(u.posts,e=>(r(),n(c,{key:e.id,post:e,class:`w-[78%] shrink-0 snap-start sm:w-auto`},null,8,[`post`]))),128))])]),_:1}))}};export{u as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,2 +1,2 @@
|
|||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Greeting-BcYAXPh9.js","assets/app-DJnl8SxL.js","assets/app-yTLwYkM9.css","assets/AppLayout-1ldLchM-.js","assets/RovingFocusGroup-CqmMkMQP.js","assets/BrandLogo-B9oA1DG4.js","assets/NewColleagues-JGWMoXS3.js","assets/Panel-D5zuY1_v.js","assets/chevron-right-CAXGr-zo.js","assets/PeopleSearch-BcXAH_-c.js","assets/arrow-right-c2thy74C.js","assets/ProfileIncomplete-CWirgl8s.js","assets/QuickLinks-CiA26-F8.js","assets/building-complex-CCnkmD29.js","assets/calendar-days-Q7KBeYQV.js","assets/chevron-left-D2uxffyU.js","assets/clock-7Lzug1Ti.js","assets/phone-CUH1yCi5.js","assets/dist-CQsPCHOQ.js","assets/Upcoming-BETeUWER.js","assets/EmptyState-CFBmx8ne.js","assets/format-Dlm0nTI_.js","assets/EventDateBlock-CfSpm6m9.js","assets/Areas-Dr9rKjp6.js","assets/NewsCard-B-l5uZ4h.js","assets/NewsImage-DyRK4fmY.js","assets/Hero-oumSJF6b.js","assets/Latest-rEL3O0dw.js"])))=>i.map(i=>d[i]);
|
||||
import{At as e,Cn as t,I as n,J as r,K as i,Wt as a,X as o,Xt as s,Y as c,en as l,ir as u,it as d,o as f,q as p}from"./app-DJnl8SxL.js";import{t as m}from"./AppLayout-1ldLchM-.js";import{n as h}from"./dist-CQsPCHOQ.js";var g=Object.assign({"../widgets/Greeting.vue":()=>f(()=>import(`./Greeting-BcYAXPh9.js`),__vite__mapDeps([0,1,2,3,4,5])),"../widgets/NewColleagues.vue":()=>f(()=>import(`./NewColleagues-JGWMoXS3.js`),__vite__mapDeps([6,1,2,3,4,5,7,8])),"../widgets/PeopleSearch.vue":()=>f(()=>import(`./PeopleSearch-BcXAH_-c.js`),__vite__mapDeps([9,1,2,10,5,3,4,7,8])),"../widgets/ProfileIncomplete.vue":()=>f(()=>import(`./ProfileIncomplete-CWirgl8s.js`),__vite__mapDeps([11,1,2,3,4,5])),"../widgets/QuickLinks.vue":()=>f(()=>import(`./QuickLinks-CiA26-F8.js`),__vite__mapDeps([12,1,2,5,13,14,3,4,15,8,16,17,18]))}),_=Object.assign({"../../../plugins-core/events/resources/js/widgets/Upcoming.vue":()=>f(()=>import(`./Upcoming-BETeUWER.js`),__vite__mapDeps([19,1,2,14,5,20,21,22,7,8])),"../../../plugins-core/news/resources/js/widgets/Areas.vue":()=>f(()=>import(`./Areas-Dr9rKjp6.js`),__vite__mapDeps([23,1,2,7,8,5,24,25,21])),"../../../plugins-core/news/resources/js/widgets/Hero.vue":()=>f(()=>import(`./Hero-oumSJF6b.js`),__vite__mapDeps([26,1,2,5,10,15,8])),"../../../plugins-core/news/resources/js/widgets/Latest.vue":()=>f(()=>import(`./Latest-rEL3O0dw.js`),__vite__mapDeps([27,1,2,25,5,20,21,7,8]))}),v={};for(let[e,t]of Object.entries(g))v[`core::${e.split(`/`).pop().replace(`.vue`,``)}`]=d(t);for(let[e,t]of Object.entries(_)){let[,n]=e.match(/plugins-core\/([^/]+)\//);v[`${n}::${e.split(`/`).pop().replace(`.vue`,``)}`]=d(t)}function y(e){return v[e]??null}var b={key:0,class:`grid grid-cols-12 gap-6`},x={class:`col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3`},S={class:`col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3`},C={key:1,class:`grid min-w-0 grid-cols-1 gap-6`},w={__name:`Dashboard`,props:{widgets:{type:Array,required:!0}},setup(d){let f=d,g=h(`(min-width: 1024px)`),_=i(()=>f.widgets.filter(e=>y(e.component))),v=e=>_.value.filter(t=>t.area===e),w=i(()=>v(`hero`)[0]??null),T=i(()=>[..._.value].sort((e,t)=>e.mobileSort-t.mobileSort));return(i,d)=>(a(),r(m,{title:`Startseite`},{default:t(()=>[u(g)?(a(),o(`div`,b,[p(`div`,x,[w.value?(a(),r(l(u(y)(w.value.component)),e({key:0},w.value.props,{class:`xl:col-span-2`}),null,16)):c(``,!0),(a(!0),o(n,null,s(v(`feed`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props,{wide:!w.value,class:w.value?`xl:col-span-1`:`xl:col-span-3`}),null,16,[`wide`,`class`]))),128)),(a(!0),o(n,null,s(v(`main`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props,{class:`xl:col-span-3`}),null,16))),128))]),p(`aside`,S,[(a(!0),o(n,null,s(v(`aside`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props),null,16))),128))])])):(a(),o(`div`,C,[(a(!0),o(n,null,s(T.value,t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props),null,16))),128))]))]),_:1}))}};export{w as default};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Greeting-CzEgARgW.js","assets/app-D9PUXL84.js","assets/app-yTLwYkM9.css","assets/AppLayout-J4hJMC50.js","assets/RovingFocusGroup-CmPAKGUw.js","assets/BrandLogo-CDbPNVYz.js","assets/NewColleagues-B3Q3Qc0s.js","assets/Panel-BEYQbw9Y.js","assets/chevron-right-ZwiJ5NHr.js","assets/PeopleSearch-BAdpyXpJ.js","assets/arrow-right-BJfvlG8u.js","assets/ProfileIncomplete-xq3jzNJa.js","assets/QuickLinks-BzvhDVAx.js","assets/building-complex-C0ndpa4F.js","assets/calendar-days-CfqaFZdn.js","assets/chevron-left-Dwvm8_Wb.js","assets/clock-Ch_g8lOY.js","assets/phone-RcbzuVt6.js","assets/dist-CkfUV8Dq.js","assets/Upcoming-BjQG08tM.js","assets/EmptyState-CEUealqa.js","assets/format-Dlm0nTI_.js","assets/EventDateBlock-Be3FgmM8.js","assets/Areas-Bxp3LBWd.js","assets/NewsCard-JuwhjoRm.js","assets/NewsImage-lWXKTpJ-.js","assets/Hero-CDYVZS06.js","assets/Latest-5SZrR9vP.js"])))=>i.map(i=>d[i]);
|
||||
import{At as e,Cn as t,I as n,J as r,K as i,Wt as a,X as o,Xt as s,Y as c,en as l,ir as u,it as d,o as f,q as p}from"./app-D9PUXL84.js";import{t as m}from"./AppLayout-J4hJMC50.js";import{n as h}from"./dist-CkfUV8Dq.js";var g=Object.assign({"../widgets/Greeting.vue":()=>f(()=>import(`./Greeting-CzEgARgW.js`),__vite__mapDeps([0,1,2,3,4,5])),"../widgets/NewColleagues.vue":()=>f(()=>import(`./NewColleagues-B3Q3Qc0s.js`),__vite__mapDeps([6,1,2,3,4,5,7,8])),"../widgets/PeopleSearch.vue":()=>f(()=>import(`./PeopleSearch-BAdpyXpJ.js`),__vite__mapDeps([9,1,2,10,5,3,4,7,8])),"../widgets/ProfileIncomplete.vue":()=>f(()=>import(`./ProfileIncomplete-xq3jzNJa.js`),__vite__mapDeps([11,1,2,3,4,5])),"../widgets/QuickLinks.vue":()=>f(()=>import(`./QuickLinks-BzvhDVAx.js`),__vite__mapDeps([12,1,2,5,13,14,3,4,15,8,16,17,18]))}),_=Object.assign({"../../../plugins-core/events/resources/js/widgets/Upcoming.vue":()=>f(()=>import(`./Upcoming-BjQG08tM.js`),__vite__mapDeps([19,1,2,14,5,20,21,22,7,8])),"../../../plugins-core/news/resources/js/widgets/Areas.vue":()=>f(()=>import(`./Areas-Bxp3LBWd.js`),__vite__mapDeps([23,1,2,7,8,5,24,25,21])),"../../../plugins-core/news/resources/js/widgets/Hero.vue":()=>f(()=>import(`./Hero-CDYVZS06.js`),__vite__mapDeps([26,1,2,5,10,15,8])),"../../../plugins-core/news/resources/js/widgets/Latest.vue":()=>f(()=>import(`./Latest-5SZrR9vP.js`),__vite__mapDeps([27,1,2,25,5,20,21,7,8]))}),v={};for(let[e,t]of Object.entries(g))v[`core::${e.split(`/`).pop().replace(`.vue`,``)}`]=d(t);for(let[e,t]of Object.entries(_)){let[,n]=e.match(/plugins-core\/([^/]+)\//);v[`${n}::${e.split(`/`).pop().replace(`.vue`,``)}`]=d(t)}function y(e){return v[e]??null}var b={key:0,class:`grid grid-cols-12 gap-6`},x={class:`col-span-8 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-9 xl:grid-cols-3`},S={class:`col-span-4 grid min-w-0 grid-cols-1 content-start gap-6 xl:col-span-3`},C={key:1,class:`grid min-w-0 grid-cols-1 gap-6`},w={__name:`Dashboard`,props:{widgets:{type:Array,required:!0}},setup(d){let f=d,g=h(`(min-width: 1024px)`),_=i(()=>f.widgets.filter(e=>y(e.component))),v=e=>_.value.filter(t=>t.area===e),w=i(()=>v(`hero`)[0]??null),T=i(()=>[..._.value].sort((e,t)=>e.mobileSort-t.mobileSort));return(i,d)=>(a(),r(m,{title:`Startseite`},{default:t(()=>[u(g)?(a(),o(`div`,b,[p(`div`,x,[w.value?(a(),r(l(u(y)(w.value.component)),e({key:0},w.value.props,{class:`xl:col-span-2`}),null,16)):c(``,!0),(a(!0),o(n,null,s(v(`feed`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props,{wide:!w.value,class:w.value?`xl:col-span-1`:`xl:col-span-3`}),null,16,[`wide`,`class`]))),128)),(a(!0),o(n,null,s(v(`main`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props,{class:`xl:col-span-3`}),null,16))),128))]),p(`aside`,S,[(a(!0),o(n,null,s(v(`aside`),t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props),null,16))),128))])])):(a(),o(`div`,C,[(a(!0),o(n,null,s(T.value,t=>(a(),r(l(u(y)(t.component)),e({key:t.key},{ref_for:!0},t.props),null,16))),128))]))]),_:1}))}};export{w as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{J as e,Wt as t,X as n,Y as r,Zt as i,en as a,q as o,ur as s}from"./app-DJnl8SxL.js";var c={class:`grid place-items-center px-6 py-10 text-center`},l={class:`mt-3 text-sm font-medium`},u={key:0,class:`mt-1 max-w-sm text-[13px] text-muted-foreground`},d={__name:`EmptyState`,props:{icon:{type:[Object,Function],required:!0},title:{type:String,required:!0},text:{type:String,default:``}},setup(d){return(f,p)=>(t(),n(`div`,c,[(t(),e(a(d.icon),{class:`size-8 text-muted-foreground`,"stroke-width":1.5})),o(`p`,l,s(d.title),1),d.text?(t(),n(`p`,u,s(d.text),1)):r(``,!0),i(f.$slots,`default`)]))}};export{d as t};
|
||||
import{J as e,Wt as t,X as n,Y as r,Zt as i,en as a,q as o,ur as s}from"./app-D9PUXL84.js";var c={class:`grid place-items-center px-6 py-10 text-center`},l={class:`mt-3 text-sm font-medium`},u={key:0,class:`mt-1 max-w-sm text-[13px] text-muted-foreground`},d={__name:`EmptyState`,props:{icon:{type:[Object,Function],required:!0},title:{type:String,required:!0},text:{type:String,default:``}},setup(d){return(f,p)=>(t(),n(`div`,c,[(t(),e(a(d.icon),{class:`size-8 text-muted-foreground`,"stroke-width":1.5})),o(`p`,l,s(d.title),1),d.text?(t(),n(`p`,u,s(d.text),1)):r(``,!0),i(f.$slots,`default`)]))}};export{d as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{K as e,Wt as t,X as n,q as r,ur as i}from"./app-DJnl8SxL.js";import{t as a}from"./format-Dlm0nTI_.js";var o={class:`grid w-12 shrink-0 place-items-center rounded-md bg-muted py-1.5 leading-none`},s={class:`text-xl font-semibold`},c={class:`mt-1 text-[10px] font-semibold tracking-wide text-muted-foreground`},l={__name:`EventDateBlock`,props:{date:{type:String,required:!0}},setup(l){let u=l,d=e(()=>a(u.date));return(e,a)=>(t(),n(`div`,o,[r(`span`,s,i(d.value.day),1),r(`span`,c,i(d.value.month),1)]))}};export{l as t};
|
||||
import{K as e,Wt as t,X as n,q as r,ur as i}from"./app-D9PUXL84.js";import{t as a}from"./format-Dlm0nTI_.js";var o={class:`grid w-12 shrink-0 place-items-center rounded-md bg-muted py-1.5 leading-none`},s={class:`text-xl font-semibold`},c={class:`mt-1 text-[10px] font-semibold tracking-wide text-muted-foreground`},l={__name:`EventDateBlock`,props:{date:{type:String,required:!0}},setup(l){let u=l,d=e(()=>a(u.date));return(e,a)=>(t(),n(`div`,o,[r(`span`,s,i(d.value.day),1),r(`span`,c,i(d.value.month),1)]))}};export{l as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{A as e,Cn as t,J as n,Wt as r,X as i,Y as a,ir as o,n as s,nt as c,q as l,r as u,rt as d,ur as f}from"./app-DJnl8SxL.js";import{j as p}from"./BrandLogo-B9oA1DG4.js";import{t as m}from"./arrow-left-CAaEosyK.js";import{r as h,t as g}from"./FormField-BmjgU2Yw.js";import{t as _}from"./button-9_XTGiWz.js";import{t as v}from"./GuestLayout-BQuErbaI.js";var y={key:0,class:`mb-6 rounded-md border border-brand-200 bg-brand-soft px-4 py-3 text-sm text-brand-soft-foreground`},b={__name:`ForgotPassword`,props:{status:{type:String,default:null}},setup(b){let x=u({email:``});return(u,S)=>(r(),n(v,{title:`Passwort vergessen`,description:`Wir senden Ihnen einen Link, mit dem Sie ein neues Passwort festlegen können.`},{default:t(()=>[b.status?(r(),i(`div`,y,f(b.status),1)):a(``,!0),l(`form`,{class:`grid gap-5`,onSubmit:S[1]||=e(e=>o(x).post(`/forgot-password`),[`prevent`])},[d(g,{id:`email`,label:`E-Mail-Adresse`,error:o(x).errors.email},{default:t(()=>[d(o(h),{id:`email`,modelValue:o(x).email,"onUpdate:modelValue":S[0]||=e=>o(x).email=e,type:`email`,autocomplete:`username`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),d(o(_),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:o(x).processing},{default:t(()=>[o(x).processing?(r(),n(o(p),{key:0,class:`animate-spin`})):a(``,!0),S[2]||=c(` Link senden `,-1)]),_:1},8,[`disabled`]),d(o(s),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:t(()=>[d(o(m),{class:`size-4`}),S[3]||=c(` Zurück zur Anmeldung `,-1)]),_:1})],32)]),_:1}))}};export{b as default};
|
||||
import{A as e,Cn as t,J as n,Wt as r,X as i,Y as a,ir as o,n as s,nt as c,q as l,r as u,rt as d,ur as f}from"./app-D9PUXL84.js";import{j as p}from"./BrandLogo-CDbPNVYz.js";import{t as m}from"./arrow-left-DNv6qC8D.js";import{r as h,t as g}from"./FormField-Cda3G9pl.js";import{t as _}from"./button-D-CgZku8.js";import{t as v}from"./GuestLayout-D98hTvh6.js";var y={key:0,class:`mb-6 rounded-md border border-brand-200 bg-brand-soft px-4 py-3 text-sm text-brand-soft-foreground`},b={__name:`ForgotPassword`,props:{status:{type:String,default:null}},setup(b){let x=u({email:``});return(u,S)=>(r(),n(v,{title:`Passwort vergessen`,description:`Wir senden Ihnen einen Link, mit dem Sie ein neues Passwort festlegen können.`},{default:t(()=>[b.status?(r(),i(`div`,y,f(b.status),1)):a(``,!0),l(`form`,{class:`grid gap-5`,onSubmit:S[1]||=e(e=>o(x).post(`/forgot-password`),[`prevent`])},[d(g,{id:`email`,label:`E-Mail-Adresse`,error:o(x).errors.email},{default:t(()=>[d(o(h),{id:`email`,modelValue:o(x).email,"onUpdate:modelValue":S[0]||=e=>o(x).email=e,type:`email`,autocomplete:`username`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),d(o(_),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:o(x).processing},{default:t(()=>[o(x).processing?(r(),n(o(p),{key:0,class:`animate-spin`})):a(``,!0),S[2]||=c(` Link senden `,-1)]),_:1},8,[`disabled`]),d(o(s),{href:`/login`,class:`inline-flex items-center justify-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:t(()=>[d(o(m),{class:`size-4`}),S[3]||=c(` Zurück zur Anmeldung `,-1)]),_:1})],32)]),_:1}))}};export{b as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{At as e,Bn as t,Cn as n,D as r,J as i,Tn as a,Wt as o,X as s,Y as c,Zt as l,at as u,ir as d,nt as f,rt as p,sr as m,ur as h}from"./app-DJnl8SxL.js";import{g,l as _,m as v,n as y}from"./BrandLogo-B9oA1DG4.js";import{i as b}from"./dist-CQsPCHOQ.js";var x=u({__name:`Label`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`label`}},setup(t){let r=t;return g(),(t,a)=>(o(),i(d(v),e(r,{onMousedown:a[0]||=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()}}),{default:n(()=>[l(t.$slots,`default`)]),_:3},16))}}),S=u({__name:`Input`,props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:n}){let i=e,c=b(i,`modelValue`,n,{passive:!0,defaultValue:i.defaultValue});return(e,n)=>a((o(),s(`input`,{"onUpdate:modelValue":n[0]||=e=>t(c)?c.value=e:null,"data-slot":`input`,class:m(d(y)(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,i.class))},null,2)),[[r,d(c)]])}}),C=u({__name:`Label`,props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let r=t,a=_(r,`class`);return(t,s)=>(o(),i(d(x),e({"data-slot":`label`},d(a),{class:d(y)(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r.class)}),{default:n(()=>[l(t.$slots,`default`)]),_:3},16,[`class`]))}}),w={class:`grid content-start gap-1.5`},T={key:0,class:`text-[13px] text-destructive`},E={key:1,class:`text-[13px] text-muted-foreground`},D={__name:`FormField`,props:{id:{type:String,required:!0},label:{type:String,required:!0},error:{type:String,default:``},hint:{type:String,default:``}},setup(e){return(t,r)=>(o(),s(`div`,w,[p(d(C),{for:e.id,class:`text-[13px] font-medium`},{default:n(()=>[f(h(e.label),1)]),_:1},8,[`for`]),l(t.$slots,`default`),e.error?(o(),s(`p`,T,h(e.error),1)):e.hint?(o(),s(`p`,E,h(e.hint),1)):c(``,!0)]))}};export{C as n,S as r,D as t};
|
||||
import{At as e,Bn as t,Cn as n,D as r,J as i,Tn as a,Wt as o,X as s,Y as c,Zt as l,at as u,ir as d,nt as f,rt as p,sr as m,ur as h}from"./app-D9PUXL84.js";import{g,l as _,m as v,n as y}from"./BrandLogo-CDbPNVYz.js";import{i as b}from"./dist-CkfUV8Dq.js";var x=u({__name:`Label`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`label`}},setup(t){let r=t;return g(),(t,a)=>(o(),i(d(v),e(r,{onMousedown:a[0]||=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()}}),{default:n(()=>[l(t.$slots,`default`)]),_:3},16))}}),S=u({__name:`Input`,props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:[`update:modelValue`],setup(e,{emit:n}){let i=e,c=b(i,`modelValue`,n,{passive:!0,defaultValue:i.defaultValue});return(e,n)=>a((o(),s(`input`,{"onUpdate:modelValue":n[0]||=e=>t(c)?c.value=e:null,"data-slot":`input`,class:m(d(y)(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3`,`aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,i.class))},null,2)),[[r,d(c)]])}}),C=u({__name:`Label`,props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(t){let r=t,a=_(r,`class`);return(t,s)=>(o(),i(d(x),e({"data-slot":`label`},d(a),{class:d(y)(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,r.class)}),{default:n(()=>[l(t.$slots,`default`)]),_:3},16,[`class`]))}}),w={class:`grid content-start gap-1.5`},T={key:0,class:`text-[13px] text-destructive`},E={key:1,class:`text-[13px] text-muted-foreground`},D={__name:`FormField`,props:{id:{type:String,required:!0},label:{type:String,required:!0},error:{type:String,default:``},hint:{type:String,default:``}},setup(e){return(t,r)=>(o(),s(`div`,w,[p(d(C),{for:e.id,class:`text-[13px] font-medium`},{default:n(()=>[f(h(e.label),1)]),_:1},8,[`for`]),l(t.$slots,`default`),e.error?(o(),s(`p`,T,h(e.error),1)):e.hint?(o(),s(`p`,E,h(e.hint),1)):c(``,!0)]))}};export{C as n,S as r,D as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,K as n,Wt as r,X as i,i as a,ir as o,n as s,nt as c,q as l,rt as u,ur as d}from"./app-DJnl8SxL.js";import{a as f,i as p,l as m,n as h,o as g}from"./AppLayout-1ldLchM-.js";var _={class:`overflow-hidden rounded-lg border bg-card`},v={class:`flex items-center justify-between gap-4 bg-brand px-6 py-6 text-brand-foreground`},y={class:`min-w-0`},b={class:`text-sm opacity-85`},x={class:`mt-0.5 text-[22px] leading-tight font-semibold tracking-tight break-words`},S={class:`mt-1.5 line-clamp-2 text-[13px] opacity-85`},C={class:`grid grid-cols-3 divide-x`,"aria-label":`Mein Bereich`},w={key:0,href:`/admin`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},T={__name:`GreetingCard`,props:{user:{type:Object,required:!0},profile:{type:Object,required:!0},greeting:{type:String,required:!0}},setup(n){return(a,T)=>(r(),i(`section`,_,[l(`div`,v,[l(`div`,y,[l(`div`,b,d(n.greeting)+`,`,1),l(`div`,x,d(n.user.name),1),l(`div`,S,d(n.profile.job_title||`Schön, dass Sie da sind!`),1)]),u(h,{person:n.user,class:`size-16 shrink-0 text-lg ring-4 ring-white/25 xl:size-20 xl:text-xl`},null,8,[`person`])]),l(`nav`,C,[u(o(s),{href:`/personen/${n.user.id}`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(p),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[0]||=c(` Mein Profil `,-1)]),_:1},8,[`href`]),u(o(s),{href:`/profil/bearbeiten`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(f),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[1]||=c(` Profil bearbeiten `,-1)]),_:1}),n.user.is_admin?(r(),i(`a`,w,[u(o(g),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[2]||=c(` Administration `,-1)])):(r(),t(o(s),{key:1,href:`/logout`,method:`post`,as:`button`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(m),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[3]||=c(` Abmelden `,-1)]),_:1}))])]))}},E={__name:`Greeting`,props:{profile:{type:Object,required:!0}},setup(e){let i=e,o=a(),s=n(()=>({...o.props.auth.user,avatar_url:i.profile.avatar_url})),c=n(()=>{let e=new Date().getHours();return e<11?`Guten Morgen`:e<18?`Guten Tag`:`Guten Abend`});return(n,i)=>(r(),t(T,{user:s.value,profile:e.profile,greeting:c.value},null,8,[`user`,`profile`,`greeting`]))}};export{E as default};
|
||||
import{Cn as e,J as t,K as n,Wt as r,X as i,i as a,ir as o,n as s,nt as c,q as l,rt as u,ur as d}from"./app-D9PUXL84.js";import{a as f,i as p,l as m,n as h,o as g}from"./AppLayout-J4hJMC50.js";var _={class:`overflow-hidden rounded-lg border bg-card`},v={class:`flex items-center justify-between gap-4 bg-brand px-6 py-6 text-brand-foreground`},y={class:`min-w-0`},b={class:`text-sm opacity-85`},x={class:`mt-0.5 text-[22px] leading-tight font-semibold tracking-tight break-words`},S={class:`mt-1.5 line-clamp-2 text-[13px] opacity-85`},C={class:`grid grid-cols-3 divide-x`,"aria-label":`Mein Bereich`},w={key:0,href:`/admin`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},T={__name:`GreetingCard`,props:{user:{type:Object,required:!0},profile:{type:Object,required:!0},greeting:{type:String,required:!0}},setup(n){return(a,T)=>(r(),i(`section`,_,[l(`div`,v,[l(`div`,y,[l(`div`,b,d(n.greeting)+`,`,1),l(`div`,x,d(n.user.name),1),l(`div`,S,d(n.profile.job_title||`Schön, dass Sie da sind!`),1)]),u(h,{person:n.user,class:`size-16 shrink-0 text-lg ring-4 ring-white/25 xl:size-20 xl:text-xl`},null,8,[`person`])]),l(`nav`,C,[u(o(s),{href:`/personen/${n.user.id}`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(p),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[0]||=c(` Mein Profil `,-1)]),_:1},8,[`href`]),u(o(s),{href:`/profil/bearbeiten`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(f),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[1]||=c(` Profil bearbeiten `,-1)]),_:1}),n.user.can_admin?(r(),i(`a`,w,[u(o(g),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[2]||=c(` Administration `,-1)])):(r(),t(o(s),{key:1,href:`/logout`,method:`post`,as:`button`,class:`flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground`},{default:e(()=>[u(o(m),{class:`size-5 text-brand-text`,"stroke-width":1.75}),T[3]||=c(` Abmelden `,-1)]),_:1}))])]))}},E={__name:`Greeting`,props:{profile:{type:Object,required:!0}},setup(e){let i=e,o=a(),s=n(()=>({...o.props.auth.user,avatar_url:i.profile.avatar_url})),c=n(()=>{let e=new Date().getHours();return e<11?`Guten Morgen`:e<18?`Guten Tag`:`Guten Abend`});return(n,i)=>(r(),t(T,{user:s.value,profile:e.profile,greeting:c.value},null,8,[`user`,`profile`,`greeting`]))}};export{E as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{I as e,K as t,Wt as n,X as r,Y as i,Zt as a,i as o,ir as s,q as c,rt as l,t as u,ur as d}from"./app-DJnl8SxL.js";import{t as f}from"./BrandLogo-B9oA1DG4.js";var p={class:`grid min-h-screen lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]`},m={class:`relative hidden overflow-hidden bg-brand text-brand-foreground lg:flex lg:flex-col lg:justify-between lg:p-12`},h={class:`relative max-w-md`},g={class:`mt-4 text-[15px] opacity-80`},_={class:`relative text-xs opacity-60`},v={class:`flex items-center justify-center bg-background px-4 py-12 sm:px-8`},y={class:`w-full max-w-[400px]`},b={class:`mb-10 lg:hidden`},x={class:`text-2xl font-semibold tracking-tight`},S={key:0,class:`mt-2 text-sm text-muted-foreground`},C={class:`mt-8`},w={__name:`GuestLayout`,props:{title:{type:String,default:``},description:{type:String,default:``}},setup(w){let T=w,E=t(()=>o().props.branding);return(t,o)=>(n(),r(e,null,[l(s(u),{title:T.title},null,8,[`title`]),c(`div`,p,[c(`aside`,m,[o[1]||=c(`div`,{class:`pointer-events-none absolute inset-0 opacity-[0.12]`,style:{"background-image":`radial-gradient(circle at 20% 20%, white 0, transparent 45%), radial-gradient(circle at 90% 80%, white 0, transparent 40%)`}},null,-1),l(f,{inverted:``,class:`relative`}),c(`div`,h,[o[0]||=c(`p`,{class:`text-3xl leading-tight font-semibold tracking-tight`},`Alles Wichtige für Ihren Arbeitsalltag – an einem Ort.`,-1),c(`p`,g,`Neuigkeiten, Ansprechpartner und Anwendungen von `+d(E.value.portal_name)+`.`,1)]),c(`p`,_,`© `+d(new Date().getFullYear())+` `+d(E.value.portal_name),1)]),c(`main`,v,[c(`div`,y,[c(`div`,b,[l(f)]),c(`h1`,x,d(T.title),1),T.description?(n(),r(`p`,S,d(T.description),1)):i(``,!0),c(`div`,C,[a(t.$slots,`default`)])])])])],64))}};export{w as t};
|
||||
import{I as e,K as t,Wt as n,X as r,Y as i,Zt as a,i as o,ir as s,q as c,rt as l,t as u,ur as d}from"./app-D9PUXL84.js";import{t as f}from"./BrandLogo-CDbPNVYz.js";var p={class:`grid min-h-screen lg:grid-cols-[minmax(0,5fr)_minmax(0,6fr)]`},m={class:`relative hidden overflow-hidden bg-brand text-brand-foreground lg:flex lg:flex-col lg:justify-between lg:p-12`},h={class:`relative max-w-md`},g={class:`mt-4 text-[15px] opacity-80`},_={class:`relative text-xs opacity-60`},v={class:`flex items-center justify-center bg-background px-4 py-12 sm:px-8`},y={class:`w-full max-w-[400px]`},b={class:`mb-10 lg:hidden`},x={class:`text-2xl font-semibold tracking-tight`},S={key:0,class:`mt-2 text-sm text-muted-foreground`},C={class:`mt-8`},w={__name:`GuestLayout`,props:{title:{type:String,default:``},description:{type:String,default:``}},setup(w){let T=w,E=t(()=>o().props.branding);return(t,o)=>(n(),r(e,null,[l(s(u),{title:T.title},null,8,[`title`]),c(`div`,p,[c(`aside`,m,[o[1]||=c(`div`,{class:`pointer-events-none absolute inset-0 opacity-[0.12]`,style:{"background-image":`radial-gradient(circle at 20% 20%, white 0, transparent 45%), radial-gradient(circle at 90% 80%, white 0, transparent 40%)`}},null,-1),l(f,{inverted:``,class:`relative`}),c(`div`,h,[o[0]||=c(`p`,{class:`text-3xl leading-tight font-semibold tracking-tight`},`Alles Wichtige für Ihren Arbeitsalltag – an einem Ort.`,-1),c(`p`,g,`Neuigkeiten, Ansprechpartner und Anwendungen von `+d(E.value.portal_name)+`.`,1)]),c(`p`,_,`© `+d(new Date().getFullYear())+` `+d(E.value.portal_name),1)]),c(`main`,v,[c(`div`,y,[c(`div`,b,[l(f)]),c(`h1`,x,d(T.title),1),T.description?(n(),r(`p`,S,d(T.description),1)):i(``,!0),c(`div`,C,[a(t.$slots,`default`)])])])])],64))}};export{w as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Jn as r,K as i,O as a,Pt as o,Rt as s,Tn as c,Wt as l,X as u,Xt as d,Y as f,c as p,ir as m,n as h,nt as g,q as _,rt as v,sr as y,ur as b}from"./app-DJnl8SxL.js";import{M as x}from"./BrandLogo-B9oA1DG4.js";import{t as S}from"./arrow-right-c2thy74C.js";import{t as C}from"./chevron-left-D2uxffyU.js";import{t as w}from"./chevron-right-CAXGr-zo.js";var T=x({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),E=x({name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]}),D=[`src`],O={class:`flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10`,"aria-live":`polite`},k={key:0,class:`mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase`},A={class:`text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]`},j={key:1,class:`mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block`},M={key:0,class:`absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6`},N={class:`flex items-center gap-1.5 px-1`},P=[`aria-label`,`aria-current`,`onClick`],F=[`aria-label`],I={__name:`HeroSlider`,props:{posts:{type:Array,required:!0}},setup(x){let I=x,L=r(0),R=r(!1),z=i(()=>I.posts[L.value]),B=null;function V(e){L.value=(e+I.posts.length)%I.posts.length}function H(){U(),I.posts.length>1&&!R.value&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(B=setInterval(()=>V(L.value+1),7e3))}function U(){clearInterval(B)}function W(){R.value=!R.value,H()}return s(H),o(U),(r,i)=>(l(),u(`section`,{class:`relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]`,"aria-roledescription":`Karussell`,"aria-label":`Hervorgehobene Neuigkeiten`,onMouseenter:U,onMouseleave:H,onFocusin:U,onFocusout:H},[v(p,{"enter-active-class":`transition-opacity duration-700`,"leave-active-class":`transition-opacity duration-700 absolute inset-0`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:e(()=>[(l(!0),u(t,null,d(x.posts,(e,t)=>c((l(),u(`img`,{key:e.id,src:e.cover_url,alt:``,class:`absolute inset-0 -z-10 size-full object-cover`},null,8,D)),[[a,t===L.value]])),128))]),_:1}),i[3]||=_(`div`,{class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent`},null,-1),_(`div`,O,[z.value.category?(l(),u(`span`,k,b(z.value.category.name),1)):f(``,!0),_(`h2`,A,b(z.value.title),1),z.value.teaser?(l(),u(`p`,j,b(z.value.teaser),1)):f(``,!0),v(m(h),{href:`/neuigkeiten/${z.value.slug}`,class:`mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700`},{default:e(()=>[i[2]||=g(` Mehr erfahren `,-1),v(m(S),{class:`size-4`})]),_:1},8,[`href`])]),x.posts.length>1?(l(),u(`div`,M,[_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Vorheriger Beitrag`,onClick:i[0]||=e=>V(L.value-1)},[v(m(C),{class:`size-5`})]),_(`div`,N,[(l(!0),u(t,null,d(x.posts,(e,t)=>(l(),u(`button`,{key:e.id,type:`button`,class:y([`h-1.5 rounded-full transition-all`,t===L.value?`w-6 bg-white`:`w-1.5 bg-white/50 hover:bg-white/80`]),"aria-label":`Beitrag ${t+1} von ${x.posts.length}`,"aria-current":t===L.value,onClick:e=>V(t)},null,10,P))),128))]),_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Nächster Beitrag`,onClick:i[1]||=e=>V(L.value+1)},[v(m(w),{class:`size-5`})]),_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":R.value?`Automatisch weiterblättern`:`Anhalten`,onClick:W},[R.value?(l(),n(m(E),{key:0,class:`size-4`})):(l(),n(m(T),{key:1,class:`size-4`}))],8,F)])):f(``,!0)],32))}},L={__name:`Hero`,props:{posts:{type:Array,required:!0}},setup(e){return(t,r)=>(l(),n(I,{posts:e.posts,class:`h-full`},null,8,[`posts`]))}};export{L as default};
|
||||
import{Cn as e,I as t,J as n,Jn as r,K as i,O as a,Pt as o,Rt as s,Tn as c,Wt as l,X as u,Xt as d,Y as f,c as p,ir as m,n as h,nt as g,q as _,rt as v,sr as y,ur as b}from"./app-D9PUXL84.js";import{M as x}from"./BrandLogo-CDbPNVYz.js";import{t as S}from"./arrow-right-BJfvlG8u.js";import{t as C}from"./chevron-left-Dwvm8_Wb.js";import{t as w}from"./chevron-right-ZwiJ5NHr.js";var T=x({name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]}),E=x({name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]}),D=[`src`],O={class:`flex h-full flex-col justify-end p-6 sm:max-w-[65%] sm:justify-center sm:p-10`,"aria-live":`polite`},k={key:0,class:`mb-3 w-fit rounded-sm bg-brand px-2 py-0.5 text-[11px] font-semibold tracking-wide text-brand-foreground uppercase`},A={class:`text-2xl leading-tight font-semibold tracking-tight sm:text-[32px]`},j={key:1,class:`mt-3 line-clamp-3 hidden text-[15px] text-white/85 sm:block`},M={key:0,class:`absolute right-4 bottom-4 flex items-center gap-2 sm:right-6 sm:bottom-6`},N={class:`flex items-center gap-1.5 px-1`},P=[`aria-label`,`aria-current`,`onClick`],F=[`aria-label`],I={__name:`HeroSlider`,props:{posts:{type:Array,required:!0}},setup(x){let I=x,L=r(0),R=r(!1),z=i(()=>I.posts[L.value]),B=null;function V(e){L.value=(e+I.posts.length)%I.posts.length}function H(){U(),I.posts.length>1&&!R.value&&!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(B=setInterval(()=>V(L.value+1),7e3))}function U(){clearInterval(B)}function W(){R.value=!R.value,H()}return s(H),o(U),(r,i)=>(l(),u(`section`,{class:`relative isolate aspect-[16/10] overflow-hidden rounded-lg bg-brand-950 text-white sm:aspect-[16/9] lg:aspect-auto lg:h-full lg:min-h-[400px]`,"aria-roledescription":`Karussell`,"aria-label":`Hervorgehobene Neuigkeiten`,onMouseenter:U,onMouseleave:H,onFocusin:U,onFocusout:H},[v(p,{"enter-active-class":`transition-opacity duration-700`,"leave-active-class":`transition-opacity duration-700 absolute inset-0`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:e(()=>[(l(!0),u(t,null,d(x.posts,(e,t)=>c((l(),u(`img`,{key:e.id,src:e.cover_url,alt:``,class:`absolute inset-0 -z-10 size-full object-cover`},null,8,D)),[[a,t===L.value]])),128))]),_:1}),i[3]||=_(`div`,{class:`absolute inset-0 -z-10 bg-gradient-to-t from-black/80 via-black/35 to-black/5 sm:bg-gradient-to-r sm:from-black/75 sm:via-black/40 sm:to-transparent`},null,-1),_(`div`,O,[z.value.category?(l(),u(`span`,k,b(z.value.category.name),1)):f(``,!0),_(`h2`,A,b(z.value.title),1),z.value.teaser?(l(),u(`p`,j,b(z.value.teaser),1)):f(``,!0),v(m(h),{href:`/neuigkeiten/${z.value.slug}`,class:`mt-5 inline-flex w-fit items-center gap-2 rounded-md bg-brand px-4 py-2.5 text-sm font-medium text-brand-foreground transition-colors hover:bg-brand-700`},{default:e(()=>[i[2]||=g(` Mehr erfahren `,-1),v(m(S),{class:`size-4`})]),_:1},8,[`href`])]),x.posts.length>1?(l(),u(`div`,M,[_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Vorheriger Beitrag`,onClick:i[0]||=e=>V(L.value-1)},[v(m(C),{class:`size-5`})]),_(`div`,N,[(l(!0),u(t,null,d(x.posts,(e,t)=>(l(),u(`button`,{key:e.id,type:`button`,class:y([`h-1.5 rounded-full transition-all`,t===L.value?`w-6 bg-white`:`w-1.5 bg-white/50 hover:bg-white/80`]),"aria-label":`Beitrag ${t+1} von ${x.posts.length}`,"aria-current":t===L.value,onClick:e=>V(t)},null,10,P))),128))]),_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":`Nächster Beitrag`,onClick:i[1]||=e=>V(L.value+1)},[v(m(w),{class:`size-5`})]),_(`button`,{type:`button`,class:`grid size-9 place-items-center rounded-full bg-black/35 hover:bg-black/55`,"aria-label":R.value?`Automatisch weiterblättern`:`Anhalten`,onClick:W},[R.value?(l(),n(m(E),{key:0,class:`size-4`})):(l(),n(m(T),{key:1,class:`size-4`}))],8,F)])):f(``,!0)],32))}},L={__name:`Hero`,props:{posts:{type:Array,required:!0}},setup(e){return(t,r)=>(l(),n(I,{posts:e.posts,class:`h-full`},null,8,[`posts`]))}};export{L as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,a as s,ir as c,n as l,nt as u,q as d,rt as f,sr as p,ur as m}from"./app-DJnl8SxL.js";import{t as h}from"./AppLayout-1ldLchM-.js";import{t as g}from"./chevron-left-D2uxffyU.js";import{t as _}from"./chevron-right-CAXGr-zo.js";import{r as v}from"./NewsImage-DyRK4fmY.js";import{t as y}from"./EmptyState-CFBmx8ne.js";import{t as b}from"./button-9_XTGiWz.js";import{t as x}from"./NewsCard-B-l5uZ4h.js";var S={key:0,class:`mb-6 flex flex-wrap gap-2`,"aria-label":`Kategorien`},C={key:1,class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4`},w={key:2,class:`rounded-lg border border-dashed bg-card`},T={key:3,class:`mt-8 flex items-center justify-between`,"aria-label":`Seiten`},E={class:`text-sm text-muted-foreground`},D={class:`flex gap-2`},O={__name:`Index`,props:{posts:{type:Object,required:!0},categories:{type:Array,required:!0},activeCategory:{type:String,default:null}},setup(O){return(k,A)=>(r(),n(h,{title:`Neuigkeiten`},{default:e(()=>[A[5]||=d(`div`,{class:`mb-6`},[d(`h1`,{class:`text-2xl font-semibold tracking-tight`},`Neuigkeiten`),d(`p`,{class:`mt-1 text-sm text-muted-foreground`},`Aktuelles aus dem Unternehmen und den Bereichen.`)],-1),O.categories.length?(r(),i(`nav`,S,[f(c(l),{href:`/neuigkeiten`,class:p([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,O.activeCategory?`bg-card hover:bg-accent`:`border-brand bg-brand text-brand-foreground`]),"preserve-scroll":``},{default:e(()=>[...A[2]||=[u(` Alle `,-1)]]),_:1},8,[`class`]),(r(!0),i(t,null,a(O.categories,t=>(r(),n(c(l),{key:t.slug,href:`/neuigkeiten?kategorie=${t.slug}`,class:p([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,O.activeCategory===t.slug?`border-brand bg-brand text-brand-foreground`:`bg-card hover:bg-accent`]),"preserve-scroll":``},{default:e(()=>[u(m(t.name),1)]),_:2},1032,[`href`,`class`]))),128))])):o(``,!0),O.posts.data.length?(r(),i(`div`,C,[(r(!0),i(t,null,a(O.posts.data,e=>(r(),n(x,{key:e.id,post:e},null,8,[`post`]))),128))])):(r(),i(`div`,w,[f(y,{icon:c(v),title:`Keine Beiträge`,text:`In dieser Kategorie ist noch nichts veröffentlicht.`},null,8,[`icon`])])),O.posts.meta.last_page>1?(r(),i(`nav`,T,[d(`p`,E,`Seite `+m(O.posts.meta.current_page)+` von `+m(O.posts.meta.last_page),1),d(`div`,D,[f(c(b),{variant:`outline`,size:`sm`,disabled:!O.posts.links.prev,onClick:A[0]||=e=>c(s).get(O.posts.links.prev)},{default:e(()=>[f(c(g)),A[3]||=u(` Neuere`,-1)]),_:1},8,[`disabled`]),f(c(b),{variant:`outline`,size:`sm`,disabled:!O.posts.links.next,onClick:A[1]||=e=>c(s).get(O.posts.links.next)},{default:e(()=>[A[4]||=u(`Ältere `,-1),f(c(_))]),_:1},8,[`disabled`])])])):o(``,!0)]),_:1}))}};export{O as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,a as s,ir as c,n as l,nt as u,q as d,rt as f,sr as p,ur as m}from"./app-D9PUXL84.js";import{t as h}from"./AppLayout-J4hJMC50.js";import{t as g}from"./chevron-left-Dwvm8_Wb.js";import{t as _}from"./chevron-right-ZwiJ5NHr.js";import{r as v}from"./NewsImage-lWXKTpJ-.js";import{t as y}from"./EmptyState-CEUealqa.js";import{t as b}from"./button-D-CgZku8.js";import{t as x}from"./NewsCard-JuwhjoRm.js";var S={key:0,class:`mb-6 flex flex-wrap gap-2`,"aria-label":`Kategorien`},C={key:1,class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4`},w={key:2,class:`rounded-lg border border-dashed bg-card`},T={key:3,class:`mt-8 flex items-center justify-between`,"aria-label":`Seiten`},E={class:`text-sm text-muted-foreground`},D={class:`flex gap-2`},O={__name:`Index`,props:{posts:{type:Object,required:!0},categories:{type:Array,required:!0},activeCategory:{type:String,default:null}},setup(O){return(k,A)=>(r(),n(h,{title:`Neuigkeiten`},{default:e(()=>[A[5]||=d(`div`,{class:`mb-6`},[d(`h1`,{class:`text-2xl font-semibold tracking-tight`},`Neuigkeiten`),d(`p`,{class:`mt-1 text-sm text-muted-foreground`},`Aktuelles aus dem Unternehmen und den Bereichen.`)],-1),O.categories.length?(r(),i(`nav`,S,[f(c(l),{href:`/neuigkeiten`,class:p([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,O.activeCategory?`bg-card hover:bg-accent`:`border-brand bg-brand text-brand-foreground`]),"preserve-scroll":``},{default:e(()=>[...A[2]||=[u(` Alle `,-1)]]),_:1},8,[`class`]),(r(!0),i(t,null,a(O.categories,t=>(r(),n(c(l),{key:t.slug,href:`/neuigkeiten?kategorie=${t.slug}`,class:p([`rounded-full border px-3.5 py-1.5 text-[13px] font-medium transition-colors`,O.activeCategory===t.slug?`border-brand bg-brand text-brand-foreground`:`bg-card hover:bg-accent`]),"preserve-scroll":``},{default:e(()=>[u(m(t.name),1)]),_:2},1032,[`href`,`class`]))),128))])):o(``,!0),O.posts.data.length?(r(),i(`div`,C,[(r(!0),i(t,null,a(O.posts.data,e=>(r(),n(x,{key:e.id,post:e},null,8,[`post`]))),128))])):(r(),i(`div`,w,[f(y,{icon:c(v),title:`Keine Beiträge`,text:`In dieser Kategorie ist noch nichts veröffentlicht.`},null,8,[`icon`])])),O.posts.meta.last_page>1?(r(),i(`nav`,T,[d(`p`,E,`Seite `+m(O.posts.meta.current_page)+` von `+m(O.posts.meta.last_page),1),d(`div`,D,[f(c(b),{variant:`outline`,size:`sm`,disabled:!O.posts.links.prev,onClick:A[0]||=e=>c(s).get(O.posts.links.prev)},{default:e(()=>[f(c(g)),A[3]||=u(` Neuere`,-1)]),_:1},8,[`disabled`]),f(c(b),{variant:`outline`,size:`sm`,disabled:!O.posts.links.next,onClick:A[1]||=e=>c(s).get(O.posts.links.next)},{default:e(()=>[A[4]||=u(`Ältere `,-1),f(c(_))]),_:1},8,[`disabled`])])])):o(``,!0)]),_:1}))}};export{O as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,K as r,Wt as i,X as a,Xt as o,Y as s,ir as c,n as l,nt as u,q as d,rt as f,ur as p}from"./app-DJnl8SxL.js";import{t as m}from"./calendar-days-Q7KBeYQV.js";import{t as h}from"./AppLayout-1ldLchM-.js";import{t as g}from"./map-pin-A7DprnXY.js";import{t as _}from"./video-RhaN0-fc.js";import{t as v}from"./EmptyState-CFBmx8ne.js";import{i as y,r as b}from"./format-Dlm0nTI_.js";import{t as x}from"./EventDateBlock-CfSpm6m9.js";var S={key:0,class:`grid max-w-4xl gap-8`},C={class:`mb-3 text-sm font-semibold text-muted-foreground`},w={class:`divide-y rounded-lg border bg-card`},T={class:`min-w-0 flex-1`},E={class:`text-[15px] font-semibold group-hover:underline`},D={class:`mt-0.5 text-[13px] text-muted-foreground`},O={key:0,class:`mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground`},k=[`src`],A={key:1,class:`max-w-4xl rounded-lg border border-dashed bg-card`},j={__name:`Index`,props:{events:{type:Object,required:!0}},setup(j){let M=j,N=r(()=>{let e=[];for(let t of M.events.data){let n=new Date(t.starts_at),r=y((n<new Date?new Date:n).toISOString()),i=e[e.length-1];i?.label===r?i.events.push(t):e.push({label:r,events:[t]})}return e});return(r,y)=>(i(),n(h,{title:`Termine`},{default:e(()=>[y[0]||=d(`div`,{class:`mb-6`},[d(`h1`,{class:`text-2xl font-semibold tracking-tight`},`Termine`),d(`p`,{class:`mt-1 text-sm text-muted-foreground`},`Veranstaltungen, Fortbildungen und Treffen.`)],-1),N.value.length?(i(),a(`div`,S,[(i(!0),a(t,null,o(N.value,r=>(i(),a(`section`,{key:r.label},[d(`h2`,C,p(r.label),1),d(`ul`,w,[(i(!0),a(t,null,o(r.events,t=>(i(),a(`li`,{key:t.id},[f(c(l),{href:`/termine/${t.id}`,class:`group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60`},{default:e(()=>[f(x,{date:t.starts_at,class:`w-14`},null,8,[`date`]),d(`div`,T,[d(`h3`,E,p(t.title),1),d(`p`,D,p(c(b)(t)),1),t.location||t.online_url?(i(),a(`p`,O,[t.location?(i(),n(c(g),{key:0,class:`size-3.5`})):(i(),n(c(_),{key:1,class:`size-3.5`})),u(` `+p(t.location||`Online`),1)])):s(``,!0)]),t.thumb_url?(i(),a(`img`,{key:0,src:t.thumb_url,alt:``,loading:`lazy`,class:`hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block`},null,8,k)):s(``,!0)]),_:2},1032,[`href`])]))),128))])]))),128))])):(i(),a(`div`,A,[f(v,{icon:c(m),title:`Keine anstehenden Termine`,text:`Neue Termine erscheinen hier, sobald sie eingetragen sind.`},null,8,[`icon`])]))]),_:1}))}};export{j as default};
|
||||
import{Cn as e,I as t,J as n,K as r,Wt as i,X as a,Xt as o,Y as s,ir as c,n as l,nt as u,q as d,rt as f,ur as p}from"./app-D9PUXL84.js";import{t as m}from"./calendar-days-CfqaFZdn.js";import{t as h}from"./AppLayout-J4hJMC50.js";import{t as g}from"./map-pin-Cw1BHrDt.js";import{t as _}from"./video-oLaYKvia.js";import{t as v}from"./EmptyState-CEUealqa.js";import{i as y,r as b}from"./format-Dlm0nTI_.js";import{t as x}from"./EventDateBlock-Be3FgmM8.js";var S={key:0,class:`grid max-w-4xl gap-8`},C={class:`mb-3 text-sm font-semibold text-muted-foreground`},w={class:`divide-y rounded-lg border bg-card`},T={class:`min-w-0 flex-1`},E={class:`text-[15px] font-semibold group-hover:underline`},D={class:`mt-0.5 text-[13px] text-muted-foreground`},O={key:0,class:`mt-0.5 flex items-center gap-1.5 text-[13px] text-muted-foreground`},k=[`src`],A={key:1,class:`max-w-4xl rounded-lg border border-dashed bg-card`},j={__name:`Index`,props:{events:{type:Object,required:!0}},setup(j){let M=j,N=r(()=>{let e=[];for(let t of M.events.data){let n=new Date(t.starts_at),r=y((n<new Date?new Date:n).toISOString()),i=e[e.length-1];i?.label===r?i.events.push(t):e.push({label:r,events:[t]})}return e});return(r,y)=>(i(),n(h,{title:`Termine`},{default:e(()=>[y[0]||=d(`div`,{class:`mb-6`},[d(`h1`,{class:`text-2xl font-semibold tracking-tight`},`Termine`),d(`p`,{class:`mt-1 text-sm text-muted-foreground`},`Veranstaltungen, Fortbildungen und Treffen.`)],-1),N.value.length?(i(),a(`div`,S,[(i(!0),a(t,null,o(N.value,r=>(i(),a(`section`,{key:r.label},[d(`h2`,C,p(r.label),1),d(`ul`,w,[(i(!0),a(t,null,o(r.events,t=>(i(),a(`li`,{key:t.id},[f(c(l),{href:`/termine/${t.id}`,class:`group flex items-center gap-4 p-4 transition-colors hover:bg-accent/60`},{default:e(()=>[f(x,{date:t.starts_at,class:`w-14`},null,8,[`date`]),d(`div`,T,[d(`h3`,E,p(t.title),1),d(`p`,D,p(c(b)(t)),1),t.location||t.online_url?(i(),a(`p`,O,[t.location?(i(),n(c(g),{key:0,class:`size-3.5`})):(i(),n(c(_),{key:1,class:`size-3.5`})),u(` `+p(t.location||`Online`),1)])):s(``,!0)]),t.thumb_url?(i(),a(`img`,{key:0,src:t.thumb_url,alt:``,loading:`lazy`,class:`hidden h-16 w-28 shrink-0 rounded-md object-cover sm:block`},null,8,k)):s(``,!0)]),_:2},1032,[`href`])]))),128))])]))),128))])):(i(),a(`div`,A,[f(v,{icon:c(m),title:`Keine anstehenden Termine`,text:`Neue Termine erscheinen hier, sobald sie eingetragen sind.`},null,8,[`icon`])]))]),_:1}))}};export{j as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,q as l,rt as u,sr as d,ur as f}from"./app-DJnl8SxL.js";import{n as p,r as m,t as h}from"./NewsImage-DyRK4fmY.js";import{t as g}from"./EmptyState-CFBmx8ne.js";import{a as _}from"./format-Dlm0nTI_.js";import{t as v}from"./Panel-D5zuY1_v.js";var y={class:`min-w-0`},b={class:`mt-0.5 line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},x={class:`mt-1 text-xs text-muted-foreground`},S={__name:`NewsListItem`,props:{post:{type:Object,required:!0}},setup(t){return(i,a)=>(r(),n(s(c),{href:`/neuigkeiten/${t.post.slug}`,class:`group flex gap-4 py-3`},{default:e(()=>[u(h,{src:t.post.thumb_url,alt:t.post.title,class:`w-28 shrink-0 rounded-md sm:w-32`},null,8,[`src`,`alt`]),l(`div`,y,[u(p,{category:t.post.category},null,8,[`category`]),l(`h3`,b,f(t.post.title),1),l(`p`,x,f(s(_)(t.post.published_at)),1)])]),_:1},8,[`href`]))}},C={key:0,href:`/admin/neuigkeiten/neu`,class:`mt-4 text-sm font-medium text-brand-text hover:underline`},w={__name:`Latest`,props:{posts:{type:Array,required:!0},canWrite:{type:Boolean,default:!1},wide:{type:Boolean,default:!1}},setup(c){return(l,u)=>(r(),n(v,{title:`Neuigkeiten`,"action-label":`Alle anzeigen`,"action-href":`/neuigkeiten`},{default:e(()=>[c.posts.length?(r(),i(`div`,{key:0,class:d([`-my-3 divide-y`,{"sm:grid sm:grid-cols-2 sm:gap-x-6 sm:divide-y-0":c.wide}])},[(r(!0),i(t,null,a(c.posts,e=>(r(),n(S,{key:e.id,post:e},null,8,[`post`]))),128))],2)):(r(),n(g,{key:1,icon:s(m),title:`Noch keine Neuigkeiten`,text:`Sobald Beiträge veröffentlicht sind, erscheinen sie hier.`},{default:e(()=>[c.canWrite?(r(),i(`a`,C,`Ersten Beitrag schreiben`)):o(``,!0)]),_:1},8,[`icon`]))]),_:1}))}};export{w as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,q as l,rt as u,sr as d,ur as f}from"./app-D9PUXL84.js";import{n as p,r as m,t as h}from"./NewsImage-lWXKTpJ-.js";import{t as g}from"./EmptyState-CEUealqa.js";import{a as _}from"./format-Dlm0nTI_.js";import{t as v}from"./Panel-BEYQbw9Y.js";var y={class:`min-w-0`},b={class:`mt-0.5 line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},x={class:`mt-1 text-xs text-muted-foreground`},S={__name:`NewsListItem`,props:{post:{type:Object,required:!0}},setup(t){return(i,a)=>(r(),n(s(c),{href:`/neuigkeiten/${t.post.slug}`,class:`group flex gap-4 py-3`},{default:e(()=>[u(h,{src:t.post.thumb_url,alt:t.post.title,class:`w-28 shrink-0 rounded-md sm:w-32`},null,8,[`src`,`alt`]),l(`div`,y,[u(p,{category:t.post.category},null,8,[`category`]),l(`h3`,b,f(t.post.title),1),l(`p`,x,f(s(_)(t.post.published_at)),1)])]),_:1},8,[`href`]))}},C={key:0,href:`/admin/neuigkeiten/neu`,class:`mt-4 text-sm font-medium text-brand-text hover:underline`},w={__name:`Latest`,props:{posts:{type:Array,required:!0},canWrite:{type:Boolean,default:!1},wide:{type:Boolean,default:!1}},setup(c){return(l,u)=>(r(),n(v,{title:`Neuigkeiten`,"action-label":`Alle anzeigen`,"action-href":`/neuigkeiten`},{default:e(()=>[c.posts.length?(r(),i(`div`,{key:0,class:d([`-my-3 divide-y`,{"sm:grid sm:grid-cols-2 sm:gap-x-6 sm:divide-y-0":c.wide}])},[(r(!0),i(t,null,a(c.posts,e=>(r(),n(S,{key:e.id,post:e},null,8,[`post`]))),128))],2)):(r(),n(g,{key:1,icon:s(m),title:`Noch keine Neuigkeiten`,text:`Sobald Beiträge veröffentlicht sind, erscheinen sie hier.`},{default:e(()=>[c.canWrite?(r(),i(`a`,C,`Ersten Beitrag schreiben`)):o(``,!0)]),_:1},8,[`icon`]))]),_:1}))}};export{w as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,ir as o,n as s,q as c,rt as l,ur as u}from"./app-DJnl8SxL.js";import{n as d}from"./AppLayout-1ldLchM-.js";import{t as f}from"./Panel-D5zuY1_v.js";var p={class:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`},m={class:`min-w-0`},h={class:`truncate text-sm font-semibold`},g={class:`truncate text-[13px] text-muted-foreground`},_={__name:`NewColleagues`,props:{people:{type:Array,required:!0}},setup(_){return(v,y)=>(r(),n(f,{title:`Neu im Team`,"action-label":`Alle Personen`,"action-href":`/personen`},{default:e(()=>[c(`ul`,p,[(r(!0),i(t,null,a(_.people,t=>(r(),i(`li`,{key:t.id},[l(o(s),{href:`/personen/${t.id}`,class:`flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-accent`},{default:e(()=>[l(d,{person:t,class:`size-11`},null,8,[`person`]),c(`div`,m,[c(`div`,h,u(t.name),1),c(`div`,g,u(t.job_title||t.department),1)])]),_:2},1032,[`href`])]))),128))])]),_:1}))}};export{_ as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,ir as o,n as s,q as c,rt as l,ur as u}from"./app-D9PUXL84.js";import{n as d}from"./AppLayout-J4hJMC50.js";import{t as f}from"./Panel-BEYQbw9Y.js";var p={class:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`},m={class:`min-w-0`},h={class:`truncate text-sm font-semibold`},g={class:`truncate text-[13px] text-muted-foreground`},_={__name:`NewColleagues`,props:{people:{type:Array,required:!0}},setup(_){return(v,y)=>(r(),n(f,{title:`Neu im Team`,"action-label":`Alle Personen`,"action-href":`/personen`},{default:e(()=>[c(`ul`,p,[(r(!0),i(t,null,a(_.people,t=>(r(),i(`li`,{key:t.id},[l(o(s),{href:`/personen/${t.id}`,class:`flex items-center gap-3 rounded-lg border p-3 transition-colors hover:bg-accent`},{default:e(()=>[l(d,{person:t,class:`size-11`},null,8,[`person`]),c(`div`,m,[c(`div`,h,u(t.name),1),c(`div`,g,u(t.job_title||t.department),1)])]),_:2},1032,[`href`])]))),128))])]),_:1}))}};export{_ as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,X as r,Y as i,ir as a,n as o,q as s,rt as c,ur as l}from"./app-DJnl8SxL.js";import{n as u,t as d}from"./NewsImage-DyRK4fmY.js";import{o as f}from"./format-Dlm0nTI_.js";var p={class:`flex flex-1 flex-col p-4`},m={class:`mt-1 line-clamp-2 text-[15px] leading-snug font-semibold group-hover:underline`},h={key:0,class:`mt-1.5 line-clamp-2 text-[13px] text-muted-foreground`},g={class:`mt-auto pt-3 text-xs text-muted-foreground`},_={__name:`NewsCard`,props:{post:{type:Object,required:!0}},setup(_){return(v,y)=>(n(),t(a(o),{href:`/neuigkeiten/${_.post.slug}`,class:`group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-md`},{default:e(()=>[c(d,{src:_.post.thumb_url,alt:_.post.title},null,8,[`src`,`alt`]),s(`div`,p,[c(u,{category:_.post.category},null,8,[`category`]),s(`h3`,m,l(_.post.title),1),_.post.teaser?(n(),r(`p`,h,l(_.post.teaser),1)):i(``,!0),s(`p`,g,l(a(f)(_.post.published_at))+` · `+l(_.post.reading_minutes)+` Min.`,1)])]),_:1},8,[`href`]))}};export{_ as t};
|
||||
import{Cn as e,J as t,Wt as n,X as r,Y as i,ir as a,n as o,q as s,rt as c,ur as l}from"./app-D9PUXL84.js";import{n as u,t as d}from"./NewsImage-lWXKTpJ-.js";import{o as f}from"./format-Dlm0nTI_.js";var p={class:`flex flex-1 flex-col p-4`},m={class:`mt-1 line-clamp-2 text-[15px] leading-snug font-semibold group-hover:underline`},h={key:0,class:`mt-1.5 line-clamp-2 text-[13px] text-muted-foreground`},g={class:`mt-auto pt-3 text-xs text-muted-foreground`},_={__name:`NewsCard`,props:{post:{type:Object,required:!0}},setup(_){return(v,y)=>(n(),t(a(o),{href:`/neuigkeiten/${_.post.slug}`,class:`group flex h-full flex-col overflow-hidden rounded-lg border bg-card transition-shadow hover:shadow-md`},{default:e(()=>[c(d,{src:_.post.thumb_url,alt:_.post.title},null,8,[`src`,`alt`]),s(`div`,p,[c(u,{category:_.post.category},null,8,[`category`]),s(`h3`,m,l(_.post.title),1),_.post.teaser?(n(),r(`p`,h,l(_.post.teaser),1)):i(``,!0),s(`p`,g,l(a(f)(_.post.published_at))+` · `+l(_.post.reading_minutes)+` Min.`,1)])]),_:1},8,[`href`]))}};export{_ as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Wt as e,X as t,Y as n,ir as r,rt as i,ur as a}from"./app-DJnl8SxL.js";import{M as o}from"./BrandLogo-B9oA1DG4.js";var s=o({name:`newspaper`,size:24,node:[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]}),c={key:0,class:`text-[11px] font-semibold tracking-wide text-brand-text uppercase`},l={__name:`CategoryLabel`,props:{category:{type:Object,default:null}},setup(r){return(i,o)=>r.category?(e(),t(`span`,c,a(r.category.name),1)):n(``,!0)}},u={class:`relative aspect-video overflow-hidden bg-muted`},d=[`src`,`alt`],f={key:1,class:`grid size-full place-items-center bg-brand-soft`},p={__name:`NewsImage`,props:{src:{type:String,default:null},alt:{type:String,default:``}},setup(n){return(a,o)=>(e(),t(`div`,u,[n.src?(e(),t(`img`,{key:0,src:n.src,alt:n.alt,loading:`lazy`,class:`size-full object-cover`},null,8,d)):(e(),t(`div`,f,[i(r(s),{class:`size-1/4 max-h-10 max-w-10 text-brand-text opacity-60`,"stroke-width":1.5})]))]))}};export{l as n,s as r,p as t};
|
||||
import{Wt as e,X as t,Y as n,ir as r,rt as i,ur as a}from"./app-D9PUXL84.js";import{M as o}from"./BrandLogo-CDbPNVYz.js";var s=o({name:`newspaper`,size:24,node:[[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2`,key:`39pd36`}],[`rect`,{width:`8`,height:`4`,x:`10`,y:`6`,rx:`1`,key:`aywv1n`}]]}),c={key:0,class:`text-[11px] font-semibold tracking-wide text-brand-text uppercase`},l={__name:`CategoryLabel`,props:{category:{type:Object,default:null}},setup(r){return(i,o)=>r.category?(e(),t(`span`,c,a(r.category.name),1)):n(``,!0)}},u={class:`relative aspect-video overflow-hidden bg-muted`},d=[`src`,`alt`],f={key:1,class:`grid size-full place-items-center bg-brand-soft`},p={__name:`NewsImage`,props:{src:{type:String,default:null},alt:{type:String,default:``}},setup(n){return(a,o)=>(e(),t(`div`,u,[n.src?(e(),t(`img`,{key:0,src:n.src,alt:n.alt,loading:`lazy`,class:`size-full object-cover`},null,8,d)):(e(),t(`div`,f,[i(r(s),{class:`size-1/4 max-h-10 max-w-10 text-brand-text opacity-60`,"stroke-width":1.5})]))]))}};export{l as n,s as r,p as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,X as r,Y as i,Zt as a,ir as o,n as s,nt as c,q as l,rt as u,sr as d,ur as f}from"./app-DJnl8SxL.js";import{t as p}from"./chevron-right-CAXGr-zo.js";var m={class:`rounded-lg border bg-card text-card-foreground`},h={key:0,class:`flex items-center justify-between gap-4 px-5 pt-4 pb-3`},g={class:`text-base font-semibold`},_={__name:`Panel`,props:{title:{type:String,default:``},actionLabel:{type:String,default:``},actionHref:{type:String,default:``}},setup(_){return(v,y)=>(n(),r(`section`,m,[_.title||v.$slots.actions?(n(),r(`header`,h,[l(`h2`,g,f(_.title),1),a(v.$slots,`actions`,{},()=>[_.actionHref?(n(),t(o(s),{key:0,href:_.actionHref,class:`inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline`},{default:e(()=>[c(f(_.actionLabel)+` `,1),u(o(p),{class:`size-3.5`})]),_:1},8,[`href`])):i(``,!0)])])):i(``,!0),l(`div`,{class:d([`px-5 pb-5`,{"pt-5":!_.title&&!v.$slots.actions}])},[a(v.$slots,`default`)],2)]))}};export{_ as t};
|
||||
import{Cn as e,J as t,Wt as n,X as r,Y as i,Zt as a,ir as o,n as s,nt as c,q as l,rt as u,sr as d,ur as f}from"./app-D9PUXL84.js";import{t as p}from"./chevron-right-ZwiJ5NHr.js";var m={class:`rounded-lg border bg-card text-card-foreground`},h={key:0,class:`flex items-center justify-between gap-4 px-5 pt-4 pb-3`},g={class:`text-base font-semibold`},_={__name:`Panel`,props:{title:{type:String,default:``},actionLabel:{type:String,default:``},actionHref:{type:String,default:``}},setup(_){return(v,y)=>(n(),r(`section`,m,[_.title||v.$slots.actions?(n(),r(`header`,h,[l(`h2`,g,f(_.title),1),a(v.$slots,`actions`,{},()=>[_.actionHref?(n(),t(o(s),{key:0,href:_.actionHref,class:`inline-flex items-center gap-0.5 text-[13px] font-medium text-brand-text hover:underline`},{default:e(()=>[c(f(_.actionLabel)+` `,1),u(o(p),{class:`size-3.5`})]),_:1},8,[`href`])):i(``,!0)])])):i(``,!0),l(`div`,{class:d([`px-5 pb-5`,{"pt-5":!_.title&&!v.$slots.actions}])},[a(v.$slots,`default`)],2)]))}};export{_ as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,ir as r,n as i,nt as a,q as o,rt as s,ur as c}from"./app-DJnl8SxL.js";import{t as l}from"./arrow-right-c2thy74C.js";import{s as u}from"./AppLayout-1ldLchM-.js";import{t as d}from"./Panel-D5zuY1_v.js";var f={action:`/personen`,method:`get`,class:`relative`,role:`search`},p={__name:`PeopleSearch`,props:{count:{type:Number,required:!0}},setup(p){return(m,h)=>(n(),t(d,{title:`Personen finden`},{default:e(()=>[o(`form`,f,[s(r(u),{class:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),h[0]||=o(`input`,{name:`q`,type:`search`,placeholder:`Name, Funktion, Abteilung …`,class:`h-10 w-full rounded-md border border-input bg-background pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`},null,-1)]),s(r(i),{href:`/personen`,class:`mt-4 flex items-center justify-between text-[13px] text-muted-foreground hover:text-foreground`},{default:e(()=>[a(c(p.count===1?`1 Person`:`${p.count.toLocaleString(`de-DE`)} Personen`)+` im Verzeichnis `,1),s(r(l),{class:`size-4`})]),_:1})]),_:1}))}};export{p as default};
|
||||
import{Cn as e,J as t,Wt as n,ir as r,n as i,nt as a,q as o,rt as s,ur as c}from"./app-D9PUXL84.js";import{t as l}from"./arrow-right-BJfvlG8u.js";import{s as u}from"./AppLayout-J4hJMC50.js";import{t as d}from"./Panel-BEYQbw9Y.js";var f={action:`/personen`,method:`get`,class:`relative`,role:`search`},p={__name:`PeopleSearch`,props:{count:{type:Number,required:!0}},setup(p){return(m,h)=>(n(),t(d,{title:`Personen finden`},{default:e(()=>[o(`form`,f,[s(r(u),{class:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),h[0]||=o(`input`,{name:`q`,type:`search`,placeholder:`Name, Funktion, Abteilung …`,class:`h-10 w-full rounded-md border border-input bg-background pr-3 pl-9 text-sm placeholder:text-muted-foreground focus-visible:border-brand-400 focus-visible:ring-3 focus-visible:ring-ring/30 focus-visible:outline-none`},null,-1)]),s(r(i),{href:`/personen`,class:`mt-4 flex items-center justify-between text-[13px] text-muted-foreground hover:text-foreground`},{default:e(()=>[a(c(p.count===1?`1 Person`:`${p.count.toLocaleString(`de-DE`)} Personen`)+` im Verzeichnis `,1),s(r(l),{class:`size-4`})]),_:1})]),_:1}))}};export{p as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,ir as r,n as i,q as a,rt as o}from"./app-DJnl8SxL.js";import{a as s}from"./AppLayout-1ldLchM-.js";var c={__name:`ProfileIncomplete`,setup(c){return(c,l)=>(n(),t(r(i),{href:`/profil/bearbeiten`,class:`flex items-start gap-3 rounded-lg border border-dashed border-brand-300 bg-card p-4 transition-colors hover:bg-brand-soft`},{default:e(()=>[o(r(s),{class:`mt-0.5 size-5 shrink-0 text-brand-text`}),l[0]||=a(`div`,null,[a(`div`,{class:`text-sm font-semibold`},`Profil vervollständigen`),a(`p`,{class:`mt-0.5 text-[13px] text-muted-foreground`},`Mit Foto und Funktion finden Kolleginnen und Kollegen Sie schneller.`)],-1)]),_:1}))}};export{c as default};
|
||||
import{Cn as e,J as t,Wt as n,ir as r,n as i,q as a,rt as o}from"./app-D9PUXL84.js";import{a as s}from"./AppLayout-J4hJMC50.js";var c={__name:`ProfileIncomplete`,setup(c){return(c,l)=>(n(),t(r(i),{href:`/profil/bearbeiten`,class:`flex items-start gap-3 rounded-lg border border-dashed border-brand-300 bg-card p-4 transition-colors hover:bg-brand-soft`},{default:e(()=>[o(r(s),{class:`mt-0.5 size-5 shrink-0 text-brand-text`}),l[0]||=a(`div`,null,[a(`div`,{class:`text-sm font-semibold`},`Profil vervollständigen`),a(`p`,{class:`mt-0.5 text-[13px] text-muted-foreground`},`Mit Foto und Funktion finden Kolleginnen und Kollegen Sie schneller.`)],-1)]),_:1}))}};export{c as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{A as e,Cn as t,J as n,Wt as r,Y as i,ir as a,nt as o,q as s,r as c,rt as l}from"./app-DJnl8SxL.js";import{j as u}from"./BrandLogo-B9oA1DG4.js";import{r as d,t as f}from"./FormField-BmjgU2Yw.js";import{t as p}from"./button-9_XTGiWz.js";import{t as m}from"./GuestLayout-BQuErbaI.js";var h={__name:`ResetPassword`,props:{email:{type:String,default:``},token:{type:String,required:!0}},setup(h){let g=h,_=c({token:g.token,email:g.email,password:``,password_confirmation:``});function v(){_.post(`/reset-password`,{onFinish:()=>_.reset(`password`,`password_confirmation`)})}return(c,h)=>(r(),n(m,{title:`Neues Passwort festlegen`,description:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:t(()=>[s(`form`,{class:`grid gap-5`,onSubmit:e(v,[`prevent`])},[l(f,{id:`email`,label:`E-Mail-Adresse`,error:a(_).errors.email},{default:t(()=>[l(a(d),{id:`email`,modelValue:a(_).email,"onUpdate:modelValue":h[0]||=e=>a(_).email=e,type:`email`,autocomplete:`username`,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),l(f,{id:`password`,label:`Neues Passwort`,error:a(_).errors.password},{default:t(()=>[l(a(d),{id:`password`,modelValue:a(_).password,"onUpdate:modelValue":h[1]||=e=>a(_).password=e,type:`password`,autocomplete:`new-password`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),l(f,{id:`password_confirmation`,label:`Passwort wiederholen`},{default:t(()=>[l(a(d),{id:`password_confirmation`,modelValue:a(_).password_confirmation,"onUpdate:modelValue":h[2]||=e=>a(_).password_confirmation=e,type:`password`,autocomplete:`new-password`,class:`h-10`},null,8,[`modelValue`])]),_:1}),l(a(p),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:a(_).processing},{default:t(()=>[a(_).processing?(r(),n(a(u),{key:0,class:`animate-spin`})):i(``,!0),h[3]||=o(` Passwort speichern `,-1)]),_:1},8,[`disabled`])],32)]),_:1}))}};export{h as default};
|
||||
import{A as e,Cn as t,J as n,Wt as r,Y as i,ir as a,nt as o,q as s,r as c,rt as l}from"./app-D9PUXL84.js";import{j as u}from"./BrandLogo-CDbPNVYz.js";import{r as d,t as f}from"./FormField-Cda3G9pl.js";import{t as p}from"./button-D-CgZku8.js";import{t as m}from"./GuestLayout-D98hTvh6.js";var h={__name:`ResetPassword`,props:{email:{type:String,default:``},token:{type:String,required:!0}},setup(h){let g=h,_=c({token:g.token,email:g.email,password:``,password_confirmation:``});function v(){_.post(`/reset-password`,{onFinish:()=>_.reset(`password`,`password_confirmation`)})}return(c,h)=>(r(),n(m,{title:`Neues Passwort festlegen`,description:`Mindestens 10 Zeichen, mit Buchstaben und Ziffern.`},{default:t(()=>[s(`form`,{class:`grid gap-5`,onSubmit:e(v,[`prevent`])},[l(f,{id:`email`,label:`E-Mail-Adresse`,error:a(_).errors.email},{default:t(()=>[l(a(d),{id:`email`,modelValue:a(_).email,"onUpdate:modelValue":h[0]||=e=>a(_).email=e,type:`email`,autocomplete:`username`,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),l(f,{id:`password`,label:`Neues Passwort`,error:a(_).errors.password},{default:t(()=>[l(a(d),{id:`password`,modelValue:a(_).password,"onUpdate:modelValue":h[1]||=e=>a(_).password=e,type:`password`,autocomplete:`new-password`,autofocus:``,class:`h-10`},null,8,[`modelValue`])]),_:1},8,[`error`]),l(f,{id:`password_confirmation`,label:`Passwort wiederholen`},{default:t(()=>[l(a(d),{id:`password_confirmation`,modelValue:a(_).password_confirmation,"onUpdate:modelValue":h[2]||=e=>a(_).password_confirmation=e,type:`password`,autocomplete:`new-password`,class:`h-10`},null,8,[`modelValue`])]),_:1}),l(a(p),{type:`submit`,size:`lg`,class:`h-10 w-full`,disabled:a(_).processing},{default:t(()=>[a(_).processing?(r(),n(a(u),{key:0,class:`animate-spin`})):i(``,!0),h[3]||=o(` Passwort speichern `,-1)]),_:1},8,[`disabled`])],32)]),_:1}))}};export{h as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,K as r,Wt as i,X as a,Xt as o,Y as s,en as c,ir as l,n as u,nt as d,q as f,rt as p,ur as m}from"./app-DJnl8SxL.js";import{M as h}from"./BrandLogo-B9oA1DG4.js";import{t as g}from"./building-complex-CCnkmD29.js";import{a as _,n as v,t as y}from"./AppLayout-1ldLchM-.js";import{n as b,t as x}from"./phone-CUH1yCi5.js";import{t as S}from"./map-pin-A7DprnXY.js";import{t as C}from"./button-9_XTGiWz.js";import{t as w}from"./Panel-D5zuY1_v.js";var T=h({name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]}),E={class:`overflow-hidden rounded-lg border bg-card`},D={class:`flex flex-col gap-4 px-6 pb-6 sm:flex-row sm:items-end sm:justify-between`},O={class:`flex flex-col gap-4 sm:flex-row sm:items-end`},k={class:`sm:pb-1`},A={class:`text-2xl font-semibold tracking-tight`},j={key:0,class:`mt-0.5 text-[15px] text-muted-foreground`},M={class:`flex gap-2 sm:pb-1`},N=[`href`],P={class:`mt-6 grid gap-6 lg:grid-cols-12`},F={class:`grid gap-4`},I={class:`min-w-0`},L={class:`text-xs text-muted-foreground`},R={class:`truncate text-sm`},z=[`href`],B={key:0,class:`text-sm leading-relaxed whitespace-pre-line`},V={key:1,class:`text-sm text-muted-foreground`},H={__name:`Show`,props:{person:{type:Object,required:!0},isOwnProfile:{type:Boolean,default:!1}},setup(h){let H=h,U=r(()=>[{icon:b,label:`E-Mail`,value:H.person.email,href:`mailto:${H.person.email}`},{icon:x,label:`Telefon`,value:H.person.phone,href:H.person.phone&&`tel:${H.person.phone}`},{icon:T,label:`Mobil`,value:H.person.mobile,href:H.person.mobile&&`tel:${H.person.mobile}`},{icon:g,label:`Abteilung`,value:H.person.department},{icon:S,label:`Standort`,value:H.person.location}].filter(e=>e.value));return(r,g)=>(i(),n(y,{title:h.person.name},{default:e(()=>[f(`section`,E,[g[2]||=f(`div`,{class:`h-28 bg-brand sm:h-32`,style:{"background-image":`linear-gradient(120deg, transparent 40%, rgb(255 255 255 / 0.08))`}},null,-1),f(`div`,D,[f(`div`,O,[p(v,{person:h.person,class:`-mt-14 size-28 text-2xl ring-4 ring-card`},null,8,[`person`]),f(`div`,k,[f(`h1`,A,m(h.person.name),1),h.person.job_title?(i(),a(`p`,j,m(h.person.job_title),1)):s(``,!0)])]),f(`div`,M,[h.isOwnProfile?(i(),n(l(C),{key:0,variant:`outline`,"as-child":``},{default:e(()=>[p(l(u),{href:`/profil/bearbeiten`},{default:e(()=>[p(l(_)),g[0]||=d(` Profil bearbeiten`,-1)]),_:1})]),_:1})):(i(),n(l(C),{key:1,"as-child":``},{default:e(()=>[f(`a`,{href:`mailto:${h.person.email}`},[p(l(b)),g[1]||=d(` E-Mail schreiben`,-1)],8,N)]),_:1}))])])]),f(`div`,P,[p(w,{title:`Kontakt`,class:`lg:col-span-5`},{default:e(()=>[f(`dl`,F,[(i(!0),a(t,null,o(U.value,e=>(i(),a(`div`,{key:e.label,class:`flex items-start gap-3`},[(i(),n(c(e.icon),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`})),f(`div`,I,[f(`dt`,L,m(e.label),1),f(`dd`,R,[e.href?(i(),a(`a`,{key:0,href:e.href,class:`text-brand-text hover:underline`},m(e.value),9,z)):(i(),a(t,{key:1},[d(m(e.value),1)],64))])])]))),128))])]),_:1}),p(w,{title:`Über mich`,class:`lg:col-span-7`},{default:e(()=>[h.person.about?(i(),a(`p`,B,m(h.person.about),1)):(i(),a(`p`,V,`Noch keine Angaben.`))]),_:1})])]),_:1},8,[`title`]))}};export{H as default};
|
||||
import{Cn as e,I as t,J as n,K as r,Wt as i,X as a,Xt as o,Y as s,en as c,ir as l,n as u,nt as d,q as f,rt as p,ur as m}from"./app-D9PUXL84.js";import{M as h}from"./BrandLogo-CDbPNVYz.js";import{t as g}from"./building-complex-C0ndpa4F.js";import{a as _,n as v,t as y}from"./AppLayout-J4hJMC50.js";import{n as b,t as x}from"./phone-RcbzuVt6.js";import{t as S}from"./map-pin-Cw1BHrDt.js";import{t as C}from"./button-D-CgZku8.js";import{t as w}from"./Panel-BEYQbw9Y.js";var T=h({name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]}),E={class:`overflow-hidden rounded-lg border bg-card`},D={class:`flex flex-col gap-4 px-6 pb-6 sm:flex-row sm:items-end sm:justify-between`},O={class:`flex flex-col gap-4 sm:flex-row sm:items-end`},k={class:`sm:pb-1`},A={class:`text-2xl font-semibold tracking-tight`},j={key:0,class:`mt-0.5 text-[15px] text-muted-foreground`},M={class:`flex gap-2 sm:pb-1`},N=[`href`],P={class:`mt-6 grid gap-6 lg:grid-cols-12`},F={class:`grid gap-4`},I={class:`min-w-0`},L={class:`text-xs text-muted-foreground`},R={class:`truncate text-sm`},z=[`href`],B={key:0,class:`text-sm leading-relaxed whitespace-pre-line`},V={key:1,class:`text-sm text-muted-foreground`},H={__name:`Show`,props:{person:{type:Object,required:!0},isOwnProfile:{type:Boolean,default:!1}},setup(h){let H=h,U=r(()=>[{icon:b,label:`E-Mail`,value:H.person.email,href:`mailto:${H.person.email}`},{icon:x,label:`Telefon`,value:H.person.phone,href:H.person.phone&&`tel:${H.person.phone}`},{icon:T,label:`Mobil`,value:H.person.mobile,href:H.person.mobile&&`tel:${H.person.mobile}`},{icon:g,label:`Abteilung`,value:H.person.department},{icon:S,label:`Standort`,value:H.person.location}].filter(e=>e.value));return(r,g)=>(i(),n(y,{title:h.person.name},{default:e(()=>[f(`section`,E,[g[2]||=f(`div`,{class:`h-28 bg-brand sm:h-32`,style:{"background-image":`linear-gradient(120deg, transparent 40%, rgb(255 255 255 / 0.08))`}},null,-1),f(`div`,D,[f(`div`,O,[p(v,{person:h.person,class:`-mt-14 size-28 text-2xl ring-4 ring-card`},null,8,[`person`]),f(`div`,k,[f(`h1`,A,m(h.person.name),1),h.person.job_title?(i(),a(`p`,j,m(h.person.job_title),1)):s(``,!0)])]),f(`div`,M,[h.isOwnProfile?(i(),n(l(C),{key:0,variant:`outline`,"as-child":``},{default:e(()=>[p(l(u),{href:`/profil/bearbeiten`},{default:e(()=>[p(l(_)),g[0]||=d(` Profil bearbeiten`,-1)]),_:1})]),_:1})):(i(),n(l(C),{key:1,"as-child":``},{default:e(()=>[f(`a`,{href:`mailto:${h.person.email}`},[p(l(b)),g[1]||=d(` E-Mail schreiben`,-1)],8,N)]),_:1}))])])]),f(`div`,P,[p(w,{title:`Kontakt`,class:`lg:col-span-5`},{default:e(()=>[f(`dl`,F,[(i(!0),a(t,null,o(U.value,e=>(i(),a(`div`,{key:e.label,class:`flex items-start gap-3`},[(i(),n(c(e.icon),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`})),f(`div`,I,[f(`dt`,L,m(e.label),1),f(`dd`,R,[e.href?(i(),a(`a`,{key:0,href:e.href,class:`text-brand-text hover:underline`},m(e.value),9,z)):(i(),a(t,{key:1},[d(m(e.value),1)],64))])])]))),128))])]),_:1}),p(w,{title:`Über mich`,class:`lg:col-span-7`},{default:e(()=>[h.person.about?(i(),a(`p`,B,m(h.person.about),1)):(i(),a(`p`,V,`Noch keine Angaben.`))]),_:1})])]),_:1},8,[`title`]))}};export{H as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,X as r,Y as i,ir as a,n as o,nt as s,q as c,rt as l,ur as u}from"./app-DJnl8SxL.js";import{M as d}from"./BrandLogo-B9oA1DG4.js";import{t as f}from"./arrow-left-CAaEosyK.js";import{t as p}from"./AppLayout-1ldLchM-.js";import{t as m}from"./clock-7Lzug1Ti.js";import{t as h}from"./map-pin-A7DprnXY.js";import{t as g}from"./video-RhaN0-fc.js";import{r as _}from"./format-Dlm0nTI_.js";import{t as v}from"./EventDateBlock-CfSpm6m9.js";import{t as y}from"./button-9_XTGiWz.js";import{t as b}from"./Panel-D5zuY1_v.js";var x=d({name:`calendar-plus`,size:24,node:[[`path`,{d:`M16 18h6`,key:`987eiv`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M19 15v6`,key:`10aioa`}],[`path`,{d:`M21 11.5V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h8.3`,key:`jgwkxf`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}]]}),S={class:`mx-auto max-w-4xl`},C={class:`flex items-start gap-4`},w={class:`pt-1 text-2xl leading-tight font-semibold tracking-tight sm:text-3xl`},T=[`src`,`alt`],E={class:`mt-6 grid gap-6 lg:grid-cols-3`},D=[`innerHTML`],O={key:1,class:`text-sm text-muted-foreground`},k={class:`grid gap-4 text-sm`},A={class:`flex gap-3`},j={key:0,class:`flex gap-3`},M={key:1,class:`flex gap-3`},N={class:`min-w-0`},P={class:`truncate`},F=[`href`],I=[`href`],L={__name:`Show`,props:{event:{type:Object,required:!0}},setup(d){return(L,R)=>(n(),t(p,{title:d.event.title},{default:e(()=>[c(`div`,S,[l(a(o),{href:`/termine`,class:`mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:e(()=>[l(a(f),{class:`size-4`}),R[0]||=s(` Alle Termine `,-1)]),_:1}),c(`div`,C,[l(v,{date:d.event.starts_at,class:`w-16 py-2`},null,8,[`date`]),c(`h1`,w,u(d.event.title),1)]),d.event.image_url?(n(),r(`img`,{key:0,src:d.event.image_url,alt:d.event.title,class:`mt-6 aspect-video w-full rounded-lg object-cover`},null,8,T)):i(``,!0),c(`div`,E,[l(b,{title:`Beschreibung`,class:`lg:col-span-2`},{default:e(()=>[d.event.description_html?(n(),r(`div`,{key:0,class:`prose prose-neutral max-w-none text-[15px]`,innerHTML:d.event.description_html},null,8,D)):(n(),r(`p`,O,`Keine weiteren Informationen.`))]),_:1}),l(b,{title:`Details`,class:`content-start`},{default:e(()=>[c(`dl`,k,[c(`div`,A,[l(a(m),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,null,[R[1]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Wann`,-1),c(`dd`,null,u(a(_)(d.event)),1)])]),d.event.location?(n(),r(`div`,j,[l(a(h),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,null,[R[2]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Ort`,-1),c(`dd`,null,u(d.event.location),1)])])):i(``,!0),d.event.online_url?(n(),r(`div`,M,[l(a(g),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,N,[R[3]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Online`,-1),c(`dd`,P,[c(`a`,{href:d.event.online_url,target:`_blank`,rel:`noopener`,class:`text-brand-text hover:underline`},`Zur Teilnahme`,8,F)])])])):i(``,!0)]),l(a(y),{variant:`outline`,class:`mt-5 w-full`,"as-child":``},{default:e(()=>[c(`a`,{href:`/termine/${d.event.id}/kalender.ics`},[l(a(x)),R[4]||=s(` In meinen Kalender`,-1)],8,I)]),_:1})]),_:1})])])]),_:1},8,[`title`]))}};export{L as default};
|
||||
import{Cn as e,J as t,Wt as n,X as r,Y as i,ir as a,n as o,nt as s,q as c,rt as l,ur as u}from"./app-D9PUXL84.js";import{M as d}from"./BrandLogo-CDbPNVYz.js";import{t as f}from"./arrow-left-DNv6qC8D.js";import{t as p}from"./AppLayout-J4hJMC50.js";import{t as m}from"./clock-Ch_g8lOY.js";import{t as h}from"./map-pin-Cw1BHrDt.js";import{t as g}from"./video-oLaYKvia.js";import{r as _}from"./format-Dlm0nTI_.js";import{t as v}from"./EventDateBlock-Be3FgmM8.js";import{t as y}from"./button-D-CgZku8.js";import{t as b}from"./Panel-BEYQbw9Y.js";var x=d({name:`calendar-plus`,size:24,node:[[`path`,{d:`M16 18h6`,key:`987eiv`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M19 15v6`,key:`10aioa`}],[`path`,{d:`M21 11.5V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h8.3`,key:`jgwkxf`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}]]}),S={class:`mx-auto max-w-4xl`},C={class:`flex items-start gap-4`},w={class:`pt-1 text-2xl leading-tight font-semibold tracking-tight sm:text-3xl`},T=[`src`,`alt`],E={class:`mt-6 grid gap-6 lg:grid-cols-3`},D=[`innerHTML`],O={key:1,class:`text-sm text-muted-foreground`},k={class:`grid gap-4 text-sm`},A={class:`flex gap-3`},j={key:0,class:`flex gap-3`},M={key:1,class:`flex gap-3`},N={class:`min-w-0`},P={class:`truncate`},F=[`href`],I=[`href`],L={__name:`Show`,props:{event:{type:Object,required:!0}},setup(d){return(L,R)=>(n(),t(p,{title:d.event.title},{default:e(()=>[c(`div`,S,[l(a(o),{href:`/termine`,class:`mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:e(()=>[l(a(f),{class:`size-4`}),R[0]||=s(` Alle Termine `,-1)]),_:1}),c(`div`,C,[l(v,{date:d.event.starts_at,class:`w-16 py-2`},null,8,[`date`]),c(`h1`,w,u(d.event.title),1)]),d.event.image_url?(n(),r(`img`,{key:0,src:d.event.image_url,alt:d.event.title,class:`mt-6 aspect-video w-full rounded-lg object-cover`},null,8,T)):i(``,!0),c(`div`,E,[l(b,{title:`Beschreibung`,class:`lg:col-span-2`},{default:e(()=>[d.event.description_html?(n(),r(`div`,{key:0,class:`prose prose-neutral max-w-none text-[15px]`,innerHTML:d.event.description_html},null,8,D)):(n(),r(`p`,O,`Keine weiteren Informationen.`))]),_:1}),l(b,{title:`Details`,class:`content-start`},{default:e(()=>[c(`dl`,k,[c(`div`,A,[l(a(m),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,null,[R[1]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Wann`,-1),c(`dd`,null,u(a(_)(d.event)),1)])]),d.event.location?(n(),r(`div`,j,[l(a(h),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,null,[R[2]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Ort`,-1),c(`dd`,null,u(d.event.location),1)])])):i(``,!0),d.event.online_url?(n(),r(`div`,M,[l(a(g),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),c(`div`,N,[R[3]||=c(`dt`,{class:`text-xs text-muted-foreground`},`Online`,-1),c(`dd`,P,[c(`a`,{href:d.event.online_url,target:`_blank`,rel:`noopener`,class:`text-brand-text hover:underline`},`Zur Teilnahme`,8,F)])])])):i(``,!0)]),l(a(y),{variant:`outline`,class:`mt-5 w-full`,"as-child":``},{default:e(()=>[c(`a`,{href:`/termine/${d.event.id}/kalender.ics`},[l(a(x)),R[4]||=s(` In meinen Kalender`,-1)],8,I)]),_:1})]),_:1})])])]),_:1},8,[`title`]))}};export{L as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,nt as l,q as u,rt as d,ur as f}from"./app-DJnl8SxL.js";import{t as p}from"./arrow-left-CAaEosyK.js";import{n as m,t as h}from"./AppLayout-1ldLchM-.js";import{t as g}from"./clock-7Lzug1Ti.js";import{n as _}from"./NewsImage-DyRK4fmY.js";import{n as v}from"./format-Dlm0nTI_.js";import{t as y}from"./NewsCard-B-l5uZ4h.js";var b={class:`mx-auto max-w-3xl`},x={class:`mt-2 text-3xl leading-tight font-semibold tracking-tight sm:text-[34px]`},S={key:0,class:`mt-4 text-lg leading-relaxed text-muted-foreground`},C={class:`mt-6 flex flex-wrap items-center gap-x-6 gap-y-3 border-y py-4 text-sm`},w={class:`block font-medium`},T={key:0,class:`block text-xs text-muted-foreground`},E={class:`text-muted-foreground`},D={class:`inline-flex items-center gap-1.5 text-muted-foreground`},O=[`src`,`alt`],k=[`innerHTML`],A={key:0,class:`mx-auto mt-16 max-w-5xl`},j={class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3`},M={__name:`Show`,props:{post:{type:Object,required:!0},related:{type:Object,required:!0}},setup(M){return(N,P)=>(r(),n(h,{title:M.post.title},{default:e(()=>[u(`article`,b,[d(s(c),{href:`/neuigkeiten`,class:`mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:e(()=>[d(s(p),{class:`size-4`}),P[0]||=l(` Alle Neuigkeiten `,-1)]),_:1}),u(`header`,null,[d(_,{category:M.post.category},null,8,[`category`]),u(`h1`,x,f(M.post.title),1),M.post.teaser?(r(),i(`p`,S,f(M.post.teaser),1)):o(``,!0),u(`div`,C,[M.post.author?(r(),n(s(c),{key:0,href:`/personen/${M.post.author.id}`,class:`flex items-center gap-3 hover:underline`},{default:e(()=>[d(m,{person:M.post.author,class:`size-9`},null,8,[`person`]),u(`span`,null,[u(`span`,w,f(M.post.author.name),1),M.post.author.job_title?(r(),i(`span`,T,f(M.post.author.job_title),1)):o(``,!0)])]),_:1},8,[`href`])):o(``,!0),u(`span`,E,f(s(v)(M.post.published_at)),1),u(`span`,D,[d(s(g),{class:`size-4`}),l(` `+f(M.post.reading_minutes)+` Min. Lesezeit`,1)])])]),M.post.cover_url?(r(),i(`img`,{key:0,src:M.post.cover_url,alt:M.post.title,class:`mt-8 aspect-video w-full rounded-lg object-cover`},null,8,O)):o(``,!0),u(`div`,{class:`prose prose-neutral mt-8 max-w-none prose-headings:tracking-tight prose-img:rounded-lg`,innerHTML:M.post.body_html},null,8,k)]),M.related.data.length?(r(),i(`section`,A,[P[1]||=u(`h2`,{class:`mb-4 text-lg font-semibold`},`Weitere Beiträge`,-1),u(`div`,j,[(r(!0),i(t,null,a(M.related.data,e=>(r(),n(y,{key:e.id,post:e},null,8,[`post`]))),128))])])):o(``,!0)]),_:1},8,[`title`]))}};export{M as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,nt as l,q as u,rt as d,ur as f}from"./app-D9PUXL84.js";import{t as p}from"./arrow-left-DNv6qC8D.js";import{n as m,t as h}from"./AppLayout-J4hJMC50.js";import{t as g}from"./clock-Ch_g8lOY.js";import{n as _}from"./NewsImage-lWXKTpJ-.js";import{n as v}from"./format-Dlm0nTI_.js";import{t as y}from"./NewsCard-JuwhjoRm.js";var b={class:`mx-auto max-w-3xl`},x={class:`mt-2 text-3xl leading-tight font-semibold tracking-tight sm:text-[34px]`},S={key:0,class:`mt-4 text-lg leading-relaxed text-muted-foreground`},C={class:`mt-6 flex flex-wrap items-center gap-x-6 gap-y-3 border-y py-4 text-sm`},w={class:`block font-medium`},T={key:0,class:`block text-xs text-muted-foreground`},E={class:`text-muted-foreground`},D={class:`inline-flex items-center gap-1.5 text-muted-foreground`},O=[`src`,`alt`],k=[`innerHTML`],A={key:0,class:`mx-auto mt-16 max-w-5xl`},j={class:`grid gap-5 sm:grid-cols-2 lg:grid-cols-3`},M={__name:`Show`,props:{post:{type:Object,required:!0},related:{type:Object,required:!0}},setup(M){return(N,P)=>(r(),n(h,{title:M.post.title},{default:e(()=>[u(`article`,b,[d(s(c),{href:`/neuigkeiten`,class:`mb-6 inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground hover:text-foreground`},{default:e(()=>[d(s(p),{class:`size-4`}),P[0]||=l(` Alle Neuigkeiten `,-1)]),_:1}),u(`header`,null,[d(_,{category:M.post.category},null,8,[`category`]),u(`h1`,x,f(M.post.title),1),M.post.teaser?(r(),i(`p`,S,f(M.post.teaser),1)):o(``,!0),u(`div`,C,[M.post.author?(r(),n(s(c),{key:0,href:`/personen/${M.post.author.id}`,class:`flex items-center gap-3 hover:underline`},{default:e(()=>[d(m,{person:M.post.author,class:`size-9`},null,8,[`person`]),u(`span`,null,[u(`span`,w,f(M.post.author.name),1),M.post.author.job_title?(r(),i(`span`,T,f(M.post.author.job_title),1)):o(``,!0)])]),_:1},8,[`href`])):o(``,!0),u(`span`,E,f(s(v)(M.post.published_at)),1),u(`span`,D,[d(s(g),{class:`size-4`}),l(` `+f(M.post.reading_minutes)+` Min. Lesezeit`,1)])])]),M.post.cover_url?(r(),i(`img`,{key:0,src:M.post.cover_url,alt:M.post.title,class:`mt-8 aspect-video w-full rounded-lg object-cover`},null,8,O)):o(``,!0),u(`div`,{class:`prose prose-neutral mt-8 max-w-none prose-headings:tracking-tight prose-img:rounded-lg`,innerHTML:M.post.body_html},null,8,k)]),M.related.data.length?(r(),i(`section`,A,[P[1]||=u(`h2`,{class:`mb-4 text-lg font-semibold`},`Weitere Beiträge`,-1),u(`div`,j,[(r(!0),i(t,null,a(M.related.data,e=>(r(),n(y,{key:e.id,post:e},null,8,[`post`]))),128))])])):o(``,!0)]),_:1},8,[`title`]))}};export{M as default};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,q as l,rt as u,ur as d}from"./app-DJnl8SxL.js";import{t as f}from"./calendar-days-Q7KBeYQV.js";import{t as p}from"./EmptyState-CFBmx8ne.js";import{r as m}from"./format-Dlm0nTI_.js";import{t as h}from"./EventDateBlock-CfSpm6m9.js";import{t as g}from"./Panel-D5zuY1_v.js";var _={class:`min-w-0 pt-0.5`},v={class:`line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},y={class:`mt-0.5 text-xs text-muted-foreground`},b={key:0,class:`truncate text-xs text-muted-foreground`},x={__name:`EventListItem`,props:{event:{type:Object,required:!0}},setup(t){return(a,f)=>(r(),n(s(c),{href:`/termine/${t.event.id}`,class:`group flex items-start gap-3.5 py-3`},{default:e(()=>[u(h,{date:t.event.starts_at},null,8,[`date`]),l(`div`,_,[l(`h3`,v,d(t.event.title),1),l(`p`,y,d(s(m)(t.event)),1),t.event.location?(r(),i(`p`,b,d(t.event.location),1)):o(``,!0)])]),_:1},8,[`href`]))}},S={key:0,class:`-my-3 divide-y`},C={__name:`Upcoming`,props:{events:{type:Array,required:!0}},setup(o){return(c,l)=>(r(),n(g,{title:`Termine`,"action-label":`Alle Termine`,"action-href":`/termine`},{default:e(()=>[o.events.length?(r(),i(`div`,S,[(r(!0),i(t,null,a(o.events,e=>(r(),n(x,{key:e.id,event:e},null,8,[`event`]))),128))])):(r(),n(p,{key:1,icon:s(f),title:`Keine anstehenden Termine`,class:`py-6`},null,8,[`icon`]))]),_:1}))}};export{C as default};
|
||||
import{Cn as e,I as t,J as n,Wt as r,X as i,Xt as a,Y as o,ir as s,n as c,q as l,rt as u,ur as d}from"./app-D9PUXL84.js";import{t as f}from"./calendar-days-CfqaFZdn.js";import{t as p}from"./EmptyState-CEUealqa.js";import{r as m}from"./format-Dlm0nTI_.js";import{t as h}from"./EventDateBlock-Be3FgmM8.js";import{t as g}from"./Panel-BEYQbw9Y.js";var _={class:`min-w-0 pt-0.5`},v={class:`line-clamp-2 text-sm leading-snug font-semibold group-hover:underline`},y={class:`mt-0.5 text-xs text-muted-foreground`},b={key:0,class:`truncate text-xs text-muted-foreground`},x={__name:`EventListItem`,props:{event:{type:Object,required:!0}},setup(t){return(a,f)=>(r(),n(s(c),{href:`/termine/${t.event.id}`,class:`group flex items-start gap-3.5 py-3`},{default:e(()=>[u(h,{date:t.event.starts_at},null,8,[`date`]),l(`div`,_,[l(`h3`,v,d(t.event.title),1),l(`p`,y,d(s(m)(t.event)),1),t.event.location?(r(),i(`p`,b,d(t.event.location),1)):o(``,!0)])]),_:1},8,[`href`]))}},S={key:0,class:`-my-3 divide-y`},C={__name:`Upcoming`,props:{events:{type:Array,required:!0}},setup(o){return(c,l)=>(r(),n(g,{title:`Termine`,"action-label":`Alle Termine`,"action-href":`/termine`},{default:e(()=>[o.events.length?(r(),i(`div`,S,[(r(!0),i(t,null,a(o.events,e=>(r(),n(x,{key:e.id,event:e},null,8,[`event`]))),128))])):(r(),n(p,{key:1,icon:s(f),title:`Keine anstehenden Termine`,class:`py-6`},null,8,[`icon`]))]),_:1}))}};export{C as default};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Cn as e,J as t,Wt as n,Zt as r,at as i,ir as a,sr as o}from"./app-DJnl8SxL.js";import{m as s,n as c,r as l}from"./BrandLogo-B9oA1DG4.js";var u=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,d=l,f=(e,t)=>n=>{if(t?.variants==null)return d(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=u(t)||u(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return d(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},p=i({__name:`Button`,props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:`button`}},setup(i){let l=i;return(u,d)=>(n(),t(a(s),{"data-slot":`button`,"data-variant":i.variant,"data-size":i.size,as:i.as,"as-child":i.asChild,class:o(a(c)(a(m)({variant:i.variant,size:i.size}),l.class))},{default:e(()=>[r(u.$slots,`default`)]),_:3},8,[`data-variant`,`data-size`,`as`,`as-child`,`class`]))}}),m=f(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});export{p as t};
|
||||
import{Cn as e,J as t,Wt as n,Zt as r,at as i,ir as a,sr as o}from"./app-D9PUXL84.js";import{m as s,n as c,r as l}from"./BrandLogo-CDbPNVYz.js";var u=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,d=l,f=(e,t)=>n=>{if(t?.variants==null)return d(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=u(t)||u(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return d(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},p=i({__name:`Button`,props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:`button`}},setup(i){let l=i;return(u,d)=>(n(),t(a(s),{"data-slot":`button`,"data-variant":i.variant,"data-size":i.size,as:i.as,"as-child":i.asChild,class:o(a(c)(a(m)({variant:i.variant,size:i.size}),l.class))},{default:e(()=>[r(u.$slots,`default`)]),_:3},8,[`data-variant`,`data-size`,`as`,`as-child`,`class`]))}}),m=f(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});export{p as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{Jn as e,K as t,Rt as n,Zn as r,ir as i,jt as a,nr as o,pt as s,vn as c,vt as l,yn as u}from"./app-DJnl8SxL.js";import{a as d,c as f,d as p,i as m,o as h,p as g,s as _,u as v}from"./BrandLogo-B9oA1DG4.js";var y=d?window:void 0;d&&window.document,d&&window.navigator,d&&window.location;function b(e){let t=o(e);return t?.$el??t}function x(...e){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=t(()=>{let t=v(o(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return g(()=>[r.value?.map(e=>b(e))??[y].filter(e=>e!=null),v(o(r.value?e[1]:e[0])),v(i(r.value?e[2]:e[1])),o(r.value?e[3]:e[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=_(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function S(){let e=r(!1),t=s();return t&&n(()=>{e.value=!0},t),e}function C(e){let n=S();return t(()=>(n.value,!!e()))}var w=Symbol(`vueuse-ssr-width`);function T(){let e=l()?m(w,null):null;return typeof e==`number`?e:void 0}function E(e,n={}){let{window:i=y,ssrWidth:a=T()}=n,s=C(()=>i&&`matchMedia`in i&&typeof i.matchMedia==`function`),c=r(typeof a==`number`),l=r(),d=r(!1);return u(()=>{if(c.value){c.value=!s.value;let t=o(e).split(`,`);d.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=!!(n||r);return n&&i&&(i=a>=f(n[1])),r&&i&&(i=a<=f(r[1])),t?!i:i});return}s.value&&(l.value=i.matchMedia(o(e)),d.value=l.value.matches)}),x(l,`change`,e=>{d.value=e.matches},{passive:!0}),t(()=>d.value)}function D(e){return JSON.parse(JSON.stringify(e))}function O(e,n,r={}){let{window:i=y,...a}=r,s,l=C(()=>i&&`ResizeObserver`in i),u=()=>{s&&=(s.disconnect(),void 0)},d=t(()=>{let t=o(e);return Array.isArray(t)?t.map(e=>b(e)):[b(t)]}),f=c(d,e=>{if(u(),l.value&&i){s=new ResizeObserver(n);for(let t of e)t instanceof Element&&s.observe(t,a)}},{immediate:!0,flush:`post`}),m=()=>{u(),f()};return p(m),{isSupported:l,stop:m}}function k(n,r,i,o={}){var l,u;let{clone:d=!1,passive:f=!1,eventName:p,deep:m=!1,defaultValue:g,shouldEmit:_}=o,v=s(),y=i||v?.emit||(v==null||(l=v.$emit)==null?void 0:l.bind(v))||(v==null||(u=v.proxy)==null||(u=u.$emit)==null?void 0:u.bind(v?.proxy)),b=p;r||=`modelValue`,b||=`update:${r.toString()}`;let x=e=>d?typeof d==`function`?d(e):D(e):e,S=()=>h(n[r])?x(n[r]):g,C=e=>{_?_(e)&&y(b,e):y(b,e)};if(f){let t=S(),i=e(t),o=!1;return c(()=>n[r],e=>{o||(o=!0,i.value=x(e),a(()=>o=!1))}),c(i,e=>{!o&&(e!==n[r]||m)&&C(e)},{deep:m}),i}return t({get(){return S()},set(e){C(e)}})}export{k as i,E as n,O as r,x as t};
|
||||
import{Jn as e,K as t,Rt as n,Zn as r,ir as i,jt as a,nr as o,pt as s,vn as c,vt as l,yn as u}from"./app-D9PUXL84.js";import{a as d,c as f,d as p,i as m,o as h,p as g,s as _,u as v}from"./BrandLogo-CDbPNVYz.js";var y=d?window:void 0;d&&window.document,d&&window.navigator,d&&window.location;function b(e){let t=o(e);return t?.$el??t}function x(...e){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=t(()=>{let t=v(o(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return g(()=>[r.value?.map(e=>b(e))??[y].filter(e=>e!=null),v(o(r.value?e[1]:e[0])),v(i(r.value?e[2]:e[1])),o(r.value?e[3]:e[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=_(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function S(){let e=r(!1),t=s();return t&&n(()=>{e.value=!0},t),e}function C(e){let n=S();return t(()=>(n.value,!!e()))}var w=Symbol(`vueuse-ssr-width`);function T(){let e=l()?m(w,null):null;return typeof e==`number`?e:void 0}function E(e,n={}){let{window:i=y,ssrWidth:a=T()}=n,s=C(()=>i&&`matchMedia`in i&&typeof i.matchMedia==`function`),c=r(typeof a==`number`),l=r(),d=r(!1);return u(()=>{if(c.value){c.value=!s.value;let t=o(e).split(`,`);d.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=!!(n||r);return n&&i&&(i=a>=f(n[1])),r&&i&&(i=a<=f(r[1])),t?!i:i});return}s.value&&(l.value=i.matchMedia(o(e)),d.value=l.value.matches)}),x(l,`change`,e=>{d.value=e.matches},{passive:!0}),t(()=>d.value)}function D(e){return JSON.parse(JSON.stringify(e))}function O(e,n,r={}){let{window:i=y,...a}=r,s,l=C(()=>i&&`ResizeObserver`in i),u=()=>{s&&=(s.disconnect(),void 0)},d=t(()=>{let t=o(e);return Array.isArray(t)?t.map(e=>b(e)):[b(t)]}),f=c(d,e=>{if(u(),l.value&&i){s=new ResizeObserver(n);for(let t of e)t instanceof Element&&s.observe(t,a)}},{immediate:!0,flush:`post`}),m=()=>{u(),f()};return p(m),{isSupported:l,stop:m}}function k(n,r,i,o={}){var l,u;let{clone:d=!1,passive:f=!1,eventName:p,deep:m=!1,defaultValue:g,shouldEmit:_}=o,v=s(),y=i||v?.emit||(v==null||(l=v.$emit)==null?void 0:l.bind(v))||(v==null||(u=v.proxy)==null||(u=u.$emit)==null?void 0:u.bind(v?.proxy)),b=p;r||=`modelValue`,b||=`update:${r.toString()}`;let x=e=>d?typeof d==`function`?d(e):D(e):e,S=()=>h(n[r])?x(n[r]):g,C=e=>{_?_(e)&&y(b,e):y(b,e)};if(f){let t=S(),i=e(t),o=!1;return c(()=>n[r],e=>{o||(o=!0,i.value=x(e),a(()=>o=!1))}),c(i,e=>{!o&&(e!==n[r]||m)&&C(e)},{deep:m}),i}return t({get(){return S()},set(e){C(e)}})}export{k as i,E as n,O as r,x as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]});export{t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]}),n=e({name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]});export{t as n,n as t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]}),n=e({name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]});export{t as n,n as t};
|
||||
|
|
@ -1 +1 @@
|
|||
import{M as e}from"./BrandLogo-B9oA1DG4.js";var t=e({name:`video`,size:24,node:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]});export{t};
|
||||
import{M as e}from"./BrandLogo-CDbPNVYz.js";var t=e({name:`video`,size:24,node:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]});export{t};
|
||||
|
|
@ -1,173 +1,173 @@
|
|||
{
|
||||
"_AppLayout-1ldLchM-.js": {
|
||||
"file": "assets/AppLayout-1ldLchM-.js",
|
||||
"_AppLayout-J4hJMC50.js": {
|
||||
"file": "assets/AppLayout-J4hJMC50.js",
|
||||
"name": "AppLayout",
|
||||
"imports": [
|
||||
"_RovingFocusGroup-CqmMkMQP.js",
|
||||
"_RovingFocusGroup-CmPAKGUw.js",
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_BrandLogo-B9oA1DG4.js": {
|
||||
"file": "assets/BrandLogo-B9oA1DG4.js",
|
||||
"_BrandLogo-CDbPNVYz.js": {
|
||||
"file": "assets/BrandLogo-CDbPNVYz.js",
|
||||
"name": "BrandLogo",
|
||||
"imports": [
|
||||
"resources/js/app.js"
|
||||
]
|
||||
},
|
||||
"_EmptyState-CFBmx8ne.js": {
|
||||
"file": "assets/EmptyState-CFBmx8ne.js",
|
||||
"_EmptyState-CEUealqa.js": {
|
||||
"file": "assets/EmptyState-CEUealqa.js",
|
||||
"name": "EmptyState",
|
||||
"imports": [
|
||||
"resources/js/app.js"
|
||||
]
|
||||
},
|
||||
"_EventDateBlock-CfSpm6m9.js": {
|
||||
"file": "assets/EventDateBlock-CfSpm6m9.js",
|
||||
"_EventDateBlock-Be3FgmM8.js": {
|
||||
"file": "assets/EventDateBlock-Be3FgmM8.js",
|
||||
"name": "EventDateBlock",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_format-Dlm0nTI_.js"
|
||||
]
|
||||
},
|
||||
"_FormField-BmjgU2Yw.js": {
|
||||
"file": "assets/FormField-BmjgU2Yw.js",
|
||||
"_FormField-Cda3G9pl.js": {
|
||||
"file": "assets/FormField-Cda3G9pl.js",
|
||||
"name": "FormField",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_dist-CQsPCHOQ.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_dist-CkfUV8Dq.js"
|
||||
]
|
||||
},
|
||||
"_GuestLayout-BQuErbaI.js": {
|
||||
"file": "assets/GuestLayout-BQuErbaI.js",
|
||||
"_GuestLayout-D98hTvh6.js": {
|
||||
"file": "assets/GuestLayout-D98hTvh6.js",
|
||||
"name": "GuestLayout",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_NewsCard-B-l5uZ4h.js": {
|
||||
"file": "assets/NewsCard-B-l5uZ4h.js",
|
||||
"_NewsCard-JuwhjoRm.js": {
|
||||
"file": "assets/NewsCard-JuwhjoRm.js",
|
||||
"name": "NewsCard",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_NewsImage-DyRK4fmY.js",
|
||||
"_NewsImage-lWXKTpJ-.js",
|
||||
"_format-Dlm0nTI_.js"
|
||||
]
|
||||
},
|
||||
"_NewsImage-DyRK4fmY.js": {
|
||||
"file": "assets/NewsImage-DyRK4fmY.js",
|
||||
"_NewsImage-lWXKTpJ-.js": {
|
||||
"file": "assets/NewsImage-lWXKTpJ-.js",
|
||||
"name": "NewsImage",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_Panel-D5zuY1_v.js": {
|
||||
"file": "assets/Panel-D5zuY1_v.js",
|
||||
"_Panel-BEYQbw9Y.js": {
|
||||
"file": "assets/Panel-BEYQbw9Y.js",
|
||||
"name": "Panel",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_chevron-right-CAXGr-zo.js"
|
||||
"_chevron-right-ZwiJ5NHr.js"
|
||||
]
|
||||
},
|
||||
"_RovingFocusGroup-CqmMkMQP.js": {
|
||||
"file": "assets/RovingFocusGroup-CqmMkMQP.js",
|
||||
"_RovingFocusGroup-CmPAKGUw.js": {
|
||||
"file": "assets/RovingFocusGroup-CmPAKGUw.js",
|
||||
"name": "RovingFocusGroup",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_arrow-left-CAaEosyK.js": {
|
||||
"file": "assets/arrow-left-CAaEosyK.js",
|
||||
"_arrow-left-DNv6qC8D.js": {
|
||||
"file": "assets/arrow-left-DNv6qC8D.js",
|
||||
"name": "arrow-left",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_arrow-right-c2thy74C.js": {
|
||||
"file": "assets/arrow-right-c2thy74C.js",
|
||||
"_arrow-right-BJfvlG8u.js": {
|
||||
"file": "assets/arrow-right-BJfvlG8u.js",
|
||||
"name": "arrow-right",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_building-complex-CCnkmD29.js": {
|
||||
"file": "assets/building-complex-CCnkmD29.js",
|
||||
"_building-complex-C0ndpa4F.js": {
|
||||
"file": "assets/building-complex-C0ndpa4F.js",
|
||||
"name": "building-complex",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_button-9_XTGiWz.js": {
|
||||
"file": "assets/button-9_XTGiWz.js",
|
||||
"_button-D-CgZku8.js": {
|
||||
"file": "assets/button-D-CgZku8.js",
|
||||
"name": "button",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_calendar-days-Q7KBeYQV.js": {
|
||||
"file": "assets/calendar-days-Q7KBeYQV.js",
|
||||
"_calendar-days-CfqaFZdn.js": {
|
||||
"file": "assets/calendar-days-CfqaFZdn.js",
|
||||
"name": "calendar-days",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_chevron-left-D2uxffyU.js": {
|
||||
"file": "assets/chevron-left-D2uxffyU.js",
|
||||
"_chevron-left-Dwvm8_Wb.js": {
|
||||
"file": "assets/chevron-left-Dwvm8_Wb.js",
|
||||
"name": "chevron-left",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_chevron-right-CAXGr-zo.js": {
|
||||
"file": "assets/chevron-right-CAXGr-zo.js",
|
||||
"_chevron-right-ZwiJ5NHr.js": {
|
||||
"file": "assets/chevron-right-ZwiJ5NHr.js",
|
||||
"name": "chevron-right",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_clock-7Lzug1Ti.js": {
|
||||
"file": "assets/clock-7Lzug1Ti.js",
|
||||
"_clock-Ch_g8lOY.js": {
|
||||
"file": "assets/clock-Ch_g8lOY.js",
|
||||
"name": "clock",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_dist-CQsPCHOQ.js": {
|
||||
"file": "assets/dist-CQsPCHOQ.js",
|
||||
"_dist-CkfUV8Dq.js": {
|
||||
"file": "assets/dist-CkfUV8Dq.js",
|
||||
"name": "dist",
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_format-Dlm0nTI_.js": {
|
||||
"file": "assets/format-Dlm0nTI_.js",
|
||||
"name": "format"
|
||||
},
|
||||
"_map-pin-A7DprnXY.js": {
|
||||
"file": "assets/map-pin-A7DprnXY.js",
|
||||
"_map-pin-Cw1BHrDt.js": {
|
||||
"file": "assets/map-pin-Cw1BHrDt.js",
|
||||
"name": "map-pin",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_phone-CUH1yCi5.js": {
|
||||
"file": "assets/phone-CUH1yCi5.js",
|
||||
"_phone-RcbzuVt6.js": {
|
||||
"file": "assets/phone-RcbzuVt6.js",
|
||||
"name": "phone",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"_video-RhaN0-fc.js": {
|
||||
"file": "assets/video-RhaN0-fc.js",
|
||||
"_video-oLaYKvia.js": {
|
||||
"file": "assets/video-oLaYKvia.js",
|
||||
"name": "video",
|
||||
"imports": [
|
||||
"_BrandLogo-B9oA1DG4.js"
|
||||
"_BrandLogo-CDbPNVYz.js"
|
||||
]
|
||||
},
|
||||
"node_modules/@fontsource-variable/inter/files/inter-cyrillic-ext-wght-normal.woff2": {
|
||||
|
|
@ -199,124 +199,124 @@
|
|||
"src": "node_modules/@fontsource-variable/inter/files/inter-vietnamese-wght-normal.woff2"
|
||||
},
|
||||
"plugins-core/events/resources/js/pages/Index.vue": {
|
||||
"file": "assets/Index-M1eUDNcS.js",
|
||||
"file": "assets/Index-D3fhEYWw.js",
|
||||
"name": "Index",
|
||||
"src": "plugins-core/events/resources/js/pages/Index.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_calendar-days-Q7KBeYQV.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_map-pin-A7DprnXY.js",
|
||||
"_video-RhaN0-fc.js",
|
||||
"_EmptyState-CFBmx8ne.js",
|
||||
"_calendar-days-CfqaFZdn.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_map-pin-Cw1BHrDt.js",
|
||||
"_video-oLaYKvia.js",
|
||||
"_EmptyState-CEUealqa.js",
|
||||
"_format-Dlm0nTI_.js",
|
||||
"_EventDateBlock-CfSpm6m9.js"
|
||||
"_EventDateBlock-Be3FgmM8.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/events/resources/js/pages/Show.vue": {
|
||||
"file": "assets/Show-CXMFmAe_.js",
|
||||
"file": "assets/Show-ChZKAb41.js",
|
||||
"name": "Show",
|
||||
"src": "plugins-core/events/resources/js/pages/Show.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_arrow-left-CAaEosyK.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_clock-7Lzug1Ti.js",
|
||||
"_map-pin-A7DprnXY.js",
|
||||
"_video-RhaN0-fc.js",
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_arrow-left-DNv6qC8D.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_clock-Ch_g8lOY.js",
|
||||
"_map-pin-Cw1BHrDt.js",
|
||||
"_video-oLaYKvia.js",
|
||||
"_format-Dlm0nTI_.js",
|
||||
"_EventDateBlock-CfSpm6m9.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_EventDateBlock-Be3FgmM8.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/events/resources/js/widgets/Upcoming.vue": {
|
||||
"file": "assets/Upcoming-BETeUWER.js",
|
||||
"file": "assets/Upcoming-BjQG08tM.js",
|
||||
"name": "Upcoming",
|
||||
"src": "plugins-core/events/resources/js/widgets/Upcoming.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_calendar-days-Q7KBeYQV.js",
|
||||
"_EmptyState-CFBmx8ne.js",
|
||||
"_calendar-days-CfqaFZdn.js",
|
||||
"_EmptyState-CEUealqa.js",
|
||||
"_format-Dlm0nTI_.js",
|
||||
"_EventDateBlock-CfSpm6m9.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_EventDateBlock-Be3FgmM8.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/news/resources/js/pages/Index.vue": {
|
||||
"file": "assets/Index-CinqnjLj.js",
|
||||
"file": "assets/Index-CQBzMk-Y.js",
|
||||
"name": "Index",
|
||||
"src": "plugins-core/news/resources/js/pages/Index.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_chevron-left-D2uxffyU.js",
|
||||
"_chevron-right-CAXGr-zo.js",
|
||||
"_NewsImage-DyRK4fmY.js",
|
||||
"_EmptyState-CFBmx8ne.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_NewsCard-B-l5uZ4h.js"
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_chevron-left-Dwvm8_Wb.js",
|
||||
"_chevron-right-ZwiJ5NHr.js",
|
||||
"_NewsImage-lWXKTpJ-.js",
|
||||
"_EmptyState-CEUealqa.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_NewsCard-JuwhjoRm.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/news/resources/js/pages/Show.vue": {
|
||||
"file": "assets/Show-C7h-pibb.js",
|
||||
"file": "assets/Show-Dl_SfsiZ.js",
|
||||
"name": "Show",
|
||||
"src": "plugins-core/news/resources/js/pages/Show.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_arrow-left-CAaEosyK.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_clock-7Lzug1Ti.js",
|
||||
"_NewsImage-DyRK4fmY.js",
|
||||
"_arrow-left-DNv6qC8D.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_clock-Ch_g8lOY.js",
|
||||
"_NewsImage-lWXKTpJ-.js",
|
||||
"_format-Dlm0nTI_.js",
|
||||
"_NewsCard-B-l5uZ4h.js"
|
||||
"_NewsCard-JuwhjoRm.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/news/resources/js/widgets/Areas.vue": {
|
||||
"file": "assets/Areas-Dr9rKjp6.js",
|
||||
"file": "assets/Areas-Bxp3LBWd.js",
|
||||
"name": "Areas",
|
||||
"src": "plugins-core/news/resources/js/widgets/Areas.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_Panel-D5zuY1_v.js",
|
||||
"_NewsCard-B-l5uZ4h.js"
|
||||
"_Panel-BEYQbw9Y.js",
|
||||
"_NewsCard-JuwhjoRm.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/news/resources/js/widgets/Hero.vue": {
|
||||
"file": "assets/Hero-oumSJF6b.js",
|
||||
"file": "assets/Hero-CDYVZS06.js",
|
||||
"name": "Hero",
|
||||
"src": "plugins-core/news/resources/js/widgets/Hero.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_arrow-right-c2thy74C.js",
|
||||
"_chevron-left-D2uxffyU.js",
|
||||
"_chevron-right-CAXGr-zo.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_arrow-right-BJfvlG8u.js",
|
||||
"_chevron-left-Dwvm8_Wb.js",
|
||||
"_chevron-right-ZwiJ5NHr.js"
|
||||
]
|
||||
},
|
||||
"plugins-core/news/resources/js/widgets/Latest.vue": {
|
||||
"file": "assets/Latest-rEL3O0dw.js",
|
||||
"file": "assets/Latest-5SZrR9vP.js",
|
||||
"name": "Latest",
|
||||
"src": "plugins-core/news/resources/js/widgets/Latest.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_NewsImage-DyRK4fmY.js",
|
||||
"_EmptyState-CFBmx8ne.js",
|
||||
"_NewsImage-lWXKTpJ-.js",
|
||||
"_EmptyState-CEUealqa.js",
|
||||
"_format-Dlm0nTI_.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"resources/js/app.js": {
|
||||
"file": "assets/app-DJnl8SxL.js",
|
||||
"file": "assets/app-D9PUXL84.js",
|
||||
"name": "app",
|
||||
"src": "resources/js/app.js",
|
||||
"isEntry": true,
|
||||
|
|
@ -347,55 +347,55 @@
|
|||
]
|
||||
},
|
||||
"resources/js/pages/Auth/ForgotPassword.vue": {
|
||||
"file": "assets/ForgotPassword-D94Q6-9V.js",
|
||||
"file": "assets/ForgotPassword-BkpbNdQ7.js",
|
||||
"name": "ForgotPassword",
|
||||
"src": "resources/js/pages/Auth/ForgotPassword.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_arrow-left-CAaEosyK.js",
|
||||
"_FormField-BmjgU2Yw.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_GuestLayout-BQuErbaI.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_arrow-left-DNv6qC8D.js",
|
||||
"_FormField-Cda3G9pl.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_GuestLayout-D98hTvh6.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/Auth/Login.vue": {
|
||||
"file": "assets/Login-DmnB-AB2.js",
|
||||
"file": "assets/Login-DdSimhdH.js",
|
||||
"name": "Login",
|
||||
"src": "resources/js/pages/Auth/Login.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_RovingFocusGroup-CqmMkMQP.js",
|
||||
"_RovingFocusGroup-CmPAKGUw.js",
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_FormField-BmjgU2Yw.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_GuestLayout-BQuErbaI.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_FormField-Cda3G9pl.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_GuestLayout-D98hTvh6.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/Auth/ResetPassword.vue": {
|
||||
"file": "assets/ResetPassword-BxQrbGZi.js",
|
||||
"file": "assets/ResetPassword-2uBM17XM.js",
|
||||
"name": "ResetPassword",
|
||||
"src": "resources/js/pages/Auth/ResetPassword.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_FormField-BmjgU2Yw.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_GuestLayout-BQuErbaI.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_FormField-Cda3G9pl.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_GuestLayout-D98hTvh6.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/Dashboard.vue": {
|
||||
"file": "assets/Dashboard-CFDctOAW.js",
|
||||
"file": "assets/Dashboard-CBKZpdbo.js",
|
||||
"name": "Dashboard",
|
||||
"src": "resources/js/pages/Dashboard.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_dist-CQsPCHOQ.js"
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_dist-CkfUV8Dq.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"resources/js/widgets/Greeting.vue",
|
||||
|
|
@ -410,110 +410,110 @@
|
|||
]
|
||||
},
|
||||
"resources/js/pages/People/Index.vue": {
|
||||
"file": "assets/Index-DeGPLaWM.js",
|
||||
"file": "assets/Index-BDGjS53w.js",
|
||||
"name": "Index",
|
||||
"src": "resources/js/pages/People/Index.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_chevron-left-D2uxffyU.js",
|
||||
"_chevron-right-CAXGr-zo.js",
|
||||
"_phone-CUH1yCi5.js",
|
||||
"_button-9_XTGiWz.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_chevron-left-Dwvm8_Wb.js",
|
||||
"_chevron-right-ZwiJ5NHr.js",
|
||||
"_phone-RcbzuVt6.js",
|
||||
"_button-D-CgZku8.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/Profile/Edit.vue": {
|
||||
"file": "assets/Edit-DEVJjjGl.js",
|
||||
"file": "assets/Edit-UYM5QKj8.js",
|
||||
"name": "Edit",
|
||||
"src": "resources/js/pages/Profile/Edit.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_FormField-BmjgU2Yw.js",
|
||||
"_dist-CQsPCHOQ.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_FormField-Cda3G9pl.js",
|
||||
"_dist-CkfUV8Dq.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"resources/js/pages/Profile/Show.vue": {
|
||||
"file": "assets/Show-C-IWbkUU.js",
|
||||
"file": "assets/Show-Cf6iBZek.js",
|
||||
"name": "Show",
|
||||
"src": "resources/js/pages/Profile/Show.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_building-complex-CCnkmD29.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_phone-CUH1yCi5.js",
|
||||
"_map-pin-A7DprnXY.js",
|
||||
"_button-9_XTGiWz.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_building-complex-C0ndpa4F.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_phone-RcbzuVt6.js",
|
||||
"_map-pin-Cw1BHrDt.js",
|
||||
"_button-D-CgZku8.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"resources/js/widgets/Greeting.vue": {
|
||||
"file": "assets/Greeting-BcYAXPh9.js",
|
||||
"file": "assets/Greeting-CzEgARgW.js",
|
||||
"name": "Greeting",
|
||||
"src": "resources/js/widgets/Greeting.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_AppLayout-1ldLchM-.js"
|
||||
"_AppLayout-J4hJMC50.js"
|
||||
]
|
||||
},
|
||||
"resources/js/widgets/NewColleagues.vue": {
|
||||
"file": "assets/NewColleagues-JGWMoXS3.js",
|
||||
"file": "assets/NewColleagues-B3Q3Qc0s.js",
|
||||
"name": "NewColleagues",
|
||||
"src": "resources/js/widgets/NewColleagues.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"resources/js/widgets/PeopleSearch.vue": {
|
||||
"file": "assets/PeopleSearch-BcXAH_-c.js",
|
||||
"file": "assets/PeopleSearch-BAdpyXpJ.js",
|
||||
"name": "PeopleSearch",
|
||||
"src": "resources/js/widgets/PeopleSearch.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_arrow-right-c2thy74C.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_Panel-D5zuY1_v.js"
|
||||
"_arrow-right-BJfvlG8u.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_Panel-BEYQbw9Y.js"
|
||||
]
|
||||
},
|
||||
"resources/js/widgets/ProfileIncomplete.vue": {
|
||||
"file": "assets/ProfileIncomplete-CWirgl8s.js",
|
||||
"file": "assets/ProfileIncomplete-xq3jzNJa.js",
|
||||
"name": "ProfileIncomplete",
|
||||
"src": "resources/js/widgets/ProfileIncomplete.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_AppLayout-1ldLchM-.js"
|
||||
"_AppLayout-J4hJMC50.js"
|
||||
]
|
||||
},
|
||||
"resources/js/widgets/QuickLinks.vue": {
|
||||
"file": "assets/QuickLinks-CiA26-F8.js",
|
||||
"file": "assets/QuickLinks-BzvhDVAx.js",
|
||||
"name": "QuickLinks",
|
||||
"src": "resources/js/widgets/QuickLinks.vue",
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"resources/js/app.js",
|
||||
"_BrandLogo-B9oA1DG4.js",
|
||||
"_building-complex-CCnkmD29.js",
|
||||
"_calendar-days-Q7KBeYQV.js",
|
||||
"_AppLayout-1ldLchM-.js",
|
||||
"_chevron-left-D2uxffyU.js",
|
||||
"_chevron-right-CAXGr-zo.js",
|
||||
"_clock-7Lzug1Ti.js",
|
||||
"_phone-CUH1yCi5.js",
|
||||
"_dist-CQsPCHOQ.js"
|
||||
"_BrandLogo-CDbPNVYz.js",
|
||||
"_building-complex-C0ndpa4F.js",
|
||||
"_calendar-days-CfqaFZdn.js",
|
||||
"_AppLayout-J4hJMC50.js",
|
||||
"_chevron-left-Dwvm8_Wb.js",
|
||||
"_chevron-right-ZwiJ5NHr.js",
|
||||
"_clock-Ch_g8lOY.js",
|
||||
"_phone-RcbzuVt6.js",
|
||||
"_dist-CkfUV8Dq.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@ defineProps({
|
|||
<UserRoundPen class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Profil bearbeiten
|
||||
</Link>
|
||||
<a v-if="user.is_admin" href="/admin" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<a v-if="user.can_admin" href="/admin" class="flex flex-col items-center gap-2 px-2 py-4 text-center text-xs font-medium text-foreground/80 hover:bg-accent hover:text-foreground">
|
||||
<Settings class="size-5 text-brand-text" :stroke-width="1.75" />
|
||||
Administration
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ const themeOptions = [
|
|||
</Link>
|
||||
|
||||
<a
|
||||
v-if="user.is_admin"
|
||||
v-if="user.can_admin"
|
||||
href="/admin"
|
||||
class="grid size-10 place-items-center rounded-md text-foreground/70 hover:bg-accent hover:text-foreground"
|
||||
aria-label="Administration"
|
||||
|
|
@ -141,7 +141,7 @@ const themeOptions = [
|
|||
<DropdownMenuItem as-child>
|
||||
<Link href="/profil/bearbeiten"><UserRoundPen /> Profil bearbeiten</Link>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem v-if="user.is_admin" as-child>
|
||||
<DropdownMenuItem v-if="user.can_admin" as-child>
|
||||
<a href="/admin"><Settings /> Administration</a>
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuSeparator />
|
||||
|
|
|
|||
75
resources/views/filament/pages/permission-checker.blade.php
Normal file
75
resources/views/filament/pages/permission-checker.blade.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<x-filament-panels::page>
|
||||
<style>
|
||||
.ih-results { display: grid; gap: .25rem; margin-top: .5rem; }
|
||||
.ih-result { text-align: left; padding: .5rem .75rem; border-radius: .5rem; font-size: .875rem; }
|
||||
.ih-result:hover { background: rgb(243 244 246); }
|
||||
.ih-table { width: 100%; font-size: .875rem; border-collapse: collapse; }
|
||||
.ih-table th { text-align: left; font-weight: 500; color: rgb(107 114 128); padding: .375rem .75rem .375rem 0; }
|
||||
.ih-table td { padding: .5rem .75rem .5rem 0; border-top: 1px solid rgb(243 244 246); }
|
||||
.ih-muted { color: rgb(107 114 128); font-size: .875rem; }
|
||||
.dark .ih-result:hover { background: rgb(31 41 55); }
|
||||
.dark .ih-table td { border-color: rgb(55 65 81); }
|
||||
.dark .ih-muted, .dark .ih-table th { color: rgb(156 163 175); }
|
||||
</style>
|
||||
|
||||
<x-filament::section heading="Person auswählen">
|
||||
<x-filament::input.wrapper>
|
||||
<x-filament::input type="search" wire:model.live.debounce.300ms="search" placeholder="Name oder E-Mail …" />
|
||||
</x-filament::input.wrapper>
|
||||
@if ($results->isNotEmpty())
|
||||
<div class="ih-results">
|
||||
@foreach ($results as $result)
|
||||
<button type="button" class="ih-result" wire:click="selectUser({{ $result->id }})">
|
||||
<strong>{{ $result->name }}</strong> <span class="ih-muted">{{ $result->email }}</span>
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
|
||||
@if ($user)
|
||||
<x-filament::section :heading="$user->name" :description="$user->email.($user->is_active ? '' : ' · deaktiviert – hat keinerlei Rechte')">
|
||||
<p class="ih-muted">Admin-Bereich: <strong>{{ $canAdmin ? 'ja' : 'nein' }}</strong></p>
|
||||
</x-filament::section>
|
||||
|
||||
<x-filament::section heading="Rollen">
|
||||
@forelse ($roles as $role)
|
||||
<x-filament::badge :color="$role->source === 'manual' ? 'gray' : 'info'" style="margin: 0 .375rem .375rem 0; display: inline-flex">
|
||||
{{ $role->name }} · {{ $role->source === 'manual' ? 'manuell' : 'über Gruppe '.$role->source_ref }}
|
||||
</x-filament::badge>
|
||||
@empty
|
||||
<p class="ih-muted">Keine Rollen – die Person kann das Portal nutzen, hat aber keine besonderen Rechte.</p>
|
||||
@endforelse
|
||||
</x-filament::section>
|
||||
|
||||
<x-filament::section heading="Globale Rechte">
|
||||
@if ($global->isEmpty())
|
||||
<p class="ih-muted">Keine.</p>
|
||||
@else
|
||||
<table class="ih-table">
|
||||
<thead><tr><th>Recht</th><th>über Rolle</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach ($global as $grant)
|
||||
<tr><td>{{ $grant['label'] }}</td><td>{{ $grant['role'] }}</td></tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
|
||||
<x-filament::section heading="Rechte für einzelne Objekte">
|
||||
@if ($objects->isEmpty())
|
||||
<p class="ih-muted">Keine.</p>
|
||||
@else
|
||||
<table class="ih-table">
|
||||
<thead><tr><th>Recht</th><th>für</th><th>über Rolle</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach ($objects as $grant)
|
||||
<tr><td>{{ $grant['label'] }}</td><td>{{ $grant['object'] }}</td><td>{{ $grant['role'] }}</td></tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
@endif
|
||||
</x-filament-panels::page>
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue