mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
improve tab
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
<div class="d-flex flex-1 pr-20 pl-50" *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2 || (p.userPermission([permissionList.Agenda.access]) && loggeduser.OwnerCalendars.length != 0) || p.userPermission([permissionList.Gabinete.access])">
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Agenda.access]) || p.userPermission([permissionList.Gabinete.access])" class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/events')"
|
||||
[class.active]="locationPathname() == '/home/events'">
|
||||
[class.active]="ActiveTabService.pages.home">
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-40" src='assets/images/icons-nav-home-active-black.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" src='assets/images/theme/gov/icons-nav-home-active-black.svg'></ion-icon>
|
||||
@@ -83,7 +83,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Agenda.access])" class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/agenda')"
|
||||
[class.active]="locationPathname() == '/home/agenda'">
|
||||
[class.active]="ActiveTabService.pages.agenda">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-40" src='assets/images/icons-nav-agenda-inactive.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" src='assets/images/theme/gov/icons-nav-agenda-inactive.svg'></ion-icon>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Gabinete.access])" class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/gabinete-digital')"
|
||||
[class.active]="locationPathname() == '/home/gabinete-digital'">
|
||||
[class.active]="ActiveTabService.pages.gabinete">
|
||||
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-40" src='assets/images/icons-nav-home-dk.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" src='assets/images/theme/gov/icons-nav-home-dk.svg'></ion-icon>
|
||||
@@ -99,14 +99,14 @@
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Actions.access])" class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/publications')"
|
||||
[class.active]="locationPathname() == '/home/publications'">
|
||||
[class.active]="ActiveTabService.pages.publication">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-40" src='assets/images/icons-nav-a-es-inactive.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" src='assets/images/theme/gov/icons-nav-a-es-inactive.svg'></ion-icon>
|
||||
<span>Acções</span>
|
||||
</div>
|
||||
|
||||
<div *ngIf="p.userPermission([permissionList.Chat.access])" class="tab mr-20 d-flex align-center cursor-pointer" (click)="changeRoute('/home/chat')"
|
||||
[class.active]="locationPathname() == '/home/chat'">
|
||||
[class.active]="ActiveTabService.pages.chat">
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'default' || ThemeService.currentTheme == 'doneIt' " class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " class="font-40" src='assets/images/theme/gov/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
|
||||
<span>Chat</span>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { RouteService } from 'src/app/services/route.service';
|
||||
import { PermissionList } from 'src/app/models/permission/permissionList';
|
||||
import { PermissionService } from 'src/app/services/permission.service';
|
||||
import { EventTrigger } from 'src/app/services/eventTrigger.service'
|
||||
/* import { Events } from 'ionic-angular' */
|
||||
import { ActiveTabService } from 'src/app/services/active-tab.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
@@ -48,6 +48,7 @@ export class HeaderPage implements OnInit {
|
||||
public RouteService: RouteService,
|
||||
public p: PermissionService,
|
||||
private eventTriger: EventTrigger,
|
||||
public ActiveTabService: ActiveTabService
|
||||
) {
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
@@ -98,27 +99,6 @@ export class HeaderPage implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
locationPathname(): string {
|
||||
let path = window.location.pathname;
|
||||
if(path.includes('/home/events')){
|
||||
return '/home/events';
|
||||
}
|
||||
else if(path.includes('/home/agenda')){
|
||||
return '/home/agenda';
|
||||
}
|
||||
else if(path.includes('/home/gabinete-digital')){
|
||||
return '/home/gabinete-digital';
|
||||
}
|
||||
else if(path.includes('/home/publications')){
|
||||
return '/home/publications';
|
||||
}
|
||||
else if(path.includes('/home/chat')){
|
||||
return '/home/chat';
|
||||
}
|
||||
else{
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
async openSearch() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user