|
|
@@ -3,7 +3,7 @@ import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
import { lastValueFrom } from 'rxjs';
|
|
|
import { GETBFOService } from 'src/app/services/getb/getbfo/getbfo.service';
|
|
|
-import { GETBMEService } from 'src/app/services/getb/getbme/getbme.service';
|
|
|
+import { GetbmeService } from 'src/app/services/getb/getbme/getbme.service';
|
|
|
import { GETBSMService } from 'src/app/services/getb/getbsm/getbsm.service';
|
|
|
|
|
|
@Component({
|
|
|
@@ -18,7 +18,7 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
|
|
|
constructor(
|
|
|
private _submoduloService: GETBSMService,
|
|
|
- private _menuService: GETBMEService,
|
|
|
+ private _menuService: GetbmeService,
|
|
|
public dialogRef: MatDialogRef<GETBFOFORMComponent>,
|
|
|
@Inject(MAT_DIALOG_DATA) public data: ModuloResponse[]
|
|
|
) {
|
|
|
@@ -49,13 +49,10 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
return arrModule;
|
|
|
}
|
|
|
|
|
|
-<<<<<<< HEAD
|
|
|
//Obtener submódulo por módulo
|
|
|
public async dataSubmodule() {
|
|
|
await lastValueFrom(
|
|
|
- this._submoduloService.getSubmodules(
|
|
|
- this.modulo_data?.value.CODIGO_MODULO
|
|
|
- )
|
|
|
+ this._submoduloService.getOneSubmodule(this.modulo_data?.value.CODIGO_MODULO)
|
|
|
).then(
|
|
|
(data: ResponseData) => {
|
|
|
if (!data.error) {
|
|
|
@@ -65,16 +62,6 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
} else {
|
|
|
this.submodulo_data?.disable();
|
|
|
}
|
|
|
-=======
|
|
|
- public async dataSubmodule() {
|
|
|
- await lastValueFrom(this._submoduloService.getOneSubmodule(this.modulo?.value.CODIGO_MODULO)).then((data:ResponseData) => {
|
|
|
- if(!data.error){
|
|
|
- if (data.response.length > 0) {
|
|
|
- this.submodulo_data?.enable();
|
|
|
- this.submodulo = this.filterSubmodule(data.response);
|
|
|
- }else{
|
|
|
- this.submodulo_data?.disable();
|
|
|
->>>>>>> 506f47802b84c3e35051a6e79ecb75b72aed79d1
|
|
|
}
|
|
|
},
|
|
|
(error) => {
|
|
|
@@ -86,7 +73,7 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
//Obtener menú por submódulo
|
|
|
public async dataMenu() {
|
|
|
await lastValueFrom(
|
|
|
- this._menuService.getMenuBySubmodulo(
|
|
|
+ this._menuService.getOneMenu(
|
|
|
this.submodulo_data?.value.CODIGO_SUBMODULO
|
|
|
)
|
|
|
).then(
|