@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('E-Nothi')) @push('css') @endpush @section('content')
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

{{ __('E-Nothi') }} / {{ __('ই-নথি') }}

{{ __('Staff applications to management with noting and approval.') }}

@can('Enothi-setup') {{ __('Categories') }} {{ __('Settings') }} @endcan @can('Enothi-export') {{ __('Export Excel') }} {{ __('Audit log') }} @endcan @can('Enothi-create') {{ __('New Application') }} @endcan
@if(!empty($stats))
{{ __('Total') }}
{{ $stats['total'] ?? 0 }}
@endif
{{ __('All Applications') }}
{{ __('Showing') }} {{ $rows->firstItem() ?? 0 }}–{{ $rows->lastItem() ?? 0 }} {{ __('of') }} {{ $rows->total() }}
@if($warehouses->isNotEmpty())
@endif
@if(request()->boolean('overdue_sla')) @endif @if(request()->boolean('awaiting_my_action')) @endif
@if(!empty($hasFilters) && $hasFilters)

{{ __('Filters applied') }}

@endif
@forelse($rows as $row) @php $statusBadge = match ($row->status) { \App\Models\EnothiFile::STATUS_APPROVED, \App\Models\EnothiFile::STATUS_CLOSED => 'success', \App\Models\EnothiFile::STATUS_REJECTED => 'danger', \App\Models\EnothiFile::STATUS_IN_REVIEW => 'warning', \App\Models\EnothiFile::STATUS_RETURNED => 'dark', \App\Models\EnothiFile::STATUS_DRAFT => 'secondary', default => 'info', }; $slaOverdue = $row->level_due_at && $row->level_due_at->isPast() && in_array($row->status, [\App\Models\EnothiFile::STATUS_IN_REVIEW, \App\Models\EnothiFile::STATUS_SUBMITTED], true); @endphp @empty @endforelse
{{ __('File No.') }} {{ __('Subject') }} {{ __('Employee') }} {{ __('Branch') }} {{ __('Category') }} {{ __('Priority') }} {{ __('Status') }} {{ __('SLA due') }} {{ __('Approver') }} {{ __('Submitted') }}
{{ $row->file_number }} {{ \Illuminate\Support\Str::limit($row->subject, 45) }} @if($employee = $row->staff?->user) {{ $employee->name }}({{ $employee->id }}) @else — @endif {{ $row->staff?->warehouse?->name ?? $row->warehouse?->name ?? '—' }} {{ \App\Models\EnothiFile::categoryLabel($row->category, $row->enothi_category_id) }} @if($row->priority === \App\Models\EnothiFile::PRIORITY_URGENT) {{ __('Urgent') }} @else {{ __('Normal') }} @endif {{ \App\Models\EnothiFile::statusLabel($row->status) }} {{ $row->level_due_at?->format('Y-m-d') ?? '—' }} @if($slaOverdue) @endif @if($approver = $row->approvalRequest?->currentApprover) {{ $approver->name }}({{ $approver->id }}) @else — @endif {{ $row->submitted_at?->format('Y-m-d') ?? $row->created_at?->format('Y-m-d') }} {{ __('View') }} @can('Enothi-edit') @if(in_array($row->status, \App\Services\Enothi\EnothiFileService::adminEditableStatuses(), true)) @endif @endcan @can('Enothi-delete') @if(in_array($row->status, \App\Services\Enothi\EnothiFileService::adminDeletableStatuses(), true)) @endif @endcan
@if(!empty($hasFilters) && $hasFilters) {{ __('No applications match your filters.') }} @else {{ __('No E-Nothi files found.') }} @endif
@if($rows->hasPages()) @endif
@endsection @push('script') @endpush