bug fixed on despacho page about presenting despacho by serialnumber

This commit is contained in:
Eudes Inácio
2021-10-19 10:51:13 +01:00
parent ed42a29c3f
commit a43535cf86
@@ -80,14 +80,11 @@ export class DespachoPage implements OnInit {
return;
}
});
this.LoadTaskDetail(this.serialnumber)
this.backgroundservice.registerBackService('Online', () => {
this.LoadTaskDetail(this.serialnumber)
});
this.getFromDb()
}
close() {
@@ -167,16 +164,15 @@ export class DespachoPage implements OnInit {
});
});
}, (error) => {
try {
this.goBack()
} catch (e) {
this.location.back();
} finally {
if (error.status == 0) {
this.toastService.badRequest('Não é possível visualizar este processo no modo offline')
} else {
this.toastService.badRequest('Processo não encontrado')
if (error.status == 0) {
this.getFromDb();
} else {
try {
this.goBack()
} catch (e) {
this.location.back();
}
this.toastService.badRequest('Processo não encontrado')
}
});
}