@php use App\Domain\Time\BusinessCalendar; use App\Support\Format; $kpis = [ ['scheduled', $kpi['scheduled']], ['working', $kpi['working']], ['traveling', $kpi['traveling']], ['onBreak', $kpi['onBreak']], ['privateLeave', $kpi['privateLeave']], ['finished', $kpi['finished']], ['late', $kpi['late']], ['missing', $kpi['missing']], ]; $kindLabel = ['TRAVEL' => 'travel', 'WORK' => 'work', 'BREAK' => 'break', 'PRIVATE_LEAVE' => 'privateLeave']; @endphp
{{ __('attendanceMgmt.kpi.'.$key) }}
{{ $value }}
@switch($key) @case('scheduled'){{ __('attendanceMgmt.kpi.scheduledCaption', ['total' => $rows->count()]) }}@break @case('late'){{ __('attendanceMgmt.kpi.lateCaption', ['minutes' => $threshold]) }}@break @default{{ __('attendanceMgmt.kpi.'.$key.'Caption') }} @endswitch
{{ __('attendanceMgmt.dataNote') }}
{{ __('attendanceMgmt.table.subtitle', ['date' => BusinessCalendar::formatKey($dateKey), 'timezone' => $timezone]) }}
{{ __('attendanceMgmt.empty.noWorkers') }}
{{ __('attendanceMgmt.empty.noWorkersHint') }}
| {{ __('attendanceMgmt.table.worker') }} | {{ __('attendanceMgmt.table.shift') }} | {{ __('attendanceMgmt.table.firstTravel') }} | {{ __('attendanceMgmt.table.workStart') }} | {{ __('attendanceMgmt.table.break') }} | {{ __('attendanceMgmt.table.checkOut') }} | {{ __('attendanceMgmt.table.work') }} | {{ __('attendanceMgmt.table.status') }} | {{ __('attendanceMgmt.table.details') }} |
|---|---|---|---|---|---|---|---|---|
| {{ $r['name'] }} | {{ $r['planned'] ?? __('attendanceMgmt.table.noSchedule') }} | {{ $r['travel'] ?? '—' }} | {{ $r['start'] ?? '—' }} | {{ $r['breaks'] ?: '—' }} | {{ $r['end'] ?? '—' }} | {{ $r['workMinutes'] === null ? '—' : Format::minutes($r['workMinutes']) }} | {{ $r['hasRecord'] ? __('workStatus.'.$r['state']->langKey()) : __('workStatus.noRecord') }} @if ($r['lateMinutes']){{ __('attendanceMgmt.flags.late', ['minutes' => $r['lateMinutes']]) }}@endif @if ($r['explanationPending']){{ __('attendanceMgmt.flags.explanationPending') }}@endif @if ($r['missing']){{ __('attendanceMgmt.flags.missing') }}@endif @if ($r['abandoned']){{ __('attendanceMgmt.flags.incomplete') }}@endif |
{{ BusinessCalendar::formatKey($dateKey) }} · {{ $timezone }}
{{ __('attendanceMgmt.drawer.planned') }}: {{ $detail['planned'] ? $detail['planned']->startTime.'–'.$detail['planned']->endTime : __('attendanceMgmt.drawer.noSchedule') }}
@if (! $s){{ __('workStatus.noRecord') }}
@else{{ __('attendanceMgmt.drawer.durationsNote') }}
@include('livewire._journey-report',['journeySummary'=>$s,'journeyTimezone'=>$timezone,'journeySite'=>$detail['session']->events->first()?->metadata['worksite']['name']??null]) @php($warnings = $s['warnings']) @if ($detail['noSchedule'])@php($warnings[] = 'NO_SCHEDULE')@endif @if ($s['incomplete'] || ! $s['finished'])@php($warnings[] = 'INCOMPLETE_SESSION')@endif @if ($detail['session']->explanation?->status === 'pending')@php($warnings[] = 'EXPLANATION_PENDING')@endif @php($lowAccuracy = $detail['session']->events->contains(fn ($e) => $e->location && $e->location->accuracy_meters > config('qw.attendance.low_accuracy_warning_meters'))) @if ($lowAccuracy)@php($warnings[] = 'LOW_GPS_ACCURACY')@endif @if (count($warnings)){{ __('attendanceMgmt.drawer.coordinatesRestricted') }}
@endif @if ($detail['session']->explanation) @php($x = $detail['session']->explanation){{ __('attendanceMgmt.drawer.minutesLate', ['minutes' => $x->minutes_late]) }} · {{ $x->status === 'pending' ? __('attendanceMgmt.drawer.explanationPending') : __('attendanceMgmt.drawer.explanationSubmitted') }}
{{-- Worker-written text is shown as entered and never translated. --}}{{ $x->reason ?? __('attendanceMgmt.drawer.noReason') }}
@endif{{ __('attendanceMgmt.drawer.gpsDisclaimer') }}
@endif