mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Fix go back
This commit is contained in:
@@ -12,6 +12,7 @@ import { AttachmentsService } from 'src/app/services/attachments.service';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { Location } from '@angular/common'
|
||||
|
||||
@Component({
|
||||
selector: 'app-opts-expediente-pr',
|
||||
@@ -48,7 +49,8 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
private navParams: NavParams,
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private toastService: ToastService
|
||||
private toastService: ToastService,
|
||||
private location: Location,
|
||||
|
||||
) {
|
||||
|
||||
@@ -276,7 +278,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
console.log(res['data']);
|
||||
let body = res['data'];
|
||||
// alert('close '+ res['data'])
|
||||
if(res['data']){
|
||||
if(res['data']) {
|
||||
console.log('open discart');
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
@@ -290,7 +292,6 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
} finally {
|
||||
loader.remove()
|
||||
}
|
||||
this.goBack();
|
||||
|
||||
}
|
||||
else{
|
||||
@@ -321,16 +322,7 @@ export class OptsExpedientePrPage implements OnInit {
|
||||
}
|
||||
|
||||
goBack() {
|
||||
if (window.innerWidth <= 800) {
|
||||
this.router.navigate(['/home/gabinete-digital/expedientes-pr']);
|
||||
} else {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"expedientes-pr": true,
|
||||
}
|
||||
};
|
||||
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
|
||||
}
|
||||
this.location.back()
|
||||
}
|
||||
|
||||
getAttachments(serialNumber){
|
||||
|
||||
Reference in New Issue
Block a user