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:
Manage and view all your customer details
| 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} |