@extends('layouts.branch') @section('title', 'Operational Dashboard') @section('header', 'Operational Dashboard') @section('content')

Operational Console

Real-time management of clinical registries and patient flow control systems.

@php $registryServices = [ 'registration' => [ 'label' => 'Patient Registration', 'sub' => 'Staff entry for new patients', 'color' => 'emerald', 'url' => route('branch.patients.create'), 'key' => 'registration' ], 'ipd' => [ 'label' => 'IPD Registration', 'sub' => 'In-patient admissions', 'color' => 'indigo', 'url' => '#', 'key' => 'ipd' ], 'opd' => [ 'label' => 'OPD Registration', 'sub' => 'Existing patient lookup', 'color' => 'rose', 'url' => route('branch.registrations.index'), 'key' => 'opd' ] ]; @endphp @foreach($registryServices as $key => $service) @php $sched = $schedules->get($service['key']); $isManualPaused = $sched?->manual_pause ?? false; $isClosedBySchedule = false; if ($sched) { if ($sched->is_closed) { $isClosedBySchedule = true; } elseif (!$sched->is_24_7) { $now = now(); $open = $sched->open_time; $close = $sched->close_time; if ($open && $close) { $isClosedBySchedule = !($now->between($open, $close)); } } } $isPaused = $isManualPaused || $isClosedBySchedule; $bgClass = $isPaused ? 'bg-slate-200 grayscale opacity-60' : 'bg-'.$service['color'].'-500'; $borderClass = $isPaused ? 'border-slate-300' : 'border-'.$service['color'].'-400 shadow-lg shadow-'.$service['color'].'-600/20'; @endphp

{{ $service['label'] }}

{{ $service['sub'] }}

@if($isManualPaused) Status: MANUALLY PAUSED @elseif($isClosedBySchedule) Status: CLOSED (SCHEDULE) @else Status: ACTIVE @endif @if(!$isPaused) @endif
@endforeach
@endsection