@extends('layouts.app') @section('title', 'Users') @section('content')

Users

@can('users.export') Export CSV @endcan @can('users.import') Import @endcan @can('users.create') Add User @endcan
@if(session('import_errors') && count(session('import_errors')))
Some rows were skipped
@endif {{-- Status tabs --}}
@if(request()->hasAny(['q', 'role', 'semester_id', 'intake'])) Clear @endif
@can('users.edit') {{-- Bulk action bar, revealed once rows are ticked --}}
@csrf
0 selected
@endcan
@can('users.edit')@endcan @forelse($users as $u) @can('users.edit') @endcan @empty @endforelse
Name Email Roles Semester / intake Status Joined Actions
@unless($u->trashed() || $u->is(auth()->user())) @endunless
{{ $u->name }}
@if($u->is(auth()->user()))You@endif @if($u->trashed())Archived@endif
{{ $u->email }} @forelse($u->roles as $role) {{ ucwords(str_replace('_', ' ', $role->name)) }} @empty none @endforelse @if($u->studentProfile) @if($u->studentProfile->currentSemester)
{{ $u->studentProfile->currentSemester->name }}
@else
No semester
@endif
{{ $u->studentProfile->intake ?: 'No intake' }}
@else — @endif
{{ $u->is_active ? 'Active' : 'Inactive' }} {{ $u->created_at?->format('d M Y') }} @if($u->trashed()) @can('users.delete')
@csrf @method('PUT')
@endcan @else @if($u->hasRole('student')) @endif @can('users.impersonate') @unless($u->is(auth()->user()) || !$u->is_active)
@csrf
@endunless @endcan @can('users.edit') @unless($u->is(auth()->user()))
@csrf @method('PATCH')
@endunless @endcan @can('users.delete') @unless($u->is(auth()->user()))
@csrf @method('DELETE')
@endunless @endcan @endif
No users found.
@if($users->hasPages()) @endif
@can('semesters.advance')
Semester progression & intakes
Advance a cohort to the next semester, place an imported list, or manage the intake list.
Open Cohorts
@endcan @push('scripts') @endpush @endsection