feat: Add FAB with asset price update, mobile optimizations, and localized financial trend
- Add Floating Action Button (FAB) with 3 quick actions - Implement Asset Price Update dialog for bulk price updates - Add bulk price update API endpoint with transaction support - Optimize multiselect, calendar, and dropdown options for mobile (44px touch targets) - Add custom date range popover to save space in Overview header - Localize number format suffixes (k/m/b for EN, rb/jt/m for ID) - Localize date format in Financial Trend (Oct 8 vs 8 Okt) - Fix negative values in trend line chart (domain auto) - Improve Asset Price Update dialog layout (compact horizontal) - Add mobile-optimized calendar with responsive cells - Fix FAB overlay and close button position - Add translations for FAB and asset price updates
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { useState, useCallback } from "react"
|
||||
import { Routes, Route, useLocation, useNavigate } from "react-router-dom"
|
||||
import { DashboardLayout } from "./layout/DashboardLayout"
|
||||
import { Overview } from "./pages/Overview"
|
||||
@@ -8,9 +9,28 @@ import { Profile } from "./pages/Profile"
|
||||
export function Dashboard() {
|
||||
const location = useLocation()
|
||||
const navigate = useNavigate()
|
||||
const [fabWalletDialogOpen, setFabWalletDialogOpen] = useState(false)
|
||||
const [fabTransactionDialogOpen, setFabTransactionDialogOpen] = useState(false)
|
||||
|
||||
const handleOpenWalletDialog = useCallback(() => {
|
||||
setFabWalletDialogOpen(true)
|
||||
}, [])
|
||||
|
||||
const handleOpenTransactionDialog = useCallback(() => {
|
||||
setFabTransactionDialogOpen(true)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<DashboardLayout currentPage={location.pathname} onNavigate={navigate}>
|
||||
<DashboardLayout
|
||||
currentPage={location.pathname}
|
||||
onNavigate={navigate}
|
||||
onOpenWalletDialog={handleOpenWalletDialog}
|
||||
onOpenTransactionDialog={handleOpenTransactionDialog}
|
||||
fabWalletDialogOpen={fabWalletDialogOpen}
|
||||
setFabWalletDialogOpen={setFabWalletDialogOpen}
|
||||
fabTransactionDialogOpen={fabTransactionDialogOpen}
|
||||
setFabTransactionDialogOpen={setFabTransactionDialogOpen}
|
||||
>
|
||||
<Routes>
|
||||
<Route path="/" element={<Overview />} />
|
||||
<Route path="/wallets" element={<Wallets />} />
|
||||
|
||||
Reference in New Issue
Block a user