feat: remove OTP gate from transactions, fix categories auth, add implementation plan

- Remove OtpGateGuard from transactions controller (OTP verified at login)
- Fix categories controller to use authenticated user instead of TEMP_USER_ID
- Add comprehensive implementation plan document
- Update .env.example with WEB_APP_URL
- Prepare for admin dashboard development
This commit is contained in:
dwindown
2025-10-11 14:00:11 +07:00
parent 0da6071eb3
commit 249f3a9d7d
159 changed files with 13748 additions and 3369 deletions

View File

@@ -279,7 +279,7 @@ export function Overview() {
kind: wallet.kind
}
})
}, [wallets, transactions, exchangeRates])
}, [wallets, transactions, exchangeRates, dateRange, customStartDate, customEndDate])
// Flexible trend data based on selected period and date range
const trendData = useMemo(() => {
@@ -526,7 +526,7 @@ export function Overview() {
</div>
{/* Date Range Filter */}
<div className="space-y-3 flex flex-col md:flex-row md:justify-between gap-3 md:w-full">
<div className="space-y-3 flex flex-col md:flex-row md:flex-wrap md:justify-between gap-3 md:w-full">
<div className="flex flex-col sm:flex-row gap-3">
<label className="text-xs font-medium text-muted-foreground flex flex-row flex-nowrap items-center gap-1">
@@ -583,7 +583,7 @@ export function Overview() {
</div>
{/* Stats Cards */}
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4">
<div className="grid gap-4 lg:grid-cols-3">
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">Total Balance</CardTitle>
@@ -628,19 +628,6 @@ export function Overview() {
</p>
</CardContent>
</Card>
<Card>
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-2">
<CardTitle className="text-sm font-medium">Transactions</CardTitle>
<Receipt className="h-4 w-4 text-muted-foreground" />
</CardHeader>
<CardContent>
<div className="text-2xl font-bold">{getFilteredTransactions(transactions, dateRange, customStartDate, customEndDate).length}</div>
<p className="text-xs text-muted-foreground">
{getDateRangeLabel(dateRange, customStartDate, customEndDate)} transactions
</p>
</CardContent>
</Card>
</div>
{/* Second Row: Wallet Breakdown (Full Width) */}
@@ -674,10 +661,10 @@ export function Overview() {
<TableCell>
<div className="flex items-center gap-2">
<button
className="font-medium text-nowrap hover:text-blue-600 hover:underline text-left"
className="font-medium text-nowrap hover:text-blue-600 hover:underline text-left cursor-pointer"
onClick={() => {
// Navigate to transactions page with wallet filter
window.location.href = `/transactions?wallet=${wallet.name}`
window.location.href = `/transactions?wallet=${encodeURIComponent(wallet.name)}`
}}
>
{wallet.name}
@@ -694,10 +681,10 @@ export function Overview() {
</TableCell>
<TableCell className="text-center">
<button
className="hover:text-blue-600 hover:underline"
className="hover:text-blue-600 hover:underline cursor-pointer"
onClick={() => {
// Navigate to transactions page with wallet filter
window.location.href = `/transactions?wallet=${wallet.name}`
window.location.href = `/transactions?wallet=${encodeURIComponent(wallet.name)}`
}}
>
{wallet.transactionCount}