@extends('layouts.app') @section('content')

Facilities

Manage registered health centers, outreach sites, and camps

+ New Facility ← Dashboard
@if($facilities->isEmpty())
🏥
No facilities registered yet
@else @foreach($facilities as $f) @php $typeBg = match($f->type) { 'facility' => '#e0f2fe', 'outreach' => '#fef3c7', 'camp' => '#fee2e2', default => '#f3f4f6' }; $typeColor = match($f->type) { 'facility' => '#075985', 'outreach' => '#92400e', 'camp' => '#991b1b', default => '#374151' }; $statusBg = match($f->status ?? 'active') { 'active' => '#dcfce7', 'inactive' => '#fef3c7', 'archived' => '#e5e7eb', default => '#f3f4f6' }; $statusColor = match($f->status ?? 'active') { 'active' => '#166534', 'inactive' => '#92400e', 'archived' => '#374151', default => '#374151' }; @endphp @endforeach
Name Type Status District Code Actions
{{ $f->name }} @if($f->level)
{{ $f->level }}
@endif
{{ ucfirst($f->type) }} {{ ucfirst($f->status ?? 'active') }} {{ $f->district }} {{ $f->code }}
@if($f->type === 'facility') View @else Open @endif Edit @if(($f->status ?? 'active') === 'active')
@csrf
@elseif(($f->status ?? 'active') === 'inactive')
@csrf
@csrf
@endif
@endif
@endsection