mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Fix
This commit is contained in:
@@ -13,7 +13,7 @@ import { DiscartExpedientModalPage } from 'src/app/pages/gabinete-digital/discar
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { DespachoPrPage } from 'src/app/pages/gabinete-digital/despachos-pr/despacho-pr/despacho-pr.page';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-despachos-pr',
|
||||
@@ -58,36 +58,41 @@ constructor (
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
|
||||
setTimeout(()=>{
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd &&
|
||||
if (event instanceof NavigationStart &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
||||
this.LoadList();
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing()
|
||||
} else {
|
||||
this.LoadList()
|
||||
}
|
||||
}
|
||||
});
|
||||
}, 10)
|
||||
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
}
|
||||
|
||||
goToDespachoPr(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras);
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
goToDespachoPr(serialNumber:any){
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": serialNumber,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras);
|
||||
}
|
||||
|
||||
notImplemented(){
|
||||
this.alertService.presentAlert('Funcionalidade em desenvolvimento');
|
||||
@@ -157,15 +162,16 @@ goToDespachoPr(serialNumber:any){
|
||||
refreshing(){
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
}, 2000);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
//event.target.complete();
|
||||
}, 2000);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
goToDespacho(serialNumber:any){
|
||||
|
||||
Reference in New Issue
Block a user