mostrar encuestas en tabla para admin
This commit is contained in:
parent
593905bf01
commit
c5bead0483
|
@ -36,7 +36,7 @@
|
|||
</div>
|
||||
|
||||
<!-- Lista de Encuestas del Usuario -->
|
||||
<div class="ds-list" (contextmenu)="openContextMenu($event)">
|
||||
<div class="ds-list" (contextmenu)="openContextMenu($event)" *ngIf="!isAdmin">
|
||||
<!-- Context Menu -->
|
||||
<div class="ds-contextmenu ds-contextmenu--closed" id="contextmenu">
|
||||
<ul id="ds-context-menu__list">
|
||||
|
@ -205,7 +205,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="table-responsive" id="entities" *ngIf="encuestas && encuestas.length > 0">
|
||||
<div class="table-responsive" id="entities" *ngIf="isAdmin && encuestas && encuestas.length > 0">
|
||||
<table class="table table-striped" aria-describedby="page-heading">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -281,7 +281,7 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- --------------------------------------------------------------------------------------------- -->
|
||||
|
||||
|
@ -415,7 +415,7 @@
|
|||
|
||||
<!-- ------------------------------------------------------------------------------------------------- -->
|
||||
|
||||
<!-- <div class="row justify-content-center">
|
||||
<!-- <div ngIf class="row justify-content-center">
|
||||
<div class="col-8">
|
||||
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
|
||||
<h2 id="jhi-encuesta-heading" data-cy="EncuestaCreateUpdateHeading" jhiTranslate="dataSurveyApp.encuesta.home.createOrEditLabel">
|
||||
|
|
|
@ -106,7 +106,11 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
|
|||
(res: HttpResponse<IEncuesta[]>) => {
|
||||
this.isLoading = false;
|
||||
const tmpEncuestas = res.body ?? [];
|
||||
if (this.isAdmin()) {
|
||||
this.encuestas = tmpEncuestas;
|
||||
} else {
|
||||
this.encuestas = tmpEncuestas.filter(e => e.usuarioExtra?.id === this.usuarioExtra?.id);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
this.isLoading = false;
|
||||
|
|
Loading…
Reference in New Issue