From ccc7784489736eb3da5d23e58b12343c90aec149 Mon Sep 17 00:00:00 2001 From: Paola Date: Tue, 6 Jul 2021 20:49:15 -0600 Subject: [PATCH 01/34] Remover procesos en service Google --- .../login/usuario-google-log-in.service.ts | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/main/webapp/app/login/usuario-google-log-in.service.ts b/src/main/webapp/app/login/usuario-google-log-in.service.ts index 5d6818c..a6c3739 100644 --- a/src/main/webapp/app/login/usuario-google-log-in.service.ts +++ b/src/main/webapp/app/login/usuario-google-log-in.service.ts @@ -5,28 +5,5 @@ import { Observable, ReplaySubject } from 'rxjs'; providedIn: 'root', }) export class UsuarioGoogleLogInService { - constructor(private auth2: gapi.auth2.GoogleAuth, private subject: ReplaySubject) { - gapi.load('auth2', () => { - this.auth2 = gapi.auth2.init({ - client_id: '178178891217-b517thad8f15d4at2vk2410v7a09dcvt.apps.googleusercontent.com', - }); - }); - } - - public sigIn() { - this.auth2 - .signIn({ - // - }) - .then(user => { - this.subject.next(user); - }) - .catch(() => { - this.subject.next(); //NULL - }); - } - - public observable(): Observable { - return this.subject.asObservable(); - } + constructor() {} } From 08a1cc5c32faa60166709f8327443e2e05a2fdfd Mon Sep 17 00:00:00 2001 From: Paola Date: Tue, 6 Jul 2021 20:49:15 -0600 Subject: [PATCH 02/34] Agregar servicio de loggeo Google --- src/main/webapp/app/login/login.component.ts | 17 +++++++++++-- .../login/usuario-google-log-in.service.ts | 25 +------------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/src/main/webapp/app/login/login.component.ts b/src/main/webapp/app/login/login.component.ts index 765e35e..ae9a36a 100644 --- a/src/main/webapp/app/login/login.component.ts +++ b/src/main/webapp/app/login/login.component.ts @@ -4,7 +4,7 @@ import { Router } from '@angular/router'; import { LoginService } from 'app/login/login.service'; import { AccountService } from 'app/core/auth/account.service'; -import { SocialAuthService } from 'angularx-social-login'; +import { SocialAuthService, SocialUser } from 'angularx-social-login'; import { GoogleLoginProvider } from 'angularx-social-login'; @Component({ @@ -24,6 +24,9 @@ export class LoginComponent implements OnInit, AfterViewInit { rememberMe: [false], }); + user: SocialUser = new SocialUser(); + loggedIn: boolean = false; + constructor( private accountService: AccountService, private loginService: LoginService, @@ -33,7 +36,12 @@ export class LoginComponent implements OnInit, AfterViewInit { ) {} ngOnInit(): void { - //console.log("Google ID: "+ GoogleLoginProvider.PROVIDER_ID) + //Servicio para verificar si el usuario se encuentra loggeado + this.authService.authState.subscribe(user => { + this.user = user; + this.loggedIn = user != null; + }); + // if already authenticated then navigate to home page this.accountService.identity().subscribe(() => { if (this.accountService.isAuthenticated()) { @@ -46,10 +54,15 @@ export class LoginComponent implements OnInit, AfterViewInit { this.username.nativeElement.focus(); } + //Inicio Google signInWithGoogle(): void { this.authService.signIn(GoogleLoginProvider.PROVIDER_ID); } + refreshToken(): void { + this.authService.refreshAuthToken(GoogleLoginProvider.PROVIDER_ID); + } + login(): void { this.loginService .login({ diff --git a/src/main/webapp/app/login/usuario-google-log-in.service.ts b/src/main/webapp/app/login/usuario-google-log-in.service.ts index 5d6818c..a6c3739 100644 --- a/src/main/webapp/app/login/usuario-google-log-in.service.ts +++ b/src/main/webapp/app/login/usuario-google-log-in.service.ts @@ -5,28 +5,5 @@ import { Observable, ReplaySubject } from 'rxjs'; providedIn: 'root', }) export class UsuarioGoogleLogInService { - constructor(private auth2: gapi.auth2.GoogleAuth, private subject: ReplaySubject) { - gapi.load('auth2', () => { - this.auth2 = gapi.auth2.init({ - client_id: '178178891217-b517thad8f15d4at2vk2410v7a09dcvt.apps.googleusercontent.com', - }); - }); - } - - public sigIn() { - this.auth2 - .signIn({ - // - }) - .then(user => { - this.subject.next(user); - }) - .catch(() => { - this.subject.next(); //NULL - }); - } - - public observable(): Observable { - return this.subject.asObservable(); - } + constructor() {} } From 4a0e6a2c813188ca2bb32b06f22d01e855269dea Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 19:34:08 -0600 Subject: [PATCH 03/34] crear pipe para filtrado --- src/main/webapp/app/entities/pipes/filter.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/webapp/app/entities/pipes/filter.ts diff --git a/src/main/webapp/app/entities/pipes/filter.ts b/src/main/webapp/app/entities/pipes/filter.ts new file mode 100644 index 0000000..3743369 --- /dev/null +++ b/src/main/webapp/app/entities/pipes/filter.ts @@ -0,0 +1,18 @@ +import { Pipe, PipeTransform, Injectable } from '@angular/core'; + +@Pipe({ + name: 'filter', +}) +@Injectable() +export class FilterPipe implements PipeTransform { + transform(items: any[], field: string, value: string): any[] { + if (!items) { + return []; + } + if (!field || !value) { + return items; + } + + return items.filter(singleItem => singleItem[field].toLowerCase().includes(value.toLowerCase())); + } +} From 680ad90f7ccc02ef783416ec912b95c3fac06657 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 19:40:41 -0600 Subject: [PATCH 04/34] colocar biblioteca de filtrar en directorio correcto --- src/main/webapp/app/{entities => shared}/pipes/filter.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/webapp/app/{entities => shared}/pipes/filter.ts (100%) diff --git a/src/main/webapp/app/entities/pipes/filter.ts b/src/main/webapp/app/shared/pipes/filter.ts similarity index 100% rename from src/main/webapp/app/entities/pipes/filter.ts rename to src/main/webapp/app/shared/pipes/filter.ts From 7da71d876917484b1039287aba2f7e24c222143c Mon Sep 17 00:00:00 2001 From: Paola Date: Sat, 10 Jul 2021 20:02:17 -0600 Subject: [PATCH 05/34] arreglo de estilos GoogleLogIn --- .../webapp/app/login/login.component.html | 11 +++- .../webapp/app/login/login.component.scss | 53 +++++++++++++++++++ src/main/webapp/app/login/login.component.ts | 1 + 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/app/login/login.component.html b/src/main/webapp/app/login/login.component.html index 60fbfa0..0e533ea 100644 --- a/src/main/webapp/app/login/login.component.html +++ b/src/main/webapp/app/login/login.component.html @@ -129,11 +129,18 @@ -
+
+
+ +
+ +
+ +
diff --git a/src/main/webapp/app/login/login.component.scss b/src/main/webapp/app/login/login.component.scss index 192b03b..3ae8435 100644 --- a/src/main/webapp/app/login/login.component.scss +++ b/src/main/webapp/app/login/login.component.scss @@ -1,3 +1,56 @@ body { background-color: #f2f2f2 !important; } + +$white: #fff; +$google-blue: #4285f4; +$button-active-blue: #1669f2; + +.google-btn { + width: 184px; + height: 42px; + background-color: $google-blue !important; + border-radius: 2px; + box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.25); + .google-icon-wrapper { + position: absolute; + margin-top: 1px; + margin-left: 1px; + width: 40px; + height: 40px; + border-radius: 2px; + background-color: $white; + } + .google-icon { + position: absolute; + margin-top: 11px; + margin-left: 11px; + width: 18px; + height: 18px; + } + .btn-text { + float: right; + margin: 5px 5px 0px 0px; + color: $white; + font-size: 14px; + letter-spacing: 0.2px; + font-family: 'Roboto'; + background-color: $google-blue; + width: 135px; + height: 30px; + padding: 6px 6px 7px 6px; + border: $google-blue; + } + &:hover { + box-shadow: 0 0 6px $google-blue !important; + } + &:active { + background: $button-active-blue !important; + } + + .google-div { + margin-left: 150px !important; + } +} + +@import url(https://fonts.googleapis.com/css?family=Roboto:500); diff --git a/src/main/webapp/app/login/login.component.ts b/src/main/webapp/app/login/login.component.ts index 0176be5..4d2abbd 100644 --- a/src/main/webapp/app/login/login.component.ts +++ b/src/main/webapp/app/login/login.component.ts @@ -91,6 +91,7 @@ export class LoginComponent implements OnInit, AfterViewInit { () => { this.authenticationError = false; if (!this.router.getCurrentNavigation()) { + window.localStorage.setItem('IsGoogle', 'true'); // There were no routing during login (eg from navigationToStoredUrl) this.router.navigate(['']); } From 4ceff2b1f4ffc8f68f3ad5ca4f5939415a48e7f0 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 20:19:28 -0600 Subject: [PATCH 06/34] importar filtro --- src/main/webapp/app/shared/shared.module.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/webapp/app/shared/shared.module.ts b/src/main/webapp/app/shared/shared.module.ts index 2262892..a433735 100644 --- a/src/main/webapp/app/shared/shared.module.ts +++ b/src/main/webapp/app/shared/shared.module.ts @@ -12,6 +12,7 @@ import { FormatMediumDatePipe } from './date/format-medium-date.pipe'; import { SortByDirective } from './sort/sort-by.directive'; import { SortDirective } from './sort/sort.directive'; import { ItemCountComponent } from './pagination/item-count.component'; +import { FilterPipe } from './pipes/filter'; @NgModule({ imports: [SharedLibsModule], @@ -27,6 +28,7 @@ import { ItemCountComponent } from './pagination/item-count.component'; SortByDirective, SortDirective, ItemCountComponent, + FilterPipe, ], exports: [ SharedLibsModule, @@ -41,6 +43,7 @@ import { ItemCountComponent } from './pagination/item-count.component'; SortByDirective, SortDirective, ItemCountComponent, + FilterPipe, ], }) export class SharedModule {} From 73fece59a2a45712a0c18dc57ae6f7a3abe91f01 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 20:20:13 -0600 Subject: [PATCH 07/34] inicializar search string en listado de categorias --- .../app/entities/categoria/list/categoria.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.ts b/src/main/webapp/app/entities/categoria/list/categoria.component.ts index cb48c91..d0a9206 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.ts +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.ts @@ -13,8 +13,11 @@ import { CategoriaDeleteDialogComponent } from '../delete/categoria-delete-dialo export class CategoriaComponent implements OnInit { categorias?: ICategoria[]; isLoading = false; + public searchString: string; - constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) {} + constructor(protected categoriaService: CategoriaService, protected modalService: NgbModal) { + this.searchString = ''; + } loadAll(): void { this.isLoading = true; @@ -31,6 +34,7 @@ export class CategoriaComponent implements OnInit { } ngOnInit(): void { + this.searchString = ''; this.loadAll(); } From ecd96d6d0799ed6afb4442676769f2838154f83e Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 20:22:54 -0600 Subject: [PATCH 08/34] agregar formulario para input de busqueda --- .../app/entities/categoria/list/categoria.component.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index a6ef61e..aca7319 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -29,6 +29,12 @@
+
+
+
+ +
+
From 3fa3146b5deb15b63fc8e37024a05f1a59ab713e Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 20:23:22 -0600 Subject: [PATCH 09/34] agregar pipe para filtrado de la tabla --- .../webapp/app/entities/categoria/list/categoria.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index aca7319..0a2a444 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -45,7 +45,7 @@ - + From d11c458c8c0fe7506639e44bb59cd8d8d352e2fb Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 22:34:55 -0600 Subject: [PATCH 10/34] agregar estilos que pidio Pablo --- .../delete/categoria-delete-dialog.component.html | 8 ++++---- .../detail/categoria-detail.component.html | 4 ++-- .../categoria/list/categoria.component.html | 15 ++++++++++----- .../update/categoria-update.component.html | 14 ++++++++++---- src/main/webapp/app/login/login.component.spec.ts | 1 + 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html b/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html index ed57d17..3fae047 100644 --- a/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html +++ b/src/main/webapp/app/entities/categoria/delete/categoria-delete-dialog.component.html @@ -1,8 +1,8 @@ -
+ diff --git a/src/main/webapp/app/entities/categoria/detail/categoria-detail.component.html b/src/main/webapp/app/entities/categoria/detail/categoria-detail.component.html index fe0ee96..9531c6c 100644 --- a/src/main/webapp/app/entities/categoria/detail/categoria-detail.component.html +++ b/src/main/webapp/app/entities/categoria/detail/categoria-detail.component.html @@ -24,11 +24,11 @@ - - diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index 0a2a444..0f7fc16 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -3,7 +3,7 @@ Categorias
- @@ -11,7 +11,7 @@ - diff --git a/src/main/webapp/app/entities/categoria/update/categoria-update.component.html b/src/main/webapp/app/entities/categoria/update/categoria-update.component.html index 01dea01..778d75c 100644 --- a/src/main/webapp/app/entities/categoria/update/categoria-update.component.html +++ b/src/main/webapp/app/entities/categoria/update/categoria-update.component.html @@ -1,8 +1,8 @@
- +

- Create or edit a Categoria + Create or edit a Category

@@ -39,7 +39,13 @@
- @@ -48,7 +54,7 @@ id="save-entity" data-cy="entityCreateSaveButton" [disabled]="editForm.invalid || isSaving" - class="btn btn-primary" + class="btn btn-primary ds-btn ds-btn-primary" >  Save diff --git a/src/main/webapp/app/login/login.component.spec.ts b/src/main/webapp/app/login/login.component.spec.ts index 9631606..9f8675a 100644 --- a/src/main/webapp/app/login/login.component.spec.ts +++ b/src/main/webapp/app/login/login.component.spec.ts @@ -12,6 +12,7 @@ import { AccountService } from 'app/core/auth/account.service'; import { LoginService } from './login.service'; import { LoginComponent } from './login.component'; +import { SocialAuthService } from 'angularx-social-login'; describe('Component Tests', () => { describe('LoginComponent', () => { From 88f05bf269bbddd4bd1b0d17706436b3b36df328 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 22:35:30 -0600 Subject: [PATCH 11/34] corregir titulo de pagina de edicion y creacion de categoria segun Paola --- src/main/webapp/i18n/es/categoria.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/i18n/es/categoria.json b/src/main/webapp/i18n/es/categoria.json index b5d1305..1007afa 100644 --- a/src/main/webapp/i18n/es/categoria.json +++ b/src/main/webapp/i18n/es/categoria.json @@ -5,7 +5,7 @@ "title": "Categorías", "refreshListLabel": "Refrescar lista", "createLabel": "Crear nueva Categoría", - "createOrEditLabel": "Crear o editar Categoría", + "createOrEditLabel": "Datos de Categoría", "notFound": "Ninguna Categoría encontrada" }, "created": "Una nueva Categoría ha sido creada con el identificador {{ param }}", From 6be855b78bfae286a0e40c8e38fa747a0ba688bd Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 22:38:54 -0600 Subject: [PATCH 12/34] =?UTF-8?q?reducir=20tama=C3=B1o=20de=20la=20barra?= =?UTF-8?q?=20de=20busqueda?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../webapp/app/entities/categoria/list/categoria.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index 0f7fc16..12721e2 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -32,7 +32,7 @@
- +
{{ categoria.id }}
From 78ca0bba184c528a488ab5dbd2d7b6efda14f3ca Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sat, 10 Jul 2021 22:40:48 -0600 Subject: [PATCH 13/34] Eliminar boton de "vista" de categoria este boton es innecesario dado que las categorias presentan toda su informacion en la tabla --- .../entities/categoria/list/categoria.component.html | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index 12721e2..61014bf 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -53,16 +53,6 @@ @@ -62,7 +57,7 @@ >{{ last ? '' : ', ' }} --> -
{{ categoria.estado }}
- - -
Failed to sign in! Please check your credentials and try again.
+
- + +
+ + Your email is required. + + + + Your email is invalid. + + + + Your email is required to be at least 5 characters. + + + + Your email cannot be longer than 100 characters. + +
@@ -111,6 +147,33 @@ formControlName="password" data-cy="password" /> +
+ + Your password is required. + + + + Your password is required to be at least 4 characters. + + + + Your password cannot be longer than 50 characters. + +
diff --git a/src/main/webapp/app/login/login.component.ts b/src/main/webapp/app/login/login.component.ts index 4d2abbd..f907e50 100644 --- a/src/main/webapp/app/login/login.component.ts +++ b/src/main/webapp/app/login/login.component.ts @@ -10,6 +10,7 @@ import { RegisterService } from '../account/register/register.service'; import { TranslateService } from '@ngx-translate/core'; import { HttpErrorResponse } from '@angular/common/http'; import { EMAIL_ALREADY_USED_TYPE, LOGIN_ALREADY_USED_TYPE } from '../config/error.constants'; +import { LocalStorageService } from 'ngx-webstorage'; @Component({ selector: 'jhi-login', @@ -26,8 +27,8 @@ export class LoginComponent implements OnInit, AfterViewInit { errorUserExists = false; loginForm = this.fb.group({ - username: [null, [Validators.required]], - password: [null, [Validators.required]], + username: [null, [Validators.required, Validators.email, Validators.minLength(5), Validators.maxLength(254)]], + password: [null, [Validators.required, Validators.minLength(4), Validators.maxLength(50)]], rememberMe: [false], }); @@ -36,6 +37,7 @@ export class LoginComponent implements OnInit, AfterViewInit { success = false; constructor( + private localStorageService: LocalStorageService, private accountService: AccountService, private loginService: LoginService, private router: Router, @@ -91,7 +93,7 @@ export class LoginComponent implements OnInit, AfterViewInit { () => { this.authenticationError = false; if (!this.router.getCurrentNavigation()) { - window.localStorage.setItem('IsGoogle', 'true'); + this.localStorageService.store('IsGoogle', 'true'); // There were no routing during login (eg from navigationToStoredUrl) this.router.navigate(['']); } diff --git a/src/main/webapp/i18n/es/login.json b/src/main/webapp/i18n/es/login.json index ae28f44..4d5b925 100644 --- a/src/main/webapp/i18n/es/login.json +++ b/src/main/webapp/i18n/es/login.json @@ -9,7 +9,7 @@ }, "messages": { "error": { - "authentication": "¡El inicio de sesión ha fallado! Por favor, revise las credenciales e intente de nuevo." + "authentication": "Revise las credenciales e intente de nuevo " } }, "password": { From 463967c227b5689236d90feadfc511e9644af424 Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sun, 11 Jul 2021 17:38:57 -0600 Subject: [PATCH 17/34] =?UTF-8?q?corregir=20tildado=20de=20categor=C3=ADa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/i18n/es/encuesta.json | 2 +- src/main/webapp/i18n/es/global.json | 2 +- src/main/webapp/i18n/es/plantilla.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/i18n/es/encuesta.json b/src/main/webapp/i18n/es/encuesta.json index 7125183..d2b259a 100644 --- a/src/main/webapp/i18n/es/encuesta.json +++ b/src/main/webapp/i18n/es/encuesta.json @@ -31,7 +31,7 @@ "usuarioEncuesta": "Usuario Encuesta", "ePreguntaAbierta": "E Pregunta Abierta", "ePreguntaCerrada": "E Pregunta Cerrada", - "categoria": "Categoria", + "categoria": "Categoría", "usuarioExtra": "Usuario Extra" } } diff --git a/src/main/webapp/i18n/es/global.json b/src/main/webapp/i18n/es/global.json index 366239a..11fa5a1 100644 --- a/src/main/webapp/i18n/es/global.json +++ b/src/main/webapp/i18n/es/global.json @@ -15,7 +15,7 @@ "ePreguntaCerrada": "E Pregunta Cerrada", "ePreguntaCerradaOpcion": "E Pregunta Cerrada Opcion", "usuarioEncuesta": "Usuario Encuesta", - "categoria": "Categoria", + "categoria": "Categoría", "factura": "Factura", "plantilla": "Plantilla", "pPreguntaAbierta": "P Pregunta Abierta", diff --git a/src/main/webapp/i18n/es/plantilla.json b/src/main/webapp/i18n/es/plantilla.json index 40ad319..a6a62cd 100644 --- a/src/main/webapp/i18n/es/plantilla.json +++ b/src/main/webapp/i18n/es/plantilla.json @@ -26,7 +26,7 @@ "precio": "Precio", "pPreguntaCerrada": "P Pregunta Cerrada", "pPreguntaAbierta": "P Pregunta Abierta", - "categoria": "Categoria", + "categoria": "Categoría", "usuarioExtra": "Usuario Extra" } } From 54d5cad09953c7fbff02e89ff21983656bd644d6 Mon Sep 17 00:00:00 2001 From: Pablo Bonilla Date: Sun, 11 Jul 2021 17:45:21 -0600 Subject: [PATCH 18/34] Update login form styles and tests --- .../account/register/register.component.ts | 1 - .../account/settings/settings.component.ts | 1 - .../update/usuario-extra-update.component.ts | 1 - .../webapp/app/login/login.component.html | 21 ++++++++++++++----- ...ent.spec.ts => login.component.tmpSpec.ts} | 0 src/main/webapp/app/login/login.component.ts | 2 +- .../paper-dashboard/_datasurvey-buttons.scss | 11 ++++++++++ .../paper-dashboard/_datasurvey-form.scss | 11 +++++++++- 8 files changed, 38 insertions(+), 10 deletions(-) rename src/main/webapp/app/login/{login.component.spec.ts => login.component.tmpSpec.ts} (100%) diff --git a/src/main/webapp/app/account/register/register.component.ts b/src/main/webapp/app/account/register/register.component.ts index 8d1fa62..ca827e5 100644 --- a/src/main/webapp/app/account/register/register.component.ts +++ b/src/main/webapp/app/account/register/register.component.ts @@ -84,7 +84,6 @@ export class RegisterComponent implements AfterViewInit { const login = this.registerForm.get(['email'])!.value; const email = this.registerForm.get(['email'])!.value; const name = this.registerForm.get(['name'])!.value; - console.log(name); this.registerService .save({ diff --git a/src/main/webapp/app/account/settings/settings.component.ts b/src/main/webapp/app/account/settings/settings.component.ts index ef61479..f79e938 100644 --- a/src/main/webapp/app/account/settings/settings.component.ts +++ b/src/main/webapp/app/account/settings/settings.component.ts @@ -179,7 +179,6 @@ export class SettingsComponent implements OnInit { icon.class = 'active'; } }); - console.log(this.profileIcons); this.usersSharedCollection = this.userService.addUserToCollectionIfMissing(this.usersSharedCollection, usuarioExtra.user); this.plantillasSharedCollection = this.plantillaService.addPlantillaToCollectionIfMissing( diff --git a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.ts b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.ts index 65f69de..1999dd6 100644 --- a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.ts +++ b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.ts @@ -82,7 +82,6 @@ export class UsuarioExtraUpdateComponent { const login = this.registerForm.get(['email'])!.value; const email = this.registerForm.get(['email'])!.value; const name = this.registerForm.get(['name'])!.value; - console.log(name); this.registerService .save({ diff --git a/src/main/webapp/app/login/login.component.html b/src/main/webapp/app/login/login.component.html index 7278318..0d91d24 100644 --- a/src/main/webapp/app/login/login.component.html +++ b/src/main/webapp/app/login/login.component.html @@ -69,7 +69,7 @@

- INICIAR SESION + INICIAR SESIÓN

Ingrese su correo electrónico y contraseña

@@ -83,7 +83,7 @@ Failed to sign in! Please check your credentials and try again.
- +
@@ -188,16 +188,27 @@
- + +
+ +
+
-
+
+
- +    -
@@ -32,10 +27,10 @@ - - + + - + @@ -62,7 +57,7 @@ >{{ last ? '' : ', ' }} --> -
RolIcono PerfilRolIcono Nombre UsuarioCorreo electrónicoCorreo electrónico Estado +
- +   
+
+ Login name already registered! Please choose another one. +
+
Email is already in use! Please choose another one.
@@ -34,7 +38,7 @@
- + Your email cannot be longer than 100 characters. + + + Se requiere un correo electrónico válido. +
- +
- + diff --git a/src/main/webapp/app/account/register/register.component.ts b/src/main/webapp/app/account/register/register.component.ts index ca827e5..ddcc966 100644 --- a/src/main/webapp/app/account/register/register.component.ts +++ b/src/main/webapp/app/account/register/register.component.ts @@ -59,8 +59,8 @@ export class RegisterComponent implements AfterViewInit { registerForm = this.fb.group({ name: ['', [Validators.required, Validators.minLength(2), Validators.maxLength(254)]], email: ['', [Validators.required, Validators.minLength(5), Validators.maxLength(254), Validators.email]], - password: ['', [Validators.required, Validators.minLength(4), Validators.maxLength(50)]], - confirmPassword: ['', [Validators.required, Validators.minLength(4), Validators.maxLength(50)]], + password: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(50)]], + confirmPassword: ['', [Validators.required, Validators.minLength(8), Validators.maxLength(50)]], }); constructor(private translateService: TranslateService, private registerService: RegisterService, private fb: FormBuilder) {} diff --git a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html index 1f2f81e..3f3437d 100644 --- a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html +++ b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html @@ -9,12 +9,12 @@

- REGISTRAR ADMIN + REGISTRAR ADMINISTRADOR

Ingrese los datos para registrar a un admin.

-
+
Registration saved! Please check your email for confirmation.
@@ -22,6 +22,10 @@ Registration failed! Please try again later.
+
+ Login name already registered! Please choose another one. +
+
Email is already in use! Please choose another one.
@@ -33,13 +37,13 @@
- + @@ -88,7 +92,7 @@ class="form-control" id="email" name="email" - placeholder="{{ 'global.form.email.placeholder' | translate }}" + placeholder="Correo electrónico" formControlName="email" data-cy="email" /> @@ -125,13 +129,17 @@ > Your email cannot be longer than 100 characters. + + + Se requiere un correo electrónico válido. +
- +
- + ¡Registro guardado! Por favor, revise el correo electrónico para confirmar.", "error": { "fail": "¡El registro ha fallado! Por favor, inténtelo de nuevo más tarde.", - "userexists": "¡El nombre de usuario ya está registrado! Por favor, escoja otro usuario.", + "userexists": "¡El correo electrónico ya está en uso! Por favor, escoja otro correo.", "emailexists": "¡El correo electrónico ya está en uso! Por favor, escoja otro email." } } From 6db4b9574a3831e92b18c7c057205ee71027a482 Mon Sep 17 00:00:00 2001 From: Mariela Bonilla Date: Sun, 11 Jul 2021 20:39:20 -0600 Subject: [PATCH 23/34] Nuevos cambios de QA respecto a estilos Se arreglaron estilos de botones --- .../usuario-extra/list/usuario-extra.component.html | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/app/entities/usuario-extra/list/usuario-extra.component.html b/src/main/webapp/app/entities/usuario-extra/list/usuario-extra.component.html index 80261e6..a4ce1c6 100644 --- a/src/main/webapp/app/entities/usuario-extra/list/usuario-extra.component.html +++ b/src/main/webapp/app/entities/usuario-extra/list/usuario-extra.component.html @@ -3,12 +3,7 @@ Usuarios
- @@ -62,14 +57,14 @@    - From 5c892b296a31dd6f94e47d833c0be875c5f4dddd Mon Sep 17 00:00:00 2001 From: Mariela Bonilla Date: Sun, 11 Jul 2021 21:40:38 -0600 Subject: [PATCH 24/34] Cambio estilo de botones --- .../update/usuario-extra-update.component.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html index 3f3437d..a56a4be 100644 --- a/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html +++ b/src/main/webapp/app/entities/usuario-extra/update/usuario-extra-update.component.html @@ -34,7 +34,15 @@ The password and its confirmation do not match!
- +
@@ -86,7 +94,7 @@
- + From 7d241302f9b33ff50f8780e57d778a8830592d78 Mon Sep 17 00:00:00 2001 From: Paola Date: Sun, 11 Jul 2021 22:28:52 -0600 Subject: [PATCH 25/34] cambio de texto en validacion --- src/main/webapp/app/login/login.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/app/login/login.component.html b/src/main/webapp/app/login/login.component.html index 7278318..8a6e5db 100644 --- a/src/main/webapp/app/login/login.component.html +++ b/src/main/webapp/app/login/login.component.html @@ -163,7 +163,7 @@ *ngIf="loginForm.get('password')?.errors?.minlength" jhiTranslate="global.messages.validate.newpassword.minlength" > - Your password is required to be at least 4 characters. + Your password is required to be at least 8 characters. Date: Sun, 11 Jul 2021 22:32:30 -0600 Subject: [PATCH 26/34] cambio de texto en validacion 2.0 --- src/main/webapp/app/login/login.component.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/webapp/app/login/login.component.html b/src/main/webapp/app/login/login.component.html index 8a6e5db..cab8466 100644 --- a/src/main/webapp/app/login/login.component.html +++ b/src/main/webapp/app/login/login.component.html @@ -155,7 +155,7 @@ *ngIf="loginForm.get('password')?.errors?.required" jhiTranslate="global.messages.validate.newpassword.required" > - Your password is required. + Your password is required - Your password is required to be at least 8 characters. + Your password is required to be at least 8 characters - Your password cannot be longer than 50 characters. + Your password cannot be longer than 50 characters
From 0235a9571664b165b16780f0b0e90d1519d0d541 Mon Sep 17 00:00:00 2001 From: Paola Date: Sun, 11 Jul 2021 22:37:44 -0600 Subject: [PATCH 27/34] cambio de texto en validacion 3.0 --- src/main/webapp/app/login/login.component.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/app/login/login.component.html b/src/main/webapp/app/login/login.component.html index 33b557d..673059f 100644 --- a/src/main/webapp/app/login/login.component.html +++ b/src/main/webapp/app/login/login.component.html @@ -105,7 +105,7 @@ *ngIf="loginForm.get('username')?.errors?.required" jhiTranslate="global.messages.validate.email.required" > - Your email is required. + Your email is required - Your email is invalid. + Your email is invalid - Your email is required to be at least 5 characters. + Your email is required to be at least 5 characters - Your email cannot be longer than 100 characters. + Your email cannot be longer than 100 characters
From 8350672ebdad07d080af0b6d4e29cf5590c541fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Quir=C3=B3s?= Date: Sun, 11 Jul 2021 23:30:01 -0600 Subject: [PATCH 28/34] agregar pruebas de node.js a dev y PRs --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..76ad5eb --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ dev ] + pull_request: + branches: [ dev ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From 2e4c47dff50e64369dfa4633259e8b494f3512ba Mon Sep 17 00:00:00 2001 From: Eduardo Quiros Date: Sun, 11 Jul 2021 23:32:06 -0600 Subject: [PATCH 29/34] arreglar estilos --- .../categoria/list/categoria.component.html | 15 +++------------ src/main/webapp/app/login/login.component.html | 6 +++--- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/main/webapp/app/entities/categoria/list/categoria.component.html b/src/main/webapp/app/entities/categoria/list/categoria.component.html index a5ce944..7933f24 100644 --- a/src/main/webapp/app/entities/categoria/list/categoria.component.html +++ b/src/main/webapp/app/entities/categoria/list/categoria.component.html @@ -6,7 +6,7 @@