mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
save
This commit is contained in:
@@ -98,6 +98,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
};
|
||||
this.checkRoutes();
|
||||
this.checkUser();
|
||||
|
||||
}
|
||||
|
||||
@@ -111,14 +112,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.showExpedients = true;
|
||||
break;
|
||||
case 'PR':
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationEnd && event.url == this.router.url) {
|
||||
this.checkRoutes();
|
||||
@@ -129,6 +122,17 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.hideRefreshButton();
|
||||
}
|
||||
|
||||
checkUser(){
|
||||
switch(this.loggeduser.Profile){
|
||||
case 'MDGPR':
|
||||
this.showExpedients = true;
|
||||
break;
|
||||
case 'PR':
|
||||
this.showExpedientesPr = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
hideRefreshButton(){
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth < 801) {
|
||||
@@ -139,13 +143,54 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
}
|
||||
if(window.innerWidth < 801){
|
||||
console.log('YASS');
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
}
|
||||
|
||||
checkRoutes(){
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
if(this.router.url == '/home/gabinete-digital?eventos=true'){
|
||||
this.openEventsToApprovePage("MDGPR");
|
||||
this.selectedElement='approval';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?expedientes=true'){
|
||||
this.openExpedientListPage();
|
||||
if(this.loggeduser.Profile == 'MDGPR'){
|
||||
this.selectedElement='Correspondence';
|
||||
}
|
||||
else{
|
||||
this.selectedElement='Expediente Presidente'
|
||||
}
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?pendentes=true'){
|
||||
this.openPendentesPage('');
|
||||
this.selectedElement='Pending';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?despachos=true'){
|
||||
this.openDespachosPage('');
|
||||
this.selectedElement='Dispatches';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?pedidos=true'){
|
||||
this.openPedidosPage('parecer');
|
||||
this.selectedElement='RequestsForOpinion';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?expedientespr=true'){
|
||||
this.openExpedientesPrPage();
|
||||
this.selectedElement='Expediente Presidente'
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?despachospr=true'){
|
||||
this.openDespachosPrPage('');
|
||||
this.selectedElement='DispatchesPr'
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomas=true'){
|
||||
this.openDiplomasPage('validar');
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
}
|
||||
else if(this.router.url == '/home/gabinete-digital?diplomasassinar=true'){
|
||||
this.openDiplomasPage('');
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
}
|
||||
|
||||
/* this.activatedRoute.queryParams.subscribe(params => {
|
||||
switch (params)
|
||||
{
|
||||
case params["eventos"]:
|
||||
@@ -185,8 +230,8 @@ export class GabineteDigitalPage implements OnInit {
|
||||
break;
|
||||
|
||||
case params["diplomas"]:
|
||||
this.openDiplomasPage('');
|
||||
this.selectedElement='DiplomasPorAssinar';
|
||||
this.openDiplomasPage('validar');
|
||||
this.selectedElement='DiplomasPorValidar';
|
||||
break;
|
||||
|
||||
case params["diplomasassinar"]:
|
||||
@@ -194,7 +239,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
this.selectedElement='DiplomasAssinar';
|
||||
break;
|
||||
}
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
refreshExpedientes(){
|
||||
@@ -429,7 +474,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
else {
|
||||
this.selectedElement='ExpedientesPr'
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientes": true,}};
|
||||
let navigationExtras: NavigationExtras = { queryParams: {"expedientespr": true,}};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
this.showExpedientesPr = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user