mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
fix open shared publication folder
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
import { ModalController, NavParams } from '@ionic/angular';
|
||||
import { AlertController, ModalController, NavParams } from '@ionic/angular';
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { PublicationsService } from 'src/app/services/publications.service';
|
||||
import { NewActionPage } from './new-action/new-action.page';
|
||||
@@ -78,6 +78,7 @@ export class PublicationsPage implements OnInit {
|
||||
private StreamService:StreamService,
|
||||
private http: HttpClient,
|
||||
|
||||
|
||||
) {
|
||||
this.months = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"];
|
||||
this.days = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"];
|
||||
@@ -87,14 +88,30 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkQueryParameter() {
|
||||
var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
var folderId = urlSearchParams.get('folderId');
|
||||
|
||||
if (folderId !== null && window["openFolder"]) {
|
||||
window["openFolder"] = false
|
||||
this.goToPublicationsList(folderId)
|
||||
} else {
|
||||
console.log('Folder ID::', folderId);
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user