@extends('backend.template.layouts.template-base') @section('title', 'Delivery Setup - Manage Zones') @section('content')

Manage Zones

plus Add New Zone
{{-- Outer container: white card wrapping filter + zone cards --}}
{{-- Filter Row --}}
{{-- Zone Cards --}} @if ($zones->isEmpty())
No zones found.
@else
@foreach ($zones as $zone) @php $pinCount = $zone->pincodes->count(); $bandCount = $zone->feeBands->count(); $firstPins = $zone->pincodes->take(3)->pluck('pincode'); $morePins = max(0, $pinCount - 3); @endphp
{{-- Top row: name + badge | actions --}}
{{ $zone->name }} {{ ucfirst($zone->status) }}
@if ($zone->status === 'active') {{ $zone->zone_code }}  |  {{ $pinCount }} PIN {{ $pinCount === 1 ? 'code' : 'codes' }}  |  Last updated on {{ $zone->updated_at->format('d M Y') }} @if ($bandCount)  |  {{ $bandCount }} Fee Band{{ $bandCount != 1 ? 's' : '' }} @endif @else {{ $zone->zone_code }}  ·  {{ $pinCount }} PIN {{ $pinCount === 1 ? 'code' : 'codes' }}  ·  Last updated on {{ $zone->updated_at->format('d M Y') }} @endif

{{-- Bottom row: warehouse | pins --}} @if ($zone->warehouse)
WAREHOUSE : {{ $zone->warehouse->warehouse_name }}
@if ($pinCount)
PINs : {{ $firstPins->join(', ') }}{{ $morePins > 0 ? '....' : '' }}{{ $morePins > 0 ? '+' . $morePins . ' more' : '' }}
@endif
@else
i No warehouse added yet. Assign a warehouse before activating this zone so that it won't affect the fee bands. Add Warehouse
@endif
@endforeach
{{-- /.fb-list --}} @endif
{{-- /.fb-container --}}
{{-- Status Modal --}} {{-- Delete Modal --}} @endsection @section('scripts') @endsection