@extends('layouts.main') @section('content')

Timesheet for {{ isset($schedule->name) ? $schedule->name : ''}}

@if (!empty($profiles)) @php $mondayDateYmd = date("Y-m-d", strtotime($schedule->start)); $tuesdayDateYmd = date('Y-m-d',strtotime('+1 day', strtotime($mondayDateYmd))); $wedDateYmd = date('Y-m-d',strtotime('+2 days', strtotime($mondayDateYmd))); $thursDateYmd = date('Y-m-d',strtotime('+3 days', strtotime($mondayDateYmd))); $friDateYmd = date('Y-m-d',strtotime('+4 days', strtotime($mondayDateYmd))); $saturdayDateYmd = date('Y-m-d',strtotime('+5 days', strtotime($mondayDateYmd))); $sundayDateYmd = date('Y-m-d',strtotime('+6 days', strtotime($mondayDateYmd))); $totalUserHours = 0; $monHours = 0; $tuesHours = 0; $wedHours = 0; $thursHours = 0; $friHours = 0; $satHours = 0; $sunHours = 0; @endphp @foreach ($profiles as $profile) @endforeach @endif
Names Monday
{{$mondayDate}}
Tuesday
{{$tuesdayDate}}
Wednesday
{{$wedDate}}
Thursday
{{$thursDate}}
Friday
{{$friDate}}
Saturday
{{$saturdayDate}}
Sunday
{{$sundayDate}}
Total Shifts
@if ($profile->autoLogout->count() > 0) @endif {{ $profile->profile_first_name}} {{$profile->profile_last_name}} {{ isset($profile->profileDesignation->career_path) ? $profile->profileDesignation->career_path : ''}} scheduleDetails[$mondayDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$mondayDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$mondayDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $monHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$tuesdayDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$tuesdayDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$tuesdayDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $tuesHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$wedDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$wedDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$wedDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $wedHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$thursDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$thursDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$thursDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $thursHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$friDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$friDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$friDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $friHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$saturdayDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$saturdayDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$saturdayDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $satHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
scheduleDetails[$sundayDate]['shiftId'] !='' && !empty($profile->timeCardProfile)) style="background-color:{{$profile->scheduleDetails[$sundayDate]['color']}} ;" @endif> @if(!empty($profile->timeCardProfile)) @foreach ($profile->timeCardProfile as $timeP) @if($timeP->day==$sundayDateYmd)

In : {{ date('H:i', strtotime($timeP->time_in)) }}

Out : {{ date('H:i', strtotime($timeP->time_out)) }} @if($timeP->autoLogout) Logged out @endif

Total Hrs : {{ str_replace(':',".",$timeP->total_hours) }}

@if($timeP->approved==0) @endif @php $sunHours+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); @endphp @endif @endforeach @endif
@php $totalSecond=0; if(!empty($profile->timeCardProfile)){ foreach ($profile->timeCardProfile as $timeP){ $totalSecond+=$common->getMinutesBetweenTwoTimes($timeP->time_in, $timeP->time_out); } } $totalUserHours += $totalSecond; @endphp

{{ floor($totalSecond / 3600).'.'. floor(($totalSecond / 60) % 60) }}

Total Hrs : {{ floor($monHours / 3600).'.'. floor(($monHours / 60) % 60) }} Total Hrs : {{ floor($tuesHours / 3600).'.'. floor(($tuesHours / 60) % 60) }} Total Hrs : {{ floor($wedHours / 3600).'.'. floor(($wedHours / 60) % 60) }} Total Hrs : {{ floor($thursHours / 3600).'.'. floor(($thursHours / 60) % 60) }} Total Hrs : {{ floor($friHours / 3600).'.'. floor(($friHours / 60) % 60) }} Total Hrs : {{ floor($satHours / 3600).'.'. floor(($satHours / 60) % 60) }} Total Hrs : {{ floor($sunHours / 3600).'.'. floor(($sunHours / 60) % 60) }} {{ floor($totalUserHours / 3600).'.'. floor(($totalUserHours / 60) % 60) }}

Shifts Legend

    @foreach ($shifts as $shift)
  • {{ucwords($shift->name)}} ({{$shift->start}})
  • @endforeach
@endsection @section('sub_header')
Timesheet for {{$team->team_name}}
@if ($loggedUserDetails['guard'] == 'user') @endif
@endsection @section('theam_css') @endsection @section('page_css') @endsection @section('js_file') @endsection @section('page_js') @endsection