@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => '']) @php $formatShiftClock = function ($value) { if ($value === null || $value === '') { return '-'; } if (!is_numeric($value)) { return (string) $value; } $totalMinutes = (int) $value; $hours = intdiv($totalMinutes, 60); $minutes = $totalMinutes % 60; return sprintf('%02d:%02d', $hours, $minutes); }; $formatShiftClockWithDay = function ($value) use ($formatShiftClock) { if ($value === null || $value === '' || !is_numeric($value)) { return $formatShiftClock($value); } $minutes = (int) $value; if ($minutes < 1440) { return $formatShiftClock($minutes); } return $formatShiftClock($minutes - 1440) . ' (+1)'; }; @endphp