mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix header
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
|
import { HeaderSettingsService } from './header-settings.service';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -11,10 +12,13 @@ export class ActiveTabService {
|
|||||||
agenda: false,
|
agenda: false,
|
||||||
publication: false,
|
publication: false,
|
||||||
home: false,
|
home: false,
|
||||||
gabinete: false
|
gabinete: false,
|
||||||
|
gabineteDetails: false
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(
|
||||||
|
private router: Router,
|
||||||
|
public HeaderSettingsService: HeaderSettingsService) {
|
||||||
|
|
||||||
this.detectActiveTab()
|
this.detectActiveTab()
|
||||||
|
|
||||||
@@ -28,12 +32,19 @@ export class ActiveTabService {
|
|||||||
this.setFalseToAllPage();
|
this.setFalseToAllPage();
|
||||||
const pathName = window.location.pathname
|
const pathName = window.location.pathname
|
||||||
|
|
||||||
|
this.HeaderSettingsService.hideHeader = false
|
||||||
|
|
||||||
if(pathName.startsWith('/home/agenda')) {
|
if(pathName.startsWith('/home/agenda')) {
|
||||||
this.pages.agenda = true
|
this.pages.agenda = true
|
||||||
} else if (pathName.startsWith('/home/events')) {
|
} else if (pathName.startsWith('/home/events')) {
|
||||||
this.pages.home = true
|
this.pages.home = true
|
||||||
} else if (pathName.startsWith('/home/gabinete-digital')) {
|
} else if (pathName.startsWith('/home/gabinete-digital')) {
|
||||||
this.pages.gabinete = true
|
this.pages.gabinete = true
|
||||||
|
|
||||||
|
if (pathName.endsWith('gabinete-digital')) {
|
||||||
|
this.pages.gabineteDetails = true
|
||||||
|
}
|
||||||
|
|
||||||
} else if (pathName.startsWith('/home/publications')) {
|
} else if (pathName.startsWith('/home/publications')) {
|
||||||
this.pages.publication = true
|
this.pages.publication = true
|
||||||
} else if (pathName.startsWith('/home/chat')) {
|
} else if (pathName.startsWith('/home/chat')) {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { HardwareGoBackService } from './hardware-go-back.service';
|
||||||
|
|
||||||
|
describe('HardwareGoBackService', () => {
|
||||||
|
let service: HardwareGoBackService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(HardwareGoBackService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class HardwareGoBackService {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
}
|
||||||
@@ -135,4 +135,8 @@ export class TaskDetailsPage implements OnInit {
|
|||||||
this.dropButton = !this.dropButton;
|
this.dropButton = !this.dropButton;
|
||||||
this.HeaderSettingsService.hideHeader = !this.dropButton
|
this.HeaderSettingsService.hideHeader = !this.dropButton
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onOndestroy() {
|
||||||
|
this.HeaderSettingsService.hideHeader == false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<div class="header-container header-fix" [ngClass]="{'d-none-header':HeaderSettingsService.hideHeader}" >
|
<div class="header-container header-fix" [ngClass]="{'d-none-header':HeaderSettingsService.hideHeader && ActiveTabService.pages.gabineteDetails}" >
|
||||||
<div class="main-tab pb-10 ion-toolbar header-color">
|
<div class="main-tab pb-10 ion-toolbar header-color">
|
||||||
|
|
||||||
<div class="mobile pt-20 d-flex div-top-header justify-space-between">
|
<div class="mobile pt-20 d-flex div-top-header justify-space-between">
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export class HeaderPage implements OnInit {
|
|||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private attachmentService: AttachmentsService,
|
private attachmentService: AttachmentsService,
|
||||||
public NotificationHolderService: NotificationHolderService,
|
public NotificationHolderService: NotificationHolderService,
|
||||||
public HeaderSettingsService: HeaderSettingsService
|
public HeaderSettingsService: HeaderSettingsService,
|
||||||
) {
|
) {
|
||||||
this.loggeduser = SessionStore.user;
|
this.loggeduser = SessionStore.user;
|
||||||
router.events.subscribe((val) => {
|
router.events.subscribe((val) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user