fix: Overview route, add period selector back, prepare product CRUD routes

This commit is contained in:
dwindown
2025-11-05 00:20:12 +07:00
parent eecb34e968
commit 5166ac4bd3
3 changed files with 15 additions and 2 deletions

View File

@@ -327,6 +327,8 @@ function AppRoutes() {
{/* Products */}
<Route path="/products" element={<ProductsIndex />} />
<Route path="/products/new" element={<ProductNew />} />
<Route path="/products/:id/edit" element={<ProductNew />} />
<Route path="/products/:id" element={<ProductNew />} />
<Route path="/products/categories" element={<ProductCategories />} />
<Route path="/products/tags" element={<ProductTags />} />
<Route path="/products/attributes" element={<ProductAttributes />} />

View File

@@ -64,8 +64,19 @@ export default function DashboardSubmenuBar({ items = [], fullscreen = false }:
})}
</div>
{/* Refresh & Dummy Toggle */}
{/* Period Selector, Refresh & Dummy Toggle */}
<div className="flex items-center gap-2 flex-shrink-0">
<Select value={period} disabled>
<SelectTrigger className="w-[140px] h-8">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="7">{__('Last 7 days')}</SelectItem>
<SelectItem value="14">{__('Last 14 days')}</SelectItem>
<SelectItem value="30">{__('Last 30 days')}</SelectItem>
<SelectItem value="all">{__('All Time')}</SelectItem>
</SelectContent>
</Select>
{!useDummy && (
<Button
variant="outline"

View File

@@ -49,7 +49,7 @@ function getStaticFallbackTree(): MainNode[] {
path: '/',
icon: 'layout-dashboard',
children: [
{ label: 'Overview', mode: 'spa', path: '/dashboard', exact: true },
{ label: 'Overview', mode: 'spa', path: '/', exact: true },
{ label: 'Revenue', mode: 'spa', path: '/dashboard/revenue' },
{ label: 'Orders', mode: 'spa', path: '/dashboard/orders' },
{ label: 'Products', mode: 'spa', path: '/dashboard/products' },