|
|
@@ -1,6 +1,7 @@
|
|
|
-import { Component, Inject, OnInit } from '@angular/core';
|
|
|
+import { Component, Inject, OnInit, ViewChild } from '@angular/core';
|
|
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
+import { MatAccordion } from '@angular/material/expansion';
|
|
|
import { lastValueFrom } from 'rxjs';
|
|
|
import { GETBFOService } from 'src/app/services/getb/getbfo/getbfo.service';
|
|
|
import { GetbmeService } from 'src/app/services/getb/getbme/getbme.service';
|
|
|
@@ -12,6 +13,8 @@ import { GETBSMService } from 'src/app/services/getb/getbsm/getbsm.service';
|
|
|
styleUrls: ['./getbfo-form.component.css'],
|
|
|
})
|
|
|
export class GETBFOFORMComponent implements OnInit {
|
|
|
+ @ViewChild(MatAccordion) accordion!: MatAccordion;
|
|
|
+
|
|
|
public formGroup: FormGroup;
|
|
|
public arr_submodulo: SubmoduloResponse[] = [];
|
|
|
public arr_menu: MenuResponse[] = [];
|
|
|
@@ -36,7 +39,8 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- ngOnInit(): void {}
|
|
|
+ ngOnInit(): void {
|
|
|
+ }
|
|
|
|
|
|
// Obtener módulos
|
|
|
public dataModule(): ModuloResponse[] {
|
|
|
@@ -51,8 +55,9 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
|
|
|
//Obtener submódulo por módulo
|
|
|
public async dataSubmodule() {
|
|
|
+
|
|
|
await lastValueFrom(
|
|
|
- this._submoduloService.getOneSubmodule(this.modulo_data?.value.CODIGO_MODULO)
|
|
|
+ this._submoduloService.getSubmoduleByForm(this.modulo_data?.value.CODIGO_MODULO)
|
|
|
).then(
|
|
|
(data: ResponseData) => {
|
|
|
if (!data.error) {
|
|
|
@@ -73,7 +78,7 @@ export class GETBFOFORMComponent implements OnInit {
|
|
|
//Obtener menú por submódulo
|
|
|
public async dataMenu() {
|
|
|
await lastValueFrom(
|
|
|
- this._menuService.getOneMenu(
|
|
|
+ this._menuService.getMenuByForm(
|
|
|
this.submodulo_data?.value.CODIGO_SUBMODULO
|
|
|
)
|
|
|
).then(
|