URA - CRM SYSTEM

Makao Makuu: Dar es Salaam | Generated on {{ now()->format('d F Y, H:i:s') }}

REPORT GENERATED BY: {{ strtoupper(auth()->user()->name) }} ({{ auth()->user()->email }})

GENERATED ON: {{ strtoupper(now()->format('d F Y, H:i:s')) }}

REPORT ID: USR-{{ $user->id }}-{{ now()->format('YmdHis') }}

User Profile Overview

FULL NAME: {{ strtoupper($user->name) }}
EMAIL ADDRESS: {{ strtoupper($user->email) }}
PHONE NUMBER: {{ strtoupper($user->phone_number) }}
USER ID: #{{ $user->id }}
ACCOUNT STATUS: {{ strtoupper($user->status) }}
MEMBER SINCE: {{ strtoupper($user->created_at->format('d F Y')) }}

Role & Organization Information

ROLE @if($user->getRoleNames()->isNotEmpty()) {{ strtoupper($user->getRoleNames()->implode(', ')) }} @else NO ROLE ASSIGNED @endif
DEPARTMENT {{ $user->department ? strtoupper($user->department->name) : 'N/A' }}
BRANCH {{ $user->branch ? strtoupper($user->branch->name) : 'N/A' }}
RANK @php if (is_object($user->rank)) { echo strtoupper($user->rank->name ?? 'N/A'); } elseif ($user->rank) { $rankObj = \App\Models\Rank::find($user->rank); echo $rankObj ? strtoupper($rankObj->name) : 'N/A'; } else { echo 'N/A'; } @endphp
REGION {{ $user->region ? strtoupper($user->region->name) : 'N/A' }}
DISTRICT {{ $user->district ? strtoupper($user->district->name) : 'N/A' }}
COMMAND {{ $user->command ? strtoupper($user->command->name) : 'N/A' }}
FORCE NUMBER {{ $user->force_number ? strtoupper($user->force_number) : 'N/A' }}
@if($totalEnquiries > 0)

Enquiry Statistics Overview

{{ number_format($totalEnquiries) }}

Total Enquiries

{{ number_format($enquiriesByType->count()) }}

Enquiry Types

{{ $enquiriesByStatus->where('status', 'Pending')->first()['count'] ?? 0 }}

Pending

{{ $enquiriesByStatus->where('status', 'Approved')->first()['count'] ?? 0 }}

Approved

Enquiries by Type

@foreach($enquiriesByType as $type) @endforeach
{{ strtoupper($type['type']) }} {{ $type['count'] }}
@if($enquiriesByStatus->count() > 0)

Enquiries by Status

@foreach($enquiriesByStatus as $status) @endforeach
{{ strtoupper($status['status']) }} {{ $status['count'] }}
@endif

Complete Enquiry Details

TOTAL RECORDS: {{ number_format($allEnquiries->count()) }} | LAST UPDATED: {{ $lastEnquiry ? strtoupper($lastEnquiry->created_at->format('d F Y')) : 'N/A' }}

@forelse($allEnquiries as $index => $enquiry) @empty @endforelse
# Date Check No Full Name Type Region District Status
{{ $index + 1 }} {{ $enquiry->created_at->format('d/m/Y') }} {{ strtoupper($enquiry->check_number) }} {{ strtoupper($enquiry->full_name ?? 'N/A') }} {{ strtoupper(str_replace('_', ' ', $enquiry->type)) }} {{ strtoupper($enquiry->region->name ?? 'N/A') }} {{ strtoupper($enquiry->district->name ?? 'N/A') }} {{ strtoupper($enquiry->status) }}
No enquiries found for this user
@endif