mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat: update vessel ownership transfer routes and navigation for consistency
This commit is contained in:
@@ -75,7 +75,7 @@ const NAV_SECTIONS: { label?: string; items: PortalNavItem[] }[] = [
|
|||||||
label: "nav.groupVessels",
|
label: "nav.groupVessels",
|
||||||
items: [
|
items: [
|
||||||
{ to: '/vessel-registration', label: 'Vessel Registration', i18nKey: 'nav.vesselRegistration', icon: IconShip },
|
{ to: '/vessel-registration', label: 'Vessel Registration', i18nKey: 'nav.vesselRegistration', icon: IconShip },
|
||||||
{ to: '/vessel-registration/transfer', label: 'Ownership Transfer', i18nKey: 'nav.ownershipTransfer', icon: IconArrowsExchange },
|
{ to: '/vessel-ownership-transfer', label: 'Ownership Transfer', i18nKey: 'nav.ownershipTransfer', icon: IconArrowsExchange },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -107,7 +107,7 @@ const PAGE_META: Record<string, { i18nKey: string }> = {
|
|||||||
'/dashboard': { i18nKey: 'nav.dashboard' },
|
'/dashboard': { i18nKey: 'nav.dashboard' },
|
||||||
'/vessel-registration-dashboard': { i18nKey: 'nav.vesselRegistrationDashboard' },
|
'/vessel-registration-dashboard': { i18nKey: 'nav.vesselRegistrationDashboard' },
|
||||||
'/vessel-registration': { i18nKey: 'nav.vesselRegistration' },
|
'/vessel-registration': { i18nKey: 'nav.vesselRegistration' },
|
||||||
'/vessel-registration/transfer': { i18nKey: 'nav.ownershipTransfer' },
|
'/vessel-ownership-transfer': { i18nKey: 'nav.ownershipTransfer' },
|
||||||
'/licensing/applications': { i18nKey: 'nav.myApplications' },
|
'/licensing/applications': { i18nKey: 'nav.myApplications' },
|
||||||
'/waiver': { i18nKey: 'nav.waiver' },
|
'/waiver': { i18nKey: 'nav.waiver' },
|
||||||
'/seafarer-registration': { i18nKey: 'nav.seafarerRegistration' },
|
'/seafarer-registration': { i18nKey: 'nav.seafarerRegistration' },
|
||||||
|
|||||||
@@ -177,7 +177,14 @@ export const router = createBrowserRouter([
|
|||||||
path: "/vessel-registration-dashboard",
|
path: "/vessel-registration-dashboard",
|
||||||
element: <Navigate to="/vessel-registration" replace />,
|
element: <Navigate to="/vessel-registration" replace />,
|
||||||
},
|
},
|
||||||
{ path: "/vessel-registration/transfer", element: <VesselTransferPage /> },
|
{ path: "/vessel-ownership-transfer", element: <VesselTransferPage /> },
|
||||||
|
// The nav item used to nest this under /vessel-registration, which made
|
||||||
|
// the sidebar's prefix-match (nav-utils.ts isItemActive) light up both
|
||||||
|
// items at once. Kept as a redirect for old bookmarks/links.
|
||||||
|
{
|
||||||
|
path: "/vessel-registration/transfer",
|
||||||
|
element: <Navigate to="/vessel-ownership-transfer" replace />,
|
||||||
|
},
|
||||||
// Legacy per-licence-type URLs. Each once had its own hand-written page
|
// Legacy per-licence-type URLs. Each once had its own hand-written page
|
||||||
// that posted to a `/logistics-licenses/*` endpoint the API never had,
|
// that posted to a `/logistics-licenses/*` endpoint the API never had,
|
||||||
// and dropped every uploaded document on the floor. They are kept as
|
// and dropped every uploaded document on the floor. They are kept as
|
||||||
@@ -291,7 +298,7 @@ export const router = createBrowserRouter([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/vessel-owner/registration/transfer",
|
path: "/vessel-owner/registration/transfer",
|
||||||
element: <Navigate to="/vessel-registration/transfer" replace />,
|
element: <Navigate to="/vessel-ownership-transfer" replace />,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ path: "*", element: <Navigate to="/" replace /> },
|
{ path: "*", element: <Navigate to="/" replace /> },
|
||||||
|
|||||||
Reference in New Issue
Block a user