@extends('admin.layouts.dashboard') @section('title', 'Executives') @section('content') @php $genders = config('constants.gender'); @endphp {{ $showArchived ? 'Show active' : 'Show archived' }} @can(\App\Support\Permissions::EXECUTIVES_CREATE) Add executive @endcan @if ($executives->isEmpty()) @else
@foreach ($executives as $executive) @endforeach
# Photo Name Role Contact Sex PIN Joined Actions
{{ $loop->iteration }} {{ ucwords($executive->fullname) }} {{ $executive->occupation ?: '—' }} {{ $executive->phone_number ?: '—' }} {{ $genders[$executive->sex] ?? 'Other' }} {{ $executive->pin2 ?: '—' }} {{ $executive->registration_date ? date('d M Y', strtotime($executive->registration_date)) : '—' }}
@can(\App\Support\Permissions::EXECUTIVES_UPDATE) Edit {{ ucwords($executive->fullname) }} @endcan @can(\App\Support\Permissions::EXECUTIVES_ARCHIVE) @if ($showArchived)
@csrf
@else
@csrf @method('DELETE')
@endif @endcan
@endif
@endsection