Browse Source

UI: Remove redudant disabled field from menu section

feature/menu-refactoring
Igor Kulikov 2 years ago
parent
commit
bc844d3b7f
  1. 1
      ui-ngx/src/app/core/services/menu.models.ts
  2. 2
      ui-ngx/src/app/modules/home/components/router-tabs.component.ts

1
ui-ngx/src/app/core/services/menu.models.ts

@ -29,7 +29,6 @@ export interface MenuSection {
icon: string;
pages?: Array<MenuSection>;
opened?: boolean;
disabled?: boolean;
rootOnly?: boolean;
}

2
ui-ngx/src/app/modules/home/components/router-tabs.component.ts

@ -107,7 +107,7 @@ export class RouterTabsComponent extends PageComponent implements OnInit {
if (found) {
const rootPath = sectionPath.substring(0, sectionPath.length - found.path.length);
const isRoot = rootPath === '';
const tabs: Array<MenuSection> = found ? found.pages.filter(page => !page.disabled && (!page.rootOnly || isRoot)) : [];
const tabs: Array<MenuSection> = found ? found.pages.filter(page => !page.rootOnly || isRoot) : [];
return tabs.map((tab) => ({...tab, path: rootPath + tab.path}));
}
return [];

Loading…
Cancel
Save