@extends('layouts.app') @push('datatable-styles') @include('sections.datatable_css') @endpush @push('styles') @endpush @php $viewJobPermission = user()->permission('view_job'); $viewInterviewPermission = user()->permission('view_interview_schedule'); @endphp @section('content')
{!! $dataTable->table(['class' => 'table table-hover border-0 w-100 mt-3 mb-3']) !!}
@forelse ($activeJobs as $item)
{{ ucfirst($item->title) }}
{{ $item->end_date ? $item->end_date->format(company()->date_format) : __('recruit::modules.job.noEndDate') }} @if($viewJobPermission == 'all' || ($viewJobPermission == 'added' && $item->added_by == user()->id) || ($viewJobPermission == 'owned' && user()->id == $item->recruiter_id) || ($viewJobPermission == 'both' && user()->id == $item->recruiter_id) || $item->added_by == user()->id) @endif @empty @endforelse
@forelse ($todaysInterview as $item) @if($viewInterviewPermission != 'none') @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 @endforelse
@endsection @push('scripts') @include('sections.datatable_js') @endpush