{{ __('admin_incidents.title') }}

{{ __('admin_incidents.subtitle') }}

{{-- Where this ends up. Asked in as many words — "where do I enter something, and where does the status page get its data from" — and nothing on either page said so. The four components measure themselves; what an operator adds here is the part no probe can know. --}}
{{ __('admin_incidents.appears_on') }} {{ __('admin_incidents.open_status') }}
{{-- Open first. This page is opened while something is wrong, and the thing an operator needs is the box to type into. --}} @forelse ($ongoing as $incident)
{{ __("status.incident.impact.{$incident->impact}") }} {{ __('status.incident.stage.'.$incident->stage()) }} @unless ($incident->isPublished()) {{ __('admin_incidents.unpublished') }} @endunless

{{ $incident->title }}

{{ __('status.incident.started') }} {{ $incident->started_at->local()->isoFormat('DD.MM. HH:mm') }} · {{ collect($incident->components)->map(fn ($c) => __("status.component.{$c}"))->join(', ') }}

@if ($updatingUuid === $incident->uuid)

{{ __('admin_incidents.resolved_hint') }}

@error('updateBody')

{{ $message }}

@enderror
{{ __('admin_incidents.post') }} {{ __('admin_incidents.cancel') }}
@else
{{ __('admin_incidents.add_update') }} {{ __('admin_incidents.delete') }}
@endif
@empty

{{ __('admin_incidents.none_open') }}

@endforelse @if ($resolved->isNotEmpty())

{{ __('admin_incidents.closed') }}

@foreach ($resolved as $incident) @endforeach
{{ $incident->title }} {{ $incident->started_at->local()->isoFormat('DD.MM.YY HH:mm') }}
@endif
{{-- Report. A page-level form, not a row editor: it creates a record rather than editing one, so R20 does not apply. --}}

{{ __('admin_incidents.report') }}

{{ __('admin_incidents.report_hint') }}

@error('title')

{{ $message }}

@enderror
{{ __('admin_incidents.affects') }}
@foreach ($this->componentOptions() as $component) @endforeach
@error('components')

{{ $message }}

@enderror
@error('startedAt')

{{ $message }}

@enderror

{{ __('admin_incidents.first_update_hint') }}

@error('firstUpdate')

{{ $message }}

@enderror
{{ __('admin_incidents.publish') }}