@extends('layouts.app') @section('title', 'طلبات التعويضات') @section('content')
{{ $requests instanceof \Illuminate\Pagination\LengthAwarePaginator ? $requests->total() : $requests->count() }}
إجمالي الطلبات
{{ $requests->where('status', 'pending')->count() }}
في الانتظار
{{ $requests->where('status', 'approved')->count() }}
معتمدة
@if($requests->count())

الطلبات

@foreach($requests as $req) @endforeach
الموظف النوع المبلغ السبب الحالة إجراءات
{{ $req->employee_name ?? 'موظف #' . $req->employee_id }} @php $types = ['raise' => 'زيادة راتب', 'bonus' => 'مكافأة', 'promotion' => 'ترقية']; @endphp {{ $types[$req->request_type] ?? $req->request_type }} {{ isset($req->amount) && $req->amount ? number_format($req->amount, 2) : '—' }} {{ \Illuminate\Support\Str::limit($req->reason, 50) }} {{ $req->status === 'approved' ? 'معتمد' : ($req->status === 'rejected' ? 'مرفوض' : 'في الانتظار') }} @if($req->status === 'pending')
@csrf
@endif
@if($requests instanceof \Illuminate\Pagination\LengthAwarePaginator)
{{ $requests->links() }}
@endif @else
💰

لا توجد طلبات

أنشئ طلب تعويض أو ترقية لموظف

@endif @endsection