@extends('layouts.app') @section('title', 'Locker Update Report') @section('content')
@php $hasSearch = request()->filled('range') || request()->filled('from_date') || request()->filled('to_date'); @endphp @if($hasSearch) Download Report @endif
{{ $records->count() }} Results
@php $ranges = [ ['val' => '3', 'label' => 'Last 3d', 'count' => $count3, 'color' => 'blue'], ['val' => '7', 'label' => 'Last 7d', 'count' => $count7, 'color' => 'yellow'], ['val' => '15', 'label' => 'Last 15d', 'count' => $count15, 'color' => 'orange'], ['val' => '30', 'label' => 'Last 30d', 'count' => $count30, 'color' => 'red'], ]; @endphp @foreach($ranges as $range) {{ $range['label'] }} {{ $range['count'] }} @endforeach
Reset
@forelse($records as $record) @empty @endforelse
S.No Locker Info OLD NEW Date Time Action
{{ $loop->iteration }}
{{ $record->locker->locker_number }}
{{ $record->locker->lockerGroup->name ?? 'N/A' }} • {{ ucfirst($record->locker->locker_size) }}
@if($record->old_value !== null)
@switch($record->old_value) @case('available') {{ $record->old_value }} @case('occupied') {{ $record->old_value }} @case('maintenance') {{ $record->old_value }} @default {{ $record->old_value }} @endswitch
@endif
@if($record->new_value !== null)
@switch($record->new_value) @case('available') {{ $record->new_value }} @case('occupied') {{ $record->new_value }} @case('maintenance') {{ $record->new_value }} @default {{ $record->new_value }} @endswitch
@endif
{{ $record->create_date ? \Carbon\Carbon::parse($record->create_date)->format('d-m-Y') : '-' }} {{ $record->create_time ? \Carbon\Carbon::parse($record->create_time)->format('H:i:s') : '' }}
No locker updates found.
@endsection