2021-07-18 20:21:45 +00:00
|
|
|
<div>
|
|
|
|
<h2 id="page-heading" data-cy="EPreguntaCerradaHeading">
|
|
|
|
<span>{{ encuesta!.nombre }}</span>
|
|
|
|
|
|
|
|
<div class="d-flex justify-content-end">
|
|
|
|
<button class="btn btn-info mr-2" (click)="loadAll()" [disabled]="isLoading">
|
|
|
|
<fa-icon icon="sync" [spin]="isLoading"></fa-icon>
|
|
|
|
<span jhiTranslate="dataSurveyApp.ePreguntaCerrada.home.refreshListLabel">Refresh List</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
id="jh-create-entity"
|
|
|
|
data-cy="entityCreateButton"
|
|
|
|
class="btn btn-primary jh-create-entity create-e-pregunta-cerrada"
|
|
|
|
[routerLink]="['/e-pregunta-cerrada/new']"
|
|
|
|
>
|
|
|
|
<fa-icon icon="plus"></fa-icon>
|
|
|
|
<span jhiTranslate="dataSurveyApp.ePreguntaCerrada.home.createLabel"> Create a new E Pregunta Cerrada </span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<jhi-alert-error></jhi-alert-error>
|
|
|
|
|
|
|
|
<jhi-alert></jhi-alert>
|
|
|
|
|
|
|
|
<div class="alert alert-warning" id="no-result" *ngIf="ePreguntas?.length === 0">
|
|
|
|
<span>No se encontraron preguntas</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="table-responsive" id="entities" *ngIf="ePreguntas && ePreguntas.length > 0">
|
|
|
|
<div>
|
|
|
|
<div *ngFor="let ePregunta of ePreguntas; let i = index; trackBy: trackId" [attr.data-index]="ePregunta.id">
|
|
|
|
<span>{{ ePregunta.nombre }} | </span>
|
|
|
|
<span>{{ ePregunta.tipo }} | </span>
|
|
|
|
<span>{{ ePregunta.opcional }}</span>
|
|
|
|
|
|
|
|
<ng-container *ngIf="ePregunta.tipo">
|
|
|
|
<ng-container *ngFor="let ePreguntaOpcion of ePreguntasOpciones; let j = index; trackBy: trackId">
|
|
|
|
<ng-container *ngIf="ePregunta.id == ePreguntaOpcion[j].epreguntaCerrada.id">
|
|
|
|
<div *ngFor="let ePreguntaOpcion2 of ePreguntaOpcion; let k = index; trackBy: trackId">
|
|
|
|
<span>--------- {{ ePreguntaOpcion2.nombre }}</span>
|
|
|
|
</div>
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
</ng-container>
|
|
|
|
<textarea *ngIf="!ePregunta.tipo" name="" id="" cols="30" rows="10"></textarea>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- <table class="table table-striped" aria-describedby="page-heading">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col"><span jhiTranslate="global.field.id">ID</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.nombre">Nombre</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.tipo">Tipo</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.opcional">Opcional</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.orden">Orden</span></th>
|
|
|
|
<th scope="col"><span jhiTranslate="dataSurveyApp.ePreguntaCerrada.encuesta">Encuesta</span></th>
|
|
|
|
<th scope="col"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr *ngFor="let ePreguntaCerrada of ePreguntaCerradas; trackBy: trackId" data-cy="entityTable">
|
|
|
|
<td>
|
|
|
|
<a [routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'view']">{{ ePreguntaCerrada.id }}</a>
|
|
|
|
</td>
|
|
|
|
<td>{{ ePreguntaCerrada.nombre }}</td>
|
|
|
|
<td *ngIf="ePreguntaCerrada.tipo != undefined" jhiTranslate="{{ 'dataSurveyApp.PreguntaCerradaTipo.' + ePreguntaCerrada.tipo }}">{{ ePreguntaCerrada.tipo }}</td>
|
|
|
|
<td *ngIf="ePreguntaCerrada.tipo == undefined"></td>
|
|
|
|
|
|
|
|
<td>{{ ePreguntaCerrada.opcional }}</td>
|
|
|
|
<td>{{ ePreguntaCerrada.orden }}</td>
|
|
|
|
<td>
|
|
|
|
<div *ngIf="ePreguntaCerrada.encuesta">
|
|
|
|
<a [routerLink]="['/encuesta', ePreguntaCerrada.encuesta?.id, 'view']">{{ ePreguntaCerrada.encuesta?.id }}</a>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td class="text-right">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
[routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'view']"
|
|
|
|
class="btn btn-info btn-sm"
|
|
|
|
data-cy="entityDetailsButton"
|
|
|
|
>
|
|
|
|
<fa-icon icon="eye"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.view">View</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
[routerLink]="['/e-pregunta-cerrada', ePreguntaCerrada.id, 'edit']"
|
|
|
|
class="btn btn-primary btn-sm"
|
|
|
|
data-cy="entityEditButton"
|
|
|
|
>
|
|
|
|
<fa-icon icon="pencil-alt"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button type="submit" (click)="delete(ePreguntaCerrada)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
|
|
|
|
<fa-icon icon="times"></fa-icon>
|
|
|
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table> -->
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- <div class="row justify-content-center">
|
2021-07-03 21:48:27 +00:00
|
|
|
<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">
|
|
|
|
Create or edit a Encuesta
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<jhi-alert-error></jhi-alert-error>
|
|
|
|
|
|
|
|
<div class="form-group" [hidden]="editForm.get('id')!.value == null">
|
|
|
|
<label class="form-control-label" jhiTranslate="global.field.id" for="field_id">ID</label>
|
|
|
|
<input type="number" class="form-control" name="id" id="field_id" data-cy="id" formControlName="id" [readonly]="true" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.nombre" for="field_nombre">Nombre</label>
|
|
|
|
<input type="text" class="form-control" name="nombre" id="field_nombre" data-cy="nombre" formControlName="nombre" />
|
|
|
|
<div *ngIf="editForm.get('nombre')!.invalid && (editForm.get('nombre')!.dirty || editForm.get('nombre')!.touched)">
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('nombre')?.errors?.required" jhiTranslate="entity.validation.required">
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('nombre')?.errors?.minlength"
|
|
|
|
jhiTranslate="entity.validation.minlength"
|
|
|
|
[translateValues]="{ min: 1 }"
|
|
|
|
>
|
|
|
|
This field is required to be at least 1 characters.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('nombre')?.errors?.maxlength"
|
|
|
|
jhiTranslate="entity.validation.maxlength"
|
|
|
|
[translateValues]="{ max: 50 }"
|
|
|
|
>
|
|
|
|
This field cannot be longer than 50 characters.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.descripcion" for="field_descripcion">Descripcion</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="descripcion"
|
|
|
|
id="field_descripcion"
|
|
|
|
data-cy="descripcion"
|
|
|
|
formControlName="descripcion"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaCreacion" for="field_fechaCreacion"
|
|
|
|
>Fecha Creacion</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaCreacion"
|
|
|
|
data-cy="fechaCreacion"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaCreacion"
|
|
|
|
formControlName="fechaCreacion"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
*ngIf="
|
|
|
|
editForm.get('fechaCreacion')!.invalid && (editForm.get('fechaCreacion')!.dirty || editForm.get('fechaCreacion')!.touched)
|
|
|
|
"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('fechaCreacion')?.errors?.required"
|
|
|
|
jhiTranslate="entity.validation.required"
|
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
[hidden]="!editForm.get('fechaCreacion')?.errors?.ZonedDateTimelocal"
|
|
|
|
jhiTranslate="entity.validation.ZonedDateTimelocal"
|
|
|
|
>
|
|
|
|
This field should be a date and time.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaPublicacion" for="field_fechaPublicacion"
|
|
|
|
>Fecha Publicacion</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaPublicacion"
|
|
|
|
data-cy="fechaPublicacion"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaPublicacion"
|
|
|
|
formControlName="fechaPublicacion"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaFinalizar" for="field_fechaFinalizar"
|
|
|
|
>Fecha Finalizar</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaFinalizar"
|
|
|
|
data-cy="fechaFinalizar"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaFinalizar"
|
|
|
|
formControlName="fechaFinalizar"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.fechaFinalizada" for="field_fechaFinalizada"
|
|
|
|
>Fecha Finalizada</label
|
|
|
|
>
|
|
|
|
<div class="d-flex">
|
|
|
|
<input
|
|
|
|
id="field_fechaFinalizada"
|
|
|
|
data-cy="fechaFinalizada"
|
|
|
|
type="datetime-local"
|
|
|
|
class="form-control"
|
|
|
|
name="fechaFinalizada"
|
|
|
|
formControlName="fechaFinalizada"
|
|
|
|
placeholder="YYYY-MM-DD HH:mm"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.calificacion" for="field_calificacion">Calificacion</label>
|
|
|
|
<input
|
|
|
|
type="number"
|
|
|
|
class="form-control"
|
|
|
|
name="calificacion"
|
|
|
|
id="field_calificacion"
|
|
|
|
data-cy="calificacion"
|
|
|
|
formControlName="calificacion"
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
*ngIf="editForm.get('calificacion')!.invalid && (editForm.get('calificacion')!.dirty || editForm.get('calificacion')!.touched)"
|
|
|
|
>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
*ngIf="editForm.get('calificacion')?.errors?.required"
|
|
|
|
jhiTranslate="entity.validation.required"
|
|
|
|
>
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
<small
|
|
|
|
class="form-text text-danger"
|
|
|
|
[hidden]="!editForm.get('calificacion')?.errors?.number"
|
|
|
|
jhiTranslate="entity.validation.number"
|
|
|
|
>
|
|
|
|
This field should be a number.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.acceso" for="field_acceso">Acceso</label>
|
|
|
|
<select class="form-control" name="acceso" formControlName="acceso" id="field_acceso" data-cy="acceso">
|
|
|
|
<option [ngValue]="null">{{ 'dataSurveyApp.AccesoEncuesta.null' | translate }}</option>
|
|
|
|
<option value="PUBLIC">{{ 'dataSurveyApp.AccesoEncuesta.PUBLIC' | translate }}</option>
|
|
|
|
<option value="PRIVATE">{{ 'dataSurveyApp.AccesoEncuesta.PRIVATE' | translate }}</option>
|
|
|
|
</select>
|
|
|
|
<div *ngIf="editForm.get('acceso')!.invalid && (editForm.get('acceso')!.dirty || editForm.get('acceso')!.touched)">
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('acceso')?.errors?.required" jhiTranslate="entity.validation.required">
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.contrasenna" for="field_contrasenna">Contrasenna</label>
|
|
|
|
<input
|
|
|
|
type="text"
|
|
|
|
class="form-control"
|
|
|
|
name="contrasenna"
|
|
|
|
id="field_contrasenna"
|
|
|
|
data-cy="contrasenna"
|
|
|
|
formControlName="contrasenna"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.estado" for="field_estado">Estado</label>
|
|
|
|
<select class="form-control" name="estado" formControlName="estado" id="field_estado" data-cy="estado">
|
|
|
|
<option [ngValue]="null">{{ 'dataSurveyApp.EstadoEncuesta.null' | translate }}</option>
|
|
|
|
<option value="DRAFT">{{ 'dataSurveyApp.EstadoEncuesta.DRAFT' | translate }}</option>
|
|
|
|
<option value="ACTIVE">{{ 'dataSurveyApp.EstadoEncuesta.ACTIVE' | translate }}</option>
|
|
|
|
<option value="FINISHED">{{ 'dataSurveyApp.EstadoEncuesta.FINISHED' | translate }}</option>
|
|
|
|
<option value="DELETED">{{ 'dataSurveyApp.EstadoEncuesta.DELETED' | translate }}</option>
|
|
|
|
</select>
|
|
|
|
<div *ngIf="editForm.get('estado')!.invalid && (editForm.get('estado')!.dirty || editForm.get('estado')!.touched)">
|
|
|
|
<small class="form-text text-danger" *ngIf="editForm.get('estado')?.errors?.required" jhiTranslate="entity.validation.required">
|
|
|
|
This field is required.
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.categoria" for="field_categoria">Categoria</label>
|
|
|
|
<select class="form-control" id="field_categoria" data-cy="categoria" name="categoria" formControlName="categoria">
|
|
|
|
<option [ngValue]="null"></option>
|
|
|
|
<option
|
|
|
|
[ngValue]="categoriaOption.id === editForm.get('categoria')!.value?.id ? editForm.get('categoria')!.value : categoriaOption"
|
|
|
|
*ngFor="let categoriaOption of categoriasSharedCollection; trackBy: trackCategoriaById"
|
|
|
|
>
|
|
|
|
{{ categoriaOption.nombre }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="form-control-label" jhiTranslate="dataSurveyApp.encuesta.usuarioExtra" for="field_usuarioExtra"
|
|
|
|
>Usuario Extra</label
|
|
|
|
>
|
|
|
|
<select class="form-control" id="field_usuarioExtra" data-cy="usuarioExtra" name="usuarioExtra" formControlName="usuarioExtra">
|
|
|
|
<option [ngValue]="null"></option>
|
|
|
|
<option
|
|
|
|
[ngValue]="
|
|
|
|
usuarioExtraOption.id === editForm.get('usuarioExtra')!.value?.id ? editForm.get('usuarioExtra')!.value : usuarioExtraOption
|
|
|
|
"
|
|
|
|
*ngFor="let usuarioExtraOption of usuarioExtrasSharedCollection; trackBy: trackUsuarioExtraById"
|
|
|
|
>
|
|
|
|
{{ usuarioExtraOption.id }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<button type="button" id="cancel-save" data-cy="entityCreateCancelButton" class="btn btn-secondary" (click)="previousState()">
|
|
|
|
<fa-icon icon="ban"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
type="submit"
|
|
|
|
id="save-entity"
|
|
|
|
data-cy="entityCreateSaveButton"
|
|
|
|
[disabled]="editForm.invalid || isSaving"
|
|
|
|
class="btn btn-primary"
|
|
|
|
>
|
|
|
|
<fa-icon icon="save"></fa-icon> <span jhiTranslate="entity.action.save">Save</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2021-07-18 20:21:45 +00:00
|
|
|
</div> -->
|