@php $status = $camera->status ?: ($camera->is_online ? 'online' : 'unknown'); $statusPalette = [ 'online' => [ 'pill' => 'bg-emerald-100 text-emerald-700', 'dot' => 'bg-emerald-500', 'panel' => 'from-emerald-500/20 to-emerald-400/5 border-emerald-300/30', ], 'offline' => [ 'pill' => 'bg-red-100 text-red-700', 'dot' => 'bg-red-500', 'panel' => 'from-red-500/20 to-red-400/5 border-red-300/30', ], 'unknown' => [ 'pill' => 'bg-amber-100 text-amber-700', 'dot' => 'bg-amber-500', 'panel' => 'from-amber-500/20 to-amber-400/5 border-amber-300/30', ], ][$status] ?? [ 'pill' => 'bg-slate-100 text-slate-700', 'dot' => 'bg-slate-400', 'panel' => 'from-slate-500/20 to-slate-400/5 border-slate-300/30', ]; $organisationName = $camera->site?->organisation?->name ?: 'Unassigned organisation'; $siteName = $camera->site?->name ?: $camera->site_name; $connectivityType = str($camera->connectivity_type ?: 'unknown')->replace('_', ' ')->title(); $latestEvent = $camera->latestHikvisionEvent; @endphp
{{ ucfirst($status) }} {{ ucfirst($camera->ownership_type ?: 'council') }} owned {{ $camera->managed_by_council ? 'Council managed' : 'Client managed' }}

Camera overview

{{ $camera->location_name }}

{{ $camera->description ?: 'No camera description has been added yet.' }}

Last seen

{{ optional($camera->last_seen_at)->format('d M Y H:i') ?? 'Never' }}

Last event

{{ optional($camera->last_event_at)->format('d M Y H:i') ?? 'Never' }}

Live IP

{{ $camera->ip_address ?: 'Not set' }}

Quick access

@if (auth()->user()?->canUpdateCamera($camera)) Edit camera @endif Open web UI @if (auth()->user()?->canUpdateCamera($camera)) @endif

Device identity

Status

{{ ucfirst($status) }}

MAC

{{ $camera->mac_address ?: 'Not set' }}

Normalized MAC

{{ $camera->mac_address_normalized ?: 'Not set' }}

Estate context

Client and site

{{ $camera->site?->organisation?->type ? ucfirst($camera->site->organisation->type) : 'Unassigned' }}

Organisation

{{ $organisationName }}

Site

{{ $siteName }}

Location

{{ $camera->location_name }}

Ownership

{{ ucfirst($camera->ownership_type ?: 'council') }}

Latest Hikvision event

{{ $latestEvent?->event_type ?: 'No events yet' }}

State

{{ $latestEvent?->event_state ?: 'Unknown' }}

Event time

{{ optional($latestEvent?->event_time)->format('d M Y H:i:s') ?? 'Never' }}

Description

{{ $latestEvent?->event_description ?: 'No event description available.' }}

Connectivity

{{ $connectivityType }}{{ $camera->connectivity_provider ? ' · '.$camera->connectivity_provider : '' }}

{{ $camera->private_apn ? 'Private APN' : 'Standard network' }}

Provider

{{ $camera->connectivity_provider ?: 'Not set' }}

SIM number

{{ $camera->sim_number ?: 'Not set' }}

ICCID

{{ $camera->sim_iccid ?: 'Not set' }}

Static IP

{{ $camera->sim_static_ip ?: 'Not set' }}

APN

{{ $camera->apn_name ?: 'Not set' }}

Router

{{ $camera->router_model ?: 'Not set' }}{{ $camera->router_serial ? ' · '.$camera->router_serial : '' }}

Router IP

{{ $camera->router_ip_address ?: 'Not set' }}

WAN IP

{{ $camera->wan_ip_address ?: 'Not set' }}

Notes

{{ $camera->connectivity_notes ?: 'No connectivity notes recorded.' }}

Maintenance

Service schedule

View all maintenance

Upcoming

@forelse ($upcomingMaintenance as $task)

{{ $task->title }}

{{ $task->statusLabel() }} · {{ optional($task->due_at)->format('d M Y') ?? 'No due date' }}

@empty

No upcoming tasks.

@endforelse

Latest completed

@forelse ($latestCompletedMaintenance as $task)

{{ $task->title }}

{{ optional($task->completed_at)->format('d M Y') ?? 'Completed' }}

@empty

No completed tasks.

@endforelse

Annual reports

@forelse ($annualServiceReports as $task)

{{ $task->title }}

{{ $task->statusLabel() }} · {{ optional($task->due_at)->format('d M Y') ?? 'No due date' }}

@empty

No annual service history.

@endforelse
@push('scripts') @endpush