@extends('layouts.admin') @section('content') @php $user = auth()->user(); $canManage = $user->hasPermission('locations.manage', $location); $canVerify = $user->hasPermission('locations.verify', $location); $childType = $type === 'province' ? 'district' : 'tehsil'; @endphp

{{ $location->localizedName() }}

{{ $location->operational_status->label() }} @if($location->needs_verification) {{ __('ui.locations.needs_verification') }} @elseif($location->verified_at) {{ __('ui.locations.verified') }} @endif @if(! $location->is_enabled){{ __('ui.locations.disabled') }}@endif
@if($location->verification_note)
{{ __('ui.locations.note') }}: {{ $location->verification_note }}
@endif
@if($canManage)
@csrf @method('PUT')

{{ __('ui.locations.details') }}

@endif
@if($canManage)
@csrf

{{ __('ui.locations.operational_status') }}

@endif @if($canVerify && $location->needs_verification)
@csrf

{{ __('ui.locations.verify_title') }}

{{ __('ui.locations.verify_help') }}

@endif
@if($children)

{{ $type === 'province' ? __('ui.admin.stats.districts') : $location->province->subunitLabel() }}

@if($type === 'province')@endif @forelse($children as $child) @if($type === 'province')@endif @empty @endforelse
{{ __('ui.locations.name') }}{{ $location->subunitLabel() }}{{ __('ui.admin.status') }} {{ __('ui.locations.verification') }}
{{ $child->localizedName() }} @if(blank($child->name_ur)){{ __('ui.locations.urdu_missing') }}@endif
{{ $child->name_en }}
{{ $child->tehsils_count }} @if($child->needs_verification_count){{ $child->needs_verification_count }} ⚑@endif{{ $child->operational_status->label() }} @if($child->needs_verification){{ __('ui.locations.needs_verification') }}@elseif($child->verified_at){{ __('ui.locations.verified') }}@else — @endif
{{ __('ui.no_results') }}
{{ $children->links() }}
@endif @endsection