@extends('layouts.app') @section('title', 'Boxes Management') @section('page-title', 'Boxes Management') @section('content')
Boxes Management
@if(\App\Helpers\PermissionHelper::isSuperUser(auth()->id())) Showing all boxes (Super User) @else Showing boxes from your authorized branches, zones, and sub-zones @endif
Add New Box
@if($boxes->count() > 0)
@foreach($boxes as $box) @endforeach
ID Name Branch Zone Sub Zone Location Status Created Actions
{{ $box->id }} {{ $box->name }} @if($box->subZone && $box->subZone->zone && $box->subZone->zone->branch)
{{ $box->subZone->zone->branch->name }} @if($box->subZone->zone->branch->code) {{ $box->subZone->zone->branch->code }} @endif
@else - @endif
@if($box->subZone && $box->subZone->zone)
{{ $box->subZone->zone->name }} @if($box->subZone->zone->code) {{ $box->subZone->zone->code }} @endif
@else - @endif
@if($box->subZone)
{{ $box->subZone->name }} @if($box->subZone->code) {{ $box->subZone->code }} @endif
@else - @endif
@if($box->latitude && $box->longitude)
{{ number_format($box->latitude, 6) }}, {{ number_format($box->longitude, 6) }}
@else - @endif
@if($box->is_active) Active @else Inactive @endif {{ $box->created_at->format('M d, Y') }}
{{ $boxes->links('pagination.custom') }}
@else
No Boxes Found

Start by creating your first box.

Create First Box
@endif
@endsection @section('scripts') @endsection