@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->name) ? $profile->profileDesignation->name : ''}} 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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $monHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $tuesHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $wedHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $thursHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $friHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $satHours+=$timeP->total_hours; @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 : {{ $timeP->total_hours }}

@if($timeP->approved==0) @endif @php $sunHours+=$timeP->total_hours; @endphp @endif @endforeach @endif
@php $profileTotalHours=0; if(!empty($profile->timeCardProfile)){ foreach ($profile->timeCardProfile as $timeP){ $profileTotalHours+=$timeP->total_hours; } } $totalUserHours += $profileTotalHours; @endphp

{{ number_format($profileTotalHours,2) }}

Total Hrs : {{ number_format($monHours,2) }} Total Hrs : {{ number_format($tuesHours,2) }} Total Hrs : {{ number_format($wedHours,2) }} Total Hrs : {{ number_format($thursHours,2) }} Total Hrs : {{ number_format($friHours,2) }} Total Hrs : {{ number_format($satHours,2) }} Total Hrs : {{ number_format($sunHours,2) }} {{ number_format($totalUserHours,2) }}

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