fix: swap Quick Stats and Recent Transactions on dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -493,35 +493,6 @@ export function DashboardPage() {
|
|||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
|
|
||||||
<SimpleGrid cols={{ base: 1, md: 2 }}>
|
<SimpleGrid cols={{ base: 1, md: 2 }}>
|
||||||
<Card withBorder padding="lg" radius="md">
|
|
||||||
<Title order={4} mb="sm">Recent Transactions</Title>
|
|
||||||
{(data?.recent_transactions || []).length === 0 ? (
|
|
||||||
<Text c="dimmed" size="sm">No transactions yet. Start by entering journal entries.</Text>
|
|
||||||
) : (
|
|
||||||
<Table striped highlightOnHover>
|
|
||||||
<Table.Tbody>
|
|
||||||
{(data?.recent_transactions || []).map((tx) => (
|
|
||||||
<Table.Tr key={tx.id}>
|
|
||||||
<Table.Td>
|
|
||||||
<Text size="xs" c="dimmed">{new Date(tx.entry_date).toLocaleDateString()}</Text>
|
|
||||||
</Table.Td>
|
|
||||||
<Table.Td>
|
|
||||||
<Text size="sm" lineClamp={1}>{tx.description}</Text>
|
|
||||||
</Table.Td>
|
|
||||||
<Table.Td>
|
|
||||||
<Badge size="xs" color={entryTypeColors[tx.entry_type] || 'gray'} variant="light">
|
|
||||||
{tx.entry_type}
|
|
||||||
</Badge>
|
|
||||||
</Table.Td>
|
|
||||||
<Table.Td ta="right" ff="monospace" fw={500}>
|
|
||||||
{fmt(tx.amount)}
|
|
||||||
</Table.Td>
|
|
||||||
</Table.Tr>
|
|
||||||
))}
|
|
||||||
</Table.Tbody>
|
|
||||||
</Table>
|
|
||||||
)}
|
|
||||||
</Card>
|
|
||||||
<Card withBorder padding="lg" radius="md">
|
<Card withBorder padding="lg" radius="md">
|
||||||
<Title order={4}>Quick Stats</Title>
|
<Title order={4}>Quick Stats</Title>
|
||||||
<Stack mt="sm" gap="xs">
|
<Stack mt="sm" gap="xs">
|
||||||
@@ -582,6 +553,35 @@ export function DashboardPage() {
|
|||||||
</Group>
|
</Group>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Card>
|
</Card>
|
||||||
|
<Card withBorder padding="lg" radius="md">
|
||||||
|
<Title order={4} mb="sm">Recent Transactions</Title>
|
||||||
|
{(data?.recent_transactions || []).length === 0 ? (
|
||||||
|
<Text c="dimmed" size="sm">No transactions yet. Start by entering journal entries.</Text>
|
||||||
|
) : (
|
||||||
|
<Table striped highlightOnHover>
|
||||||
|
<Table.Tbody>
|
||||||
|
{(data?.recent_transactions || []).map((tx) => (
|
||||||
|
<Table.Tr key={tx.id}>
|
||||||
|
<Table.Td>
|
||||||
|
<Text size="xs" c="dimmed">{new Date(tx.entry_date).toLocaleDateString()}</Text>
|
||||||
|
</Table.Td>
|
||||||
|
<Table.Td>
|
||||||
|
<Text size="sm" lineClamp={1}>{tx.description}</Text>
|
||||||
|
</Table.Td>
|
||||||
|
<Table.Td>
|
||||||
|
<Badge size="xs" color={entryTypeColors[tx.entry_type] || 'gray'} variant="light">
|
||||||
|
{tx.entry_type}
|
||||||
|
</Badge>
|
||||||
|
</Table.Td>
|
||||||
|
<Table.Td ta="right" ff="monospace" fw={500}>
|
||||||
|
{fmt(tx.amount)}
|
||||||
|
</Table.Td>
|
||||||
|
</Table.Tr>
|
||||||
|
))}
|
||||||
|
</Table.Tbody>
|
||||||
|
</Table>
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
</SimpleGrid>
|
</SimpleGrid>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user