@extends('layouts.app') @section('content')
{{-- CSS Styles --}} {{-- Breadcrumb Header --}}
{{-- Page Header with Gradient --}}

{{ $branch->name }} Branch Users

User analytics and performance tracking

{{ $users->count() }} Users
{{-- Login Analytics Cards --}}
@php $login_cards = [ [ 'title' => 'Logged In Today', 'key' => 'today', 'icon' => 'fas fa-calendar-day', 'gradient' => 'linear-gradient(135deg, #10b981 0%, #059669 100%)', ], [ 'title' => 'This Week', 'key' => 'this_week', 'icon' => 'fas fa-calendar-week', 'gradient' => 'linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)', ], [ 'title' => 'This Month', 'key' => 'this_month', 'icon' => 'fas fa-calendar-alt', 'gradient' => 'linear-gradient(135deg, #f59e0b 0%, #d97706 100%)', ], [ 'title' => 'Long Time Ago', 'key' => 'long_time', 'icon' => 'fas fa-clock', 'gradient' => 'linear-gradient(135deg, #dc3545 0%, #c41e30 100%)', ], ]; @endphp @foreach ($login_cards as $card)

{{ $card['title'] }}

{{ count($loginAnalytics[$card['key']] ?? []) }}

Active Users

@endforeach
{{-- Performance Analytics Section --}}
{{-- Top Performers (Enquiries) --}}
Top Performers
{{ ($enquiryPerformance['top_performers'] ?? collect())->count() }}
Users with Enquiries
{{-- Most Rejections --}}
Most Rejections
{{ ($rejectionPerformance['poor_performers'] ?? collect())->count() }}
Users with Rejections
{{-- Withdraw Savings Leaders --}}
Withdraw Leaders
{{ ($withdrawSavingsLeaders ?? collect())->count() }}
Withdrawal Processors
{{-- Deduction Leaders --}}
Deduction Leaders
Increase
{{ ($deductionLeaders['increase'] ?? collect())->count() }}
Users
Decrease
{{ ($deductionLeaders['decrease'] ?? collect())->count() }}
Users
{{-- All Users Table --}}
All Users
@forelse($users as $user) @empty @endforelse
SN Name Email Enquiries Rejections Last Login Actions
{{ $loop->iteration }}
{{ strtoupper(substr($user->name, 0, 2)) }}
{{ $user->name }}
{{ $user->email }} {{ $enquiryPerformance['all_counts'][$user->id] ?? 0 }} {{ $rejectionPerformance['all_counts'][$user->id] ?? 0 }} @if($user->last_login)
{{ \Carbon\Carbon::parse($user->last_login)->format('d/m/Y') }} {{ \Carbon\Carbon::parse($user->last_login)->format('H:i') }} HRS
@else Never @endif
View
No Users Found

There are no users in this branch yet

{{-- Top Performers Modal --}} {{-- Most Rejections Modal --}} {{-- Withdraw Leaders Modal --}} {{-- Deduction Leaders Modal --}} {{-- JavaScript for Pagination --}} @endsection