This commit is contained in:
Peter Maquiran
2022-10-06 15:45:38 +01:00
parent 42005b731b
commit 2ec28c95de
4 changed files with 31 additions and 31 deletions
+1 -20
View File
@@ -1,8 +1,8 @@
<div class="header-container">
<div class="main-tab pb-10 ion-toolbar header-color">
<div class="mobile pt-20 d-flex div-top-header justify-space-between">
<div title="Pesquisa" *ngIf="!hideSearchBtn" class="div-search">
<div (click)="openSearch()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-45" src='assets/images/icons-search.svg'></ion-icon>
@@ -11,11 +11,6 @@
</div>
</div>
<!-- <div class="div-logo align-center justify-center">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'gov' " src='assets/images/theme/gov/gabinetedigital_logo.png' alt='logo'>
<img *ngIf="ThemeService.currentTheme == 'tribunal' " src='assets/images/theme/tribunal/tribunal-constitucional.png' alt='logo'>
</div> -->
<div class="div-logo align-center justify-center">
<div class="logo-icon">
<img *ngIf="ThemeService.currentTheme == 'default' " src='assets/images/logo-no-bg.png' alt='logo'>
@@ -24,7 +19,6 @@
</div>
<div *ngIf="ThemeService.currentTheme == 'gov'" class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<p class="logo-description-text tp-5">GABINETE DIGITAL</p>
<div class="add-line"></div>
</div>
@@ -56,8 +50,6 @@
<div class="logo-description d-flex align-center justify-content-center">
<div class="logo-description-content">
<!-- <p class="logo-description-text">Calendário Partilhado</p> -->
<div *ngIf="ThemeService.currentTheme == 'default' " class="logo-description-content">
<p class="logo-description-text color-white">GABINETE DIGITAL</p>
<div class="add-line-white"></div>
@@ -91,8 +83,6 @@
<span>Início</span>
</div>
<!-- *ngIf="p.userPermission([permissionList.Agenda])" -->
<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'">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-40" src='assets/images/icons-nav-agenda-inactive.svg'></ion-icon>
@@ -102,8 +92,6 @@
<span>Agenda</span>
</div>
<!-- *ngIf="p.userPermission([permissionList.Gabinete])" -->
<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'">
@@ -113,8 +101,6 @@
<span>Gabinete</span>
</div>
<!-- *ngIf="p.userPermission([permissionList.Actions])" -->
<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'">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-40" src='assets/images/icons-nav-a-es-inactive.svg'></ion-icon>
@@ -123,8 +109,6 @@
<span>Acções</span>
</div>
<!-- *ngIf="p.userPermission([permissionList.Chat])" -->
<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'">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " class="font-40" src='assets/images/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
@@ -132,7 +116,6 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="font-40" src='assets/images/theme/gov/icons-nav-grupos-inactive-dk-white.svg'></ion-icon>
<span>Chat</span>
</div>
</div>
<div class="header-btns d-flex">
@@ -173,7 +156,6 @@
<ion-icon *ngIf="ThemeService.currentTheme == 'tribunal' " class="icon" src='assets/images/theme/tribunal/icons-profile.svg'></ion-icon>
<div class="profile-text">
<!-- <ion-label>{{profileLabel(loggeduser.Profile)}}</ion-label> -->
<div *ngIf="this.notificationLength > 0 && !production" class="icon-badge"
style="right: -18px;top: -9px;">
{{notificationLength}}</div>
@@ -187,5 +169,4 @@
</div>
<div [class.header-bottom-line] = "ThemeService.currentTheme == 'gov'" style="height: 5px;"></div>
<!-- {{ RouteService.history | json }} -->
</div>
+25 -10
View File
@@ -12,6 +12,7 @@ import { ThemeService } from '../../services/theme.service';
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 { models } from 'beast-orm';
@Component({
selector: 'app-header',
@@ -51,6 +52,7 @@ export class HeaderPage implements OnInit {
router.events.subscribe((val) => {
this.showSearch = false;
this.isProfileOpen = false
this.canOpenSearch = true;
});
@@ -108,6 +110,7 @@ export class HeaderPage implements OnInit {
}
}
canOpenSearch = true
async openSearch() {
let classs, showSearchInput, type;
@@ -130,16 +133,28 @@ export class HeaderPage implements OnInit {
type = "AccoesPresidenciais"
}
const modal = await this.modalController.create({
component: SearchPage,
cssClass: classs,
componentProps: {
type: type,
showSearchInput: showSearchInput,
select: false
}
});
return await modal.present();
if(this.canOpenSearch) {
this.canOpenSearch = false
const modal = await this.modalController.create({
component: SearchPage,
cssClass: classs,
componentProps: {
type: type,
showSearchInput: showSearchInput,
select: false
}
});
await modal.present();
modal.onDidDismiss().then(() => {
this.canOpenSearch = true;
});
}
}
changeRoute(path) {