|
| 1 | +@php |
| 2 | + /** @var \App\Models\User $user */ |
| 3 | +@endphp |
| 4 | + |
| 5 | +<div class="my-1"> |
| 6 | + <span class="text-nowrap me-3"><x-badge.active-status :active="$user->status"/></span> |
| 7 | + <span class="text-nowrap me-3"><i class="fa fa-fw fa-sign-in-alt"></i> {{ __('Last login') }} |
| 8 | + {{ $user->last_login_at ? formatDateTime($user->last_login_at) : __('never') }}</span> |
| 9 | + @if($user->userRoles->isNotEmpty()) |
| 10 | + <span class="me-3"> |
| 11 | + <i class="fa fa-fw fa-user-group" title="{{ __('User roles') }}"></i> |
| 12 | + @foreach($user->userRoles->sortBy('name') as $userRole) |
| 13 | + <x-bs::badge variant="primary">{{ $userRole->name }}</x-bs::badge> |
| 14 | + @endforeach |
| 15 | + </span> |
| 16 | + @endif |
| 17 | +</div> |
| 18 | + |
| 19 | +<div class="mb-3"> |
| 20 | + @isset($user->date_of_birth) |
| 21 | + <span class="text-nowrap me-3"><i class="fa fa-fw fa-cake-candles" title="{{ __('Date of birth') }}"></i> {{ formatDate($user->date_of_birth) }}</span> |
| 22 | + @endisset |
| 23 | + @isset($user->phone) |
| 24 | + <span class="text-nowrap me-3"><i class="fa fa-fw fa-phone" title="{{ __('Phone number') }}"></i> {{ $user->phone }}</span> |
| 25 | + @endisset |
| 26 | + <span class="text-nowrap me-3"><i class="fa fa-fw fa-at" title="{{ __('E-mail') }}"></i> {{ $user->email }} |
| 27 | + @isset($user->email_verified_at) |
| 28 | + <x-bs::badge variant="success">{{ __('verified') }}</x-bs::badge> |
| 29 | + @else |
| 30 | + <x-bs::badge variant="danger">{{ __('not verified') }}</x-bs::badge> |
| 31 | + @endisset |
| 32 | + </span> |
| 33 | + @if(count($user->addressBlock) > 0) |
| 34 | + <span class="text-nowrap me-3"><i class="fa fa-fw fa-location-pin" title="{{ __('Address') }}"></i> {{ implode(', ', $user->addressBlock) }}</span> |
| 35 | + @endif |
| 36 | +</div> |
| 37 | + |
| 38 | +<div class="row"> |
| 39 | + <div id="responsibilities" class="col-12 col-xl-6 col-xxl-4"> |
| 40 | + <h2>{{ __('Responsibilities') }}</h2> |
| 41 | + @if( |
| 42 | + $user->responsibleForEvents->isEmpty() |
| 43 | + && $user->responsibleForEventSeries->isEmpty() |
| 44 | + && $user->responsibleForOrganizations->isEmpty() |
| 45 | + ) |
| 46 | + <x-bs::alert class="danger">{{ __(':name has not been assigned any responsibilities.', [ |
| 47 | + 'name' => $user->first_name, |
| 48 | + ]) }}</x-bs::alert> |
| 49 | + @endif |
| 50 | + @if($user->responsibleForOrganizations->isNotEmpty()) |
| 51 | + <div class="mb-3"> |
| 52 | + <h3>{{ __('Organizations') }}</h3> |
| 53 | + @include('organizations.shared.organization_list', [ |
| 54 | + 'organizations' => $user->responsibleForOrganizations, |
| 55 | + ]) |
| 56 | + </div> |
| 57 | + @endif |
| 58 | + @if($user->responsibleForEventSeries->isNotEmpty()) |
| 59 | + <div class="mb-3"> |
| 60 | + <h3>{{ __('Event series') }}</h3> |
| 61 | + @include('event_series.shared.event_series_list', [ |
| 62 | + 'eventSeries' => $user->responsibleForEventSeries, |
| 63 | + ]) |
| 64 | + </div> |
| 65 | + @endif |
| 66 | + @if($user->responsibleForEvents->isNotEmpty()) |
| 67 | + <div class="mb-3"> |
| 68 | + <h3>{{ __('Events') }}</h3> |
| 69 | + @include('events.shared.event_list', [ |
| 70 | + 'events' => $user->responsibleForEvents, |
| 71 | + ]) |
| 72 | + </div> |
| 73 | + @endif |
| 74 | + </div> |
| 75 | + <div id="bookings" class="col-12 col-xl-6 col-xxl-4"> |
| 76 | + <h2>{{ __('Bookings') }}</h2> |
| 77 | + @if($user->bookings->count() === 0) |
| 78 | + <x-bs::alert class="danger">{{ __(':name does not have any bookings yet.', [ |
| 79 | + 'name' => $user->first_name, |
| 80 | + ]) }}</x-bs::alert> |
| 81 | + @endif |
| 82 | + @include('bookings.shared.booking_list', [ |
| 83 | + 'bookings' => $user->bookings, |
| 84 | + ]) |
| 85 | + </div> |
| 86 | + <div id="documents" class="col-12 col-xl-6 col-xxl-4"> |
| 87 | + <h2>{{ __('Documents') }}</h2> |
| 88 | + @if($user->documents->count() === 0) |
| 89 | + <x-bs::alert class="danger">{{ __(':name has not uploaded any documents yet.', [ |
| 90 | + 'name' => $user->first_name, |
| 91 | + ]) }}</x-bs::alert> |
| 92 | + @endif |
| 93 | + @include('documents.shared.document_list', [ |
| 94 | + 'documents' => $user->documents, |
| 95 | + ]) |
| 96 | + </div> |
| 97 | +</div> |
0 commit comments