{{ __('Permintaan ATK Umum') }}

Request Information

Requested By
{{ $officeSupplyRequest->name }}
@if ($officeSupplyRequest->department)
Department
{{ $officeSupplyRequest->department }}
@endif
Status
$officeSupplyRequest->status === 'Initiated', 'bg-yellow-50 text-yellow-700 ring-1 ring-yellow-200' => $officeSupplyRequest->status === 'In Process', 'bg-green-50 text-green-700 ring-1 ring-green-200' => $officeSupplyRequest->status === 'Approved', 'bg-gray-50 text-gray-700 ring-1 ring-gray-200' => $officeSupplyRequest->status === 'Completed', 'bg-red-50 text-red-700 ring-1 ring-red-200' => $officeSupplyRequest->status === 'Rejected', 'bg-gray-50 text-gray-700 ring-1 ring-gray-200' => $officeSupplyRequest->status === 'Cancelled', ])> {{ $officeSupplyRequest->status }}
Created At
{{ $officeSupplyRequest->created_at->format('d M Y H:i') }}
@if ($officeSupplyRequest->remarks)
Comment
{{ $officeSupplyRequest->remarks }}
@endif
@if ($officeSupplyRequest->items && count($officeSupplyRequest->items) > 0)

Requested Items

@if ($officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user()))
@endif
@if ($officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user())) @endif @if ($officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user())) @elseif($officeSupplyRequest->status === 'Approved') @endif @foreach ($officeSupplyRequest->items as $index => $item) @if ($officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user())) @endif @if ($officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user())) @elseif($officeSupplyRequest->status === 'Approved') @endif @endforeach
No Item Name Qty Unit Comment Approve Status
{{ $index + 1 }} @php $canEditItem = $officeSupplyRequest->getCurrentStepIndex() === 1 && $officeSupplyRequest->getApproverAction(Auth::user()) !== null; @endphp @if ($canEditItem)
@else {{ $item['item_name'] ?? '-' }} @endif
@if ($canEditItem) @else {{ $item['quantity'] ?? '-' }} @endif @if ($canEditItem) @else {{ $item['unit'] ?? '-' }} @endif @if ($canEditItem) @else {{ $item['comment'] ?? '-' }} @endif @if (isset($item['approved']) && $item['approved']) @else @endif
@endif @if ($officeSupplyRequest->approvals->isNotEmpty())

Activity Log

@foreach ($officeSupplyRequest->approvals->sortByDesc('created_at') as $approval) @php $statusStyles = [ 'Approved' => [ 'bg-green-50 text-green-700 ring-green-200', 'bg-green-500', ], 'Rejected' => ['bg-red-50 text-red-700 ring-red-200', 'bg-red-500'], ]; [$pillClass, $dotClass] = $statusStyles[$approval->status] ?? [ 'bg-gray-50 text-gray-700 ring-gray-200', 'bg-gray-400', ]; @endphp
{{ strtoupper(substr($approval->user->name ?? '?', 0, 1)) }}
{{ $approval->user->name }} {{ $approval->created_at->format('d M Y H:i') }}
{{ $approval->status }}
@php $approvalComment = $approval->comment ?? $approval->remarks ?? null; @endphp @if ($approvalComment && trim($approvalComment))
{{ $approvalComment }}
@else

No comment provided.

@endif
@endforeach
@else {{--

No approval history found

Approval records will appear here once processed.

--}} @endif @if ($officeSupplyRequest->getApproverAction(Auth::user()))

Actions

@endif

Approval Workflow

@php $steps = [ [ 'name' => $officeSupplyRequest->user->name, 'status' => $officeSupplyRequest->status === 'Rejected' ? 'Needs Edit' : 'Approved', ], [ 'name' => $officeSupplyRequest->approver1_name, 'status' => $officeSupplyRequest->appstatus1, ], [ 'name' => $officeSupplyRequest->approver2_name, 'status' => $officeSupplyRequest->appstatus2, ], ]; @endphp @foreach ($steps as $index => $step)
@php $bgColor = $step['status'] === 'Approved' ? '#dcfce7' : ($step['status'] === 'Rejected' ? '#fef9c3' : ($step['status'] === 'Cancelled' ? '#fee2e2' : '#dbeafe')); $borderColor = $step['status'] === 'Approved' ? '#22c55e' : ($step['status'] === 'Rejected' ? '#eab308' : ($step['status'] === 'Cancelled' ? '#ef4444' : '#3b82f6')); $textColor = $step['status'] === 'Approved' ? '#15803d' : ($step['status'] === 'Rejected' ? '#a16207' : ($step['status'] === 'Cancelled' ? '#b91c1c' : '#1d4ed8')); $icon = $step['status'] === 'Approved' ? '✓' : $index + 1; $displayStatus = $step['status'] === 'Approved' ? 'Approved' : ($step['status'] === 'Initiated' ? 'Initiated' : $step['status'] ?? 'Initiated'); @endphp
{{ $icon }}
{{ $step['name'] ?? 'N/A' }}
{{ $displayStatus }}
@endforeach
@if ( $officeSupplyRequest->user_id === Auth::user()->id && in_array($officeSupplyRequest->status, ['Initiated', 'Rejected']))
Edit
@csrf
@endif