@extends('company.layouts.master') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('breadcrumbs')@endsection @push('page-styles') @endpush @php $tiles = [ ['icon' => 'fa-building', 'label' => 'Departments', 'value' => $stats['departments']], ['icon' => 'fa-bullseye', 'label' => 'Designations', 'value' => $stats['designations']], ['icon' => 'fa-clipboard-list', 'label' => 'Job Descriptions', 'value' => $stats['job_descriptions']], ['icon' => 'fa-users', 'label' => 'Applicants', 'value' => $stats['applicants']], ]; $panels = [ ['id' => 'careerChart', 'title' => 'Career Overview', 'icon' => 'fa-chart-column'], ['id' => 'statusChart', 'title' => 'Applicant Status', 'icon' => 'fa-chart-pie'], ['id' => 'deptChart', 'title' => 'Department-wise Applicants', 'icon' => 'fa-sitemap'], ['id' => 'roleChart', 'title' => 'Job Role-wise Applicants', 'icon' => 'fa-briefcase'], ]; @endphp @section('content')
{{-- Header --}}

Dashboard

{{ $company->name }} workspace @unless ($isMain) Your assigned departments only @endunless

{{ now()->format('l, d M Y') }}
{{-- KPI cards --}}
@foreach ($tiles as $t)
{{ number_format($t['value']) }}
{{ $t['label'] }}
@endforeach
{{-- Charts Row 1 --}}
@foreach (array_slice($panels, 0, 2) as $p)
{{ $p['title'] }}
@endforeach
{{-- Charts Row 2 --}}
@foreach (array_slice($panels, 2, 2) as $p)
{{ $p['title'] }}
@endforeach
{{-- User & Recent activity: MAIN (Admin) dashboard only --}} @if ($isMain)
User Activity
Comments & status changes per team member
Recent Activity
@permission('users.read') View all @endpermission
@forelse ($recentActivity as $log) @empty @endforelse
UserActionDetailsWhen
{{ $log->user?->name ?? 'System' }} {{ ucfirst(str_replace('_', ' ', $log->action)) }} {{ $log->description ?? '—' }} {{ $log->created_at?->diffForHumans() }}
No activity yet.
@endif
@endsection @push('page-scripts') @endpush