2021-07-25 22:48:21 +00:00
|
|
|
<div class="container-fluid" *ngIf="encuesta">
|
2021-07-25 10:56:18 +00:00
|
|
|
<div>
|
|
|
|
<h2 id="page-heading" data-cy="EPreguntaCerradaHeading">
|
2021-07-28 05:01:53 +00:00
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
<p class="ds-title">Vista previa de {{ encuesta!.nombre }}</p>
|
|
|
|
<fa-icon class="ds-info--icon" [icon]="faQuestion" data-toggle="modal" data-target="#verParametros"></fa-icon>
|
|
|
|
</div>
|
2021-07-27 07:08:10 +00:00
|
|
|
|
2021-07-25 10:56:18 +00:00
|
|
|
<p class="ds-subtitle">Creada el día {{ encuesta!.fechaCreacion | formatShortDatetime | lowercase }}</p>
|
|
|
|
<div class="d-flex justify-content-end">
|
|
|
|
<button type="button" class="ds-btn ds-btn--secondary" (click)="previousState()">
|
|
|
|
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.back">Back</span>
|
|
|
|
</button>
|
|
|
|
<ng-container *ngIf="encuesta!.estado === 'DRAFT'">
|
|
|
|
<button type="button" class="ds-btn ds-btn--primary" (click)="publishSurvey()">Publicar encuesta</button>
|
|
|
|
</ng-container>
|
2021-07-23 06:56:59 +00:00
|
|
|
</div>
|
2021-07-25 10:56:18 +00:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
<jhi-alert-error></jhi-alert-error>
|
|
|
|
<div *ngIf="successPublished" class="alert alert-success alert-dismissible fade show" role="alert">
|
|
|
|
Su encuesta fue publicada exitosamente
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
|
|
<span aria-hidden="true">×</span>
|
|
|
|
</button>
|
2021-07-23 06:56:59 +00:00
|
|
|
</div>
|
|
|
|
|
2021-07-25 10:56:18 +00:00
|
|
|
<!-- <jhi-alert></jhi-alert> -->
|
2021-07-23 06:56:59 +00:00
|
|
|
|
2021-07-25 10:56:18 +00:00
|
|
|
<div class="alert alert-warning" id="no-result" *ngIf="ePreguntas?.length === 0">
|
|
|
|
<span>No se encontraron preguntas</span>
|
|
|
|
</div>
|
2021-07-23 06:56:59 +00:00
|
|
|
|
2021-07-25 10:56:18 +00:00
|
|
|
<div class="ds-survey preview-survey" id="entities" *ngIf="ePreguntas && ePreguntas.length > 0">
|
|
|
|
<div class="ds-survey--all-question-wrapper col-8">
|
|
|
|
<div class="ds-survey--question-wrapper card-encuesta lift" *ngFor="let ePregunta of ePreguntas; let i = index; trackBy: trackId">
|
|
|
|
<div
|
|
|
|
[attr.data-index]="ePregunta.id"
|
|
|
|
[attr.data-tipo]="ePregunta.tipo"
|
|
|
|
[attr.data-opcional]="ePregunta.opcional"
|
|
|
|
class="ds-survey--question"
|
|
|
|
>
|
|
|
|
<div class="ds-survey--titulo">
|
|
|
|
<span class="ds-survey--titulo--name">{{ i + 1 }}. {{ ePregunta.nombre }}</span>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<span *ngIf="ePregunta.tipo === 'SINGLE'" class="ds-subtitle"
|
|
|
|
>Pregunta de respuesta {{ 'dataSurveyApp.PreguntaCerradaTipo.SINGLE' | translate | lowercase }}
|
|
|
|
{{ ePregunta.opcional ? '(opcional)' : '' }}</span
|
|
|
|
>
|
|
|
|
<span *ngIf="ePregunta.tipo === 'MULTIPLE'" class="ds-subtitle"
|
|
|
|
>Pregunta de respuesta {{ 'dataSurveyApp.PreguntaCerradaTipo.MULTIPLE' | translate | lowercase }}
|
|
|
|
{{ ePregunta.opcional ? '(opcional)' : '' }}</span
|
|
|
|
>
|
|
|
|
<span *ngIf="!ePregunta.tipo" class="ds-subtitle"
|
|
|
|
>Pregunta de respuesta abierta {{ ePregunta.opcional ? '(opcional)' : '' }}</span
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
<ng-container *ngIf="ePregunta.tipo">
|
|
|
|
<ng-container *ngFor="let ePreguntaOpcion of ePreguntasOpciones; let j = index; trackBy: trackId">
|
|
|
|
<ng-container *ngFor="let ePreguntaOpcionFinal of ePreguntaOpcion">
|
|
|
|
<ng-container *ngIf="ePregunta.id === ePreguntaOpcionFinal.epreguntaCerrada.id">
|
|
|
|
<div
|
2021-07-25 23:07:09 +00:00
|
|
|
class="ds-survey--option ds-survey--option--base ds-survey--closed-option can-delete"
|
2021-07-25 10:56:18 +00:00
|
|
|
[attr.data-id]="ePreguntaOpcionFinal.id"
|
|
|
|
>
|
2021-07-25 22:58:46 +00:00
|
|
|
<div class="radio" *ngIf="ePregunta.tipo === 'SINGLE'">
|
2021-07-25 22:48:21 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
style="border-radius: 3px"
|
|
|
|
name="{{ 'radio' + ePregunta.id }}"
|
|
|
|
id="{{ 'radio' + ePreguntaOpcionFinal.id }}"
|
|
|
|
/>
|
|
|
|
<!-- <input class="ds-survey--checkbox" id="{{ ePregunta.id }}-{{ ePreguntaOpcionFinal.id }}" type="checkbox" disabled /> -->
|
|
|
|
<label for="{{ 'radio' + ePreguntaOpcionFinal.id }}">{{ ePreguntaOpcionFinal.nombre }}</label>
|
|
|
|
</div>
|
2021-07-25 22:58:46 +00:00
|
|
|
<div class="checkbox" *ngIf="ePregunta.tipo === 'MULTIPLE'">
|
2021-07-25 22:48:21 +00:00
|
|
|
<input type="checkbox" style="border-radius: 3px" id="{{ 'checkbox' + ePreguntaOpcionFinal.id }}" />
|
|
|
|
<!-- <input class="ds-survey--checkbox" id="{{ ePregunta.id }}-{{ ePreguntaOpcionFinal.id }}" type="checkbox" disabled /> -->
|
|
|
|
<label for="{{ 'checkbox' + ePreguntaOpcionFinal.id }}">{{ ePreguntaOpcionFinal.nombre }}</label>
|
|
|
|
</div>
|
2021-07-25 10:56:18 +00:00
|
|
|
</div>
|
2021-07-23 06:56:59 +00:00
|
|
|
</ng-container>
|
2021-07-25 10:56:18 +00:00
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<div class="ds-survey--option ds-survey--option--base ds-survey--open-option" *ngIf="!ePregunta.tipo">
|
|
|
|
<textarea cols="30" rows="10" disabled></textarea>
|
2021-07-23 06:56:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-27 07:08:10 +00:00
|
|
|
<div
|
|
|
|
class="modal fade ds-modal"
|
|
|
|
id="verParametros"
|
|
|
|
tabindex="-1"
|
|
|
|
role="dialog"
|
|
|
|
aria-labelledby="exampleModalCenterTitle"
|
|
|
|
aria-hidden="true"
|
|
|
|
>
|
|
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h1 class="modal-title" id="exampleModalLongTitle">Información de encuesta</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-body">
|
|
|
|
<div>
|
|
|
|
<div class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p style="font-size: 1.2em" class="ds-subtitle">Cantidad de preguntas</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<p>{{ ePreguntas?.length }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--<div>
|
|
|
|
<p style="font-size: 1.2em" class="ds-survey--titulo--name">Colaboradores</p>
|
|
|
|
</div>-->
|
|
|
|
|
|
|
|
<div class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle" jhiTranslate="dataSurveyApp.encuesta.acceso">Acceso</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<p jhiTranslate="{{ 'dataSurveyApp.AccesoEncuesta.' + encuesta.acceso }}">{{ encuesta.acceso }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div *ngIf="encuesta.acceso === 'PRIVATE'" class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle">Contraseña</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<p>{{ encuesta.contrasenna }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-5">
|
|
|
|
<p class="ds-subtitle">Estado:</p>
|
|
|
|
<p jhiTranslate="{{ 'dataSurveyApp.EstadoEncuesta.' + encuesta.estado }}">{{ encuesta.estado }}</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div *ngIf="encuesta.categoria" class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle">Categoría</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<P> </P> {{ encuesta.categoria?.nombre }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle">Fecha de publicación</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<P
|
|
|
|
>{{
|
|
|
|
encuesta.fechaPublicacion === undefined
|
|
|
|
? 'Sin publicar'
|
2021-07-30 02:17:16 +00:00
|
|
|
: (encuesta.fechaPublicacion | formatShortDatetime | lowercase)
|
2021-07-27 07:08:10 +00:00
|
|
|
}}
|
|
|
|
</P>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!--<div class="mb-5">
|
|
|
|
<p jhiTranslate="dataSurveyApp.encuesta.fechaFinalizar" class="ds-subtitle" > Fecha Finalizar</p>
|
|
|
|
<p> </p></div>
|
|
|
|
<dl>
|
|
|
|
<dt><span jhiTranslate="dataSurveyApp.encuesta.fechaFinalizar">Fecha Finalizar</span></dt>
|
|
|
|
<dd>
|
|
|
|
<span>
|
|
|
|
-
|
|
|
|
{{
|
|
|
|
encuesta.fechaFinalizar === undefined
|
|
|
|
? 'Sin fecha de finalización'
|
2021-07-30 02:17:16 +00:00
|
|
|
: (encuesta.fechaFinalizar | formatShortDatetime | lowercase)
|
2021-07-27 07:08:10 +00:00
|
|
|
}}</span
|
|
|
|
>
|
|
|
|
</dd>
|
|
|
|
</dl>-->
|
|
|
|
|
|
|
|
<div class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle">Fecha de finalización</p>
|
2021-07-27 07:08:10 +00:00
|
|
|
<P>
|
|
|
|
{{
|
|
|
|
encuesta.fechaFinalizada === undefined
|
|
|
|
? 'Sin finalizar'
|
|
|
|
: (encuesta.fechaFinalizada | formatShortDatetime | lowercase)
|
|
|
|
}}
|
|
|
|
</P>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mb-5">
|
2021-07-28 05:01:53 +00:00
|
|
|
<p class="ds-subtitle">Calificación</p>
|
|
|
|
<div>
|
2021-07-27 07:08:10 +00:00
|
|
|
<fa-icon *ngFor="let i of [].constructor(encuesta.calificacion)" class="entity-icon--star" [icon]="faStar"></fa-icon
|
|
|
|
><fa-icon
|
|
|
|
*ngFor="let i of [].constructor(5 - encuesta.calificacion!)"
|
|
|
|
class="entity-icon--star--off"
|
|
|
|
[icon]="faStar"
|
|
|
|
></fa-icon>
|
2021-07-28 05:01:53 +00:00
|
|
|
</div>
|
2021-07-27 07:08:10 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button id="cancelBtnVerParametros" type="button" class="ds-btn ds-btn--secondary" data-dismiss="modal">
|
|
|
|
<fa-icon icon="arrow-left"></fa-icon> <span>Volver</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-23 06:56:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-07-03 21:48:27 +00:00
|
|
|
</div>
|