{{-- Dashboard --}}
  • Dashboard
  • {{-- === Super Admin === --}} @if (Auth::user()->role_id == 1)
  • User Management
    • Users
    • Roles
  • Agents
  • Setting
    • Languages
    • Windows
    • Services
  • @endif {{-- === GOA Admin === --}} @if (Auth::user()->role_id == 2)
  • Setting
    • Windows
    • Services
  • {{--
  • All Customers
  • --}} @endif {{-- === Officer === --}} @php $user = Auth::user(); $assignedServiceIds = $user->services()->pluck('services.id')->toArray(); $allCount = App\Models\Application::whereIn('service_id', $assignedServiceIds)->count(); $approvedCount = App\Models\Application::whereIn('service_id', $assignedServiceIds) ->where('status', 'approved') ->count(); $rejectedCount = App\Models\Application::whereIn('service_id', $assignedServiceIds) ->where('status', 'rejected') ->count(); $pendingCount = App\Models\Application::whereIn('service_id', $assignedServiceIds) ->where('status', 'request') ->count(); $appointCount = App\Models\Application::whereIn('service_id', $assignedServiceIds) ->where('status', 'appointed') ->count(); $acceptedCount = App\Models\Application::whereIn('service_id', $assignedServiceIds) ->where('status', 'accepted') ->count(); @endphp @if (Auth::user()->role_id == 3)
  • Gaaffiwwan({{ $allCount }})
    • Tajaajila Gafatame({{ $pendingCount }})
    • @php $paymentOrderedServices = [115, 108, 125, 69]; $userHasAccess = Auth::user()->services->contains( fn($s) => in_array($s->id, $paymentOrderedServices), ); @endphp @if ($userHasAccess)
    • Kaffaaltii Ajajame({{ $pendingCount }})
    • @endif
    • Tajaajila Fudhatame ({{ $acceptedCount }})
    • Tajaajila milka'e({{ $approvedCount }})
    • Tajaajila Beellamamee({{ $appointCount }})
    • Tajaajila didame({{ $rejectedCount }})
  • Issue
    • Issue List
  • Customer List
  • Reports
  • @endif {{-- === Reports (Super Admin + GOA Admin) === --}} @if (in_array(Auth::user()->role_id, [1, 2]))
  • Reports
    • Today Report
    • {{--
    • Summary Report
    • --}}
  • Issue
    • All Issue
    • Report
    • Create New Issue
    • My Issue
  • @endif {{-- Customer --}} @if (Auth::user()->role_id == 4) @php $userId = Auth::user()->id; $allApplications = \App\Models\Application::where('user_id', $userId)->count(); $acceptedCount = \App\Models\Application::where('user_id', $userId)->where('status', 'accept')->count(); $approvedCount = \App\Models\Application::where('user_id', $userId) ->where('status', 'approved') ->count(); $appointmentCount = \App\Models\Application::where('user_id', $userId) ->where('status', 'appointed') ->count(); $rejectedCount = \App\Models\Application::where('user_id', $userId)->where('status', 'reject')->count(); $pendingCount = \App\Models\Application::where('user_id', $userId)->where('status', 'accept')->count(); @endphp
  • Gaaffiwaan Koo({{ $allApplications }})
      @php // use App\Models\Application; $hasOrderedService = App\Models\Application::where('user_id', Auth::id()) ->where('status', 'accepted') ->whereHas('service', function ($query) { $query->where('payment', '>', 0); }) ->exists(); @endphp
    • Tajaajila Gafatame({{ $allApplications }})
    • @if ($hasOrderedService)
    • Ordered Application({{ $allApplications }})
    • @endif
    • Tajaajila Beellamamee({{ $appointmentCount }})
    • Tajaajila Hor.Irra.Jiru({{ $pendingCount }})
    • Tajaajila Didame({{ $rejectedCount }})
  • @endif @if (Auth::user()->role_id == 6) @php $userId = Auth::user()->id; $allApplications = \App\Models\Application::where('user_id', $userId)->count(); $acceptedCount = \App\Models\Application::where('user_id', $userId)->where('status', 'accept')->count(); $approvedCount = \App\Models\Application::where('user_id', $userId) ->where('status', 'approved') ->count(); $rejectedCount = \App\Models\Application::where('user_id', $userId)->where('status', 'reject')->count(); $pendingCount = \App\Models\Application::where('user_id', $userId)->where('status', 'request')->count(); @endphp
  • Customer Management
    • New Customer
    • Customer List
  • @endif @if (Auth::user()->role_id == 9)
  • Issue Management
    • Issue
    • My Issue
  • @endif @if (Auth::user()->role_id == 8)
  • Issue Management
    • Issue
    • My Issue
  • @endif