@extends('layouts.admin') @section('title', 'Manage Users - ' . $event->name) @section('content')

Manage Users for Event

Back to Events

{{ $event->name }}

@if($event->description)

{{ strip_tags($event->description) }}

@endif
@if($event->location) 📍 {{ $event->location }} @endif @if($event->start_date) 📅 {{ $event->start_date->format('M j, Y g:i A') }} @endif 👥 {{ $event->users->count() }} users
@if(session('success')) @endif
@csrf @method('PUT')
Available Users from {{ $event->client->name }}

Select users to associate with this event:

@if($clientUsers->count() > 0)
@foreach($clientUsers as $user) @endforeach
Name Email Role Joined Client Current Status
id, $eventUserIds) ? 'checked' : '' }}>
{{ $user->name }}
@if($user->is_admin) Admin @endif
{{ $user->email }} @php $clientAssociation = $user->clients->first(); @endphp {{ $clientAssociation ? ucfirst($clientAssociation->pivot->role_in_client) : 'N/A' }} {{ $clientAssociation ? \Carbon\Carbon::parse($clientAssociation->pivot->joined_at)->format("M j, Y") : 'N/A' }} @if(in_array($user->id, $eventUserIds)) Associated @else Not Associated @endif
{{ $clientUsers->count() }} total users available
{{ count($eventUserIds) }} currently associated with this event
@else

No Users Available

There are no users associated with the client "{{ $event->client->name }}" yet.

Users need to be associated with the client before they can be assigned to specific events.

@endif
@endsection