@extends('admin.layouts.app') @section('page-title', 'Profile') @section('content')
@php $user = $user ?? Auth::guard('admin')->user(); $isAdmin = $user->type === 'admin'; $initials = strtoupper(substr($user->name ?? 'U', 0, 1)); $joiningFormatted = $user->joining_date ? \Carbon\Carbon::parse($user->joining_date)->format('d M Y') : '—'; $isActive = ($user->status ?? 'active') === 'active'; // stats — controller मधून येतात, fallback 0 $s = $stats ?? []; $totalContainers = $s['total_containers'] ?? 0; $totalInvoices = $s['total_invoices'] ?? 0; $paidInvoices = $s['paid_invoices'] ?? 0; $pendingInvoices = $s['pending_invoices'] ?? 0; $totalCustomers = $s['total_customers'] ?? 0; $totalMarklist = $s['total_marklist'] ?? 0; $activeMarklist = $s['active_marklist'] ?? 0; @endphp {{-- ════════ PROFILE HEADER ════════ --}}
{{ $initials }}
{{-- Row 1 --}}
Full Name
{{ $user->name ?? '—' }}
Account Type
{{ $isAdmin ? '⭐ Admin' : '👤 Staff' }}
Status
{{ ucfirst($user->status ?? 'active') }}
@if($user->employee_id)
Employee ID
{{ $user->employee_id }}
@endif
{{-- Row 2 --}}
Email
{{ $user->email ?? '—' }}
Phone
{{ $user->phone ?? '—' }}
@if($user->department)
Department
{{ $user->department }}
@endif @if($user->designation)
Designation
{{ $user->designation }}
@endif @if($user->address)
Address
{{ $user->address }}
@endif
{{-- ════════ PROFESSIONAL INFO ════════ --}}
🏢 Professional Information
@if($user->employee_id)
🪪
Employee ID
{{ $user->employee_id }}
@endif @if($user->username)
👤
Username
{{ $user->username }}
@endif @if($user->role)
🎯
Role
{{ $user->role }}
@endif @if($user->department)
🏬
Department
{{ $user->department }}
@endif @if($user->designation)
📋
Designation
{{ $user->designation }}
@endif
📅
Joining Date
{{ $joiningFormatted }}
@if($user->emergency_phone)
🆘
Emergency Phone
{{ $user->emergency_phone }}
@endif @if($user->additional_info)
📝
Additional Info
{{ $user->additional_info }}
@endif
{{-- ════════ REAL STATS ════════ --}}
📦
Total Containers
{{ number_format($totalContainers) }}
🧾
Total Invoices
{{ number_format($totalInvoices) }}
Pending Invoices
{{ number_format($pendingInvoices) }}
Paid Invoices
{{ number_format($paidInvoices) }}
👥
Total Customers
{{ number_format($totalCustomers) }}
🏷️
Mark List
{{ number_format($totalMarklist) }}
{{-- ════════ BOTTOM CARDS ════════ --}}
Recent Activity
  • 📦 Shipment #SH-2024-001 delivered 5 min ago
  • 📝 New shipment #SH-2024-002 created 13 min ago
  • ⏰ Delay reported for #SH-2024-003 1 hr ago
@endsection