@php $editPermission = user()->permission('edit_events'); $deletePermission = user()->permission('delete_events'); $attendeesIds = $event->attendee->pluck('user_id')->toArray(); @endphp

{{ $event->event_name }}

@if ($event->status == 'pending') @if ($editPermission == 'all' || ($editPermission == 'added' && $event->added_by == user()->id) || ($editPermission == 'owned' && in_array(user()->id, $attendeesIds)) || ($editPermission == 'both' && (in_array(user()->id, $attendeesIds) || $event->added_by == user()->id)) || $event->host == user()->id ) @lang('app.markComplete') @lang('app.markCancel') @endif @endif
@if (!in_array('client', user_roles()))

@lang('app.attendeesEmployee')

@foreach ($event->attendee as $item) @if(in_array('employee', $item->user->roles->pluck('name')->toArray()))

@endif @endforeach

@if (in_array('clients', user_modules()))

@lang('app.attendeesClients')

@foreach ($event->attendee as $item) @if(in_array('client', $item->user->roles->pluck('name')->toArray()))

@endif @endforeach

@endif @endif

@lang('app.host')

@if ($event->user)

@else -- @endif

@php $url = str_starts_with($event->event_link, 'http') ? $event->event_link : 'http://'.$event->event_link; $link = "$event->event_link"; @endphp @if ($event->status)

@lang('app.status')

@if ($event->status == 'pending')

{{ ucfirst($event->status) }}

@elseif ($event->status == 'completed')

{{ ucfirst($event->status) }}

@elseif ($event->status == 'cancelled')

{{ ucfirst($event->status) }}

@endif
@endif @if ($event->note) @endif @if ($event->files->count() > 0)
@forelse($event->files as $file) @empty @endforelse
@endif