@extends('layouts.customer') @section('content')
{{--

Staff

--}}
@if ($message = Session::get('success'))

{{ $message }}

@endif
{{ $staff->getName() ?? 'Guest' }}

{{ $staff->getName() ?? 'Guest' }} @if( $staff->roles->whereNotIn('name', 'BranchStaffMember')->first() ) ( {{ $staff->roles->whereNotIn('name', 'BranchStaffMember')->first()->display_name ?? '' }} ) @endif

Employee at {{ $restaurant_name }}

Hourly Pay: {{ $staff->payment_type_hourly ? "$".$staff->payment_type_hourly : 'N/A' }}

@if( $staff->lastClocked )

@php $lastClocked = $staff->lastClocked; $fmt_date = \Carbon\Carbon::parse($lastClocked->created_at)->format('F j, Y'); // 'Apr 16, 2024'; $fmt_time = \Carbon\Carbon::parse($lastClocked->created_at)->format('h:i a'); // '01:30 PM'; @endphp {{ sprintf('Last active %s at %s', $fmt_date, $fmt_time) }}

@endif

Staff Clock In/Out

{{--
--}}
Display Filters
{{--
--}}
{{----}} @if( $staff->clock ) @foreach( $staff->clock as $date => $clock ) {{----}} @endforeach @endif
Date Day Clock In Clock Out Hours BreakOT OT PayTotal Pay Action
{{ $clock['date'] ?? '' }} {{ $clock['day'] ?? '' }} @if (!empty($clock['check_in'])) {{ $clock['check_in'] }} @else 0 @endif @if (!empty($clock['check_out'])) {{ $clock['check_out'] }} @else 0 @endif {{ $clock['total_time'] ?? '' }} @php if( isset($clock['break']) && isset($clock['break_start']) && isset($clock['break_end']) ) { /*$breakTimeDiff = \Carbon\Carbon::parse($clock['break_start'])->diffForHumans( \Carbon\Carbon::parse($clock['break_end']), CarbonInterface::DIFF_ABSOLUTE );*/ $breakTimeDiff = $clock['break_start']->diffForHumans( $clock['break_end'], \Carbon\CarbonInterface::DIFF_ABSOLUTE ); echo $breakTimeDiff; } else { echo '-'; } @endphp @php // $working_hours = 8; // Dynamically added $regular_hours = $working_hours * 60 * 60; $overtime_clocked = 0; if( $clock['time'] > $regular_hours ) { $overtime_clocked = $clock['time'] - $regular_hours; } $hours = floor($overtime_clocked / 3600); $mins = floor($overtime_clocked / 60 % 60); echo timeDiffInHoursAndMins($hours, $mins); @endphp @if( isset($staff->payment_type_hourly) && $staff->payment_type_hourly > 0 ) @if( $overtime_clocked ) @php $per_hour = $staff->payment_type_hourly; $hours = floor( $overtime_clocked / 3600 ); $mins = floor( $overtime_clocked / 60 % 60 ); @endphp ${{ number_format(round($hours * $per_hour + $mins * ($per_hour / 60), 2) * 1.5, 2) }} @else {{ 'N/A' }} @endif @else {{ 'N/A' }} @endif @if( isset($staff->payment_type_hourly) && $staff->payment_type_hourly > 0 ) @if( $clock['time'] ) @php $per_hour = $staff->payment_type_hourly; $hours = floor( ( $clock['time'] ) / 3600 ); $mins = floor( ( $clock['time'] ) / 60 % 60 ); $totalTime = round($hours * $per_hour + $mins * ($per_hour / 60), 2); @endphp ${{ number_format(round($totalTime, 2), 2) }} @else {{ 'N/A' }} @endif @else {{ 'N/A' }} @endif
Account Information

First Name

{{ $staff->first_name ?? '-' }}

Last Name

{{ $staff->last_name ?? '-' }}

Email

{{ $staff->email ?? '-' }}

Phone

{{ $staff->phone ?? '-' }}

Certificates (0)
@if( isset($staff->certificates) && $staff->certificates)
# First Last Handle
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter
@else

No certificates added yet.

@endif
Onboarding (0)
@php $documents = [ [ 'name' => 'W-4 Form', 'slug' => 'w-4', 'version' => 0, 'file' => '', ], [ 'name' => 'I-9 Form', 'slug' => 'i-9', 'version' => 0, 'file' => '', ], [ 'name' => 'State Withholding Form', 'slug' => 'state-withholding', 'version' => 0, 'file' => '', ], ]; @endphp @if($documents) @foreach( $documents as $document ) @endforeach
Name Version File
{{ $document['name'] ?? '' }} {{ $document['version'] ?? '' }} @if( isset($document['file']) && !empty($document['file']) ) {{ 'Sent' }} @else {{ 'Not sent' }} @endif
@else

No documents added yet.

@endif
@endsection @section('beforescript') @endsection @section('script')