diff --git a/admin-spa/src/components/nav/DashboardSubmenuBar.tsx b/admin-spa/src/components/nav/DashboardSubmenuBar.tsx
index 7bbfb17..a8c090e 100644
--- a/admin-spa/src/components/nav/DashboardSubmenuBar.tsx
+++ b/admin-spa/src/components/nav/DashboardSubmenuBar.tsx
@@ -9,9 +9,9 @@ import { __ } from '@/lib/i18n';
import { useQueryClient } from '@tanstack/react-query';
import type { SubItem } from '@/nav/tree';
-type Props = { items?: SubItem[]; fullscreen?: boolean };
+type Props = { items?: SubItem[]; fullscreen?: boolean; headerVisible?: boolean };
-export default function DashboardSubmenuBar({ items = [], fullscreen = false }: Props) {
+export default function DashboardSubmenuBar({ items = [], fullscreen = false, headerVisible = true }: Props) {
const { period, setPeriod, useDummy } = useDashboardPeriod();
const { pathname } = useLocation();
const queryClient = useQueryClient();
@@ -22,10 +22,11 @@ export default function DashboardSubmenuBar({ items = [], fullscreen = false }:
if (items.length === 0) return null;
- // Calculate top position based on fullscreen state
- // Fullscreen: top-16 (below 64px header)
- // Normal: top-[88px] (below 40px WP admin bar + 48px menu bar)
- const topClass = fullscreen ? 'top-0' : 'top-[calc(7rem+32px)]';
+ // Calculate top position based on fullscreen state and header visibility
+ // Fullscreen with header visible: top-16 (below 64px header)
+ // Fullscreen with header hidden: top-0 (replace header position)
+ // Normal: top-[calc(7rem+32px)] (below WP admin bar + menu bar)
+ const topClass = fullscreen ? (headerVisible ? 'top-16' : 'top-0') : 'top-[calc(7rem+32px)]';
return (
diff --git a/admin-spa/src/components/nav/SubmenuBar.tsx b/admin-spa/src/components/nav/SubmenuBar.tsx
index 3fdd945..a08a03e 100644
--- a/admin-spa/src/components/nav/SubmenuBar.tsx
+++ b/admin-spa/src/components/nav/SubmenuBar.tsx
@@ -2,19 +2,20 @@ import React from 'react';
import { Link, useLocation } from 'react-router-dom';
import type { SubItem } from '@/nav/tree';
-type Props = { items?: SubItem[]; fullscreen?: boolean };
+type Props = { items?: SubItem[]; fullscreen?: boolean; headerVisible?: boolean };
-export default function SubmenuBar({ items = [], fullscreen = false }: Props) {
+export default function SubmenuBar({ items = [], fullscreen = false, headerVisible = true }: Props) {
// Always call hooks first
const { pathname } = useLocation();
// Single source of truth: props.items. No fallbacks, no demos, no path-based defaults
if (items.length === 0) return null;
- // Calculate top position based on fullscreen state
- // Fullscreen: top-16 (below 64px header)
- // Normal: top-[88px] (below 40px WP admin bar + 48px menu bar)
- const topClass = fullscreen ? 'top-0' : 'top-[calc(7rem+32px)]';
+ // Calculate top position based on fullscreen state and header visibility
+ // Fullscreen with header visible: top-16 (below 64px header)
+ // Fullscreen with header hidden: top-0 (replace header position)
+ // Normal: top-[calc(7rem+32px)] (below WP admin bar + menu bar)
+ const topClass = fullscreen ? (headerVisible ? 'top-16' : 'top-0') : 'top-[calc(7rem+32px)]';
return (
diff --git a/admin-spa/src/routes/Orders/index.tsx b/admin-spa/src/routes/Orders/index.tsx
index 86cdb7d..085f412 100644
--- a/admin-spa/src/routes/Orders/index.tsx
+++ b/admin-spa/src/routes/Orders/index.tsx
@@ -5,6 +5,7 @@ import { Filter, PackageOpen, Trash2 } from 'lucide-react';
import { ErrorCard } from '@/components/ErrorCard';
import { getPageLoadErrorMessage } from '@/lib/errorHandling';
import { __ } from '@/lib/i18n';
+import { useFABConfig } from '@/hooks/useFABConfig';
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/components/ui/hover-card';
import {
AlertDialog,
@@ -85,6 +86,7 @@ function StatusBadge({ value }: { value?: string }) {
}
export default function Orders() {
+ useFABConfig('orders'); // Add FAB for creating orders
const initial = getQuery();
const [page, setPage] = useState(Number(initial.page ?? 1) || 1);
const [status, setStatus] = useState(initial.status || undefined);