mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix
This commit is contained in:
@@ -374,7 +374,7 @@ export class GabineteDigitalPage implements OnInit {
|
|||||||
if( window.innerWidth <= 801) {
|
if( window.innerWidth <= 801) {
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
this.showPedidos = true;
|
this.showPedidos = true;
|
||||||
this.selectedElement = 'RequestForApproval'
|
this.selectedElement = 'RequestForApproval'
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ task | json}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="task" class="aside-right flex-column height-100">
|
<div *ngIf="task" class="aside-right flex-column height-100">
|
||||||
|
|||||||
@@ -473,15 +473,15 @@ export class PedidoPage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
this.router.navigate(['/home/gabinete-digital/pendentes']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log(this.task.WorkflowName)
|
|
||||||
// Pedido de Deferimento
|
|
||||||
// Pedido de Parecer
|
|
||||||
|
|
||||||
let navigationExtras: NavigationExtras = {
|
let navigationExtras: NavigationExtras;
|
||||||
queryParams: {
|
|
||||||
"pendentes": true,
|
if (this.task.WorkflowName == 'Pedido de Deferimento') {
|
||||||
}
|
navigationExtras= { queryParams: {"deferimento": true,}};
|
||||||
|
} else if (this.task.WorkflowName == 'Pedido de Parecer') {
|
||||||
|
navigationExtras = { queryParams: {"parecer": true,}};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -490,16 +490,15 @@ export class PedidoPage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
this.router.navigate(['/home/gabinete-digital/pedidos']);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log(this.task.WorkflowName)
|
|
||||||
// Pedido de Deferimento
|
let navigationExtras: NavigationExtras;
|
||||||
// Pedido de Parecer
|
|
||||||
|
if (this.task.WorkflowName == 'Pedido de Deferimento') {
|
||||||
|
navigationExtras= { queryParams: {"deferimento": true,}};
|
||||||
let navigationExtras: NavigationExtras = {
|
} else if (this.task.WorkflowName == 'Pedido de Parecer') {
|
||||||
queryParams: {
|
navigationExtras = { queryParams: {"parecer": true,}};
|
||||||
"pedidos": true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ export class PedidosPage implements OnInit {
|
|||||||
) {
|
) {
|
||||||
//Inicializar segment
|
//Inicializar segment
|
||||||
this.segment = 'parecer';
|
this.segment = 'parecer';
|
||||||
|
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
this.activatedRoute.queryParams.subscribe(params => {
|
||||||
if(params['deferimento'] == 'true') {
|
if(params['deferimento'] == 'true') {
|
||||||
this.segment = 'deferimento';
|
this.segment = 'deferimento';
|
||||||
@@ -45,6 +46,7 @@ export class PedidosPage implements OnInit {
|
|||||||
this.segment = 'parecer';
|
this.segment = 'parecer';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -74,7 +76,7 @@ export class PedidosPage implements OnInit {
|
|||||||
|
|
||||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||||
|
|
||||||
//this.LoadList();
|
this.LoadList();
|
||||||
}
|
}
|
||||||
|
|
||||||
goToPedido(serialNumber:any){
|
goToPedido(serialNumber:any){
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||||
import { CalendarComponent } from 'ionic2-calendar';
|
import { CalendarComponent } from 'ionic2-calendar';
|
||||||
|
|
||||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||||
@@ -49,20 +49,19 @@ export class PedidosPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
this.LoadList();
|
this.LoadList();
|
||||||
|
|
||||||
setTimeout(()=>{
|
this.router.events.forEach((event) => {
|
||||||
// update list
|
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
||||||
const location = window.location
|
event instanceof NavigationEnd && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||
|
||||||
const pathname = location.pathname + location.search
|
event instanceof NavigationEnd && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)
|
||||||
|
) {
|
||||||
this.router.events.forEach((event) => {
|
this.doRefresh()
|
||||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
}
|
||||||
this.LoadList();
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 10)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
segmentChanged(ev: any) {
|
segmentChanged(ev: any) {
|
||||||
@@ -153,9 +152,9 @@ export class PedidosPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
doRefresh() {
|
doRefresh() {
|
||||||
this.LoadList();
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
}, 2000);
|
this.LoadList();
|
||||||
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
goToPedido(serialNumber:any) {
|
goToPedido(serialNumber:any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user