import React from 'react'; import { MoreVertical, ArrowDownRight, ArrowUpRight, ChevronLeft, ChevronRight } from 'lucide-react'; export default function AccountsTable({ data = [], pagination = null, onPageChange }) { const formatCurrency = (val) => { return new Intl.NumberFormat('en-AE', { style: 'currency', currency: 'AED' }).format(val); }; return (
Detailed breakdown of income and expenses.
| Date | Type | Category / Description | Amount |
|---|---|---|---|
| No transactions found for the selected period. | |||
|
{new Date(row.date).toLocaleDateString()}
{new Date(row.date).toLocaleDateString(undefined, { weekday: 'short' })}
|
{row.type === 'Income' ? |
{row.category}
{row.description || 'No description provided'}
|
{row.type === 'Income' ? '+' : '-'}{formatCurrency(row.amount)} |
Showing page {pagination.current_page} of {pagination.last_page} ({pagination.total} total)