@extends('layouts.app') @push('styles') @if (!is_null($viewEventPermission) && $viewEventPermission != 'none') @endif @endpush @section('content')

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

{!! now()->timezone(global_setting()->timezone)->format(global_setting()->time_format) . '' . now()->timezone(global_setting()->timezone)->format('l') . '' !!} @if (!is_null($currentClockIn)) @lang('app.clockInAt') - {{ $currentClockIn->clock_in_time->timezone(global_setting()->timezone)->format(global_setting()->time_format) }} @endif

@if (in_array('attendance', user_modules()) && $cannotLogin == false) @if (is_null($currentClockIn) && is_null($checkTodayLeave)) @endif @endif @if (!is_null($currentClockIn) && is_null($currentClockIn->clock_out_time)) @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->employeeDetails->designation->name ?? '--' }}

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

@endif @if (in_array('attendance', user_modules()) && in_array('shift_schedule', $activeWidgets))
@lang('modules.attendance.shift') @foreach ($currentWeekDates as $key => $weekDate) @if (isset($weekShifts[$key])) {{ $weekDate->format(global_setting()->date_format) }} {{ $weekDate->format('l') }} @if (isset($weekShifts[$key]->shift)) {{ $weekShifts[$key]->shift->shift_name }} @else {!! $weekShifts[$key] !!} @endif @if (isset($weekShifts[$key]->shift)) @if (attendance_setting()->allow_shift_change && !$weekDate->isPast()) @if (!is_null($weekShifts[$key]->requestChange) && $weekShifts[$key]->requestChange->status == 'waiting') @else @endif @else -- @endif @else -- @endif @endif @endforeach
@endif @if (in_array('birthday', $activeWidgets))
@forelse ($upcomingBirthdays as $upcomingBirthday) {{ $upcomingBirthday->date_of_birth->format('d') }} {{ $upcomingBirthday->date_of_birth->format('M') }} @php $currentYear = \Carbon\Carbon::now()->year; $dateBirth = $upcomingBirthday->date_of_birth->format($currentYear . '-m-d'); $dateBirth = \Carbon\Carbon::parse($dateBirth); $date1 = \Carbon\Carbon::now(); $date1 = strtotime($date1); $date2 = strtotime($dateBirth); $diff = $date2 - $date1; $diff_in_days = floor($diff / (60 * 60 * 24)) + 1; @endphp @if ($diff_in_days == 0) @lang('app.today') @else @lang('modules.dashboard.inDays', ['days' => $diff_in_days]) @endif @empty @endforelse
@endif @if (!is_null($myActiveTimer))
{{ $myActiveTimer->start_time->timezone(global_setting()->timezone)->format('M d, Y' . ' - ' . global_setting()->time_format) }}

@php $endTime = now(); $totalHours = $endTime->diff($myActiveTimer->start_time)->format('%d') * 24 + $endTime->diff($myActiveTimer->start_time)->format('%H'); $totalMinutes = $totalHours * 60 + $endTime->diff($myActiveTimer->start_time)->format('%i'); $totalMinutes = $totalMinutes - $myActiveTimer->breaks->sum('total_minutes'); $timeLog = intdiv($totalMinutes, 60) . ' ' . __('app.hrs') . ' '; if ($totalMinutes % 60 > 0) { $timeLog .= $totalMinutes % 60 . ' ' . __('app.mins'); } @endphp @lang('modules.timeLogs.totalHours'): {{ $timeLog }}

  • @lang('modules.timeLogs.startTime') {{ $myActiveTimer->start_time->timezone(global_setting()->timezone)->format(global_setting()->time_format) }}
  • @lang('app.task') {{ $myActiveTimer->task->heading }}
  • @foreach ($myActiveTimer->breaks as $item)
  • @if (!is_null($item->end_time)) @php $endTime = $item->end_time; $totalHours = $endTime->diff($item->start_time)->format('%d') * 24 + $endTime->diff($item->start_time)->format('%H'); $totalMinutes = $totalHours * 60 + $endTime->diff($item->start_time)->format('%i'); $timeLog = intdiv($totalMinutes, 60) . ' ' . __('app.hrs') . ' '; if ($totalMinutes % 60 > 0) { $timeLog .= $totalMinutes % 60 . ' ' . __('app.mins'); } @endphp @lang('modules.timeLogs.break') ({{ $timeLog }}) {{ $item->start_time->timezone(global_setting()->timezone)->format(global_setting()->time_format) . ' - ' . $item->end_time->timezone(global_setting()->timezone)->format(global_setting()->time_format) }} @else @lang('modules.timeLogs.break') {{ $item->start_time->timezone(global_setting()->timezone)->format(global_setting()->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 @if (in_array('notices', $activeWidgets)) @isset($notices)

@lang('app.menu.notices')

@foreach ($notices as $notice) @endforeach
@endisset @endif
@endif
@if (in_array('tasks', $activeWidgets)) @endif @if (in_array('projects', $activeWidgets)) @endif
@if (in_array('my_task', $activeWidgets))
@lang('app.task')# @lang('app.task') @lang('app.status') @lang('app.dueDate') @forelse ($pendingTasks as $task) #{{ $task->id }}
{{ ucfirst($task->heading) }}

@foreach ($task->labels as $label) {{ $label->label_name }} @endforeach

{{ $task->boardColumn->column_name }} @if (is_null($task->due_date)) -- @elseif ($task->due_date->endOfDay()->isPast()) {{ $task->due_date->format(global_setting()->date_format) }} @elseif ($task->due_date->setTimezone(global_setting()->timezone)->isToday()) {{ __('app.today') }} @else {{ $task->due_date->format(global_setting()->date_format) }} @endif @empty @endforelse
@endif @if (in_array('my_calender', $activeWidgets))
@endif
@endsection @push('scripts') @if (!is_null($viewEventPermission) && $viewEventPermission != 'none') @endif @if (attendance_setting()->radius_check == 'yes' || attendance_setting()->save_current_location) @endif @endpush