Merge branch 'dev' into feature/US-62
This commit is contained in:
commit
089f508fa7
|
@ -136,6 +136,31 @@ public class EncuestaResource {
|
||||||
.body(result);
|
.body(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PutMapping("/encuestas/update/{id}")
|
||||||
|
public ResponseEntity<Encuesta> updateEncuestaReal(
|
||||||
|
@PathVariable(value = "id", required = false) final Long id,
|
||||||
|
@Valid @RequestBody Encuesta encuesta
|
||||||
|
) throws URISyntaxException {
|
||||||
|
log.debug("REST request to update Encuesta : {}, {}", id, encuesta);
|
||||||
|
if (encuesta.getId() == null) {
|
||||||
|
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
|
||||||
|
}
|
||||||
|
if (!Objects.equals(id, encuesta.getId())) {
|
||||||
|
throw new BadRequestAlertException("Invalid ID", ENTITY_NAME, "idinvalid");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!encuestaRepository.existsById(id)) {
|
||||||
|
throw new BadRequestAlertException("Entity not found", ENTITY_NAME, "idnotfound");
|
||||||
|
}
|
||||||
|
|
||||||
|
Encuesta result = encuestaService.save(encuesta);
|
||||||
|
|
||||||
|
return ResponseEntity
|
||||||
|
.ok()
|
||||||
|
.headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, encuesta.getId().toString()))
|
||||||
|
.body(result);
|
||||||
|
}
|
||||||
|
|
||||||
@PutMapping("/encuestas/publish/{id}")
|
@PutMapping("/encuestas/publish/{id}")
|
||||||
public ResponseEntity<Encuesta> publishEncuesta(
|
public ResponseEntity<Encuesta> publishEncuesta(
|
||||||
@PathVariable(value = "id", required = false) final Long id,
|
@PathVariable(value = "id", required = false) final Long id,
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex justify-content-center">
|
<div class="d-flex justify-content-center">
|
||||||
<button class="ds-btn ds-btn--primary" routerLink="/login" jhiTranslate="global.messages.info.authenticated.botonInicio">
|
<button class="ds-btn ds-btn--primary" routerLink="/login" jhiTranslate="global.messages.info.authenticated.botonInicio">
|
||||||
sign in</button
|
sign in
|
||||||
>.
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="ds-contextmenu__divider ds-contextmenu__divider--separator-bottom" id="contextmenu-edit--separator">
|
<div class="ds-contextmenu__divider ds-contextmenu__divider--separator-bottom" id="contextmenu-edit--separator">
|
||||||
<li class="d-justify justify-content-start" id="contextmenu-edit">
|
<li class="d-justify justify-content-start" id="contextmenu-edit">
|
||||||
<button type="button" (click)="openSurvey(null)"><fa-icon class="contextmenu__icon" [icon]="faEdit"></fa-icon>Editar</button>
|
<button type="button" data-toggle="modal" data-target="#editarEncuesta">
|
||||||
|
<fa-icon class="contextmenu__icon" [icon]="faEdit"></fa-icon>Editar
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
<li id="contextmenu-preview">
|
<li id="contextmenu-preview">
|
||||||
<button type="button" (click)="openPreview()">
|
<button type="button" (click)="openPreview()">
|
||||||
|
@ -401,3 +403,150 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div
|
||||||
|
class="modal fade ds-modal"
|
||||||
|
id="editarEncuesta"
|
||||||
|
tabindex="-1"
|
||||||
|
role="dialog"
|
||||||
|
aria-labelledby="exampleModalCenterTitle"
|
||||||
|
aria-hidden="true"
|
||||||
|
>
|
||||||
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<form
|
||||||
|
autocomplete="off"
|
||||||
|
class="ds-form"
|
||||||
|
name="surveyEditForm"
|
||||||
|
role="form"
|
||||||
|
novalidate
|
||||||
|
(ngSubmit)="editSurvey()"
|
||||||
|
[formGroup]="surveyEditForm"
|
||||||
|
>
|
||||||
|
<div class="modal-header">
|
||||||
|
<h1 class="modal-title" id="exampleModalLongTitle">Modificar Encuesta</h1>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<!-- Survey Modify Modal -->
|
||||||
|
<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="
|
||||||
|
surveyEditForm.get('nombre')!.invalid && (surveyEditForm.get('nombre')!.dirty || surveyEditForm.get('nombre')!.touched)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<small
|
||||||
|
class="form-text text-danger"
|
||||||
|
*ngIf="surveyEditForm.get('nombre')?.errors?.required"
|
||||||
|
jhiTranslate="entity.validation.required"
|
||||||
|
>
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
<small
|
||||||
|
class="form-text text-danger"
|
||||||
|
*ngIf="surveyEditForm.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="surveyEditForm.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.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="
|
||||||
|
surveyEditForm.get('acceso')!.invalid && (surveyEditForm.get('acceso')!.dirty || surveyEditForm.get('acceso')!.touched)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<small
|
||||||
|
class="form-text text-danger"
|
||||||
|
*ngIf="surveyEditForm.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.categoria" for="field_categoria">Categoría</label>
|
||||||
|
<select class="form-control" id="field_categoria" data-cy="categoria" name="categoria" formControlName="categoria">
|
||||||
|
<option [ngValue]="null" selected></option>
|
||||||
|
<option
|
||||||
|
[ngValue]="
|
||||||
|
categoriaOption.id === surveyEditForm.get('categoria')!.value?.id
|
||||||
|
? surveyEditForm.get('categoria')!.value
|
||||||
|
: categoriaOption
|
||||||
|
"
|
||||||
|
*ngFor="let categoriaOption of categoriasSharedCollection; trackBy: trackCategoriaById"
|
||||||
|
>
|
||||||
|
{{ categoriaOption.nombre }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<div
|
||||||
|
*ngIf="
|
||||||
|
surveyEditForm.get('categoria')!.invalid &&
|
||||||
|
(surveyEditForm.get('categoria')!.dirty || surveyEditForm.get('categoria')!.touched)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<small
|
||||||
|
class="form-text text-danger"
|
||||||
|
*ngIf="surveyEditForm.get('categoria')?.errors?.required"
|
||||||
|
jhiTranslate="entity.validation.required"
|
||||||
|
>
|
||||||
|
This field is required.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button id="cancelEditSurveyBtn" type="button" class="ds-btn ds-btn--secondary" data-dismiss="modal">
|
||||||
|
<fa-icon icon="arrow-left"></fa-icon> <span jhiTranslate="entity.action.cancel">Cancel</span>
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
id="save-entity"
|
||||||
|
data-cy="entityCreateSaveButton"
|
||||||
|
class="ds-btn ds-btn--primary"
|
||||||
|
[disabled]="surveyEditForm.invalid || isSaving"
|
||||||
|
>
|
||||||
|
<span jhiTranslate="entity.action.edit">Edit</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -99,6 +99,14 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
|
||||||
// usuarioExtra: [],
|
// usuarioExtra: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
surveyEditForm = this.fb.group({
|
||||||
|
id: [],
|
||||||
|
nombre: [null, [Validators.required, Validators.minLength(1), Validators.maxLength(50)]],
|
||||||
|
descripcion: [],
|
||||||
|
acceso: [null, [Validators.required]],
|
||||||
|
categoria: [null, [Validators.required]],
|
||||||
|
});
|
||||||
|
|
||||||
createAnother: Boolean = false;
|
createAnother: Boolean = false;
|
||||||
selectedSurveyId: number | null = null;
|
selectedSurveyId: number | null = null;
|
||||||
|
|
||||||
|
@ -469,18 +477,22 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
|
||||||
|
|
||||||
let res = await this.encuestaService.find(this.selectedSurveyId).toPromise();
|
let res = await this.encuestaService.find(this.selectedSurveyId).toPromise();
|
||||||
this.selectedSurvey = res.body;
|
this.selectedSurvey = res.body;
|
||||||
|
// Fill in the edit survey
|
||||||
|
this.fillSurveyEditForm();
|
||||||
this.isPublished = this.selectedSurvey!.estado === 'ACTIVE' || this.selectedSurvey!.estado === 'FINISHED'; // QUE SE LE MUESTRE CUANDO ESTE EN DRAFT
|
this.isPublished = this.selectedSurvey!.estado === 'ACTIVE' || this.selectedSurvey!.estado === 'FINISHED'; // QUE SE LE MUESTRE CUANDO ESTE EN DRAFT
|
||||||
|
|
||||||
document.getElementById('contextmenu-create--separator')!.style.display = 'none';
|
document.getElementById('contextmenu-create--separator')!.style.display = 'none';
|
||||||
document.getElementById('contextmenu-edit--separator')!.style.display = 'block';
|
|
||||||
document.getElementById('contextmenu-delete--separator')!.style.display = 'block';
|
document.getElementById('contextmenu-delete--separator')!.style.display = 'block';
|
||||||
document.getElementById('contextmenu-edit')!.style.display = 'block';
|
document.getElementById('contextmenu-edit--separator')!.style.display = 'block';
|
||||||
document.getElementById('contextmenu-preview')!.style.display = 'block';
|
document.getElementById('contextmenu-preview')!.style.display = 'block';
|
||||||
|
|
||||||
if (!this.isPublished) {
|
if (!this.isPublished) {
|
||||||
|
document.getElementById('contextmenu-edit--separator')!.style.display = 'block';
|
||||||
|
document.getElementById('contextmenu-edit')!.style.display = 'block';
|
||||||
document.getElementById('contextmenu-publish')!.style.display = 'block';
|
document.getElementById('contextmenu-publish')!.style.display = 'block';
|
||||||
document.getElementById('contextmenu-duplicate')!.style.display = 'block';
|
document.getElementById('contextmenu-duplicate')!.style.display = 'block';
|
||||||
} else {
|
} else {
|
||||||
|
document.getElementById('contextmenu-edit')!.style.display = 'none';
|
||||||
document.getElementById('contextmenu-publish')!.style.display = 'none';
|
document.getElementById('contextmenu-publish')!.style.display = 'none';
|
||||||
document.getElementById('contextmenu-duplicate')!.style.display = 'none';
|
document.getElementById('contextmenu-duplicate')!.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
@ -512,4 +524,29 @@ export class EncuestaComponent implements OnInit, AfterViewInit {
|
||||||
const res = await this.encuestaService.duplicate(this.selectedSurveyId!).toPromise();
|
const res = await this.encuestaService.duplicate(this.selectedSurveyId!).toPromise();
|
||||||
this.loadAll();
|
this.loadAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
editSurvey(): void {
|
||||||
|
const survey = { ...this.selectedSurvey };
|
||||||
|
survey.nombre = this.surveyEditForm.get(['nombre'])!.value;
|
||||||
|
survey.descripcion = this.surveyEditForm.get(['descripcion'])!.value;
|
||||||
|
survey.acceso = this.surveyEditForm.get(['acceso'])!.value;
|
||||||
|
survey.categoria = this.surveyEditForm.get(['categoria'])!.value;
|
||||||
|
// Prevent user update by setting to null
|
||||||
|
survey.usuarioExtra!.user = null;
|
||||||
|
console.log(survey);
|
||||||
|
|
||||||
|
this.encuestaService.updateSurvey(survey).subscribe(res => {
|
||||||
|
this.loadAll();
|
||||||
|
$('#cancelEditSurveyBtn').click();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
fillSurveyEditForm(): void {
|
||||||
|
this.surveyEditForm.patchValue({
|
||||||
|
nombre: this.selectedSurvey!.nombre,
|
||||||
|
descripcion: this.selectedSurvey!.descripcion,
|
||||||
|
acceso: this.selectedSurvey!.acceso,
|
||||||
|
categoria: this.selectedSurvey!.categoria,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,13 @@ export class EncuestaService {
|
||||||
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSurvey(encuesta: IEncuesta): Observable<EntityResponseType> {
|
||||||
|
const copy = this.convertDateFromClient(encuesta);
|
||||||
|
return this.http
|
||||||
|
.put<IEncuesta>(`${this.resourceUrl}/update/${getEncuestaIdentifier(encuesta) as number}`, copy, { observe: 'response' })
|
||||||
|
.pipe(map((res: EntityResponseType) => this.convertDateFromServer(res)));
|
||||||
|
}
|
||||||
|
|
||||||
partialUpdate(encuesta: IEncuesta): Observable<EntityResponseType> {
|
partialUpdate(encuesta: IEncuesta): Observable<EntityResponseType> {
|
||||||
const copy = this.convertDateFromClient(encuesta);
|
const copy = this.convertDateFromClient(encuesta);
|
||||||
return this.http
|
return this.http
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<div>
|
<div>
|
||||||
<h2 id="page-heading" data-cy="EPreguntaCerradaHeading">
|
<h2 id="page-heading" data-cy="EPreguntaCerradaHeading">
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<p class="ds-title">{{ encuesta!.nombre }}</p>
|
<p class="ds-title ds-title--interactive" contenteditable="true" spellcheck="false" (blur)="updateSurveyName($event)">
|
||||||
|
{{ encuesta!.nombre }}
|
||||||
|
</p>
|
||||||
<fa-icon
|
<fa-icon
|
||||||
class="ds-info--icon"
|
class="ds-info--icon"
|
||||||
[icon]="faQuestion"
|
[icon]="faQuestion"
|
||||||
|
|
|
@ -184,7 +184,7 @@ export class EncuestaUpdateComponent implements OnInit, AfterViewChecked {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewChecked(): void {
|
ngAfterViewChecked(): void {
|
||||||
this.initListeners();
|
// this.initListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
trackId(index: number, item: IEPreguntaCerrada): number {
|
trackId(index: number, item: IEPreguntaCerrada): number {
|
||||||
|
@ -202,18 +202,18 @@ export class EncuestaUpdateComponent implements OnInit, AfterViewChecked {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initListeners(): void {
|
// initListeners(): void {
|
||||||
const checkboxes = document.getElementsByClassName('ds-survey--checkbox');
|
// const checkboxes = document.getElementsByClassName('ds-survey--checkbox');
|
||||||
for (let i = 0; i < checkboxes.length; i++) {
|
// for (let i = 0; i < checkboxes.length; i++) {
|
||||||
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');
|
||||||
} 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');
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
previousState(): void {
|
previousState(): void {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
|
@ -440,6 +440,18 @@ export class EncuestaUpdateComponent implements OnInit, AfterViewChecked {
|
||||||
this.isSavingQuestion = false;
|
this.isSavingQuestion = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSurveyName(event: any) {
|
||||||
|
const updatedSurveyName = event.target.innerText;
|
||||||
|
if (updatedSurveyName !== this.encuesta?.nombre) {
|
||||||
|
const survey = { ...this.encuesta };
|
||||||
|
survey.nombre = updatedSurveyName;
|
||||||
|
// Prevent user update by setting to null
|
||||||
|
survey.usuarioExtra!.user = null;
|
||||||
|
|
||||||
|
this.encuestaService.updateSurvey(survey).subscribe(res => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// previousState(): void {
|
// previousState(): void {
|
||||||
// window.history.back();
|
// window.history.back();
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<span jhiTranslate="dataSurveyApp.plantilla.home.title">Plantillas</span>
|
<span jhiTranslate="dataSurveyApp.plantilla.home.title">Plantillas</span>
|
||||||
|
|
||||||
<div class="d-flex justify-content-end">
|
<div class="d-flex justify-content-end">
|
||||||
<button class="btn btn-info mr-2" (click)="loadAll()" [disabled]="isLoading">
|
<button class="ds-btn btn-info mr-2" (click)="loadAll()" [disabled]="isLoading">
|
||||||
<fa-icon icon="sync" [spin]="isLoading"></fa-icon>
|
<fa-icon icon="sync" [spin]="isLoading"></fa-icon>
|
||||||
<span jhiTranslate="dataSurveyApp.plantilla.home.refreshListLabel">Refresh List</span>
|
<span jhiTranslate="dataSurveyApp.plantilla.home.refreshListLabel">Refresh List</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -11,11 +11,11 @@
|
||||||
<button
|
<button
|
||||||
id="jh-create-entity"
|
id="jh-create-entity"
|
||||||
data-cy="entityCreateButton"
|
data-cy="entityCreateButton"
|
||||||
class="btn btn-primary jh-create-entity create-plantilla"
|
class="ds-btn ds-btn--primary jh-create-entity create-plantilla"
|
||||||
[routerLink]="['/plantilla/new']"
|
[routerLink]="['/plantilla/new']"
|
||||||
>
|
>
|
||||||
<fa-icon icon="plus"></fa-icon>
|
<fa-icon icon="plus"></fa-icon>
|
||||||
<span jhiTranslate="dataSurveyApp.plantilla.home.createLabel"> Create a new Plantilla </span>
|
<span jhiTranslate="dataSurveyApp.plantilla.home.createLabel"> Create a new Template </span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
|
@ -25,14 +25,13 @@
|
||||||
<jhi-alert></jhi-alert>
|
<jhi-alert></jhi-alert>
|
||||||
|
|
||||||
<div class="alert alert-warning" id="no-result" *ngIf="plantillas?.length === 0">
|
<div class="alert alert-warning" id="no-result" *ngIf="plantillas?.length === 0">
|
||||||
<span jhiTranslate="dataSurveyApp.plantilla.home.notFound">No plantillas found</span>
|
<span jhiTranslate="dataSurveyApp.plantilla.home.notFound">No templates found</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="table-responsive" id="entities" *ngIf="plantillas && plantillas.length > 0">
|
<div class="table-responsive" id="entities" *ngIf="plantillas && plantillas.length > 0">
|
||||||
<table class="table table-striped" aria-describedby="page-heading">
|
<table class="table table-striped" aria-describedby="page-heading">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col"><span jhiTranslate="global.field.id">ID</span></th>
|
|
||||||
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.nombre">Nombre</span></th>
|
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.nombre">Nombre</span></th>
|
||||||
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.descripcion">Descripcion</span></th>
|
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.descripcion">Descripcion</span></th>
|
||||||
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.fechaCreacion">Fecha Creacion</span></th>
|
<th scope="col"><span jhiTranslate="dataSurveyApp.plantilla.fechaCreacion">Fecha Creacion</span></th>
|
||||||
|
@ -45,9 +44,6 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let plantilla of plantillas; trackBy: trackId" data-cy="entityTable">
|
<tr *ngFor="let plantilla of plantillas; trackBy: trackId" data-cy="entityTable">
|
||||||
<td>
|
|
||||||
<a [routerLink]="['/plantilla', plantilla.id, 'view']">{{ plantilla.id }}</a>
|
|
||||||
</td>
|
|
||||||
<td>{{ plantilla.nombre }}</td>
|
<td>{{ plantilla.nombre }}</td>
|
||||||
<td>{{ plantilla.descripcion }}</td>
|
<td>{{ plantilla.descripcion }}</td>
|
||||||
<td>{{ plantilla.fechaCreacion | formatMediumDatetime }}</td>
|
<td>{{ plantilla.fechaCreacion | formatMediumDatetime }}</td>
|
||||||
|
@ -64,7 +60,7 @@
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
[routerLink]="['/plantilla', plantilla.id, 'view']"
|
[routerLink]="['/plantilla', plantilla.id, 'view']"
|
||||||
class="btn btn-info btn-sm"
|
class="ds-btn btn-info btn-sm"
|
||||||
data-cy="entityDetailsButton"
|
data-cy="entityDetailsButton"
|
||||||
>
|
>
|
||||||
<fa-icon icon="eye"></fa-icon>
|
<fa-icon icon="eye"></fa-icon>
|
||||||
|
@ -74,14 +70,14 @@
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
[routerLink]="['/plantilla', plantilla.id, 'edit']"
|
[routerLink]="['/plantilla', plantilla.id, 'edit']"
|
||||||
class="btn btn-primary btn-sm"
|
class="ds-btn ds-btn--primary btn-sm"
|
||||||
data-cy="entityEditButton"
|
data-cy="entityEditButton"
|
||||||
>
|
>
|
||||||
<fa-icon icon="pencil-alt"></fa-icon>
|
<fa-icon icon="pencil-alt"></fa-icon>
|
||||||
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.edit">Edit</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button type="submit" (click)="delete(plantilla)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
|
<button type="submit" (click)="delete(plantilla)" class="ds-btn ds-btn--danger btn-sm" data-cy="entityDeleteButton">
|
||||||
<fa-icon icon="times"></fa-icon>
|
<fa-icon icon="times"></fa-icon>
|
||||||
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -34,7 +34,7 @@ export class PlantillaComponent implements OnInit {
|
||||||
this.loadAll();
|
this.loadAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
trackId(index: number, item: IPlantilla): number {
|
trackId(_index: number, item: IPlantilla): number {
|
||||||
return item.id!;
|
return item.id!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,12 +30,12 @@ export const ADMIN_ROUTES: RouteInfo[] = [
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icontype: 'nc-icon nc-paper',
|
icontype: 'nc-icon nc-paper',
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// path: '/plantilla',
|
path: '/plantilla',
|
||||||
// title: 'Plantillas',
|
title: 'Plantillas',
|
||||||
// type: 'link',
|
type: 'link',
|
||||||
// icontype: 'nc-icon nc-album-2',
|
icontype: 'nc-icon nc-album-2',
|
||||||
// },
|
},
|
||||||
{
|
{
|
||||||
path: '/categoria',
|
path: '/categoria',
|
||||||
title: 'Categorías',
|
title: 'Categorías',
|
||||||
|
|
|
@ -9,6 +9,21 @@
|
||||||
letter-spacing: 0.025rem;
|
letter-spacing: 0.025rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
|
|
||||||
|
&--interactive {
|
||||||
|
border: 2.25px solid transparent;
|
||||||
|
border-radius: 3px;
|
||||||
|
outline: 0;
|
||||||
|
text-transform: none;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border: 2.25px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
border: 2.25px solid #2962ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ds-title--small {
|
.ds-title--small {
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
"home": {
|
"home": {
|
||||||
"title": "Plantillas",
|
"title": "Plantillas",
|
||||||
"refreshListLabel": "Refrescar lista",
|
"refreshListLabel": "Refrescar lista",
|
||||||
"createLabel": "Crear nuevo Plantilla",
|
"createLabel": "Crear nueva plantilla",
|
||||||
"createOrEditLabel": "Crear o editar Plantilla",
|
"createOrEditLabel": "Crear o editar plantilla",
|
||||||
"notFound": "Ningún Plantillas encontrado"
|
"notFound": "No se encontró ninguna plantilla"
|
||||||
},
|
},
|
||||||
"created": "Un nuevo Plantilla ha sido creado con el identificador {{ param }}",
|
"created": "Una nueva plantilla ha sido creada con el identificador {{ param }}",
|
||||||
"updated": "Un Plantilla ha sido actualizado con el identificador {{ param }}",
|
"updated": "Una plantilla ha sido actualizada con el identificador {{ param }}",
|
||||||
"deleted": "Un Plantilla ha sido eliminado con el identificador {{ param }}",
|
"deleted": "Una plantilla ha sido eliminada con el identificador {{ param }}",
|
||||||
"delete": {
|
"delete": {
|
||||||
"question": "¿Seguro que quiere eliminar Plantilla {{ id }}?"
|
"question": "¿Seguro que quiere eliminar Plantilla {{ id }}?"
|
||||||
},
|
},
|
||||||
|
@ -19,9 +19,9 @@
|
||||||
},
|
},
|
||||||
"id": "ID",
|
"id": "ID",
|
||||||
"nombre": "Nombre",
|
"nombre": "Nombre",
|
||||||
"descripcion": "Descripcion",
|
"descripcion": "Descripción",
|
||||||
"fechaCreacion": "Fecha Creacion",
|
"fechaCreacion": "Fecha Creación",
|
||||||
"fechaPublicacionTienda": "Fecha Publicacion Tienda",
|
"fechaPublicacionTienda": "Fecha Publicación Tienda",
|
||||||
"estado": "Estado",
|
"estado": "Estado",
|
||||||
"precio": "Precio",
|
"precio": "Precio",
|
||||||
"pPreguntaCerrada": "P Pregunta Cerrada",
|
"pPreguntaCerrada": "P Pregunta Cerrada",
|
||||||
|
|
Loading…
Reference in New Issue