@extends('layouts.header_admin') @section('css') @endsection @section('content') @if(session()->has('message'))
{{ session()->get('message') }}
@endif
@if(count($personnels) > 0) @foreach($personnels as $key => $employee) {{-- New Laborer --}} @endforeach @endif
Employee Name Action
{{strtoupper($employee->displayName)}}
@if(count($personnels) > 0) @foreach($personnels as $key => $employee) @include('users.view_record') @endforeach @endif @php function get_working_hours($timeout,$timein) { return round((((strtotime($timeout) - strtotime($timein)))/3600),2); } function get_late($schedule,$timein) { $late = (((strtotime($schedule->time_in) - strtotime($timein)))/3600); // dd($late); if($late < 0) { $late_data = $late; } else { $late_data = 0; } return round($late_data*-1,2); } function night_difference($start_work,$end_work) { $start_night = mktime('22','00','00',date('m',$start_work),date('d',$start_work),date('Y',$start_work)); $end_night = mktime('06','00','00',date('m',$start_work),date('d',$start_work) + 1,date('Y',$start_work)); if($start_work >= $start_night && $start_work <= $end_night) { if($end_work >= $end_night) { return ($end_night - $start_work) / 3600; } else { return ($end_work - $start_work) / 3600; } } elseif($end_work >= $start_night && $end_work <= $end_night) { if($start_work <= $start_night) { return ($end_work - $start_night) / 3600; } else { return ($end_work - $start_work) / 3600; } } else { if($start_work < $start_night && $end_work > $end_night) { return ($end_night - $start_night) / 3600; } return 0; } } @endphp @endsection @section('js') @endsection