Skip to content

Commit

Permalink
MONIT - Visualización listado de elementos rup (#67)
Browse files Browse the repository at this point in the history
* fix(MONIT-57): Visualización listado de elementos rup

* fix(RUPER): Quita control de items en atomos

---------

Co-authored-by: aldoEMatamala <[email protected]>
Co-authored-by: silviroa <[email protected]>
  • Loading branch information
3 people authored Aug 16, 2024
1 parent 147fa9d commit 78374d8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plex-title [titulo]="titulo">
<plex-button type="danger" (click)="volver()">VOLVER</plex-button>
<plex-button type="success" (click)="onSave()" [validateForm]="formulario1 && formulario2"
[disabled]="!formulario1.form.valid || !formulario2.form.valid || !items.length">GUARDAR
[disabled]="!formulario1.form.valid || (tipoAtomo?.id=='SelectStaticoComponent' && (!formulario2.form.valid || !items.length))">GUARDAR
</plex-button>
</plex-title>
<form #formulario1="ngForm">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,35 @@
<b label>Nombre</b>
<b label>Concepto</b>
<b label>Componente</b>
<b></b>
<b label>Tipo</b>
<b label>Requeridos</b>
<b button></b>
</plex-heading>
<plex-item *ngFor="let elemento of elementosRup$ | async">
<plex-label titulo="{{ elemento.nombre }}"> </plex-label>
<plex-label titulo="{{ elemento.conceptos[0].term }}"> </plex-label>
<plex-label titulo="{{ elemento.nombre? elemento.nombre: 'S/N' }}">
</plex-label>
<plex-label titulo="{{ elemento.conceptos[0]?.term }}"> </plex-label>
<plex-label titulo="{{ elemento.componente }}" [tituloBold]="false"> </plex-label>
<plex-label></plex-label>
<plex-label titulo="{{ elemento.tipo }}" [tituloBold]="false"> </plex-label>
<plex-label [tituloBold]="false"> {{ elemento.requeridos?.length || 0 }} </plex-label>

<plex-button type="success" style="display: none;">hola</plex-button>
<ng-container [ngSwitch]="elemento.componente" ngProjectAs="plex-button">
<plex-button *ngSwitchCase="'MoleculaBaseComponent'" type="warning" icon="pencil" size="sm"
[routerLink]="['molecula', elemento.id]">
</plex-button>
<plex-button *ngSwitchCase="'SeccionadoComponent'" type="warning" icon="pencil" size="sm"
[routerLink]="['seccion', elemento.id]">
</plex-button>
<plex-button *ngSwitchCase="'PRESTACION'" type="warning" icon="pencil" size="sm"
[routerLink]="['prestacion', elemento.id]">
</plex-button>
<plex-button *ngSwitchDefault type="warning" icon="pencil" size="sm"
[routerLink]="['atomo', elemento.id]">
</plex-button>

</ng-container>

<div class="d-flex justify-content-end w-100">
<ng-container [ngSwitch]="elemento.componente" ngProjectAs="plex-button">
<plex-button *ngSwitchCase="'MoleculaBaseComponent'" type="warning" icon="pencil" size="sm"
[routerLink]="['molecula', elemento.id]">
</plex-button>
<plex-button *ngSwitchCase="'SeccionadoComponent'" type="warning" icon="pencil" size="sm"
[routerLink]="['seccion', elemento.id]">
</plex-button>
<plex-button *ngSwitchCase="'PRESTACION'" type="warning" icon="pencil" size="sm"
[routerLink]="['prestacion', elemento.id]">
</plex-button>
<plex-button *ngSwitchDefault type="warning" icon="pencil" size="sm"
[routerLink]="['atomo', elemento.id]">
</plex-button>
</ng-container>
</div>
</plex-item>
</plex-list>
</plex-layout-main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class ElementosRupListadoService {
*/
elementosVisibles(elementos: IElementoRUP[]) {
return elementos.filter(e => {
return !!e.updatedAt || !!e.createdAt;
return e.activo;
});
}

Expand Down

0 comments on commit 78374d8

Please sign in to comment.