@php $showFullProfile = false; $employeeDetail = $employee->employeeDetail; if ($viewPermission == 'all' || ($viewPermission == 'added' && $employeeDetail->added_by == user()->id) || ($viewPermission == 'owned' && $employeeDetail->user_id == user()->id) || ($viewPermission == 'both' && ($employeeDetail->user_id == user()->id || $employeeDetail->added_by == user()->id)) ) { $showFullProfile = true; } @endphp @php $editEmployeePermission = user()->permission('edit_employees'); $viewAppreciationPermission = user()->permission('view_appreciation'); @endphp

{{ $employee->name_salutation }} @isset($employee->country) @endisset

@if ($editEmployeePermission == 'all' || ($editEmployeePermission == 'added' && $employee->employeeDetail->added_by == user()->id)) @endif

{{ !is_null($employee->employeeDetail) && !is_null($employee->employeeDetail->designation) ? $employee->employeeDetail->designation->name : '' }} • {{ isset($employee->employeeDetail) && !is_null($employee->employeeDetail->department) && !is_null($employee->employeeDetail->department) ? $employee->employeeDetail->department->team_name : '' }} | {{__('app.role')}}: {{$employee->roles()->withoutGlobalScopes()->latest()->first()->display_name}}

@lang('app.lastLogin') @if (!is_null($employee->last_login)) {{ $employee->last_login->timezone(company()->timezone)->translatedFormat(company()->date_format . ' ' . company()->time_format) }} @else -- @endif

@if ($employee->status != 'active')

@endif @if ($showFullProfile) @endif
@if ($employee->employeeDetail->about_me != '')
{{ $employee->employeeDetail->about_me }}
@endif

@lang('modules.employees.gender')

@php $currentyearJoiningDate = \Carbon\Carbon::parse(now(company()->timezone)->year.'-'.$employee->employeeDetail->joining_date->translatedFormat('m-d')); if ($currentyearJoiningDate->copy()->endOfDay()->isPast()) { $currentyearJoiningDate = $currentyearJoiningDate->addYear(); } $diffInHoursJoiningDate = now(company()->timezone)->floatDiffInHours($currentyearJoiningDate, false); $currentDay = \Carbon\Carbon::parse(now(company()->timezone)->toDateTimeString())->startOfDay()->setTimezone('UTC'); $joiningDay = $employee->employeeDetail->joining_date; $totalWorkYears = $joiningDay->copy()->diffInYears($currentDay); $totalWorkMonths = $joiningDay->copy()->diffInMonths($currentDay); @endphp @if ($showFullProfile) @if($employee->employeeDetail->employment_type == 'internship') @endif @if($employee->employeeDetail->employment_type == 'on_contract') @endif {{-- Custom fields data --}} @endif
@if ($showFullProfile) @forelse ($employee->appreciationsGrouped as $item)
@if(isset($item->award->awardIcon->icon)) @endif {{ $item->no_of_awards }}
@empty @endforelse
@endif

@lang('modules.employees.reportingTo')

@if ($employee->employeeDetail->reportingTo) @else -- @endif
@if ($employee->reportingTeam)

@lang('modules.employees.reportingTeam')

@if (count($employee->reportingTeam) > 0) @if (count($employee->reportingTeam) > 1) @foreach ($employee->reportingTeam as $item) @endforeach @else @foreach ($employee->reportingTeam as $item) @endforeach @endif @else -- @endif
@endif
@if ($showFullProfile)
@if (in_array('attendance', user_modules()))
@endif @if (in_array('leaves', user_modules()))
@endif
@if (in_array('tasks', user_modules()))
@if (array_sum($taskChart['values']) > 0) @endif
@endif @if (in_array('tickets', user_modules()))
@if (array_sum($ticketChart['values']) > 0) @endif
@endif
@endif