@extends('layouts.admin') @section('title', $supermarket->name . ' - Aisle Management') @section('content')

Aisle Management

{{ $supermarket->name }}

@if(session('success')) @endif @if(session('error')) @endif @if($errors->any()) @endif
Total Aisles
{{ $aisles->count() }}
Active Aisles
{{ $aisles->where('is_active', true)->count() }}
Products in Aisles
{{ $aisles->sum('products_count') }}
Avg Products/Aisle
{{ $aisles->count() > 0 ? round($aisles->sum('products_count') / $aisles->count()) : 0 }}
Store Aisles
@if($aisles->count() > 0)
@foreach($aisles as $aisle) @endforeach
Image Aisle # Name & Description Category Products Status Actions
@if($aisle->aisle_image) {{ $aisle->aisle_name }} @else
@endif
{{ $aisle->aisle_number }}
{{ $aisle->aisle_name }}
{{ Str::limit($aisle->description ?? 'No description', 40) }} @if($aisle->location || $aisle->side)
{{ ucfirst($aisle->location) }}{{ $aisle->side ? ' - ' . ucfirst($aisle->side) : '' }} @endif
@if($aisle->primary_category) @php $mainCategoryInfo = $mainCategories->find($aisle->primary_category); $subCategoryInfo = $aisle->sub_category_id ? $subCategories->find($aisle->sub_category_id) : null; @endphp
@if($mainCategoryInfo && $mainCategoryInfo->image) {{ $mainCategoryInfo->name }} @endif
@if($mainCategoryInfo)
{{ $mainCategoryInfo->name }}
@else
Main ID: {{ $aisle->primary_category }}
@endif @if($subCategoryInfo)
{{ $subCategoryInfo->name }}
@endif
@else No category @endif
{{ $aisle->products_count ?? 0 }} Products @if($aisle->is_active) Active @else Inactive @endif
@csrf @method('DELETE')
@else
No Aisles Found

This supermarket doesn't have any aisles configured yet.

@endif
@endsection