@extends('layouts.master') @section('title', $title) @section('page_css') @endsection @section('content')
{{-- Top Stats --}}
Total Staff
{{ $staff_total }}
{{ $permenant_staff }} Permenant • {{ $temporary_staff }} Temporary
Monthly Salary Expense
{{ number_format((float)$monthly_salary_expense, 2) }}
This month
Last Month Salary Generated
{{number_format( $unpaid_salary_generated, 0) }}
{{number_format( $paid_salary_generated, 0) }} paid
Attendance Today
{{ $attendance_today }}
Present today
{{-- Quick Cards --}}
{{-- @php $quickCards = [ ['icon'=>'fa-building','label'=>'Branches','value'=>$branches,'gradient'=>'card-gradient-1'], ['icon'=>'fa-sitemap','label'=>'Departments','value'=>$departments,'gradient'=>'card-gradient-2'], ['icon'=>'fa-clock','label'=>'Shifts','value'=>$shifts,'gradient'=>'card-gradient-3'], ['icon'=>'fa-hand-holding-usd','label'=>'Loans','value'=>$total_loans,'gradient'=>'card-gradient-4'], ['icon'=>'fa-wallet','label'=>'Advances','value'=>$total_advances,'gradient'=>'card-gradient-5'], ['icon'=>'fa-id-badge','label'=>'Job Titles','value'=>$job_titles,'gradient'=>'card-gradient-6'], ]; @endphp --}} {{-- @foreach($quickCards as $card)
{{ $card['label'] }}
{{ $card['value'] }}
@endforeach --}}
{{-- Attendance Cards --}}
Attendance This Month (from today)
Fridays excluded • Active & Suspended Staff
{{-- @foreach($attendanceCards as $card)
{{ $card['label'] }}
{{ $card['value'] }}
@endforeach --}}
{{-- Attendance Chart --}}
Attendance Overview (Current Month)
{{-- Main Charts and Lists --}}
Salary Payments — last 6 months
Trend of total salary per month
Paid vs Unpaid (rows)
Proportion of paid/unpaid salary rows
Top Paid Staff
{{ $top_staff_name }}
Salary: {{ number_format($top_staff_salary,2) }}
Branch Summary
    @forelse($branch_summary as $b)
  • {{ $b['branch_name'] }}
    {{ $b['total'] }}
  • @empty
  • No branches found
  • @endforelse
Salary Heads Summary
Paid Heads
{{ $paidHeads }}
Unpaid Heads
{{ $unpaidHeads }}
{{-- Recent Payments & Unpaid Rows --}}
Recent Payments
Latest salary payments
@forelse($recent_payments as $p) @empty @endforelse
# Staff Amount Type Date Status
{{ $p->id }} {{ optional(\App\Models\Employee\Staff::find($p->staff_id))->name ?? 'N/A' }} {{ number_format((float)$p->payment_amount,2) }} {{ $p->payment_type }} {{ \Carbon\Carbon::parse($p->date)->format('Y-m-d') }} {{ $p->status }}
No payments yet
Recent Unpaid Salary Rows
Action required
@forelse($recent_unpaid as $d) @empty @endforelse
# Staff Net Salary Month Status
{{ $d->id }} {{ optional(\App\Models\Employee\Staff::find($d->staff_id))->name ?? 'N/A' }} {{ number_format((float)$d->net_salary,2) }} {{ optional(\App\Models\Payroll\PayrollSalaryHead::find($d->salary_head_id))->month ?? 'N/A' }} {{ $d->status }}
All paid — no unpaid rows
@endsection @section('page_js') @endsection