@extends('layouts.app') @section('title', 'Shifts') @section('subtitle', 'Manage work shifts and schedules') @section('content')
@if(session('success'))

{{ session('success') }}

@endif @if(session('error'))

{{ session('error') }}

@endif
Add

Total Shifts

{{ \App\Models\Shift::count() }}

Active

{{ \App\Models\Shift::where('is_active', true)->count() }}

Total Employees

{{ \App\Models\User::count() }}

Current Shift

{{ \App\Models\Shift::where('is_active', true)->first()->name ?? 'N/A' }}

Shift List

{{ \App\Models\Shift::count() }} shifts
@forelse($shifts as $shift) @empty @endforelse
Shift Employees Status Actions
{{ $shift->name }}
{{ $shift->description ? Str::limit($shift->description, 50) : 'No description' }}
{{ $shift->users_count }} @if($shift->is_active) Active @else Inactive @endif
@csrf @method('DELETE')

No shifts found

Start by creating your first shift

@if($shifts->hasPages())
Showing {{ $shifts->firstItem() }} to {{ $shifts->lastItem() }} of {{ $shifts->total() }} results
@if($shifts->onFirstPage()) Previous @else Previous @endif @foreach($shifts->getUrlRange(1, $shifts->lastPage()) as $page => $url) @if($page == $shifts->currentPage()) {{ $page }} @else {{ $page }} @endif @endforeach @if($shifts->hasMorePages()) Next @else Next @endif
@endif
@endsection