Skip to content

Commit 1f2d913

Browse files
author
Fleetbase CI
committed
fix: rename top-level virtual route to track-order to resolve no-shadow-route-definition lint error
The ember/no-shadow-route-definition rule flagged the top-level `virtual` route (path: '/:section/:slug') as shadowing the nested `virtual` routes (path: '/:slug') inside orders, drivers, vehicles, etc. While the routes are in entirely different URL namespaces at runtime, the static linter cannot distinguish nesting depth and treats any two routes with the same name and structurally identical dynamic segment patterns as a conflict. Fix: rename the top-level route from 'virtual' to 'track-order' (which accurately describes its purpose — the Track Order login-screen button) and update the two corresponding references in extension.js.
1 parent 40dff75 commit 1f2d913

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

addon/extension.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ export default {
8383
'auth:login',
8484
new MenuItem({
8585
title: 'Track Order',
86-
route: 'virtual',
86+
route: 'track-order',
8787
slug: 'track-order',
8888
icon: 'barcode',
8989
type: 'link',
9090
wrapperClass: 'btn-block py-1 border dark:border-gray-700 border-gray-200 hover:opacity-50',
9191
component: new ExtensionComponent('@fleetbase/fleetops-engine', 'order-tracking-lookup'),
9292
onClick: (menuItem) => {
93-
universe.transitionMenuItem('virtual', menuItem);
93+
universe.transitionMenuItem('track-order', menuItem);
9494
},
9595
})
9696
);

addon/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import buildRoutes from 'ember-engines/routes';
22

33
export default buildRoutes(function () {
4-
this.route('virtual', { path: '/:section/:slug' });
4+
this.route('track-order', { path: '/:section/:slug' });
55
this.route('operations', { path: '/' }, function () {
66
this.route('order-config', function () {});
77
this.route('service-rates', function () {

0 commit comments

Comments
 (0)