From ad96c0ee3b7dd0bfbff68c7bcc7f337d0134c0e1 Mon Sep 17 00:00:00 2001 From: Mariela Bonilla Date: Mon, 26 Jul 2021 00:12:07 -0600 Subject: [PATCH] fix event dataset --- .../webapp/app/entities/encuesta/list/encuesta.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/entities/encuesta/list/encuesta.component.ts b/src/main/webapp/app/entities/encuesta/list/encuesta.component.ts index 1c2c015..5d4bb97 100644 --- a/src/main/webapp/app/entities/encuesta/list/encuesta.component.ts +++ b/src/main/webapp/app/entities/encuesta/list/encuesta.component.ts @@ -457,8 +457,9 @@ export class EncuestaComponent implements OnInit, AfterViewInit { document.querySelectorAll('.ds-list--entity').forEach(e => { e.classList.remove('active'); }); + this.selectedSurveyId = Number(event.target.dataset.id); - let res = await this.encuestaService.find(event.target.id).toPromise(); + let res = await this.encuestaService.find(this.selectedSurveyId).toPromise(); this.selectedSurvey = res.body; this.isPublished = this.selectedSurvey!.estado === 'DRAFT'; // QUE SE LE MUESTRE CUANDO ESTE EN DRAFT // } @@ -474,7 +475,6 @@ export class EncuestaComponent implements OnInit, AfterViewInit { //document.getElementById('contextmenu-share')!.style.display = 'block'; if ((event.target as HTMLElement).classList.contains('ds-list')) { - document; document.getElementById('contextmenu-create--separator')!.style.display = 'block'; document.getElementById('contextmenu-edit--separator')!.style.display = 'none'; document.getElementById('contextmenu-delete--separator')!.style.display = 'none';