@extends('user.layouts') @section('title', 'Category Request History') @section('header') @endsection @section('content')
@include('user.partials.category_request_tabs')

Category Request History

{{-- FILTER SECTION --}}
{{-- FROM DATE --}}
{{-- TO DATE --}}
From Date cannot be greater than To Date.
{{-- AGENT NAME --}}
{{-- CATEGORY NAME --}}
{{-- MALAYALAM NAME --}}
{{-- STATUS --}}
{{-- RESET BUTTON --}}
{{-- TABLE SECTION --}}
@foreach ($service_list as $service) @php $agentName = optional($service->user)->name ?? '-'; $initial = $agentName !== '-' ? mb_strtoupper(mb_substr(trim($agentName), 0, 1)) : 'A'; $createdDate = $service->created_at ? $service->created_at->copy()->timezone('Asia/Kolkata') : null; $status = strtolower(trim($service->status ?? 'pending')); if (!in_array($status, ['approved', 'rejected', 'pending'])) { $status = 'pending'; } @endphp {{-- SERIAL NUMBER --}} {{-- REQUEST DATE AND TIME --}} {{-- AGENT NAME --}} {{-- CATEGORY NAME --}} {{-- MALAYALAM NAME --}} {{-- IMAGE --}} {{-- STATUS --}} @endforeach
SN REQUEST DATE AGENT NAME CATEGORY NAME CATEGORY NAME MALAYALAM IMAGE STATUS
{{ $loop->iteration }} @if($createdDate)
{{ $createdDate->format('d-m-Y') }}
{{ $createdDate->format('h:i A') }}
@else - @endif
{{ $initial }}
{{ $agentName }}
{{ $service->category_name ?? '-' }} {{ $service->category_name_malayalam ?? '-' }} @if(!empty($service->image)) @else No Image @endif @if($status === 'approved') Approved @elseif($status === 'rejected') Rejected @else Pending @endif
{{-- IMAGE MODAL --}} @endsection @section('footer') {{-- jQuery must already be loaded by user.layouts --}} @endsection