@extends('app') @section('content')

{{ $title }}

Pantau seluruh permintaan alat medis di semua ruangan

Daftar Permintaan
{{-- Filter Form --}}
{{-- Search --}}
{{-- Status --}} {{-- Tanggal Dari --}}
{{-- Tanggal Ke --}}
{{-- Submit --}} {{-- Reset --}} @if (request()->hasAny(['search', 'status', 'dari', 'ke'])) Reset @endif
{{-- Active filter badges --}} @if (request()->hasAny(['search', 'status', 'dari', 'ke']))
Filter aktif: @if (request('search')) Kata kunci: "{{ request('search') }}" @endif @if (request('status')) 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
@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 @empty @endforelse
No Kode Tanggal Perawat Ruangan Item Status Aksi
{{ $loop->iteration }} {{ $p->kode_permintaan }} {{ \Carbon\Carbon::parse($p->tanggal_permintaan)->format('d M Y') }}
{{ strtoupper(substr($p->perawat->name, 0, 2)) }}
{{ $p->perawat->name }}
{{ $p->ruangan->nama_ruangan ?? '-' }} {{ $p->details->count() }} item {{ $statusLabel }}
Belum ada data permintaan
@endsection