|
|
@@ -13,7 +13,7 @@ import { USERInterface } from '../../../interfaces/user-interface';
|
|
|
import { ENCService } from 'src/app/services/enc/enc.service';
|
|
|
import { MCOMAUService } from 'src/app/services/mco/mcomau/mcomau.service';
|
|
|
import { ValidationsService } from 'src/app/services/validations.service';
|
|
|
-import { map, Observable, startWith } from 'rxjs';
|
|
|
+import { lastValueFrom, map, Observable, startWith } from 'rxjs';
|
|
|
import { FormControl } from '@angular/forms';
|
|
|
|
|
|
@Component({
|
|
|
@@ -562,12 +562,15 @@ export class MESMHSComponent implements AfterViewInit {
|
|
|
}
|
|
|
|
|
|
obtenerDetalleSolicitud(item: any) {
|
|
|
- this._mesmhsService.obtenerDetalleSolicitud(item.IDSOLICITUD).subscribe(
|
|
|
- (res) => {
|
|
|
- this.solicitud = res;
|
|
|
- this.openDialogForm(this.solicitud);
|
|
|
- },
|
|
|
- (error) => {
|
|
|
+
|
|
|
+
|
|
|
+ lastValueFrom(this._mesmhsService.obtenerDetalleSolicitud(item.IDSOLICITUD)).then(
|
|
|
+ (data:any) => {
|
|
|
+ if (!data.error) {
|
|
|
+ this.openDialogForm(data.response);
|
|
|
+ }
|
|
|
+
|
|
|
+ }, (error) => {
|
|
|
if (!error.ok) {
|
|
|
this._validationService.openSnackBar('Ocurrió un error inesperado');
|
|
|
}
|