mivita/resources/views/admin/payment-dashboard/_partials/incident-table.blade.php
2026-04-14 18:07:45 +02:00

71 lines
3.4 KiB
PHP

<div class="table-responsive">
<table class="table table-sm table-hover">
<thead class="thead-light">
<tr>
<th>Schwere</th>
<th>Titel</th>
<th>Anbieter</th>
<th>Typ</th>
<th>Status</th>
<th>Erkannt</th>
<th>Dauer</th>
@if(isset($showActions) && $showActions)
<th></th>
@endif
</tr>
</thead>
<tbody>
@forelse($incidents as $incident)
<tr>
<td>
<span class="badge badge-{{ $incident->severity_color }}">
{{ $incident->severity_label }}
</span>
</td>
<td>
<a href="{{ route('admin.payment-dashboard.show', $incident) }}">
{{ $incident->title }}
</a>
@if($incident->ticket_number)
<span class="text-muted small ml-1">#{{ $incident->ticket_number }}</span>
@endif
</td>
<td><span class="badge badge-secondary">{{ $incident->provider_label }}</span></td>
<td>
<i class="ion {{ $incident->type_icon }}"></i>
{{ $incident->type_label }}
</td>
<td>
<span class="badge badge-{{ $incident->status_color }}">
{{ $incident->status_label }}
</span>
</td>
<td class="text-nowrap">{{ $incident->detected_at->format('d.m.Y H:i') }}</td>
<td class="text-nowrap">{{ $incident->duration }}</td>
@if(isset($showActions) && $showActions)
<td>
<div class="d-flex gap-1">
<form method="POST" action="{{ route('admin.payment-dashboard.status.update', $incident) }}" class="d-inline">
@csrf
@method('PATCH')
<select name="status" class="custom-select custom-select-sm" onchange="this.form.submit()" style="width:auto">
@foreach(['open' => 'Offen', 'in_progress' => 'In Bearb.', 'waiting_provider' => 'Wartet', 'resolved' => 'Gelöst', 'closed' => 'Geschl.'] as $value => $label)
<option value="{{ $value }}" {{ $incident->status === $value ? 'selected' : '' }}>{{ $label }}</option>
@endforeach
</select>
</form>
<a href="{{ route('admin.payment-dashboard.show', $incident) }}" class="btn btn-sm btn-outline-secondary">
<i class="ion ion-md-open"></i>
</a>
</div>
</td>
@endif
</tr>
@empty
<tr>
<td colspan="8" class="text-center text-muted py-3">Keine Incidents vorhanden.</td>
</tr>
@endforelse
</tbody>
</table>
</div>