@extends('adminlte::page') @section('title', config('app.name') . ' | ' . __('Open vacancies')) @section('content_header') @if (Auth::user()->hasAnyRole('admin', 'hiringManager'))

{{__('Administration')}} / {{__('Open vacancies')}}

@else

{{__('Application access denied')}}

@endif @stop @section('js') @if (session()->has('success')) @elseif(session()->has('error')) @endif @if($errors->any()) @foreach ($errors->all() as $error) @endforeach @endif @stop @section('content') @if (Auth::user()->hasAnyRole('admin', 'hiringManager'))

{{__('Open vacancies')}}

@if(!$vacancies->isEmpty()) @foreach($vacancies as $vacancy) @if($vacancy->vacancyStatus == 'OPEN') @else @endif @endforeach
{{__('Name')}} {{__('Description')}} {{__('Free slots')}} {{__('Status')}} {{__('Created at')}} {{__('Actions')}}
{{$vacancy->vacancyName}} {{substr($vacancy->vacancyDescription, 0, 20)}}... {{$vacancy->vacancyCount}}{{__('Open')}}{{__('Closed')}}{{$vacancy->created_at}} @if ($vacancy->vacancyStatus == 'OPEN')
@csrf @method('PATCH')
@else
@csrf @method('PATCH')
@endif
@csrf @method('DELETE')

{{ __('Note: If you delete a vacancy, all its applications are also deleted') }}

@else

{{__('Nothing to see here! Open some vacancies first. This will get applicants pouring in! (hopefully)')}}

@endif
@else @endif @stop @section('footer') @include('breadcrumbs.dashboard.footer') @stop