| @@ -363,7 +363,7 @@ const NavigationContent: React.FC = () => { | |||||
| id: "nav.settings.shopAndTruck", | id: "nav.settings.shopAndTruck", | ||||
| icon: <Storefront />, | icon: <Storefront />, | ||||
| labelKey: "nav.settings.shopAndTruck", | labelKey: "nav.settings.shopAndTruck", | ||||
| path: "/settings/shop", | |||||
| path: "/settings/shop/board", | |||||
| }, | }, | ||||
| { | { | ||||
| id: "nav.settings.deliveryOrderFloor", | id: "nav.settings.deliveryOrderFloor", | ||||
| @@ -495,6 +495,13 @@ const NavigationContent: React.FC = () => { | |||||
| if (!pathname.startsWith(p + "/")) return false; | if (!pathname.startsWith(p + "/")) return false; | ||||
| // `/doworkbench` must not claim `/doworkbenchsearch` (prefix without trailing slash) | // `/doworkbench` must not claim `/doworkbenchsearch` (prefix without trailing slash) | ||||
| if (p === "/doworkbench" && pathname.startsWith("/doworkbenchsearch")) return false; | if (p === "/doworkbench" && pathname.startsWith("/doworkbenchsearch")) return false; | ||||
| // Shop sub-routes (detail, truckdetail, legacy tab page) share one nav entry → board | |||||
| if ( | |||||
| p === "/settings/shop/board" && | |||||
| (pathname === "/settings/shop" || pathname.startsWith("/settings/shop/")) | |||||
| ) { | |||||
| return true; | |||||
| } | |||||
| return true; | return true; | ||||
| }); | }); | ||||
| matches.sort((a, b) => b.length - a.length); | matches.sort((a, b) => b.length - a.length); | ||||
| @@ -325,7 +325,7 @@ const ShopDetail: React.FC = () => { | |||||
| <Alert severity="error" sx={{ mb: 2 }}> | <Alert severity="error" sx={{ mb: 2 }}> | ||||
| {error} | {error} | ||||
| </Alert> | </Alert> | ||||
| <Button onClick={() => router.push("/settings/shop?tab=0")}>{t("Back")}</Button> | |||||
| <Button onClick={() => router.push("/settings/shop/board")}>{t("Back")}</Button> | |||||
| </Box> | </Box> | ||||
| ); | ); | ||||
| } | } | ||||
| @@ -336,7 +336,7 @@ const ShopDetail: React.FC = () => { | |||||
| <Alert severity="warning" sx={{ mb: 2 }}> | <Alert severity="warning" sx={{ mb: 2 }}> | ||||
| {t("Shop not found")} | {t("Shop not found")} | ||||
| </Alert> | </Alert> | ||||
| <Button onClick={() => router.push("/settings/shop?tab=0")}>{t("Back")}</Button> | |||||
| <Button onClick={() => router.push("/settings/shop/board")}>{t("Back")}</Button> | |||||
| </Box> | </Box> | ||||
| ); | ); | ||||
| } | } | ||||
| @@ -347,7 +347,7 @@ const ShopDetail: React.FC = () => { | |||||
| <CardContent> | <CardContent> | ||||
| <Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }}> | <Box sx={{ display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2 }}> | ||||
| <Typography variant="h6">{t("Shop Information")}</Typography> | <Typography variant="h6">{t("Shop Information")}</Typography> | ||||
| <Button onClick={() => router.push("/settings/shop?tab=0")}>{t("Back")}</Button> | |||||
| <Button onClick={() => router.push("/settings/shop/board")}>{t("Back")}</Button> | |||||
| </Box> | </Box> | ||||
| <Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}> | <Box sx={{ display: "flex", flexDirection: "column", gap: 2 }}> | ||||
| @@ -493,7 +493,7 @@ const TruckLaneDetail: React.FC = () => { | |||||
| }; | }; | ||||
| const handleBack = () => { | const handleBack = () => { | ||||
| router.push("/settings/shop?tab=1"); | |||||
| router.push("/settings/shop/board"); | |||||
| }; | }; | ||||
| const handleOpenAddShopDialog = () => { | const handleOpenAddShopDialog = () => { | ||||