@extends('layouts.app') @section('title', 'Omanization Tracking') @section('breadcrumbs') @endsection @section('content')
{{-- Header --}}

Omanization Tracking

Monitor and track your Omanization compliance ratio

@if(auth()->user()->role === 'company_admin')
@csrf
@endif
{{-- Current Status Cards --}}
{{ $currentRatio['total'] }}
Total Employees
{{ $currentRatio['omani'] }}
Omani Nationals
@php $ratioColor = $currentRatio['is_compliant'] ? 'success' : ($currentRatio['ratio'] >= $currentRatio['required'] - 5 ? 'warning' : 'danger'); @endphp
{{ number_format($currentRatio['ratio'], 1) }}%
Current Ratio
{{ number_format($requiredPercentage, 1) }}%
Required Ratio
{{-- Compliance Status Banner --}} @if($currentRatio['total'] > 0)
@if($currentRatio['is_compliant'])

Compliant — your Omanization ratio meets the requirement.

@else
@php $needed = $currentRatio['required'] > 0 && $currentRatio['total'] > 0 ? max(0, ceil(($currentRatio['required'] * $currentRatio['total'] / 100) - $currentRatio['omani'])) : 0; @endphp

Non-Compliant — you need approximately {{ $needed }} more Omani employee(s) to meet the {{ number_format($requiredPercentage, 1) }}% requirement.

@endif
@endif {{-- Trend Chart --}}

12-Month Trend

@if($trendData->count() > 1) @else

Need at least 2 monthly snapshots to show trends.

@endif
{{-- Department Breakdown --}} @if(count($departmentBreakdown) > 0)

Department Breakdown

@foreach($departmentBreakdown as $dept) @endforeach
Department Total Omani Non-Omani Ratio Status
{{ $dept['name'] }} {{ $dept['total'] }} {{ $dept['omani'] }} {{ $dept['non_omani'] }}
{{ number_format($dept['ratio'], 1) }}%
@if($dept['ratio'] >= $requiredPercentage) Compliant @elseif($dept['ratio'] >= $requiredPercentage - 5) At Risk @else Below Target @endif
@endif
@if($trendData->count() > 1) @push('scripts') @endpush @endif @endsection