@if (in_array('work_anniversary', $activeWidgets) && in_array('employees', user_modules()))
@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