@extends('template.layouts.template-base') @section('title', 'Dashboard') @section('styles') @endsection @section('content') @php // Summary cards: [key, label, icon, colour, background, link (only when the user may open the listing)] $cards = [ ['total_clients', 'Total Clients', 'bx bx-buildings', 'success', 'card-bg-1', $can['client'] ? route('backend.client.index') : null], ['active_clients', 'Active Clients', 'bx bx-check-shield', 'success', 'card-bg-1', $can['client'] ? route('backend.client.index') : null], ['total_projects', 'Total Projects', 'bx bx-briefcase', 'primary', 'card-bg-2', $can['project'] ? route('backend.project.index') : null], ['active_projects', 'Active Projects', 'bx bx-briefcase-alt-2', 'primary', 'card-bg-2', $can['project'] ? route('backend.project.index') : null], ['client_staff', 'Client Staff', 'bx bx-user', 'info', 'card-bg-3', $can['staff'] ? route('backend.all-staff.index') : null], ['project_staff', 'Project Staff', 'bx bx-user-pin', 'info', 'card-bg-3', $can['staff'] ? route('backend.all-staff.index') : null], ['active_staff', 'Total Active Staff', 'bx bx-group', 'warning', 'card-bg-4', $can['staff'] ? route('backend.all-staff.index') : null], ['relieved_staff', 'Relieved Staff', 'bx bx-user-x', 'danger', 'card-bg-4', route('backend.staff-releaving.index')], ]; @endphp
{{-- Filter bar --}}
Dashboard Overview
{{ $ranges[$default_range] }}
to
Loading…
{{-- Summary cards --}}
@foreach ($cards as [$key, $label, $icon, $colour, $bg, $url]) @endforeach
{{-- Charts --}} @php $chartCard = function ($key, $title, $badge, $note, $col = 'col-xl-6', $extra = '') { return compact('key', 'title', 'badge', 'note', 'col', 'extra'); }; $charts = [ $chartCard('companies', 'Client & Project Status', 'Current', 'Active and inactive clients and projects. Not affected by the date filter.'), $chartCard('staff', 'Staff Distribution', 'Current', 'Each staff member is counted once: active staff split by type, plus inactive and relieved staff (relieved through Staff Releaving).'), $chartCard('joining', 'Staff Joining & Relieving', 'Period', 'By date of joining and date of relieving of each staff.'), $chartCard('attendance', 'Attendance', 'Period', 'Distinct staff per day. Absent includes A and LOP; Leave is CL. Week offs and holidays are excluded.', 'col-xl-6', 'attendance'), $chartCard('recruitment', 'Recruitment', 'Period', '"Moved to onboarding" is dated by the candidate\'s last update, as stage changes are not dated. "Staff joined" uses the staff date of joining.', $can['wages'] ? 'col-xl-6' : 'col-xl-12'), ]; if ($can['wages']) { $charts[] = $chartCard('wages', 'Wages Overview', 'Period', 'Monthly gross of saved paysheets (CUMANS: earned gross, Corporate: total earnings). Staff counts are active staff by their client / project wage type.', 'col-xl-6', 'wages'); } @endphp
@foreach ($charts as $chart)

{{ $chart['title'] }}

@if ($chart['extra'] === 'attendance')
@foreach (['auto' => 'Auto', 'day' => 'Daily', 'week' => 'Weekly', 'month' => 'Monthly'] as $value => $label) @endforeach
@endif {{ $chart['badge'] }}
@if ($chart['extra'] === 'wages')
CUMANS wages staff
–
Corporate wages staff
–
@endif
No records for this period
This chart could not be displayed

{{ $chart['note'] }}

@endforeach
{{-- Pending actions and quick actions --}}

Pending Actions

Quick Actions

@foreach ($quick_actions as [$label, $icon, $url]) @endforeach
{{-- Latest clients and projects --}}

Clients List

@if ($can['client']) View All @endif
@forelse ($latest_clients as $client) @empty @endforelse
S.No Name Founder Name Email Status
{{ $loop->iteration }} {{ $client->company_name }} {{ $client->founder_name }}
{{ $client->email }}
{{ $client->status == 1 ? 'Active' : 'Inactive' }}
No active clients yet

Projects List

@if ($can['project']) View All @endif
@forelse ($latest_projects as $project) @empty @endforelse
S.No Name Founder Name Email Status
{{ $loop->iteration }} {{ $project->project_name }} {{ $project->founder_name }}
{{ $project->email }}
{{ $project->status == 1 ? 'Active' : 'Inactive' }}
No active projects yet
@endsection @section('scripts') @endsection