@foreach ($locations as $loc) @php // Load location once to avoid multiple database hits and improve performance $location = $loc->location; // Pre-calculate commonly used values $isDeleted = $location->is_deleted == true; $isArchived = $location->is_archived == true; $isActive = $location->is_active == false; $passwordChanged = $location->password_changed == false; // Pre-calculate address $address = $location->address_line1; if (!empty($location->address_line2)) { $address .= ', ' . $location->address_line2; } if (!empty($location->address_line3)) { $address .= ', ' . $location->address_line3; } // Pre-calculate group hierarchies $groupNames = []; $groupHierarchies = []; foreach ($loc->groups as $assignment) { // Add direct group name $groupNames[] = $assignment->group->group; $origin = []; $currentGroup = $assignment->group; while ($currentGroup->parent) { $origin[] = $currentGroup->parent->group; $currentGroup = $currentGroup->parent; } $origin = array_reverse($origin); $origin[] = $assignment->group->group; $originMessage = $origin ? implode(' → ', $origin) : ''; if ($originMessage) { $groupHierarchies[] = $originMessage; } } $groupsAttribute = count($groupNames) > 0 ? implode(', ', $groupNames) : 'Unassigned'; $hierarchyAttribute = implode('|', $groupHierarchies); // Pre-calculate status $status = $isDeleted ? 'Deleted' : ($isArchived ? 'Archived' : ($isActive ? 'Inactive' : ($passwordChanged ? 'Not started' : 'Live'))); @endphp

{{$location->registration_no}}

@if (isset($location->location_type))
{{$location->location_type->name}}
@endif
@if ($location->is_active) Live @elseif($location->is_archived) Archived @elseif($location->is_deleted) Deleted @endif @if ($location->records()->exists() == false) not started submissions @endif @if (($loc->groups ?? collect())->isEmpty()) Unassigned @endif @if ($location->is_active == false) Inactive @endif @if ($location->password_changed == false) Not activated by site team @endif
@if ($location->ods_name)
@endif
@if (count($loc->groups))
groups) > 1) style="display:flex;align-items:center;flex-wrap:wrap;width:144px;" @endif> @foreach ($loc->groups as $assignment) @php $origin = []; $currentGroup = $assignment->group; while ($currentGroup->parent) { $origin[] = $currentGroup->parent->group; $currentGroup = $currentGroup->parent; } $origin = array_reverse($origin); $origin[] = $assignment->group->group; $originMessage = $origin ? implode(' → ', $origin) : 'No origin'; @endphp

{{ $assignment->group->group }}

@endforeach
@endif

@livewire('location-tags-manager', ['loc_id' => $location->id])

Access

Two factor Authentication

@if ($location->otp && $location->otp->isEnabled) @endif
@if ($location->otp && $location->otp->isEnabled) @php $showVerificationButton = !$location->otp->is_totp_enabled; @endphp @if ($showVerificationButton)
@isset($location->otp)
@if ($location->getOtpLogs->count() == 0) @else @foreach ($location->getOtpLogs->sortByDesc('created_at') as $log ) @endforeach @endif
Date & time Verification Code Details Status
No data found
{{ \Carbon\Carbon::parse($log->created_at)->format('d M Y h:i A') }} {{ $log->otp }}
  • {{$log->ip}}
  • {{$log->os}}
  • {{$log->device}}
{{ \Carbon\Carbon::parse($log->expires_at)->isPast() ? 'Expired' : 'Successful' }}
@endisset
@endif @endif

Password Reset

@csrf

Quick Login

@if (count($head_office->organisationSettings) != 0) @endif
Access Remotely Edit & View
@endforeach