@php
$secEmp = [];
foreach($item->employees as $usrdt){
$secEmp[] = $usrdt->id;
}
$employeeStatus = $item->employeesData->filter(function ($value, $key) use ($loggedEmployee) {
return $value->user_id == $loggedEmployee->id;
})->first();
@endphp
@if ($viewInterviewPermission == 'all'
|| ($viewInterviewPermission == 'added' && $item->added_by == user()->id)
|| ($viewInterviewPermission == 'owned' && in_array($loggedEmployee->id, $secEmp))
|| ($viewInterviewPermission == 'both' && (in_array($loggedEmployee->id, $secEmp)) || $item->added_by == user()->id))
@if ($viewInterviewPermission == 'all'
|| ($viewInterviewPermission == 'added' && $item->added_by == user()->id)
|| ($viewInterviewPermission == 'owned' && in_array($loggedEmployee->id, $secEmp)
|| ($viewInterviewPermission == 'both' && (in_array($loggedEmployee->id, $secEmp)) || $item->added_by == user()->id)))
{{ $item->jobApplication ? ucfirst($item->jobApplication->full_name) : ''}}
@else
{{ $item->jobApplication ? ucfirst($item->jobApplication->full_name) : '' }}
@endif
{{ $item->jobApplication ? ucfirst($item->jobApplication->job->title) : '' }}
|
{{ $item->schedule_date->format(company()->date_format) }} |
@php
if ($item->status == 'pending') {
$priority = 'yellow';
} elseif ($item->status == 'hired') {
$priority = 'light-green';
} elseif ($item->status == 'canceled') {
$priority = 'red';
} elseif ($item->status == 'rejected') {
$priority = 'brown';
} elseif ($item->status == 'completed') {
$priority = 'blue';
} else {
$priority = 'black';
}
@endphp
|
@if ($viewInterviewPermission == 'all'
|| ($viewInterviewPermission == 'added' && $item->added_by == user()->id)
|| ($viewInterviewPermission == 'owned' && in_array($loggedEmployee->id, $secEmp)
|| ($viewInterviewPermission == 'both' && (in_array($loggedEmployee->id, $secEmp)) || $item->added_by == user()->id)))
@endif
|
@endif
@endif
@empty