U-C: Kanalkonfigurator (Kanal › Ablauf): Modellwahl nach Kanalprofil (E2/O2), Schritte mit Schalter, Ausführung, Ausführenden und Fristen, Herkunft der Werte, Vorschau; ConfigureChannelProcess; Modell legt Einstellungen fest
Flache Prozessfelder im Kanalformular entfallen als Hauptansicht. Volle Suite 820/820. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d695566a7a
commit
c255783cec
13 files changed
+981
-50
No files matched your search
@@ -2,7 +2,7 @@
|
||||
@php
|
||||
$cell = 'padding:.4rem .5rem;border-bottom:1px solid rgba(128,128,128,.2);vertical-align:top';
|
||||
$muted = 'color:#6b7280;font-size:.8rem';
|
||||
$levels = [\App\Process\ProcessProfile::SYSTEM => 'Grundeinstellung', \App\Process\ProcessProfile::TENANT => 'Ihr Standard', \App\Process\ProcessProfile::PROPERTY => 'Wohnung', \App\Process\ProcessProfile::CHANNEL => 'Portal', \App\Process\ProcessProfile::WEBSITE => 'Webseite', \App\Process\ProcessProfile::CASE_TYPE => 'fest (A6)'];
|
||||
$levels = [\App\Process\ProcessProfile::SYSTEM => 'Grundeinstellung', \App\Process\ProcessProfile::TENANT => 'Ihr Standard', \App\Process\ProcessProfile::PROPERTY => 'Wohnung', \App\Process\ProcessProfile::CHANNEL => 'Portal', \App\Process\ProcessProfile::WEBSITE => 'Webseite', \App\Process\ProcessProfile::CASE_TYPE => 'fest (A6)', \App\Process\ProcessProfile::MODEL => 'Ablaufmodell'];
|
||||
@endphp
|
||||
|
||||
<x-filament::section heading="So lesen Sie diese Übersicht" collapsible collapsed>
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
<x-filament-panels::page>
|
||||
@php
|
||||
$muted = 'color:#6b7280;font-size:.8rem';
|
||||
$card = 'border:1px solid rgba(128,128,128,.3);border-radius:.5rem;padding:.75rem 1rem;margin-bottom:.6rem';
|
||||
$input = 'border:1px solid rgba(128,128,128,.4);border-radius:.375rem;padding:.3rem .45rem;background:transparent';
|
||||
$phases = ['P01' => 'Eingang und Daten', 'P02' => 'Angebot und Verbindlichkeit', 'P03' => 'Abwicklung', 'P04' => 'Aufenthalt', 'P05' => 'Abschluss'];
|
||||
$performers = ['system' => 'System', 'landlord' => 'Sie', 'guest' => 'Gast', 'portal' => 'Portal', 'service_provider' => 'Dienstleister', 'none' => 'niemand'];
|
||||
$draft = $this->drafts[$this->intake];
|
||||
$models = $this->models();
|
||||
$model = $this->model();
|
||||
$steps = $this->steps();
|
||||
$problems = $this->problems();
|
||||
@endphp
|
||||
|
||||
@if (count($this->tabs()) > 1)
|
||||
<div style="display:flex;gap:.5rem">
|
||||
@foreach ($this->tabs() as $key => $label)
|
||||
<x-filament::button :color="$this->intake === $key ? 'primary' : 'gray'" wire:click="$set('intake', '{{ $key }}')">{{ $label }}</x-filament::button>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<x-filament::section :heading="$this->question()" :description="$draft['derived'] ? 'Noch nicht gewählt: abgeleitet aus Ihren bisherigen Einstellungen. Gespeichert wird erst, wenn Sie speichern.' : null">
|
||||
@if ($models === [])
|
||||
<p>Für diesen Kanal ist für diese Eingangsart kein Ablaufmodell freigegeben (Kanalprofil). Vorgänge folgen weiter dem aus den Einstellungen abgeleiteten Ablauf.</p>
|
||||
@endif
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));gap:.6rem" role="radiogroup" aria-label="Ablaufmodell">
|
||||
@foreach ($models as $key => $candidate)
|
||||
<button type="button" role="radio" aria-checked="{{ $draft['model'] === $key ? 'true' : 'false' }}" wire:click="chooseModel('{{ $key }}')"
|
||||
style="{{ $card }};text-align:left;{{ $draft['model'] === $key ? 'border-color:rgb(var(--primary-600));box-shadow:0 0 0 1px rgb(var(--primary-600))' : '' }}">
|
||||
<strong>{{ $candidate::label() }}</strong>
|
||||
<span style="{{ $muted }}"> · {{ implode('/', array_map(fn ($type) => strtoupper($type->value), $candidate::caseTypes())) }}</span>
|
||||
<div style="font-size:.85rem;margin-top:.3rem">{{ $candidate::description() }}</div>
|
||||
</button>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@if (count($model->variants()) > 1)
|
||||
<div style="margin-top:.8rem">
|
||||
<label style="font-size:.9rem">Variante
|
||||
<select wire:model.live="drafts.{{ $this->intake }}.variant" style="{{ $input }};margin-left:.4rem">
|
||||
@foreach ($model->variants() as $variant)
|
||||
<option value="{{ $variant->key }}">{{ $variant->label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
@if ($model->variant($draft['variant'])?->isTesterOnly())
|
||||
<p style="color:#b45309;font-size:.85rem;margin-top:.3rem">Nur im Prozess-Tester verwendbar (Architekturnachweis). Sie können diese Variante mit „Ablauf testen“ durchspielen, aber nicht speichern.</p>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
|
||||
@if ($problems !== [])
|
||||
<x-filament::section heading="Nicht zulässig">
|
||||
<ul style="color:#b91c1c;font-size:.9rem;list-style:disc;padding-left:1.2rem">
|
||||
@foreach ($problems as $problem)<li>{{ $problem }}</li>@endforeach
|
||||
</ul>
|
||||
</x-filament::section>
|
||||
@endif
|
||||
|
||||
<div style="display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:1rem;align-items:start">
|
||||
<div>
|
||||
@foreach (collect($steps)->groupBy('phase') as $phase => $group)
|
||||
<h3 style="font-weight:600;margin:.6rem 0 .3rem">{{ $phases[$phase] ?? $phase }}</h3>
|
||||
@foreach ($group as $index => $step)
|
||||
<div style="{{ $card }};{{ $step['on'] ? '' : 'opacity:.6' }}" wire:key="step-{{ $this->intake }}-{{ $step['module'] }}">
|
||||
<div style="display:flex;justify-content:space-between;gap:.5rem;align-items:center">
|
||||
<strong>{{ $step['label'] }}
|
||||
@if ($step['tester_only'])<span style="color:#b45309;font-size:.75rem"> · nur im Prozess-Tester</span>@endif
|
||||
@if ($step['inserted'])<span style="{{ $muted }}"> · Zusatzschritt der Variante</span>@endif
|
||||
</strong>
|
||||
@if ($step['optional'])
|
||||
<x-filament::button size="xs" :color="($draft['steps'][$step['module']]['on'] ?? true) === false ? 'gray' : 'success'" wire:click="toggleStep('{{ $step['module'] }}')">
|
||||
{{ ($draft['steps'][$step['module']]['on'] ?? true) === false ? 'aus' : 'an' }}
|
||||
</x-filament::button>
|
||||
@else
|
||||
<span style="{{ $muted }}" title="Pflichtschritt – nicht abschaltbar">🔒 Pflicht</span>
|
||||
@endif
|
||||
</div>
|
||||
<div style="font-size:.85rem;margin-top:.25rem">{{ $step['purpose'] }}</div>
|
||||
<div style="{{ $muted }};margin-top:.25rem">
|
||||
Wer: {{ $performers[$step['performer']] ?? $step['performer'] ?? '–' }}
|
||||
@if ($step['waits'] !== []) · kann warten auf: {{ implode(', ', array_map(fn ($wait) => ['guest' => 'Gast', 'portal' => 'Portal', 'landlord' => 'Sie', 'time' => 'Frist'][$wait] ?? $wait, $step['waits'])) }}@endif
|
||||
@if (! $step['on'] && $step['reason']) · <em>übersprungen: {{ $step['reason'] }}</em>@endif
|
||||
@if ($this->expert()) · <code>{{ $step['module'] }}</code> v{{ $step['version'] }}@endif
|
||||
</div>
|
||||
|
||||
@if ($step['mode_setting'] && $step['mode_options'] !== [])
|
||||
<label style="display:block;font-size:.85rem;margin-top:.4rem">Ausführung
|
||||
<select wire:model.live="drafts.{{ $this->intake }}.settings.{{ $step['mode_setting']->value }}" style="{{ $input }};margin-left:.4rem">
|
||||
<option value="">wie Standard</option>
|
||||
@foreach ($step['mode_options'] as $value => $label)<option value="{{ $value }}">{{ $label }}</option>@endforeach
|
||||
</select>
|
||||
<span style="{{ $muted }}">{{ $this->setting($step['mode_setting'], $this->profile())['source'] }}</span>
|
||||
</label>
|
||||
@endif
|
||||
|
||||
@if ($step['performer_setting'] && count($step['performer_options']) > 1)
|
||||
<label style="display:block;font-size:.85rem;margin-top:.4rem">Wer sendet
|
||||
<select wire:model.live="drafts.{{ $this->intake }}.settings.{{ $step['performer_setting']->value }}" style="{{ $input }};margin-left:.4rem">
|
||||
<option value="">wie Standard</option>
|
||||
@foreach ($step['performer_options'] as $value => $label)<option value="{{ $value }}">{{ $label }}</option>@endforeach
|
||||
</select>
|
||||
<span style="{{ $muted }}">im Rahmen des Modells wählbar, ohne Modellwechsel</span>
|
||||
</label>
|
||||
@endif
|
||||
|
||||
@foreach ($step['parameters'] as $parameter)
|
||||
<label style="display:block;font-size:.85rem;margin-top:.4rem">{{ $parameter['question'] }}
|
||||
<input type="text" wire:model.live.debounce.600ms="drafts.{{ $this->intake }}.settings.{{ $parameter['key'] }}" placeholder="{{ $parameter['value'] }}" style="{{ $input }};width:8rem;margin-left:.4rem">
|
||||
<span style="{{ $muted }}">wirksam: {{ $parameter['value'] }} ({{ $parameter['source'] }})</span>
|
||||
@if ($parameter['set'])
|
||||
<button type="button" wire:click="inherit('{{ $parameter['key'] }}')" style="{{ $muted }};text-decoration:underline">auf geerbten Wert zurücksetzen</button>
|
||||
@endif
|
||||
</label>
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
<x-filament::section heading="Vorschau: ein neuer Vorgang" description="Mit den aktuellen, auch ungespeicherten Einstellungen. Es wird nichts gespeichert und nichts ausgeführt.">
|
||||
<ol style="font-size:.85rem;list-style:decimal;padding-left:1.2rem">
|
||||
@foreach ($steps as $step)
|
||||
<li style="{{ $step['on'] ? '' : 'color:#9ca3af;text-decoration:line-through' }}">
|
||||
{{ $step['label'] }}
|
||||
<span style="{{ $muted }}">– {{ $step['on'] ? ($performers[$step['performer']] ?? $step['performer'] ?? '').($step['mode'] ? ', '.(\App\Enums\ProcessingMode::tryFrom($step['mode'])?->getLabel() ?? \App\Enums\DataRequestMode::tryFrom($step['mode'])?->getLabel() ?? $step['mode']) : '') : 'übersprungen: '.$step['reason'] }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ol>
|
||||
<p style="{{ $muted }};margin-top:.6rem">Gilt für neue Vorgänge. Laufende Vorgänge dieses Kanals ({{ $this->runningCases() }}) behalten ihren bisherigen Ablauf.</p>
|
||||
@if (\Illuminate\Support\Facades\Route::has('filament.admin.resources.channels.test'))
|
||||
<x-filament::button tag="a" color="gray" :href="\App\Filament\Resources\Channels\ChannelResource::getUrl('test', ['record' => $this->record, 'intake' => $this->intake])" style="margin-top:.6rem">Ablauf testen</x-filament::button>
|
||||
@endif
|
||||
</x-filament::section>
|
||||
</div>
|
||||
</x-filament-panels::page>
|
||||
Reference in new issue
Block a user