no cargar encuesta si esta no tiene preguntas

This commit is contained in:
Eduardo Quiros 2021-08-05 22:32:07 -06:00
parent aa046622c5
commit 3ef564420b
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,7 @@ export class EncuestaCompleteComponent implements OnInit {
checkboxes[i].addEventListener('click', e => { checkboxes[i].addEventListener('click', e => {
if ((e.target as HTMLInputElement).checked) { if ((e.target as HTMLInputElement).checked) {
(e.target as HTMLElement).offsetParent!.classList.add('ds-survey--closed-option--active'); (e.target as HTMLElement).offsetParent!.classList.add('ds-survey--closed-option--active');
debugger;
} else { } else {
(e.target as HTMLElement).offsetParent!.classList.remove('ds-survey--closed-option--active'); (e.target as HTMLElement).offsetParent!.classList.remove('ds-survey--closed-option--active');
} }
@ -128,6 +129,9 @@ export class EncuestaCompleteComponent implements OnInit {
this.isLoading = false; this.isLoading = false;
} }
); );
if (this.ePreguntas!.length == 0) {
this.previousState();
}
} }
previousState(): void { previousState(): void {