@extends('layouts.portal') @section('title', 'Employers') @section('subtitle', 'Partner companies that post roles and hire INFOTICS graduates. Each company signs in with a hiring-manager login.') @section('actions') @endsection @section('content') @php $open = old('_modal'); $sizes = ['1-10', '11-50', '51-200', '201-500', '501-1000', '1000+']; $approved = $employers->where('status', 'approved')->count(); $waiting = $employers->where('status', 'pending')->count(); $suspended = $employers->where('status', 'suspended')->count(); @endphp
Companies{{ $employers->count() }}{{ $approved }} approved
Awaiting approval{{ $waiting }}{{ $waiting ? 'Approve to let them post jobs' : 'Nothing waiting' }}
Open postings{{ $employers->sum('open_jobs_count') }}{{ $employers->sum('jobs_count') }} postings in total
{{ $suspended ? 'Suspended' : 'Hiring managers' }}{{ $suspended ?: $employers->sum('users_count') }}{{ $suspended ? 'Cannot sign in or post' : 'Employer logins' }}
@if($employers->isEmpty())
@else
@foreach($employers as $e) @php $managers = $e->users->filter(fn ($m) => $m->user); @endphp @endforeach
CompanyHiring managersStatusPostingsActions
{{ $e->company_name }}
{{ collect([$e->industry, $e->location, $e->company_size ? $e->company_size.' staff' : null])->filter()->implode(' · ') ?: 'Profile not completed' }}
@if($e->website){{ preg_replace('~^https?://(www\.)?~', '', rtrim($e->website, '/')) }} @endif
@forelse($managers as $m)
{{ $m->user->name }}{{ $m->user->email }}@if($m->user->last_login_at) · signed in {{ $m->user->last_login_at->diffForHumans() }}@else · never signed in @endif
@empty No login yet @endforelse @if($e->email)
Company mailbox: {{ $e->email }}
@endif
{{ $e->jobs_count }}
{{ $e->open_jobs_count }} open
@if($e->status !== 'approved')
@csrf @method('PUT')
@endif @if($e->status !== 'suspended')
@csrf @method('PUT')
@endif
@endif {{-- Add employer --}} @foreach($employers as $e) @php $isEdit = $open === 'edit-'.$e->id; $isInv = $open === 'invite-'.$e->id; $v = fn (string $f) => $isEdit ? old($f, $e->{$f}) : $e->{$f}; $managers = $e->users->filter(fn ($m) => $m->user); @endphp {{-- Edit employer --}} {{-- Invite hiring manager --}} @endforeach @endsection