@extends('layouts.portal') @section('title', 'Job postings') @section('subtitle', 'Review and publish roles from partner employers. Approving a posting emails the employer.') @section('actions') Applications @if($applicationsTotal){{ $applicationsTotal }}@endif New posting @endsection @section('content') @php $cur = $filters['status'] ?? ''; $keep = collect($filters)->except('status')->filter()->all(); $tabs = ['' => 'All', 'pending' => 'Pending review', 'open' => 'Open', 'draft' => 'Draft', 'closed' => 'Closed', 'rejected' => 'Rejected']; $total = $counts->sum(); $hasFilters = collect($filters)->filter()->isNotEmpty(); @endphp @if($jobs->isEmpty())
New posting
@else
@foreach($jobs as $j) @php $expired = $j->status === 'open' && $j->closes_at && $j->closes_at->isPast(); @endphp @endforeach
RoleStatusApplicationsDatesActions
{{ $j->title }}@if($j->featured) Featured@endif
{{ $j->employer?->company_name ?? 'Employer removed' }} · {{ collect([$j->location, $j->employment_type, $j->work_mode])->filter()->implode(' · ') }}
@if($expired)
Expired
@endif
@if($j->applications_count){{ $j->applications_count }}@else0@endif {{ $j->posted_at ? 'Posted '.$j->posted_at->format('d M Y') : 'Not published' }}
{{ $j->closes_at ? 'Closes '.$j->closes_at->format('d M Y') : 'No closing date' }}
@if(in_array($j->status, ['pending', 'draft', 'rejected', 'closed'], true))
status === 'pending' || $j->status === 'draft') data-confirm="Publish “{{ $j->title }}”? {{ $j->employer?->company_name }} will be emailed that it is live." @endif>@csrf @method('PUT')
@endif @if(in_array($j->status, ['pending', 'draft'], true)) @endif @if($j->status === 'open')
@csrf @method('PUT')
@endif
{{ $jobs->links() }} @foreach($jobs as $j) @continue(! in_array($j->status, ['pending', 'draft'], true)) @endforeach @endif @endsection