@extends('layouts.master') @section('title', $title) @section('page_css') @endsection @section('content') @php // Saturday first (the hospital week) $week = [6 => 'Sat', 0 => 'Sun', 1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri']; $canPay = $usesLeavePay && auth()->user()->can('leave-paid-unpaid-manage'); $dayList = fn ($days) => collect($week)->filter(fn ($n, $d) => in_array($d, $days, true))->implode(', '); @endphp {{-- each staff member's shift, working days and exemptions (AttendanceCalculator reads them) --}}
Hospital working days: {{ $dayList($hospitalDays) ?: 'none' }} — staff on Hospital default follow them (change in Attendance rules). Give a staff member their own days when they are off on a different day (e.g. off Thursday instead of Friday). One day's pay is their salary ÷ their working days of the month.
@if ($canPay)@endif @forelse ($staff as $s) @php $own = $s->work_days !== null && trim($s->work_days) !== ''; $days = \App\Services\HrmRules::workDays($rules, $s->work_days); @endphp @if ($canPay) @endif @empty @endforelse
Staff Shift Working days ExemptPaid leave
{{ $s->name }}
{{ $jobTitles[$s->job_title] ?? '' }}
@foreach ($week as $d => $label) @endforeach
attendance_exempt)>
paid_leave)>
No enabled staff.
{{-- one schedule for many staff --}} @endsection @section('page_js') @endsection