Skip to content

Commit

Permalink
feat(RUP): agrega concepto en select (#2469)
Browse files Browse the repository at this point in the history
Co-authored-by: mcele <MCele>
  • Loading branch information
MCele authored Sep 29, 2021
1 parent 75a4dec commit d8c934d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { RUPComponent } from '../../core/rup.component';
import { Unsubscribe } from '@andes/shared';
import { Observable, of } from 'rxjs';
import { RupElement } from '..';
import { ISnomedConcept } from '../../../interfaces/snomed-concept.interface';

/**
* Params:
Expand Down Expand Up @@ -103,6 +104,10 @@ export class SelectBaseComponent extends RUPComponent implements OnInit, AfterVi
if (!this.otherEnabled) {
if (this.itemSelected) {
this.registro.valor = this.itemSelected;
if (this.params.addRegister) {
// se agrega un registro por concepto seleccionado
this.addConcepto(this.itemSelected);
}
} else {
this.registro.valor = null;
}
Expand All @@ -117,6 +122,10 @@ export class SelectBaseComponent extends RUPComponent implements OnInit, AfterVi

}

addConcepto(concepto: ISnomedConcept) {
this.ejecucionService.agregarConcepto(concepto);
}

@Unsubscribe()
loadDatos(event) {
if (!event) {
Expand Down

0 comments on commit d8c934d

Please sign in to comment.