mirror of https://github.com/abpframework/abp.git
5 changed files with 52 additions and 32 deletions
@ -1,18 +1,29 @@ |
|||
import { Injectable } from '@angular/core'; |
|||
import { addAbpRoutes, eLayoutType } from '@abp/ng.core'; |
|||
import { addAbpRoutes, eLayoutType, PatchRouteByName, ABP } from '@abp/ng.core'; |
|||
import { getSettingTabs } from '@abp/ng.theme.shared'; |
|||
import { Store } from '@ngxs/store'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class SettingManagementConfigService { |
|||
constructor() { |
|||
addAbpRoutes({ |
|||
name: 'Settings', |
|||
constructor(private store: Store) { |
|||
const route = { |
|||
name: 'AbpSettingManagement::Settings', |
|||
path: 'setting-management', |
|||
parentName: 'AbpUiNavigation::Menu:Administration', |
|||
layout: eLayoutType.application, |
|||
order: 6, |
|||
iconClass: 'fa fa-cog', |
|||
} as ABP.FullRoute; |
|||
|
|||
addAbpRoutes(route); |
|||
|
|||
setTimeout(() => { |
|||
const tabs = getSettingTabs(); |
|||
if (!tabs || !tabs.length) { |
|||
this.store.dispatch(new PatchRouteByName('AbpSettingManagement::Settings', { ...route, invisible: true })); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue