@extends('layouts.admin') @section('content')
@if (in_array(auth()->user()->role, ['operator']))
(Max File Size 5 MB)
@csrf
@endif
📁 Uploaded Documents
@if(isset($documents) && $documents->count() > 0)
@foreach($documents as $doc) @php $show_doc = false; if (auth()->user()->role == 'admin') { $show_doc = true; } elseif (auth()->user()->role == 'accounts') { $show_doc = in_array($doc->status, ['pending', 'reupload']); } elseif (auth()->user()->role == 'operator') { $show_doc = $doc->status == 'pending'; } elseif (auth()->user()->role == 'ca') { $show_doc = $doc->status == 'approved'; } @endphp @if($show_doc) @php $fname = basename($doc->bill_path); @endphp
@if (auth()->user()->role == 'admin' && $doc->status == 'pending') File Icon {{ $fname }} ({{ strtolower(pathinfo($fname, PATHINFO_EXTENSION)) }}) @else File Icon {{ $fname }} ({{ strtolower(pathinfo($fname, PATHINFO_EXTENSION)) }}) @endif @if (auth()->user()->role == 'accounts' && in_array($doc->status, ['pending', 'reupload']))
@csrf
@else
Status: {{ ucfirst($doc->status) }}
@endif @if (in_array(auth()->user()->role, ['admin', 'accounts'])) @endif
@endif @endforeach
@else

No documents uploaded yet.

@endif
@endsection