Compare commits

..

17 Commits

Author SHA1 Message Date
Eduardo Quiros 5d2ea85e11
Merge pull request #148 from Quantum-P3/qa
deploy
2021-08-18 05:34:03 +00:00
Eduardo Quiros d5277d1575
Merge branch 'dev' into qa 2021-08-17 23:23:12 -06:00
Eduardo Quiros fc03659f7e
Merge pull request #147 from Quantum-P3/fix/password
arreglar logica de contraseña
2021-08-18 05:21:59 +00:00
Eduardo Quiros 03eec6d7c1
Merge pull request #145 from Quantum-P3/feature/US-47
Feature/us 47
2021-08-18 05:09:49 +00:00
Eduardo Quiros f4ebb8ab48
arreglar logica de contraseña 2021-08-17 23:06:48 -06:00
Paola 28c984a7d0 Merge branch 'feature/US-47' of https://github.com/Quantum-P3/datasurvey into feature/US-47 2021-08-17 22:33:22 -06:00
Paola a0dc074828 fix html factura 2021-08-17 22:32:50 -06:00
Eduardo Quiros 9f23887793
apply stash 2021-08-17 22:25:18 -06:00
Eduardo Quiros 95f48f952c
Merge pull request #144 from Quantum-P3/qa
deploy
2021-08-18 03:30:00 +00:00
Eduardo Quiros 32271cc84f
Merge branch 'dev' into qa 2021-08-17 21:16:13 -06:00
Eduardo Quiros 4cb626aab7
Merge pull request #143 from Quantum-P3/fix/home-page-surveys
Fix home page surveys
2021-08-18 02:33:53 +00:00
Eduardo Quiros b8f9d347ad
Merge pull request #138 from Quantum-P3/qa
deploy
2021-08-17 01:14:15 +00:00
Eduardo Quiros 3e96c118d1
Merge pull request #137 from Quantum-P3/dev
qa
2021-08-17 00:46:48 +00:00
Pablo Bonilla 69b09b7789
Remove unnecessary images 2021-08-16 00:05:38 -06:00
Eduardo Quiros d5633430ef
Merge pull request #132 from Quantum-P3/qa
deploy
2021-08-15 06:12:21 +00:00
Eduardo Quiros 0041032f7c
Merge pull request #131 from Quantum-P3/dev
pasar a QA
2021-08-15 05:55:57 +00:00
Eduardo Quiros c20df7fffd
Merge pull request #111 from Quantum-P3/dev
move to QA
2021-08-02 06:03:04 +00:00
6 changed files with 59 additions and 49 deletions

View File

@ -68,7 +68,7 @@ email.deleteColaborator.text2=Saludos,
email.receipt.title=Comprobante de pago email.receipt.title=Comprobante de pago
email.receipt.user={0} email.receipt.user={0}
email.receipt.fecha={0} email.receipt.fecha=Fecha de pago: {0}
email.receipt.plantilla={0} email.receipt.plantilla={0}
email.receipt.precio=${0} email.receipt.precio=${0}

View File

@ -135,11 +135,9 @@
<div class="page-content container"> <div class="page-content container">
<div class="container px-0"> <div class="container px-0">
<div class="row mt-4"> <div class="row mt-4">
<div class="col-12 col-lg-10 offset-lg-1"> <div>
<!-- .row --> <!-- .row -->
<hr class="row brc-default-l1 mx-n1 mb-4" />
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div> <div>
@ -153,31 +151,56 @@
<!-- /.col --> <!-- /.col -->
<div class="text-95 col-sm-6 align-self-start d-sm-flex justify-content-end"> <div class="text-95 col-sm-6 align-self-start d-sm-flex justify-content-end">
<hr class="d-sm-none" />
<div class="text-grey-m2"> <div class="text-grey-m2">
<div class="my-2"> <div class="my-2">
<i class="fa fa-circle text-blue-m2 text-xs mr-1"></i> <i class="text-blue-m2 text-xs mr-1"></i>
<span class="text-600 text-90" th:text="#{email.receipt.fecha(${factura.getFecha()}, 'dd-MM-yyyy HH:mm' )}" <span class="text-600 text-90" th:text="#{email.receipt.fecha(${factura.getFecha()}, 'dd-MM-yyyy HH:mm' )}"
>Fecha:</span >Fecha:</span
> >
</div> </div>
</div> </div>
</div> </div>
<hr class="d-sm-none" />
<!-- /.col --> <!-- /.col -->
</div> </div>
<div class="mt-4"> <div class="container">
<div class="row text-600 text-white bgc-default-tp1 py-25"> <div class="row">
<div class="col-9 col-sm-5">Plantilla</div> <div class="col-lg-10 mt-5 mb-5">
<div class="d-none d-sm-block col-4 col-sm-2">Cantidad</div> <table class="table table-bordered" style="width: 100%">
<div class="d-none d-sm-block col-sm-2">Precio</div> <thead>
</div> <tr class="text-uppercase font-weight-bold text-blue">
<th>Plantilla</th>
<th>Cantidad</th>
<th>Precio</th>
</tr>
</thead>
<div class="text-95 text-secondary-d3"> <tbody style="text-align: center">
<div class="row mb-2 mb-sm-0 py-25"> <tr class="text-95 text-secondary-d3">
<div class="col-9 col-sm-5" th:text="#{email.receipt.plantilla(${factura.getNombrePlantilla()})}"></div> <td th:text="#{email.receipt.plantilla(${factura.getNombrePlantilla()})}"></td>
<div class="d-none d-sm-block col-2">1</div> <td>1</td>
<div class="d-none d-sm-block col-2 text-95" th:text="#{email.receipt.precio(${factura.getCosto()})}"></div> <td th:text="#{email.receipt.precio(${factura.getCosto()})}"></td>
</tr>
</tbody>
</table>
<hr />
<!-- <div class="row text-600 text-white bgc-default-tp1 d-flex flex-row" >
<div class="col-9 col-sm-5">Plantilla</div>
<div class="d-none d-sm-block col-4 col-sm-2">Cantidad</div>
<div class="d-none d-sm-block col-sm-2">Precio</div>
</div>
<div class="text-95 text-secondary-d3">
<div class="row mb-2 mb-sm-0 py-25">
<div class="col-9 col-sm-5" th:text="#{email.receipt.plantilla(${factura.getNombrePlantilla()})}"></div>
<div class="d-none d-sm-block col-2">1</div>
<div class="d-none d-sm-block col-2 text-95" th:text="#{email.receipt.precio(${factura.getCosto()})}"></div>
</div>
</div>-->
</div> </div>
</div> </div>
</div> </div>
@ -185,7 +208,7 @@
<div class="row mt-3"> <div class="row mt-3">
<div class="col-12 col-sm-5 text-grey text-90 order-first order-sm-last"> <div class="col-12 col-sm-5 text-grey text-90 order-first order-sm-last">
<div class="row my-2 align-items-center bgc-primary-l3 p-2"> <div class="row my-2 align-items-center bgc-primary-l3 p-2">
<div class="col-7 text-right">Monto total</div> <div class="col-7 text-600 text-110 text-blue text-right">Monto total:</div>
<div class="col-5"> <div class="col-5">
<span class="text-150 text-success-d3 opacity-2" th:text="#{email.receipt.precio(${factura.getCosto()})}"></span> <span class="text-150 text-success-d3 opacity-2" th:text="#{email.receipt.precio(${factura.getCosto()})}"></span>
</div> </div>

View File

@ -75,12 +75,7 @@ export class EncuestaCompleteComponent implements OnInit {
this.cantidadCalificaciones = parseInt(this.encuesta!.calificacion!.toString().split('.')[1]); this.cantidadCalificaciones = parseInt(this.encuesta!.calificacion!.toString().split('.')[1]);
this.sumCalificacion = this.avgCalificacion * this.cantidadCalificaciones; this.sumCalificacion = this.avgCalificacion * this.cantidadCalificaciones;
} }
this.isLocked = this.verifyPassword(); this.verifyPassword();
if (this.isLocked) {
this.previousState();
} else {
this.loadAll();
}
}); });
for (let pregunta of this.ePreguntas!) { for (let pregunta of this.ePreguntas!) {
if (pregunta.tipo && pregunta.tipo === PreguntaCerradaTipo.SINGLE) { if (pregunta.tipo && pregunta.tipo === PreguntaCerradaTipo.SINGLE) {
@ -89,17 +84,22 @@ export class EncuestaCompleteComponent implements OnInit {
} }
} }
verifyPassword(): boolean { verifyPassword(): void {
if (this.encuesta!.acceso === AccesoEncuesta.PUBLIC) { if (this.encuesta!.acceso === AccesoEncuesta.PUBLIC) {
return false; this.loadAll();
this.isLocked = false;
} else { } else {
const modalRef = this.modalService.open(EncuestaPasswordDialogComponent, { size: 'lg', backdrop: 'static' }); const modalRef = this.modalService.open(EncuestaPasswordDialogComponent, { size: 'lg', backdrop: 'static' });
modalRef.componentInstance.encuesta = this.encuesta; modalRef.componentInstance.encuesta = this.encuesta;
modalRef.closed.subscribe(reason => { modalRef.closed.subscribe(reason => {
return reason === 'success'; this.isLocked = reason != 'success';
if (this.isLocked) {
this.previousState();
} else {
this.loadAll();
}
}); });
} }
return true;
} }
ngAfterViewChecked(): void { ngAfterViewChecked(): void {
@ -194,7 +194,6 @@ export class EncuestaCompleteComponent implements OnInit {
this.getOpenQuestionAnswers(); this.getOpenQuestionAnswers();
this.registerOpenQuestionAnswers(); this.registerOpenQuestionAnswers();
this.updateEncuestaRating(); this.updateEncuestaRating();
this.previousState(); this.previousState();
} }

View File

@ -1,12 +1,12 @@
<form class="ds-form" [formGroup]="passwordForm" name="deleteForm" (ngSubmit)="submitPassword()"> <form class="ds-form" name="deleteForm">
<div *ngIf="this.isWrong">
<p>Contraseña incorrecta</p>
</div>
<div class="modal-body"> <div class="modal-body">
<p class="ds-title--small" jhiTranslate="dataSurveyApp.encuesta.password.title">Enter password</p> <p class="ds-title--small" jhiTranslate="dataSurveyApp.encuesta.password.title">Enter password</p>
<p class="ds-subtitle" id="jhi-delete-encuesta-heading" jhiTranslate="dataSurveyApp.encuesta.password.text"> <p class="ds-subtitle" id="jhi-delete-encuesta-heading" jhiTranslate="dataSurveyApp.encuesta.password.text">
This survey is marked as private, please enter the password This survey is marked as private, please enter the password
</p> </p>
<div class="alert alert-danger" *ngIf="this.isWrong">
<p>Contraseña incorrecta</p>
</div>
<input [(ngModel)]="passwordInput" type="password" name="passwordInput" id="passwordInput" placeholder="qwerty..." /> <input [(ngModel)]="passwordInput" type="password" name="passwordInput" id="passwordInput" placeholder="qwerty..." />
</div> </div>
@ -15,13 +15,7 @@
<fa-icon icon="arrow-left"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span> <fa-icon icon="arrow-left"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button> </button>
<button <button class="ds-btn ds-btn--primary" (click)="submitPassword()">
id="jhi-confirm-delete-option"
data-cy="submit"
type="submit"
class="ds-btn ds-btn--primary"
[disabled]="passwordForm.get('password')!.invalid"
>
<span jhiTranslate="entity.action.submit">Submit</span> <span jhiTranslate="entity.action.submit">Submit</span>
</button> </button>
</div> </div>

View File

@ -1,5 +1,4 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormBuilder, Validators } from '@angular/forms';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { IEncuesta } from '../encuesta.model'; import { IEncuesta } from '../encuesta.model';
@ -9,21 +8,16 @@ import { IEncuesta } from '../encuesta.model';
styleUrls: ['./encuesta-password-dialog.component.scss'], styleUrls: ['./encuesta-password-dialog.component.scss'],
}) })
export class EncuestaPasswordDialogComponent implements OnInit { export class EncuestaPasswordDialogComponent implements OnInit {
passwordForm = this.fb.group({
password: [null, [Validators.required]],
});
encuesta?: IEncuesta; encuesta?: IEncuesta;
isWrong?: boolean; isWrong?: boolean;
passwordInput?: string; passwordInput?: string;
constructor(protected activeModal: NgbActiveModal, protected fb: FormBuilder) {} constructor(protected activeModal: NgbActiveModal) {}
ngOnInit(): void {} ngOnInit(): void {}
submitPassword() { submitPassword() {
const password = this.passwordForm.get(['password'])!.value; if (this.passwordInput != undefined && this.passwordInput === this.encuesta!.contrasenna) {
if (this.passwordForm.valid && password === this.encuesta!.contrasenna) {
this.activeModal.close('success'); this.activeModal.close('success');
} else { } else {
this.isWrong = true; this.isWrong = true;

View File

@ -58,7 +58,7 @@
[disabled]="isLoading" [disabled]="isLoading"
data-toggle="modal" data-toggle="modal"
data-target="#crearPregunta" data-target="#crearPregunta"
*ngIf="encuesta!.estado !== 'FINISHED' && (isAutor() || isEscritor())" *ngIf="encuesta!.estado !== 'ACTIVE' && encuesta!.estado !== 'FINISHED' && (isAutor() || isEscritor())"
> >
<fa-icon icon="sync" [icon]="faPlus"></fa-icon>&nbsp;&nbsp;<span>Crear pregunta</span> <fa-icon icon="sync" [icon]="faPlus"></fa-icon>&nbsp;&nbsp;<span>Crear pregunta</span>
</button> </button>