diff --git a/src/app/_modules/administration/page/administration-page.component.html b/src/app/_modules/administration/page/administration-page.component.html index fd7deb7..71c54a3 100644 --- a/src/app/_modules/administration/page/administration-page.component.html +++ b/src/app/_modules/administration/page/administration-page.component.html @@ -4,7 +4,9 @@
- +
+ +
diff --git a/src/app/_modules/administration/page/administration-page.component.ts b/src/app/_modules/administration/page/administration-page.component.ts index 4004156..bb39fae 100644 --- a/src/app/_modules/administration/page/administration-page.component.ts +++ b/src/app/_modules/administration/page/administration-page.component.ts @@ -35,7 +35,10 @@ export class AdministrationPageComponent { makeTabs() { //this.tabs = [{name: 'company', title: 'Структура ФАУ «ФЦС»'}, {name: 'committee', title: 'Структура ТК 465'}]; //if (this.authService.isSuperAdmin) this.tabs.push({name: 'site-pages', title: 'Структура сайта'}); - this.tabs = [{name: 'site-pages', title: 'Структура сайта'}, {name: 'users', title: 'Пользователи'}, {name: 'licence', title: 'Данные о лицензии'}]; + this.tabs = [ + {name: 'site-pages', title: 'Структура сайта', access: ["admin", "editor"]}, + {name: 'users', title: 'Пользователи', access: ["admin"]}, + {name: 'licence', title: 'Данные о лицензии', access: ["admin"]}]; this.switchTab(this.route.snapshot.paramMap.get('tab')); } @@ -43,4 +46,12 @@ export class AdministrationPageComponent { this.tabs.map(tab => {tab.active = tab.name === name}); } + showTab(tab){ + return tab.access.filter(role=>this.privileges[role]).length + } + + get privileges(){ + return this.authService.user?.privileges + } + } diff --git a/src/app/_modules/layout/header/user-bar/header-user-bar.component.html b/src/app/_modules/layout/header/user-bar/header-user-bar.component.html index be29fbe..17e3bc8 100644 --- a/src/app/_modules/layout/header/user-bar/header-user-bar.component.html +++ b/src/app/_modules/layout/header/user-bar/header-user-bar.component.html @@ -9,7 +9,7 @@
Личный кабинет
-
+
Панель управления
diff --git a/src/app/_services/authentication.service.ts b/src/app/_services/authentication.service.ts index f833428..3f7f822 100644 --- a/src/app/_services/authentication.service.ts +++ b/src/app/_services/authentication.service.ts @@ -57,7 +57,9 @@ export class AuthenticationService { get isMainCompanyMember() { return this.privileges?.mainCompanyMember; } - + get isEditor() { + return this.privileges?.editor; + } signup(data: any): Observable { diff --git a/src/vniigaz-v2/css/_admin.scss b/src/vniigaz-v2/css/_admin.scss index 64f4caa..07b902f 100644 --- a/src/vniigaz-v2/css/_admin.scss +++ b/src/vniigaz-v2/css/_admin.scss @@ -49,9 +49,21 @@ } -administrate-site-pages>pages-tree{ +administrate-site-pages{ + >pages-tree{ display: block; margin-bottom: 128px; + } + + + @media screen and (max-width: 1330px) { + .page-control { + display: none; + } + .logo, .page-lable{ + display: none !important; + } + } } ico.page-control{ @@ -166,32 +178,6 @@ pages-tree{ - - - @media screen and (max-width: 1330px) { - .item { - .bar { - .mid { - padding: 0 12px; - .info .logo { - display: none; - } - } - .right { - display: none; - } - } - .items { - padding-left: 16px; - } - &.company { - .items { - padding-left: 40px; - } - } - } - } - } diff --git a/src/vniigaz-v2/css/_grid.scss b/src/vniigaz-v2/css/_grid.scss index 304d2c6..c0e9817 100644 --- a/src/vniigaz-v2/css/_grid.scss +++ b/src/vniigaz-v2/css/_grid.scss @@ -196,6 +196,9 @@ pages-menu-item{ right-content, left-content{ display: none; } + .jumbotron-edit-field{ + display: none; + } }