@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')
@if (!is_null($checkTodayLeave))
@elseif (!is_null($checkTodayHoliday))
@endif @if(in_array('admin', user_roles()))
@include('dashboard.update-message-dashboard') @includeIf('dashboard.update-message-module-dashboard')
@endif

@lang('app.welcome') {{ $user->name }}

{!! 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 $currentDateTime = now()->timezone(company()->timezone); $msg = null; $start_time = \Carbon\Carbon::createFromFormat('H:i:s', $attendanceSettings->office_start_time, company()->timezone); $mid_time = \Carbon\Carbon::createFromFormat('H:i:s', $attendanceSettings->halfday_mark_time, company()->timezone); $end_time = \Carbon\Carbon::createFromFormat('H:i:s', $attendanceSettings->office_end_time, company()->timezone); if ($start_time->gt($end_time)) { // check if shift end time is less then current time then shift not ended yet if( now(company()->timezone)->lessThan($end_time) || (now(company()->timezone)->greaterThan($end_time) && now(company()->timezone)->lessThan($start_time)) ){ $start_time->subDay(); $mid_time->subDay(); }else{ $mid_time->addDay(); $end_time->addDay(); } } // dd($checkTodayHoliday); $current_user_id = auth()->user()->id; $leaveApplied = $leave->where('user_id', $current_user_id)->where('status', 'approved')->first(); if($leaveApplied != null && ($leaveApplied->duration === 'single' || $leaveApplied->duration === 'multiple') && $currentDateTime->between($start_time, $end_time)){ $msg = __('messages.leaveApplied'); }elseif ($leaveApplied != null && $leaveApplied->duration === 'half day' && $leaveApplied->half_day_type === 'first_half' && $currentDateTime->lt($mid_time) && $currentDateTime->between($start_time, $mid_time)){ $msg = __('messages.leaveForFirstHalf'); }elseif ($leaveApplied != null && $leaveApplied->duration === 'half day' && $leaveApplied->half_day_type === 'second_half' && $currentDateTime->gt($mid_time) && $currentDateTime->between($mid_time, $end_time)){ $msg = __('messages.leaveForSecondHalf'); }else if(!is_null($checkTodayHoliday) && $checkTodayHoliday->exists){ $msg = __('messages.todayHoliday'); }else if($cannotLogin == true){ $msg = __('messages.notInOfficeHours'); } /* 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
@if(count(array_intersect(['profile', 'shift_schedule', 'birthday', 'notices'], $activeWidgets)) > 0)
@if (in_array('profile', $activeWidgets))
Card image

{{ $user->name }}

{{ $user->employeeDetail->designation->name ?? '--' }}

@lang('app.employeeId') : {{ $user->employeeDetail->employee_id }}

@endif @if (!is_null($myActiveTimer) && in_array('tasks', user_modules()))
{{ $myActiveTimer->start_time->timezone(company()->timezone)->translatedFormat('M d, Y' . ' - ' . company()->time_format) }}

@lang('modules.timeLogs.totalHours'): {{ \Carbon\CarbonInterval::formatHuman(now()->diffInMinutes($myActiveTimer->start_time) - $myActiveTimer->breaks->sum('total_minutes')) }}

  • @lang('modules.timeLogs.startTime') {{ $myActiveTimer->start_time->timezone(company()->timezone)->translatedFormat(company()->time_format) }}
  • @lang('app.task') {{ $myActiveTimer->task->heading }}
  • @foreach ($myActiveTimer->breaks as $item)
  • @if (!is_null($item->end_time)) @lang('modules.timeLogs.break') ({{ \Carbon\CarbonInterval::formatHuman($item->end_time->diffInMinutes($item->start_time)) }}) {{ $item->start_time->timezone(company()->timezone)->translatedFormat(company()->time_format) . ' - ' . $item->end_time->timezone(company()->timezone)->translatedFormat(company()->time_format) }} @else @lang('modules.timeLogs.break') {{ $item->start_time->timezone(company()->timezone)->translatedFormat(company()->time_format) }} @endif
  • @endforeach
@if ($editTimelogPermission == 'all' || ($editTimelogPermission == 'added' && $myActiveTimer->added_by == user()->id) || ($editTimelogPermission == 'owned' && (($myActiveTimer->project && $myActiveTimer->project->client_id == user()->id) || $myActiveTimer->user_id == user()->id)) || ($editTimelogPermission == 'both' && (($myActiveTimer->project && $myActiveTimer->project->client_id == user()->id) || $myActiveTimer->user_id == user()->id || $myActiveTimer->added_by == user()->id))) @if (is_null($myActiveTimer->activeBreak)) @lang('modules.timeLogs.pauseTimer') @lang('modules.timeLogs.stopTimer') @else @lang('modules.timeLogs.resumeTimer') @endif @endif
@endif @include('dashboard.employee.widgets.shift_schedule') @include('dashboard.employee.widgets.birthday') @include('dashboard.employee.widgets.appreciation') @include('dashboard.employee.widgets.leave') @include('dashboard.employee.widgets.work_from_home') @include('dashboard.employee.widgets.work_anniversary') @include('dashboard.employee.widgets.notice-period') @include('dashboard.employee.widgets.probation') @include('dashboard.employee.widgets.internship') @include('dashboard.employee.widgets.contract')
@endif
@if (in_array('tasks', $activeWidgets) && (!is_null($viewTaskPermission) && $viewTaskPermission != 'none') && in_array('tasks', user_modules())) @endif @include('dashboard.employee.widgets.projects') @include('dashboard.employee.widgets.follow_ups') @include('dashboard.employee.widgets.lead') @include('dashboard.employee.widgets.week_timelog')
@include('dashboard.employee.widgets.my_tasks') @include('dashboard.employee.widgets.tickets') @include('dashboard.employee.widgets.my_calendar') @include('dashboard.employee.widgets.notices')
@endsection @push('scripts') @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 @if (attendance_setting()->radius_check == 'yes' || attendance_setting()->save_current_location) @endif @endpush