@extends('admin.layouts.app') @section('title', 'Global Location Manager') @section('page-title', 'Global Location Manager') @section('content')

Global Location Manager

5-Level Worldwide Hierarchy: Continent → Country → State → District → Sacred City with real-time Live/Inactive toggles, bulk controls, and instant editing.

@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
@endif {{-- ---- Add Country Form ---- --}} {{-- ---- Add State Form ---- --}} {{-- ---- Add City Form ---- --}} {{-- ---- KPI Stats / Location Tabs ---- --}}
🌍 {{ $stats['active_countries'] }} / {{ $stats['total_countries'] }} Countries 🏛️ {{ $stats['active_states'] }} / {{ $stats['total_states'] }} States / Provinces 🛕 {{ $stats['active_cities'] }} / {{ $stats['total_cities'] }} Cities & Hubs 💡 {{ $stats['pending_suggestions'] }} Suggestions
{{-- ---- Toolbar ---- --}}
Countries States Cities Suggestions ({{ $stats['pending_suggestions'] }})
@if(!empty($countryFilter) || !empty($stateFilter)) @php $filteredCountry = !empty($countryFilter) ? $allCountries->firstWhere('id', (int) $countryFilter) : null; $filteredState = !empty($stateFilter) ? $allStates->firstWhere('id', (int) $stateFilter) : null; @endphp
🔍 Active Filter: @if($filteredCountry) Country: {{ $filteredCountry->name }} @endif @if($filteredState) State: {{ $filteredState->name }} @endif
✕ Clear Filter
@endif {{-- ---- Bulk Action Bar ---- --}} {{-- ================= TAB 1: COUNTRIES ================= --}} @if($tab === 'countries')
@forelse($countries as $cnt) @empty @endforelse
ISO Country Name Continent Dial / Currency States Cities Status Action
{{ $cnt->iso_code_2 }} {{ $cnt->name }} {{ $cnt->continent->name ?? '-' }} {{ $cnt->phone_code ?: '-' }} • {{ $cnt->currency_code ?: '-' }} {{ $cnt->states_count }} ➔ {{ $cnt->cities_count }} ➔ @if($cnt->is_active) LIVE @else INACTIVE @endif
@csrf
@csrf @method('DELETE')
No countries found.
@if($countries->hasPages())
Showing {{ $countries->firstItem() }}–{{ $countries->lastItem() }} of {{ $countries->total() }} country(ies)
{{ $countries->links() }}
@endif {{-- ================= TAB 2: STATES ================= --}} @elseif($tab === 'states')
@forelse($states as $st) @empty @endforelse
Code State / Province Name Country Type Cities Status Action
{{ $st->code ?: '--' }} {{ $st->name }} {{ $st->country->name ?? '-' }} ({{ $st->country->iso_code_2 ?? '' }}) {{ $st->type_label }} {{ $st->cities_count }} ➔ @if($st->is_active) LIVE @else INACTIVE @endif
@csrf
@csrf @method('DELETE')
No states or provinces found.
@if($states->hasPages())
Showing {{ $states->firstItem() }}–{{ $states->lastItem() }} of {{ $states->total() }} state(s)
{{ $states->links() }}
@endif {{-- ================= TAB 3: CITIES & SACRED LOCALITIES ================= --}} @elseif($tab === 'cities')
@forelse($cities as $cty) @empty @endforelse
City / Sacred Locality District / County State / Country Postal Code Sacred Hub Status Action
{{ $cty->name }} @if($cty->is_sacred_hub) ⭐ SACRED @endif
{{ $cty->district->name ?? '--' }} {{ $cty->state->name ?? '-' }}, {{ $cty->country->name ?? '-' }} {{ $cty->postal_code ?: '--' }} {!! $cty->is_sacred_hub ? '★ Hub' : '—' !!} @if($cty->is_active) LIVE @else INACTIVE @endif
@csrf
@csrf @method('DELETE')
No cities found.
@if($cities->hasPages())
Showing {{ $cities->firstItem() }}–{{ $cities->lastItem() }} of {{ $cities->total() }} city(ies)
{{ $cities->links() }}
@endif {{-- ================= TAB 4: SUGGESTIONS ================= --}} @elseif($tab === 'suggestions')
@forelse($pendingCities as $pc) @empty @endforelse
Suggested City State / Country Submitted By Date Moderation Decision
{{ $pc->name }} {{ $pc->state->name ?? '-' }}, {{ $pc->country->name ?? '-' }} {{ $pc->suggestedBy->name ?? 'Devotee / Visitor' }} {{ $pc->created_at->format('d M Y') }}
@csrf
@csrf
@csrf @method('DELETE')
No pending city suggestions in the queue.
@if($pendingCities->hasPages())
Showing {{ $pendingCities->firstItem() }}–{{ $pendingCities->lastItem() }} of {{ $pendingCities->total() }} suggestion(s)
{{ $pendingCities->links() }}
@endif @endif {{-- ================= EDIT COUNTRY MODAL ================= --}} {{-- ================= EDIT STATE MODAL ================= --}} {{-- ================= EDIT CITY MODAL ================= --}} @endsection