@if (in_array('profile', $activeWidgets))
{{ mb_ucfirst($user->name) }}
{{ $user->employeeDetails->designation->name ?? '--' }}
@lang('app.employeeId') :
{{ mb_strtoupper($user->employeeDetails->employee_id) }}
@endif
@if (!is_null($myActiveTimer))
{{ $myActiveTimer->start_time->timezone(company()->timezone)->format('M d, Y' . ' - ' . company()->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(company()->timezone)->format(company()->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(company()->timezone)->format(company()->time_format) . ' - ' . $item->end_time->timezone(company()->timezone)->format(company()->time_format) }}
@else
@lang('modules.timeLogs.break')
{{ $item->start_time->timezone(company()->timezone)->format(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
@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(company()->date_format) }}
|
{{ $weekDate->format('l') }} |
@if (isset($weekShifts[$key]->shift))
{{ $weekShifts[$key]->shift->shift_name }}
@if (!is_null($weekShifts[$key]->remarks) && $weekShifts[$key]->remarks != '')
@endif
@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 = now()->year;
$dateBirth = $upcomingBirthday->date_of_birth->format($currentYear . '-m-d');
$dateBirth = \Carbon\Carbon::parse($dateBirth);
$currentDay = \Carbon\Carbon::parse(now(company()->timezone)->toDateTimeString())->startOfDay()->setTimezone('UTC');
$diffInDays = $dateBirth->copy()->diffForHumans($currentDay);
@endphp
@if ($dateBirth->setTimezone(company()->timezone)->isToday())
@lang('app.today')
@else
{{ $diffInDays }}
@endif
|
@empty
|
@endforelse
@endif
@if (in_array('appreciation', $activeWidgets))
@forelse ($appreciations as $appreciation)
|
@if(isset($appreciation->award->awardIcon->icon))
@endif
@if(isset($appreciation->award))
{{ mb_ucwords($appreciation->award->title) }}
{{ $appreciation->award_date->format($company->date_format) }}
@endif
|
@empty
|
@endforelse
@endif
@if (in_array('leave', $activeWidgets))
@forelse ($leave as $totalLeave)
|
@if ($totalLeave->duration == 'single' || $totalLeave->duration == 'multiple')
@lang('modules.dashboard.fullDay')
@else
@if ($totalLeave->duration == 'half day' && $totalLeave->half_day_type == 'first_half')
@lang('modules.leaves.firstHalf')
@else
@lang('modules.leaves.secondHalf')
@endif
@endif
|
{{ucfirst($totalLeave->type->type_name)}}
|
@empty
|
@endforelse
@endif
@if (in_array('work_from_home', $activeWidgets))
@forelse ($workFromHome as $totalworkFromHome)
@empty
@endforelse
@endif
@if (in_array('work_anniversary', $activeWidgets))
@forelse ($upcomingAnniversaries as $upcomingAnniversary)
|
@php
// calculate total worked days
$currentDay = \Carbon\Carbon::parse(now(company()->timezone)->toDateTimeString())->startOfDay()->setTimezone('UTC');
$joiningDay = $upcomingAnniversary->joining_date;
$totalWorkDays = $joiningDay->copy()->diff($currentDay);
@endphp
@if ($joiningDay->setTimezone(company()->timezone)->isToday())
@lang('modules.dashboard.joinedToday')
@else
{{ $totalWorkDays->format(__('app.completed'). ' ' . ' %y '.__('app.year')) }}
@endif
|
@empty
|
@endforelse
@endif