@extends('layout.master') @section('content') @php $userType = \App\Helpers\Helpers::getUserRole()->type_id ?? []; $userAccess = \App\Helpers\Helpers::getUserAccess() ?? []; $access = $userAccess['accesses'] ?? []; @endphp @if (!empty($visitors_list))
{{--

Visitors

--}}
{{-- + Add Residence --}} {{-- + Add Visitor --}} + Add Visitor {{-- --}}
Total Visitors on Record {{ $all_visitors_count ?? 0 }} Over Stayers on Record {{ $over_stayers_count ?? 0 }}
{{-- @php $view = !empty($userType) ? ($userType == 1 || ($userType == 2 && (!empty($access['visitors']) && in_array(2, $access['visitors']))) ? '' : 'hide') : 'hide'; $edit = !empty($userType) ? ($userType == 1 || ($userType == 2 && (!empty($access['visitors']) && in_array(3, $access['visitors']))) ? '' : 'hide') : 'hide'; $delete = !empty($userType) ? ($userType == 1 || ($userType == 2 && (!empty($access['visitors']) && in_array(4, $access['visitors']))) ? '' : 'hide') : 'hide'; @endphp --}} @php $view = !empty($userType) ? ($userType == 2 && (empty($access['visitors']) || !in_array(2, $access['visitors'])) ? 'hide' : '') : 'hide'; $edit = !empty($userType) ? ($userType == 2 && (empty($access['visitors']) || !in_array(3, $access['visitors'])) ? 'hide' : '') : 'hide'; $delete = !empty($userType) ? ($userType == 2 && (empty($access['visitors']) || !in_array(4, $access['visitors'])) ? 'hide' : '') : 'hide'; @endphp @include('visitors.table')
@else

No records found

@endif {{-- filter model for visitor --}} @push('scripts') @endPush @endsection