TenantAtlas/apps/platform/resources/views/filament/widgets/tenant/triage-arrival-continuity.blade.php
2026-04-09 23:29:20 +02:00

98 lines
4.3 KiB
PHP

@php
/** @var ?\App\Support\PortfolioTriage\PortfolioArrivalContext $context */
@endphp
<div>
@if ($context)
@php
$familyColor = $context->concernFamily === 'backup_health' ? 'danger' : 'warning';
$stateColor = match ($context->concernState) {
'absent' => 'danger',
'stale', 'degraded', 'weakened', 'unvalidated' => 'warning',
default => 'gray',
};
@endphp
<x-filament::section>
<x-slot name="heading">
<span class="flex items-center gap-2">
<x-filament::icon
icon="heroicon-m-arrow-trending-up"
class="h-5 w-5 text-warning-500"
/>
Triage arrival
</span>
</x-slot>
<div class="flex flex-col gap-4">
<div class="flex flex-wrap items-start justify-between gap-4">
<div class="min-w-0 flex-1">
<div class="flex flex-wrap gap-2">
<x-filament::badge color="gray" size="sm">
{{ $context->sourceLabel() }}
</x-filament::badge>
<x-filament::badge :color="$familyColor" size="sm">
{{ $context->concernFamilyLabel() }}
</x-filament::badge>
<x-filament::badge :color="$stateColor" size="sm">
{{ $context->concernStateLabel() }}
</x-filament::badge>
</div>
<div class="mt-3 text-sm font-semibold text-gray-950 dark:text-white">
Why this tenant opened
</div>
<div class="mt-1 text-sm leading-relaxed text-gray-600 dark:text-gray-300">
{{ $context->arrivalSummary }}
</div>
@if (filled($context->currentTruthDelta))
<div class="mt-3 rounded-lg bg-gray-50 p-3 text-sm text-gray-700 dark:bg-white/5 dark:text-gray-200">
{{ $context->currentTruthDelta }}
</div>
@endif
@if (filled($context->claimBoundary))
<div class="mt-3 text-xs leading-relaxed text-gray-500 dark:text-gray-400">
{{ $context->claimBoundary }}
</div>
@endif
</div>
<div class="flex w-full flex-col gap-2 sm:w-auto sm:min-w-52 sm:items-end">
@if (filled($context->nextStep['url'] ?? null))
<x-filament::button
tag="a"
:href="$context->nextStep['url']"
size="sm"
color="warning"
>
{{ $context->nextStep['label'] }}
</x-filament::button>
@elseif (($context->nextStep['disabled'] ?? false) === true)
<div class="text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400">
{{ $context->nextStep['label'] }}
</div>
@endif
@if (filled($context->returnTarget['url'] ?? null))
<x-filament::link :href="$context->returnTarget['url']" size="sm" class="font-medium">
{{ $context->returnTarget['label'] }}
</x-filament::link>
@endif
@if (filled($context->nextStep['helperText'] ?? null))
<div class="text-xs text-gray-500 dark:text-gray-400">
{{ $context->nextStep['helperText'] }}
</div>
@endif
</div>
</div>
</div>
</x-filament::section>
@endif
</div>