feat(dashboard): ability to locate new admin route under existing route (#10587)

This PR add ability to locate new admin route under existing route in sidebar.

For example, new route Brands
![image](https://github.com/user-attachments/assets/1b297fb0-296c-4e94-a4cb-f84f4c676c53)
![image](https://github.com/user-attachments/assets/80336909-1c0a-49c9-b8e1-3b1137ae2e48)

https://github.com/user-attachments/assets/b46b1813-e92e-4b67-84a1-84660023ac7c
This commit is contained in:
Eugene Pro
2024-12-19 14:23:21 +02:00
committed by GitHub
parent 16ae192456
commit 3efd25d06d
11 changed files with 131 additions and 26 deletions

View File

@@ -4,6 +4,7 @@ import type {
CustomFieldModelContainerMap,
CustomFieldModelFormTabsMap,
InjectionZone,
NestedRoutePosition,
} from "@medusajs/admin-shared"
import type { ComponentType } from "react"
import { ZodFirstPartySchemaTypes } from "zod"
@@ -24,6 +25,11 @@ export interface RouteConfig {
* An optional icon to display in the sidebar together with the label. If no label is provided, the icon will be ignored.
*/
icon?: ComponentType
/**
* The nested route to display under existing route in the sidebar.
*/
nested?: NestedRoutePosition
}
export type CustomFormField<