@extends('layouts.employee') @section('title', 'Tactical Dashboard') @section('content') @if(isset($birthdayWish))

Celebration Time!

{{ $birthdayWish }}

@endif @if(isset($hiringAnniversaryWish))

Work Anniversary!

{{ $hiringAnniversaryWish }}

@endif @if($employee->license_expiry && \Carbon\Carbon::parse($employee->license_expiry)->isPast())

Security License Expired

Your security license expired on {{ \Carbon\Carbon::parse($employee->license_expiry)->format('d M, Y') }}. Immediate action is required to maintain operational status.

Update License
@endif
@php $unreadCountDashboard = \App\Models\Notification::where('employee_id', '=', auth('employee')->id(), 'and')->whereNull('read_at')->count(); @endphp
Messages
@if($unreadCountDashboard > 0) @endif
{{ $unreadCountDashboard }}
Jobs
{{ $employee->schedules()->count() }}
Active
{{ $activeJobs->count() }}
Shift Hours (30d)
{{ $shiftHours30d }}h
Income (30d)
${{ number_format($currentMonthIncome, 1) }}

Income Statistics

12-Month Performance Trend

Gross Earnings

Highest Earning Month

${{ number_format($highestIncome, 2) }}

{{ $highestMonth }}

"Peak performance achieved through consistent operational excellence and route density."

Active Operations

Current & Upcoming Today

Live
@if($activeJobs->count() > 0)
@foreach($activeJobs as $job) @php $pivot = $job->pivot; $hasStarted = !empty($pivot->actual_start_at); $hasCheckedIn = !empty($pivot->checkin_images); $hasCheckedOut = !empty($pivot->actual_end_at); @endphp
{{ $job->from_datetime->format('M') }} {{ $job->from_datetime->format('d') }}
{{ $job->duty_number }}
@if($hasCheckedIn || $hasCheckedOut) @endif @if($hasStarted && !$hasCheckedOut)
Active
@endif

{{ $job->site->name }}

{{ $job->from_datetime->format('H:i') }} - {{ $job->to_datetime->format('H:i') }}
{{ $job->site->city }}
@php $companions = $job->employees->where('id', '!=', $employee->id); @endphp
@if($companions->count() > 0)
Team Members
@foreach($companions as $comp)
{{ substr($comp->first_name, 0, 1) }}{{ substr($comp->last_name, 0, 1) }}
{{ $comp->first_name }} {{ $comp->last_name }}
@endforeach
@else
Solo Deployment
@endif
@if(!$hasStarted)
@csrf
@elseif(!$hasCheckedOut)
@if(!$hasCheckedIn) @endif
@csrf
@else @endif

Job Evidence: Check-In

@csrf

Tactical Briefing: Report Incident

@csrf

Mission Evidence: Extraction

@csrf

Mission Evidence Gallery

Intel Log #{{ $job->duty_number }}

@php $inImgs = json_decode($pivot->checkin_images, true) ?? []; $outImgs = json_decode($pivot->checkout_images, true) ?? []; @endphp @if(count($inImgs) > 0)

Infiltration Evidence

@foreach($inImgs as $idx => $img)
@csrf @method('DELETE')
@endforeach
@endif @if(count($outImgs) > 0)

Extraction Evidence

@foreach($outImgs as $idx => $img)
@csrf @method('DELETE')
@endforeach
@endif @if(count($inImgs) == 0 && count($outImgs) == 0)

No visual evidence available

@endif
@endforeach
@else

No active operations

@endif

Today's Duty

Scheduled for {{ Carbon\Carbon::today()->format('d M Y') }}

@if($todayJobs->count() > 0)
@foreach($todayJobs as $job)
Duty #{{ $job->duty_number }} {{ $job->from_datetime->diffForHumans() }}

{{ $job->site->name }}

{{ $job->from_datetime->format('H:i') }}
at
{{ $job->site->city }}
@if($job->status === 'active')
In Progress
@else
@csrf
@endif
@endforeach
@else

No duties scheduled for today

@endif

Reports

Completed Operations

@if($completedJobs->count() > 0)
@foreach($completedJobs as $cJob) @endforeach
Mission Times Actions
#{{ $cJob->duty_number }} {{ $cJob->site->name }} {{ $cJob->from_datetime->format('d M Y') }}
{{ $cJob->pivot->actual_start_at ? \Carbon\Carbon::parse($cJob->pivot->actual_start_at)->format('H:i') : '--:--' }} - {{ $cJob->pivot->actual_end_at ? \Carbon\Carbon::parse($cJob->pivot->actual_end_at)->format('H:i') : '--:--' }}
@else

No completed missions found

@endif
{{-- Patroller Jobs Section --}} @if(isset($activePatrollerJobs) && ($activePatrollerJobs->count() > 0 || $todayPatrollerJobs->count() > 0))

Patrol Roaster

Route Patrols

Patrol
@if($activePatrollerJobs->count() > 0)
@foreach($activePatrollerJobs as $job)
{{ $job->from_time->format('M') }} {{ $job->from_time->format('d') }}

[PATROLLER] {{ $job->route->name }}

{{ $job->calculated_status }}

Duty #{{ $job->duty_number }}

{{ $job->from_time->format('h:i A') }} - {{ $job->to_time->format('h:i A') }} {{ $job->route->sites->count() }} Sites
@if($job->job_status === 'pending') @elseif($job->job_status === 'in_progress') Continue Patrol @endif
@endforeach
@endif @if($todayPatrollerJobs->count() > 0)

Upcoming Today

@foreach($todayPatrollerJobs as $job)

[PATROLLER] {{ $job->route->name }}

{{ $job->from_time->format('h:i A') }} - {{ $job->to_time->format('h:i A') }} • {{ $job->route->sites->count() }} sites

{{ $job->calculated_status }}
@endforeach
@endif @if($activePatrollerJobs->count() === 0 && $todayPatrollerJobs->count() === 0)

No patrol jobs today

@endif
@endif {{-- Completed Patroller Jobs --}} @if(isset($completedPatrollerJobs) && $completedPatrollerJobs->count() > 0)

Completed Patrols

Recent patrol reports

@foreach($completedPatrollerJobs as $job)

[PATROLLER] {{ $job->route->name }}

{{ $job->from_time->format('M d, Y h:i A') }} • Duty #{{ $job->duty_number }}

View Report
@endforeach
@endif

Issued Uniforms

Equipment Inventory

@if($issuedUniforms->count() > 0)
@foreach($issuedUniforms as $issued) @endforeach
Item Variant Qty Issued Date
{{ $issued->variant->uniform->name }} @if($issued->notes)

{{ Str::limit($issued->notes, 30) }}

@endif
{{ $issued->variant->size }} {{ $issued->variant->color }}
{{ $issued->quantity }} {{ $issued->issued_at->format('M d, Y') }}
@else

No uniforms issued yet

@endif
View All Uniforms
@endsection