@php
// Edit me $subadmin milega, create me null
$isEdit = isset($subadmin);
$loginType = old('login_type', $isEdit ? $subadmin->login_type : 'custom');
$locationType = old('location_type', $subadmin->location_type ?? 'all');
@endphp
{{-- ================= LOGIN TYPE ================= --}}
@foreach(['facebook' => 'Facebook Login', 'google' => 'Google Login', 'custom' => 'Custom Login'] as $type => $label)
@endforeach
{{-- ================= USERNAME (CUSTOM) ================= --}}
@error('name')
{{ $message }}
@enderror
{{-- ================= PASSWORD ================= --}}
Min 8 chars, uppercase, lowercase, number & special char
@error('password')
{{ $message }}
@enderror
{{-- ================= FIRST / LAST NAME ================= --}}
@error('first_name')
{{ $message }}
@enderror
@error('last_name')
{{ $message }}
@enderror
{{-- ================= EMAIL ================= --}}
@error('email')
{{ $message }}
@enderror
{{-- ================= FACEBOOK / GOOGLE EMAIL ================= --}}
{{-- ================= SELECT LOCATION ================= --}}
{{-- ================= LOCATION DROPDOWN ================= --}}
@php
$selectedLocations = old(
'location_ids',
$subadmin->location_ids ?? []
);
@endphp
@error('location_ids')
{{ $message }}
@enderror
{{-- ================= PERMISSIONS ================= --}}
@foreach($permissions as $group => $items)
@php
$groupKey = \Illuminate\Support\Str::slug($group);
$hasMultiple = $items->count() > 1;
@endphp
{{ $group }}
@if($hasMultiple)
@endif
@foreach($items as $permission)
@endforeach
@endforeach
@push('scripts')
@endpush