Data Permintaan
Kelola semua permintaan alat medis ruangan Anda
Tambah Permintaan
@if (session('success'))
{{ session('success') }}
@endif
@if (session('error'))
{{ session('error') }}
@endif
{{-- Filter Form --}}
{{-- Active filter badges --}}
@if (request()->hasAny(['search', 'status', 'dari', 'ke']))
Filter aktif:
@if (request('search'))
Kata kunci: "{{ request('search') }}"
@endif
@if (request('status'))
@php
$statusLabels = [
'DIAJUKAN' => 'Diajukan',
'DISETUJUI_KARU' => 'Disetujui Karu',
'DITOLAK_KARU' => 'Ditolak Karu',
'DISETUJUI_LOGISTIK' => 'Disetujui Logistik',
'DITOLAK_LOGISTIK' => 'Ditolak Logistik',
];
@endphp
Status:
{{ $statusLabels[request('status')] ?? request('status') }}
@endif
@if (request('dari'))
Dari:
{{ \Carbon\Carbon::parse(request('dari'))->format('d M Y') }}
@endif
@if (request('ke'))
Ke:
{{ \Carbon\Carbon::parse(request('ke'))->format('d M Y') }}
@endif
@endif
| No |
Kode |
Tanggal |
Ruangan |
Item |
Status |
Catatan Karu |
Catatan Logistik |
Aksi |
@forelse($data as $p)
@php
$statusClass = match ($p->status) {
'DIAJUKAN' => 'status-pending',
'DISETUJUI_KARU', 'DISETUJUI_LOGISTIK' => 'status-approved',
'DITOLAK_KARU', 'DITOLAK_LOGISTIK' => 'status-rejected',
default => 'status-pending',
};
$statusIcon = match ($p->status) {
'DIAJUKAN' => 'fa-hourglass-half',
'DISETUJUI_KARU' => 'fa-circle-check',
'DITOLAK_KARU' => 'fa-circle-xmark',
'DISETUJUI_LOGISTIK' => 'fa-circle-check',
'DITOLAK_LOGISTIK' => 'fa-circle-xmark',
default => 'fa-circle-question',
};
$statusLabel = match ($p->status) {
'DIAJUKAN' => 'Diajukan',
'DISETUJUI_KARU' => 'Disetujui Karu',
'DITOLAK_KARU' => 'Ditolak Karu',
'DISETUJUI_LOGISTIK' => 'Disetujui Logistik',
'DITOLAK_LOGISTIK' => 'Ditolak Logistik',
default => $p->status,
};
@endphp
| {{ $loop->iteration }} |
{{ $p->kode_permintaan }} |
{{ \Carbon\Carbon::parse($p->tanggal_permintaan)->format('d M Y') }}
|
{{ $p->ruangan->nama_ruangan ?? '-' }} |
{{ $p->details->count() }} item |
{{ $statusLabel }}
|
@if ($p->catatan_karu)
{{ $p->catatan_karu }}
@else
—
@endif
|
@if ($p->catatan_logistik)
{{ $p->catatan_logistik }}
@else
—
@endif
|
@if ($p->status == 'DIAJUKAN')
@endif
|
@empty
|
Belum ada data permintaan
|
@endforelse