@extends('layouts.app') @section('title', 'Dashboard') @section('page-title', 'Dashboard') @section('content') {{-- ====== ADMIN / SUPERVISOR DASHBOARD ====== --}} @if(Auth::user()->hasRole(['admin', 'supervisor']))
{{-- Stats row --}}
{{-- Today's Deployments --}}

Today's Deployments

View all
@forelse($todayDeployments as $d)
{{ strtoupper(substr($d->communicator->name, 0, 2)) }}
{{ $d->communicator->name }}
{{ $d->station->name }}{{ $d->programme ? ' · '.$d->programme->name : '' }}
@if($d->start_time)
{{ date('g:i A', strtotime($d->start_time)) }}
@endif
{{ ucfirst($d->status) }}
@empty
No deployments scheduled for today
@endforelse
{{-- Pending Requests --}}

Pending Requests

View all
@forelse($pendingRequests as $r)
{{ $r->type === 'self' ? 'Self' : 'Producer' }}
{{ $r->communicator?->name ?? $r->requestedBy->name }}
{{ $r->station?->name }} · {{ $r->requested_date?->format('d M') }}
Review
@empty
No pending requests
@endforelse
{{-- Upcoming deployments --}} @if($upcomingDeployments->isNotEmpty())

Upcoming Deployments

View all
@foreach($upcomingDeployments as $d) @endforeach
Communicator Station / Programme Date Status
{{ $d->communicator->name }} {{ $d->station->name }}{{ $d->programme ? ' · '.$d->programme->name : '' }} {{ $d->deployment_date->format('d M Y') }} {{ ucfirst($d->status) }}
@endif
{{-- ====== COMMUNICATOR DASHBOARD ====== --}} @elseif(Auth::user()->hasRole('communicator'))
@if($communicator) {{-- Profile banner --}}
{{ strtoupper(substr($communicator->name, 0, 2)) }}
{{ $communicator->name }}
{{ $communicator->region?->name }} · {{ $communicator->tier?->name ?? 'Untiered' }}
@if($communicator->tier)
Current Tier
{{ $communicator->tier->name }}
@endif
{{-- Quick stats --}}
{{ $pendingDeployments->count() }}
Awaiting Response
{{ $myDeployments->count() }}
Upcoming
{{ $unreadCount }}
Unread Alerts
{{-- Pending deployments needing action --}} @if($pendingDeployments->isNotEmpty())

⚡ Action Required — Pending Deployments

@foreach($pendingDeployments as $d)
{{ $d->station->name }}
@if($d->programme)
{{ $d->programme->name }}
@endif
{{ $d->deployment_date->format('l, d M Y') }}{{ $d->start_time ? ' at '.date('g:i A', strtotime($d->start_time)) : '' }}
@if($d->topic)
Topic: {{ $d->topic }}
@endif
@csrf
@endforeach
@endif {{-- Upcoming deployments --}} @if($myDeployments->isNotEmpty())

Upcoming Deployments

View all
@foreach($myDeployments as $d)
{{ $d->station->name }}
{{ $d->deployment_date->format('d M Y') }}{{ $d->start_time ? ' · '.date('g:i A', strtotime($d->start_time)) : '' }}
{{ ucfirst($d->status) }}
@endforeach
@endif @else
Your account is not yet linked to a communicator profile. Please contact your administrator.
@endif
{{-- ====== PRODUCER DASHBOARD ====== --}} @elseif(Auth::user()->hasRole('producer'))
{{ $pendingCount }}
Pending Requests
{{ $approvedCount }}
Approved Requests

Recent Requests

+ New Request
@forelse($myRequests as $r)
{{ $r->communicator?->name ?? '—' }}
{{ $r->station?->name }} · {{ $r->requested_date?->format('d M Y') }}
{{ ucfirst($r->status) }}
@empty
No requests yet. Make a request
@endforelse
@endif @endsection