@extends('layouts.app') @push('styles') @if ((!is_null($viewEventPermission) && $viewEventPermission != 'none') || (!is_null($viewHolidayPermission) && $viewHolidayPermission != 'none') || (!is_null($viewTaskPermission) && $viewTaskPermission != 'none') || (!is_null($viewTicketsPermission) && $viewTicketsPermission != 'none') || (!is_null($viewLeavePermission) && $viewLeavePermission != 'none') ) @endif @endpush @section('content')
{!! now()->timezone(company()->timezone)->translatedFormat(company()->time_format) . '' . now()->timezone(company()->timezone)->translatedFormat('l') . '' !!} @if (!is_null($currentClockIn)) @lang('app.clockInAt') - {{ $currentClockIn->clock_in_time->timezone(company()->timezone)->translatedFormat(company()->time_format) }} @endif
@php $current_time = now()->timezone(company()->timezone)->translatedFormat(company()->time_format); $msg = null; $strt = \Carbon\Carbon::createFromFormat('H:i:s', $attendanceSettings->office_start_time)->translatedFormat(company()->time_format); $end_time = \Carbon\Carbon::createFromFormat('H:i:s', $attendanceSettings->office_end_time)->translatedFormat(company()->time_format); $current_user_id = auth()->user()->id; // Assuming you're using Laravel's authentication and getting the current user ID $leave_for_current_user = $leave->where('user_id', $current_user_id)->first(); if($leave_for_current_user != null){ $msg = 'Leave is applied for today.'; }else if(!is_null($checkTodayHoliday) && $checkTodayHoliday->exists){ $msg = 'Today is Holiday.'; }else if($cannotLogin == true){ $msg = 'You are not within office hours.'; } /* true means shift is near to cross with auto clock time adding clock out show false means show clock in */ $flagbtn = now()->timezone(company()->timezone)->addHours($attendanceSettings->auto_clock_out_time)->gt($shiftEndDateTime); @endphp @if (in_array('attendance', user_modules())) @if (is_null($currentClockIn) && $checkJoiningDate == true || (is_null($currentClockIn) && $flagbtn == false)) @endif @endif @if (!is_null($currentClockIn) && is_null($currentClockIn->clock_out_time) || (!is_null($currentClockIn) && $flagbtn == true)) @endif @if (in_array('admin', user_roles())) @endif@lang('modules.timeLogs.totalHours'): {{ \Carbon\CarbonInterval::formatHuman(now()->diffInMinutes($myActiveTimer->start_time) - $myActiveTimer->breaks->sum('total_minutes')) }}