import { useState } from 'react'; import { ChevronDown, Search, Filter, MoreVertical, Plus, Users, TrendingUp, Home as HomeIcon } from 'lucide-react'; import BreadCrumb from '../../components/BreadCrumb'; export default function Customers({ user }) { const [searchQuery, setSearchQuery] = useState(''); const customers = [ { id: 1, name: 'Rajesh Kumar', phone: '+91 98765 43210', avatar: 'RK', balance: 45000, type: 'credit', status: 'Active', statusColor: 'bg-green-100 text-green-700', transactions: 24 }, { id: 2, name: 'Priya Sharma', phone: '+91 98765 43211', avatar: 'PS', balance: 8500, type: 'debit', status: 'Active', statusColor: 'bg-green-100 text-green-700', transactions: 18 }, { id: 3, name: 'Amit Patel', phone: '+91 98765 43212', avatar: 'AP', balance: 22000, type: 'credit', status: 'Active', statusColor: 'bg-green-100 text-green-700', transactions: 32 }, { id: 4, name: 'Sneha Reddy', phone: '+91 98765 43213', avatar: 'SR', balance: 5000, type: 'debit', status: 'Pending', statusColor: 'bg-yellow-100 text-yellow-700', transactions: 12 }, { id: 5, name: 'Vikram Singh', phone: '+91 98765 43214', avatar: 'VS', balance: 15000, type: 'credit', status: 'Active', statusColor: 'bg-green-100 text-green-700', transactions: 28 }, { id: 6, name: 'Anjali Gupta', phone: '+91 98765 43215', avatar: 'AG', balance: 3200, type: 'debit', status: 'Active', statusColor: 'bg-green-100 text-green-700', transactions: 9 }, ]; const totalCredit = customers.filter(c => c.type === 'credit').reduce((sum, c) => sum + c.balance, 0); const totalDebit = customers.filter(c => c.type === 'debit').reduce((sum, c) => sum + c.balance, 0); const breadcrumbItems = [ { icon: , label: 'Home', path: '/dashboard', active: false }, { icon: , label: 'Customers', path: '/customers', active: true } ]; return (
{/* Header */}
{/* Summary Cards */}
Total Customers
{customers.length}
+12% from last month
Total Receivable
₹{totalCredit.toLocaleString()}
From {customers.filter(c => c.type === 'credit').length} customers
Total Payable
₹{totalDebit.toLocaleString()}
To {customers.filter(c => c.type === 'debit').length} customers
Active Customers
{customers.filter(c => c.status === 'Active').length}
{customers.filter(c => c.status === 'Pending').length} pending
{/* Customers Table */}

Customer Directory

Manage and view all your customer details

setSearchQuery(e.target.value)} className="w-full pl-10 pr-4 py-2.5 bg-white border border-gray-300 rounded-xl text-sm focus:outline-none focus:ring-2 focus:ring-[#FF6B00] focus:border-transparent" />
{customers.map((customer) => ( ))}
Customer Phone Balance Type Transactions Status
{customer.avatar}
{customer.name}
{customer.phone} ₹{customer.balance.toLocaleString()} {customer.type === 'credit' ? 'You will get' : 'You will give'} {customer.transactions} {customer.status}
); }