From d6e1d322878576ddafdc69e143a9a8035fa87daf Mon Sep 17 00:00:00 2001 From: Mariela Bonilla Date: Mon, 26 Jul 2021 00:00:03 -0600 Subject: [PATCH] fix conflicts --- .../detail/encuesta-detail.component.html | 2 +- .../encuesta/list/encuesta.component.ts | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/app/entities/encuesta/detail/encuesta-detail.component.html b/src/main/webapp/app/entities/encuesta/detail/encuesta-detail.component.html index 70e8083..0b5bbed 100644 --- a/src/main/webapp/app/entities/encuesta/detail/encuesta-detail.component.html +++ b/src/main/webapp/app/entities/encuesta/detail/encuesta-detail.component.html @@ -197,7 +197,7 @@ - {{ encuesta.categoria?.nombre }} -
+
Fecha Publicacion
{ const modalRef = this.modalService.open(EncuestaDeleteDialogComponent, { size: 'lg', backdrop: 'static' }); @@ -427,6 +428,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit { } selectSurvey(event: any): void { + this.idEncuesta = event.target.getAttribute('data-id'); document.querySelectorAll('.ds-list--entity').forEach(e => { e.classList.remove('active'); }); @@ -436,7 +438,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit { } openPreview() { - const surveyId = this.selectedIdSurvey; + const surveyId = this.idEncuesta; this.router.navigate(['/encuesta', surveyId, 'preview']); } @@ -456,9 +458,10 @@ export class EncuestaComponent implements OnInit, AfterViewInit { e.classList.remove('active'); }); - let res = await this.encuestaService.find(this.selectedSurveyId).toPromise(); + let res = await this.encuestaService.find(event.target.id).toPromise(); this.selectedSurvey = res.body; this.isPublished = this.selectedSurvey!.estado === 'DRAFT'; // QUE SE LE MUESTRE CUANDO ESTE EN DRAFT + // } document.getElementById('contextmenu-create--separator')!.style.display = 'block'; document.getElementById('contextmenu-edit--separator')!.style.display = 'block'; @@ -468,7 +471,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit { document.getElementById('contextmenu-publish')!.style.display = 'block'; //cambiar } document.getElementById('contextmenu-preview')!.style.display = 'block'; - document.getElementById('contextmenu-share')!.style.display = 'block'; + //document.getElementById('contextmenu-share')!.style.display = 'block'; if ((event.target as HTMLElement).classList.contains('ds-list')) { document; @@ -477,6 +480,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit { document.getElementById('contextmenu-delete--separator')!.style.display = 'none'; } else if ((event.target as HTMLElement).classList.contains('ds-list--entity')) { this.selectedSurveyId = Number(event.target.dataset.id); + this.idEncuesta = Number(event.target.dataset.id); event.target.classList.add('active'); let res = await this.encuestaService.find(this.selectedSurveyId).toPromise(); @@ -487,7 +491,7 @@ export class EncuestaComponent implements OnInit, AfterViewInit { document.getElementById('contextmenu-edit--separator')!.style.display = 'block'; document.getElementById('contextmenu-delete--separator')!.style.display = 'block'; document.getElementById('contextmenu-edit')!.style.display = 'block'; - document.getElementById('contextmenu-duplicate')!.style.display = 'block'; + document.getElementById('contextmenu-preview')!.style.display = 'block'; if (!this.isPublished) { document.getElementById('contextmenu-publish')!.style.display = 'block';