|
|
@@ -427,11 +427,23 @@ export class InvestmentProposalApproveComponent implements OnInit {
|
|
|
}
|
|
|
},
|
|
|
err => {
|
|
|
- Swal.fire({
|
|
|
- icon: "error",
|
|
|
- title: "Error al guardar",
|
|
|
- text: err.message
|
|
|
- });
|
|
|
+ debugger
|
|
|
+ if(err.code==405){
|
|
|
+ Swal.fire({
|
|
|
+ icon: "error",
|
|
|
+ title: "Operacion no permitida",
|
|
|
+ text: err.message
|
|
|
+ }).then(result => {
|
|
|
+ Swal.close();
|
|
|
+ window.location.href = "#/investment-proposals";
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ Swal.fire({
|
|
|
+ icon: "error",
|
|
|
+ title: "Error al guardar",
|
|
|
+ text: err.message
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
);
|
|
|
});
|
|
|
@@ -519,11 +531,23 @@ export class InvestmentProposalApproveComponent implements OnInit {
|
|
|
}
|
|
|
},
|
|
|
err => {
|
|
|
- Swal.fire({
|
|
|
- icon: "error",
|
|
|
- title: "Error al guardar",
|
|
|
- text: err.message
|
|
|
- });
|
|
|
+ if(err.code==405){
|
|
|
+ Swal.fire({
|
|
|
+ icon: "error",
|
|
|
+ title: "Operacion no permitida",
|
|
|
+ text: err.message
|
|
|
+ }).then(result => {
|
|
|
+ Swal.close();
|
|
|
+ window.location.href = "#/investment-proposals";
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ Swal.fire({
|
|
|
+ icon: "error",
|
|
|
+ title: "Error al guardar",
|
|
|
+ text: err.message
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.router.navigate(["/investment-proposals"]);
|
|
|
}
|
|
|
);
|
|
|
});
|