Skip to content

Commit 06c22c6

Browse files
committed
[DSC-648] fix statistics menu
1 parent 5eadbe2 commit 06c22c6

1 file changed

Lines changed: 14 additions & 13 deletions

File tree

src/app/menu.resolver.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,6 @@ export class MenuResolver implements Resolve<boolean> {
150150
]).pipe(take(1)).subscribe(([canViewUsage, canViewLogin, canViewWorkflow]) => {
151151
const menuList = [];
152152
if (canViewUsage || canViewLogin || canViewWorkflow) {
153-
menuList.push(
154-
{
155-
id: 'statistics',
156-
active: false,
157-
visible: true,
158-
index: 1,
159-
model: {
160-
type: MenuItemType.TEXT,
161-
text: 'menu.section.statistics'
162-
} as TextMenuItemModel,
163-
}
164-
);
165-
166153
if (canViewUsage) {
167154
menuList.push({
168155
id: 'statistics_site',
@@ -204,6 +191,20 @@ export class MenuResolver implements Resolve<boolean> {
204191
} as LinkMenuItemModel
205192
});
206193
}
194+
195+
// the parent menu should be added after the children
196+
menuList.push(
197+
{
198+
id: 'statistics',
199+
active: false,
200+
visible: true,
201+
index: 1,
202+
model: {
203+
type: MenuItemType.TEXT,
204+
text: 'menu.section.statistics'
205+
} as TextMenuItemModel,
206+
}
207+
);
207208
}
208209
menuList.forEach((menuSection) => this.menuService.addSection(MenuID.PUBLIC, Object.assign(menuSection, {
209210
shouldPersistOnRouteChange: true

0 commit comments

Comments
 (0)