@extends('admin.layouts.app') @section('title', 'Bank & Branch Management Dashboard') @section('content')
{{-- 1. PAGE TITLE & BREADCRUMB --}}

📊 Bank Apprised Management System

Monitor your banking network at a glance

{{-- 2. STATISTICS CARDS --}} {{-- Responsive change: Increased column size for better look on small desktops/tablets --}}
{{-- Banks Card --}}
{{-- Adjusted font size for better mobile scaling --}}

{{ number_format($stats['total_banks']) }}

Total Banks

{{ $stats['active_banks'] }} Active {{ $stats['total_banks'] - $stats['active_banks'] }} Inactive
{{-- Branches Card --}}

{{ number_format($stats['total_branches']) }}

Total Branches

{{ $stats['active_branches'] }} Active {{ $stats['total_branches'] - $stats['active_branches'] }} Inactive
{{-- Agents Card --}}

{{ number_format($stats['total_agents']) }}

Total Agents

{{ $stats['active_agents'] }} Active {{ $stats['total_agents'] - $stats['active_agents'] }} Inactive
--- {{-- 3. GOLD PRICE SECTION (Corrected for null date format error) --}}
Enter Gold Price per gram (24 carat)
{{-- Added margin for separation on small screens --}}
@csrf
@if(isset($latestPrice))

💰 ₹{{ number_format($latestPrice->price, 2) }}

Current Gold Price per gram (Per 24 Carat)

Last updated: {{ $latestPrice->updated_at?->format('d M Y, h:i A') ?? $latestPrice->created_at?->format('d M Y, h:i A') ?? 'N/A' }}
@csrf @method('DELETE')
@endif
--- {{-- 4. QUICK ACTIONS --}}
🚀 Quick Actions
{{-- Used g-3 for responsive grid gap and col-6 for mobile stacking --}}
--- {{-- 5. RECENT CUSTOMERS SECTION --}}
Recent Customers
{{-- Added table-responsive for better mobile scrolling --}}
@forelse($recentCustomers as $key => $customer) @empty @endforelse
# Customer (Borrower) Loan Details Location Status Actions
{{ $key + 1 }}
{{ strtoupper(substr($customer->brauser_name ?? 'U', 0, 1)) }}
{{ $customer->brauser_name }}
Relative: {{ $customer->ralative_name ?? 'N/A' }}
LN: {{ $customer->loan_number ?? 'N/A' }} AC: {{ $customer->account_number ?? 'N/A' }}
{{ $customer->address }} @if($customer->is_active) Active @else Inactive @endif {{-- Adjusted button group to wrap on mobile if needed with small gap --}}

No recent customers found.

--- {{-- 6. RECENT BRANCHES & AGENTS --}} {{-- Replaced col-xl-6 with col-lg-6 for better tablet/small desktop layout --}}
{{-- Branches List --}}
Recent Branches
@forelse($recentBranches as $key=> $branch) @empty @endforelse
# Bank Branch Address Status Actions
{{ $key+1 }}
{{ $branch->bank->bank ?? 'N/A' }}
{{ $branch->branch_address }} @if($branch->is_active) Active @else Inactive @endif

No branches found

{{-- Agents List --}}
Recent Agents
@forelse($recentAgents as $key=> $agent) @empty @endforelse
# Name Bank Branch Status Actions
{{ $key+1 }}
{{ $agent->name }}
{{ $agent->bank->bank ?? 'N/A' }} {{ $agent->branch->branch_address ?? 'N/A' }} @if($agent->is_active) Active @else Inactive @endif

No agents found

--- {{-- 7. APPRAISAL HISTORY SECTIONS --}}
{{-- First Appraisal History --}}
Recent First Appraisal Certificates
@forelse($appraisalHistory as $key=> $record) @empty @endforelse
# Customer Status Date Action
{{ $key+1}} {{ $record->customer->brauser_name ?? 'N/A' }} {{ $record->status }} {{ $record->downloaded_at ? \Carbon\Carbon::parse($record->downloaded_at)->format('d M Y') : '—' }}

No first appraisal records found

{{-- Second Appraisal History --}}
Recent Second Appraisal Certificates
@forelse($secondAppraisalHistory as $key=> $record) @empty @endforelse
# Folio No Loan A/c No Generated At Action
{{ $key+1}} {{ $record->ledger_folio_no }} {{ $record->gold_loan_account_no }} {{ $record->created_at->format('d M Y') }}

No second appraisal certificates found.

{{-- STYLES: Minimal changes for better responsiveness --}} {{-- SCRIPTS --}} @endsection