Skip to content

Commit

Permalink
fix(TOP): se marca la solicitud seleccionada
Browse files Browse the repository at this point in the history
  • Loading branch information
maring0019 committed Apr 10, 2023
1 parent 03c9e3c commit 9f84281
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/app/components/top/solicitudes/solicitudes.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class SolicitudesComponent implements OnInit {
public prestacionesDestino = [];
public estado;
public asignadas = false;
public prestacionSelected;
itemsDropdown: any = []; // Acciones del dropdown 'vincular
openedDropDown = null;

Expand Down Expand Up @@ -273,6 +274,10 @@ export class SolicitudesComponent implements OnInit {
}

seleccionar(prestacion) {
if (prestacion) {
this.prestacionSelected = prestacion;
}

if (this.seleccionado && this.seleccionado.id === prestacion.id) {
this.seleccionado = null;
} else {
Expand Down
7 changes: 5 additions & 2 deletions src/app/components/top/solicitudes/solicitudes.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
(scroll)="onScroll()" [offset]="collapse?252:180" height="60vh">
<plex-table-columns>
</plex-table-columns>
<tr *ngFor="let prestacion of prestacionesEntrada; let i=index" (click)="seleccionar(prestacion)">
<tr *ngFor="let prestacion of prestacionesEntrada; let i=index" (click)="seleccionar(prestacion)"
[class.selected]="prestacion?.id===prestacionSelected?.id" [class.selectable]="selectable">
<td *plTableCol="'fecha'">
<plex-label>
<shared-popover-audit class="mt-3" placement="right" [data]="prestacion"
Expand Down Expand Up @@ -242,7 +243,9 @@
(scroll)="onScroll()" [offset]="collapse?252:180" height="60vh">
<plex-table-columns>
</plex-table-columns>
<tr *ngFor="let prestacion of prestacionesSalida; let i=index" (click)="seleccionar(prestacion)">
<tr *ngFor="let prestacion of prestacionesSalida; let i=index" (click)="seleccionar(prestacion)"
[class.selected]="prestacion?.id===prestacionSelected?.id" [class.selectable]="selectable">

<!-- FECHA -->
<td *plTableCol="'fecha'">
<plex-label [tituloBold]="true" titulo="Registrada el {{prestacion.createdAt | fecha}}"
Expand Down

0 comments on commit 9f84281

Please sign in to comment.