Merge branch 'dev' into fix/log-in

This commit is contained in:
Paola 2021-07-11 22:36:48 -06:00
commit dddb15f125
34 changed files with 250 additions and 126 deletions

48
package-lock.json generated
View File

@ -23,6 +23,8 @@
"@ng-bootstrap/ng-bootstrap": "9.1.3",
"@ngx-translate/core": "13.0.0",
"@ngx-translate/http-loader": "6.0.0",
"@types/gapi.auth2": "0.0.54",
"angularx-social-login": "^4.0.1",
"bootstrap": "4.6.0",
"dayjs": "1.10.5",
"ngx-infinite-scroll": "10.0.1",
@ -4227,6 +4229,19 @@
"@types/node": "*"
}
},
"node_modules/@types/gapi": {
"version": "0.0.40",
"resolved": "https://registry.npmjs.org/@types/gapi/-/gapi-0.0.40.tgz",
"integrity": "sha512-HzV7JIp5vgCZYPLzTg+LJCEVbTbZ/wNSCatNYThNvDTtiNXU+ccrUfFLUF2akHsil+KCpf2yp9OUhLUflsOuBw=="
},
"node_modules/@types/gapi.auth2": {
"version": "0.0.54",
"resolved": "https://registry.npmjs.org/@types/gapi.auth2/-/gapi.auth2-0.0.54.tgz",
"integrity": "sha512-4HEphaKsGndb9+tnd2PBBmxloaij04iYXVsjgHpFxqbPFt5Le6pasoh5g5BEtwp/YEm9xDbzssp44BYR2/7RcQ==",
"dependencies": {
"@types/gapi": "*"
}
},
"node_modules/@types/glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
@ -5091,6 +5106,18 @@
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
"dev": true
},
"node_modules/angularx-social-login": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/angularx-social-login/-/angularx-social-login-4.0.1.tgz",
"integrity": "sha512-dL65y0HXlKd8hhuH70/FFTxWsndEBU5DX2I1x7AcJ1ZAYpU6LPtQMbnzy10eSOcWZNeZX8XzaRaIbc4P+GjmvA==",
"dependencies": {
"tslib": "^2.0.0"
},
"peerDependencies": {
"@angular/common": "^12.0.0",
"@angular/core": "^12.0.0"
}
},
"node_modules/ansi-colors": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
@ -30320,6 +30347,19 @@
"@types/node": "*"
}
},
"@types/gapi": {
"version": "0.0.40",
"resolved": "https://registry.npmjs.org/@types/gapi/-/gapi-0.0.40.tgz",
"integrity": "sha512-HzV7JIp5vgCZYPLzTg+LJCEVbTbZ/wNSCatNYThNvDTtiNXU+ccrUfFLUF2akHsil+KCpf2yp9OUhLUflsOuBw=="
},
"@types/gapi.auth2": {
"version": "0.0.54",
"resolved": "https://registry.npmjs.org/@types/gapi.auth2/-/gapi.auth2-0.0.54.tgz",
"integrity": "sha512-4HEphaKsGndb9+tnd2PBBmxloaij04iYXVsjgHpFxqbPFt5Le6pasoh5g5BEtwp/YEm9xDbzssp44BYR2/7RcQ==",
"requires": {
"@types/gapi": "*"
}
},
"@types/glob": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz",
@ -30984,6 +31024,14 @@
"integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=",
"dev": true
},
"angularx-social-login": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/angularx-social-login/-/angularx-social-login-4.0.1.tgz",
"integrity": "sha512-dL65y0HXlKd8hhuH70/FFTxWsndEBU5DX2I1x7AcJ1ZAYpU6LPtQMbnzy10eSOcWZNeZX8XzaRaIbc4P+GjmvA==",
"requires": {
"tslib": "^2.0.0"
}
},
"ansi-colors": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",

View File

@ -95,7 +95,7 @@ jhipster:
token-validity-in-seconds: 86400
token-validity-in-seconds-for-remember-me: 2592000
mail: # specific JHipster mail property, for standard properties see MailProperties
base-url: http://127.0.0.1:8080
base-url: http://localhost:9000
logging:
use-json-format: false # By default, logs are not in Json format
logstash: # Forward logs to logstash over a socket, used by LoggingConfiguration

View File

@ -23,6 +23,10 @@
<strong>Registration failed!</strong> Please try again later.
</div>
<div class="alert alert-danger" *ngIf="errorUserExists" jhiTranslate="register.messages.error.userexists">
<strong>Login name already registered!</strong> Please choose another one.
</div>
<div class="alert alert-danger" *ngIf="errorEmailExists" jhiTranslate="register.messages.error.emailexists">
<strong>Email is already in use!</strong> Please choose another one.
</div>
@ -34,7 +38,7 @@
<form
name="form"
role="form"
class="form"
class="ds-form"
(ngSubmit)="register()"
[formGroup]="registerForm"
*ngIf="!success"
@ -42,7 +46,7 @@
>
<div class="mb-3">
<div class="form-group">
<label for="name" class="form-label">Nombre</label>
<label for="name" class="form-label">Nombre completo</label>
<input
type="text"
class="form-control"
@ -136,13 +140,17 @@
>
Your email cannot be longer than 100 characters.
</small>
<small class="form-text text-danger" *ngIf="registerForm.get('email')?.errors?.email">
Se requiere un correo electrónico válido.
</small>
</div>
</div>
</div>
<div class="mb-3">
<div class="form-group">
<label for="password" jhiTranslate="global.form.newpassword.label">Password</label>
<label for="password">Nueva contraseña</label>
<input
type="password"
class="form-control"
@ -188,7 +196,7 @@
<div class="mb-3">
<div class="form-group">
<label for="password" jhiTranslate="global.form.newpassword.label">Password</label>
<label for="password">Repetir nueva contraseña</label>
<input
type="password"
class="form-control"
@ -243,7 +251,7 @@
<button
type="submit"
[disabled]="registerForm.invalid"
class="btn btn-primary w-100"
class="ds-btn ds-btn--primary w-100"
jhiTranslate="register.form.button"
data-cy="submit"
>

View File

@ -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) {}
@ -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({

View File

@ -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(

View File

@ -1,8 +1,8 @@
<form *ngIf="categoria" name="deleteForm" (ngSubmit)="confirmDelete(categoria.id!)">
<form class="ds-form" *ngIf="categoria" name="deleteForm" (ngSubmit)="confirmDelete(categoria.id!)">
<div class="modal-header">
<h4 class="modal-title" data-cy="categoriaDeleteDialogHeading" jhiTranslate="entity.delete.title">Confirm delete operation</h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">&times;</button>
<button type="button" class="ds-btn close" data-dismiss="modal" aria-hidden="true" (click)="cancel()">&times;</button>
</div>
<div class="modal-body">
@ -14,11 +14,11 @@
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal" (click)="cancel()">
<button type="button" class="btn btn-secondary ds-btn ds-btn-secondary" data-dismiss="modal" (click)="cancel()">
<fa-icon icon="ban"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
<button id="jhi-confirm-delete-categoria" data-cy="entityConfirmDeleteButton" type="submit" class="btn btn-danger">
<button id="jhi-confirm-delete-categoria" data-cy="entityConfirmDeleteButton" type="submit" class="btn btn-danger ds-btn ds-btn-danger">
<fa-icon icon="times"></fa-icon>&nbsp;<span jhiTranslate="entity.action.delete">Delete</span>
</button>
</div>

View File

@ -24,11 +24,11 @@
</dd>
</dl>
<button type="submit" (click)="previousState()" class="btn btn-info" data-cy="entityDetailsBackButton">
<button type="submit" (click)="previousState()" class="btn btn-ds btn-info" data-cy="entityDetailsBackButton">
<fa-icon icon="arrow-left"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back">Back</span>
</button>
<button type="button" [routerLink]="['/categoria', categoria.id, 'edit']" class="btn btn-primary">
<button type="button" [routerLink]="['/categoria', categoria.id, 'edit']" class="btn btn-ds btn-ds-primary btn-primary">
<fa-icon icon="pencil-alt"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit">Edit</span>
</button>
</div>

View File

@ -3,15 +3,10 @@
<span jhiTranslate="dataSurveyApp.categoria.home.title">Categorias</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.categoria.home.refreshListLabel">Refresh List</span>
</button>
<button
id="jh-create-entity"
data-cy="entityCreateButton"
class="btn btn-primary jh-create-entity create-categoria"
class="btn btn-primary jh-create-entity create-categoria ds-btn ds-btn-primary"
[routerLink]="['/categoria/new']"
>
<fa-icon icon="plus"></fa-icon>
@ -32,7 +27,7 @@
<form class="ds-form">
<div class="input-group">
<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
<input type="text" class="form-control" name="searchString" placeholder="Type to search..." [(ngModel)]="searchString" />
<input type="text" name="searchString" placeholder="Buscar..." [(ngModel)]="searchString" />
</div>
</form>
<table class="table table-striped" aria-describedby="page-heading">
@ -53,27 +48,22 @@
<td jhiTranslate="{{ 'dataSurveyApp.EstadoCategoria.' + categoria.estado }}">{{ categoria.estado }}</td>
<td class="text-right">
<div class="btn-group">
<button
type="submit"
[routerLink]="['/categoria', categoria.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]="['/categoria', categoria.id, 'edit']"
class="btn btn-primary btn-sm"
class="btn btn-primary btn-sm ds-btn ds-btn-primary"
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(categoria)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
<button
type="submit"
(click)="delete(categoria)"
class="btn btn-danger btn-sm ds-btn ds-btn-danger"
data-cy="entityDeleteButton"
>
<fa-icon icon="times"></fa-icon>
<span class="d-none d-md-inline" jhiTranslate="entity.action.delete">Delete</span>
</button>

View File

@ -1,12 +1,15 @@
<div class="row justify-content-center">
<div class="col-8">
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm">
<form name="editForm" role="form" novalidate (ngSubmit)="save()" [formGroup]="editForm" class="ds-form">
<h2 id="jhi-categoria-heading" data-cy="CategoriaCreateUpdateHeading" jhiTranslate="dataSurveyApp.categoria.home.createOrEditLabel">
Create or edit a Categoria
Create or edit a Category
</h2>
<div>
<jhi-alert-error></jhi-alert-error>
<div class="alert alert-danger" *ngIf="duplicateName" jhiTranslate="dataSurveyApp.categoria.errors.duplicateName">
A category with that name already exists.
</div>
<div class="form-group" [hidden]="editForm.get('id')!.value == null">
<label class="form-control-label" jhiTranslate="global.field.id" for="field_id">ID</label>
@ -39,7 +42,13 @@
</div>
<div>
<button type="button" id="cancel-save" data-cy="entityCreateCancelButton" class="btn btn-secondary" (click)="previousState()">
<button
type="button"
id="cancel-save"
data-cy="entityCreateCancelButton"
class="btn btn-secondary ds-btn ds-btn-secondary"
(click)="previousState()"
>
<fa-icon icon="ban"></fa-icon>&nbsp;<span jhiTranslate="entity.action.cancel">Cancel</span>
</button>
@ -48,7 +57,7 @@
id="save-entity"
data-cy="entityCreateSaveButton"
[disabled]="editForm.invalid || isSaving"
class="btn btn-primary"
class="btn btn-primary ds-btn ds-btn-primary"
>
<fa-icon icon="save"></fa-icon>&nbsp;<span jhiTranslate="entity.action.save">Save</span>
</button>

View File

@ -14,19 +14,32 @@ import { CategoriaService } from '../service/categoria.service';
})
export class CategoriaUpdateComponent implements OnInit {
isSaving = false;
public categorias?: ICategoria[];
editForm = this.fb.group({
id: [],
nombre: [null, [Validators.required]],
estado: [null, [Validators.required]],
});
public duplicateName: boolean;
constructor(protected categoriaService: CategoriaService, protected activatedRoute: ActivatedRoute, protected fb: FormBuilder) {}
constructor(protected categoriaService: CategoriaService, protected activatedRoute: ActivatedRoute, protected fb: FormBuilder) {
this.duplicateName = false;
this.categorias = [];
this.loadAll();
}
ngOnInit(): void {
this.activatedRoute.data.subscribe(({ categoria }) => {
this.updateForm(categoria);
});
this.loadAll();
}
loadAll(): void {
this.categoriaService.query().subscribe(res => {
this.categorias = res.body ?? [];
});
}
previousState(): void {
@ -36,13 +49,25 @@ export class CategoriaUpdateComponent implements OnInit {
save(): void {
this.isSaving = true;
const categoria = this.createFromForm();
if (categoria.id !== undefined) {
this.subscribeToSaveResponse(this.categoriaService.update(categoria));
const condicion = this.categoryExists(categoria);
if (!condicion) {
if (categoria.id !== undefined) {
this.subscribeToSaveResponse(this.categoriaService.update(categoria));
} else {
this.subscribeToSaveResponse(this.categoriaService.create(categoria));
}
} else {
this.subscribeToSaveResponse(this.categoriaService.create(categoria));
this.duplicateName = true;
this.isSaving = false;
}
}
protected categoryExists(categoria: ICategoria): boolean {
this.loadAll();
var condicion = this.categorias!.some(cat => cat.nombre === categoria.nombre);
return condicion;
}
protected subscribeToSaveResponse(result: Observable<HttpResponse<ICategoria>>): void {
result.pipe(finalize(() => this.onSaveFinalize())).subscribe(
() => this.onSaveSuccess(),

View File

@ -1,21 +1,11 @@
<div>
<h2 id="page-heading" data-cy="UsuarioExtraHeading">
<span jhiTranslate="dataSurveyApp.usuarioExtra.home.title">Usuario Extras</span>
<span jhiTranslate="dataSurveyApp.usuarioExtra.home.title">Usuarios</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.usuarioExtra.home.refreshListLabel">Refresh List</span>
</button>
<button
id="jh-create-entity"
data-cy="entityCreateButton"
class="btn btn-primary jh-create-entity create-usuario-extra"
[routerLink]="['/usuario-extra/new']"
>
<button id="jh-create-entity" data-cy="entityCreateButton" class="ds-btn ds-btn--primary" [routerLink]="['/usuario-extra/new']">
<fa-icon icon="plus"></fa-icon>
<span jhiTranslate="dataSurveyApp.usuarioExtra.home.createLabel"> Create a new Usuario Extra </span>
<span jhiTranslate="dataSurveyApp.usuarioExtra.home.createLabel"> Create a new administrador </span>
</button>
</div>
</h2>
@ -32,10 +22,10 @@
<table class="table table-striped" aria-describedby="page-heading">
<thead>
<tr>
<th scope="col"><span>Rol</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.iconoPerfil">Icono Perfil</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.rol">Rol</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.iconoPerfil">Icono</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.nombre">Nombre Usuario</span></th>
<th scope="col"><span>Correo electrónico</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.correo">Correo electrónico</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.estado">Estado</span></th>
<!--<th scope="col"><span jhiTranslate="dataSurveyApp.usuarioExtra.plantilla">Plantilla</span></th>-->
<th scope="col"></th>
@ -62,19 +52,19 @@
>{{ last ? '' : ', ' }}
</span>
</td>-->
<td class="text-right">
<td class="text-center">
<div class="btn-group">
<button
type="submit"
[routerLink]="['/usuario-extra', usuarioExtra.id, 'view']"
class="btn btn-info btn-sm"
class="ds-btn ds-btn--primary 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" (click)="delete(usuarioExtra)" class="btn btn-danger btn-sm" data-cy="entityDeleteButton">
&nbsp;&nbsp;
<button type="submit" (click)="delete(usuarioExtra)" class="ds-btn ds-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>

View File

@ -10,3 +10,7 @@
list-style: none;
padding-left: 10px;
}
.btn-group button {
margin: 0 2px;
}

View File

@ -30,9 +30,9 @@ export class UsuarioExtraComponent implements OnInit {
rolList = user.authorities;
let a = rolList?.pop();
if (a == 'ROLE_ADMIN') {
user.authorities = ['ADMIN'];
user.authorities = ['Admin'];
} else if (a == 'ROLE_USER') {
user.authorities = ['USUARIO'];
user.authorities = ['Usuario'];
}
});
this.publicUsers = res;

View File

@ -9,12 +9,12 @@
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<h4 class="text-dark-50 text-center pb-0 fw-bold p-0 m-0" style="color: #727070; font-weight: 700; font-size: 1.3rem">
REGISTRAR ADMIN
REGISTRAR ADMINISTRADOR
</h4>
<p class="mb-4" style="color: rgba(146, 146, 146, 0.664)">Ingrese los datos para registrar a un admin.</p>
</div>
<div class="alert alert-success" *ngIf="success" jhiTranslate="register.messages.adminsuccess">
<div class="alert alert-success" *ngIf="success" jhiTranslate="register.messages.success">
<strong>Registration saved!</strong> Please check your email for confirmation.
</div>
@ -22,6 +22,10 @@
<strong>Registration failed!</strong> Please try again later.
</div>
<div class="alert alert-danger" *ngIf="errorUserExists" jhiTranslate="register.messages.error.userexists">
<strong>Login name already registered!</strong> Please choose another one.
</div>
<div class="alert alert-danger" *ngIf="errorEmailExists" jhiTranslate="register.messages.error.emailexists">
<strong>Email is already in use!</strong> Please choose another one.
</div>
@ -30,16 +34,24 @@
The password and its confirmation do not match!
</div>
<form name="form" role="form" class="form" (ngSubmit)="register()" [formGroup]="registerForm" *ngIf="!success" autocomplete="off">
<form
name="form"
role="form"
class="ds-form"
(ngSubmit)="register()"
[formGroup]="registerForm"
*ngIf="!success"
autocomplete="off"
>
<div class="mb-3">
<div class="form-group">
<label for="name" class="form-label">Nombre</label>
<label for="name" class="form-label">Nombre completo</label>
<input
type="text"
class="form-control"
id="name"
name="name"
placeholder="{{ 'global.form.name.placeholder' | translate }}"
placeholder="Nombre completo"
formControlName="name"
data-cy="name"
/>
@ -82,13 +94,13 @@
<div class="mb-3">
<div class="form-group">
<label for="emailaddress" class="form-label">Correo electrónico</label>
<label for="email" class="form-label">Correo electrónico</label>
<input
type="email"
class="form-control"
id="email"
name="email"
placeholder="{{ 'global.form.email.placeholder' | translate }}"
placeholder="Correo electrónico"
formControlName="email"
data-cy="email"
/>
@ -125,13 +137,17 @@
>
Your email cannot be longer than 100 characters.
</small>
<small class="form-text text-danger" *ngIf="registerForm.get('email')?.errors?.email">
Se requiere un correo electrónico válido.
</small>
</div>
</div>
</div>
<div class="mb-3">
<div class="form-group">
<label for="password" jhiTranslate="global.form.newpassword.label">Password</label>
<label for="password">Nueva contraseña</label>
<input
type="password"
class="form-control"
@ -176,7 +192,7 @@
<div class="mb-3">
<div class="form-group">
<label for="password" jhiTranslate="global.form.newpassword.label">Password</label>
<label for="password">Repetir nueva contraseña</label>
<input
type="password"
class="form-control"
@ -231,7 +247,7 @@
<button
type="submit"
[disabled]="registerForm.invalid"
class="btn btn-primary w-100"
class="ds-btn ds-btn--primary w-100"
jhiTranslate="register.form.button"
data-cy="submit"
>

View File

@ -57,8 +57,8 @@ export class UsuarioExtraUpdateComponent {
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) {}
@ -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({

View File

@ -69,7 +69,7 @@
<div class="card-body p-4">
<div class="text-center w-75 m-auto">
<h4 class="text-dark-50 text-center pb-0 fw-bold p-0 m-0" style="color: #727070; font-weight: 700; font-size: 1.3rem">
INICIAR SESION
INICIAR SESIÓN
</h4>
<p class="mb-4" style="color: rgba(146, 146, 146, 0.664)">Ingrese su correo electrónico y contraseña</p>
</div>
@ -83,7 +83,7 @@
<strong>Failed to sign in!</strong> Please check your credentials and try again.
</div>
<form class="form" role="form" (ngSubmit)="login()" [formGroup]="loginForm">
<form class="ds-form" role="form" (ngSubmit)="login()" [formGroup]="loginForm">
<div class="mb-3">
<div class="form-group">
<label for="username" class="form-label">Correo electrónico</label>
@ -188,16 +188,27 @@
</div>
<div class="mb-3 mb-0 text-center">
<button type="submit" class="btn btn-primary w-100" data-cy="submit">Iniciar sesion</button>
<button type="submit" class="ds-btn ds-btn--primary w-100" data-cy="submit">Iniciar sesión</button>
</div>
<div class="mb-3 mb-0 text-center">
<button
type="button"
class="ds-btn ds-btn--google w-100 d-flex align-items-center justify-content-center"
(click)="signInWithGoogle()"
>
<img class="mr-2" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" />
Iniciar con Google
</button>
</div>
</form>
<div class="google-btn w-80 m-auto">
<!-- <div class="google-btn w-80 m-auto">
<div class="google-icon-wrapper">
<img class="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" />
</div>
<button class="btn-text" (click)="signInWithGoogle()">Iniciar con Google</button>
</div>
</div> -->
<!--<div class="mb-3 mb-0">
<button class="btn" (click)="signInWithGoogle()">

View File

@ -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', () => {

View File

@ -28,7 +28,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
loginForm = this.fb.group({
username: [null, [Validators.required, Validators.email, Validators.minLength(5), Validators.maxLength(254)]],
password: [null, [Validators.required, Validators.minLength(4), Validators.maxLength(50)]],
password: [null, [Validators.required, Validators.minLength(8), Validators.maxLength(50)]],
rememberMe: [false],
});
@ -69,7 +69,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
}
ngAfterViewInit(): void {
this.username.nativeElement.focus();
// this.username.nativeElement.focus();
}
//Inicio Google

View File

@ -52,3 +52,14 @@
color: #d33232;
}
}
.ds-btn--google {
background-color: transparent;
color: #787878;
border: 1px solid #e6e6e6;
img {
width: 20px;
height: 20px;
}
}

View File

@ -13,7 +13,8 @@ $form-background: #f1f5f9;
}
}
input {
input,
input:-webkit-autofill {
background-color: $form-background;
border-radius: 15px;
border: 1.75px solid transparent;
@ -44,3 +45,11 @@ $form-background: #f1f5f9;
color: #757d94;
}
}
input:-internal-autofill-selected,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
background-color: $form-background !important;
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"AccesoEncuesta": {
"null": "",
"PUBLIC": "PUBLIC",
"PRIVATE": "PRIVATE"
"PUBLIC": "Pública",
"PRIVATE": "Privada"
}
}
}

View File

@ -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 }}",
@ -21,7 +21,10 @@
"nombre": "Nombre",
"estado": "Estado",
"encuesta": "Encuesta",
"plantilla": "Plantilla"
"plantilla": "Plantilla",
"errors": {
"duplicateName": "Ya existe una categoría con ese nombre."
}
}
}
}

View File

@ -31,7 +31,7 @@
"usuarioEncuesta": "Usuario Encuesta",
"ePreguntaAbierta": "E Pregunta Abierta",
"ePreguntaCerrada": "E Pregunta Cerrada",
"categoria": "Categoria",
"categoria": "Categoría",
"usuarioExtra": "Usuario Extra"
}
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"EstadoCategoria": {
"null": "",
"ACTIVE": "ACTIVA",
"INACTIVE": "INACTIVA"
"ACTIVE": "Activa",
"INACTIVE": "Inactiva"
}
}
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"EstadoColaborador": {
"null": "",
"PENDING": "PENDING",
"ACTIVE": "ACTIVE"
"PENDING": "Pendiente",
"ACTIVE": "Activo"
}
}
}

View File

@ -2,10 +2,10 @@
"dataSurveyApp": {
"EstadoEncuesta": {
"null": "",
"DRAFT": "DRAFT",
"ACTIVE": "ACTIVE",
"FINISHED": "FINISHED",
"DELETED": "DELETED"
"DRAFT": "Borrador",
"ACTIVE": "Activa",
"FINISHED": "Finalizada",
"DELETED": "Eliminada"
}
}
}

View File

@ -2,10 +2,10 @@
"dataSurveyApp": {
"EstadoPlantilla": {
"null": "",
"DRAFT": "DRAFT",
"ACTIVE": "ACTIVE",
"DELETED": "DELETED",
"DISABLED": "DISABLED"
"DRAFT": "Borrador",
"ACTIVE": "Activa",
"DELETED": "Eliminada",
"DISABLED": "Desactivada"
}
}
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"EstadoUsuario": {
"null": "",
"ACTIVE": "ACTIVE",
"SUSPENDED": "SUSPENDED"
"ACTIVE": "Activo",
"SUSPENDED": "Bloqueado"
}
}
}

View File

@ -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",
@ -78,13 +78,13 @@
"validate": {
"newpassword": {
"required": "Se requiere que ingrese una contraseña.",
"minlength": "Se requiere que su contraseña tenga por lo menos 4 caracteres",
"minlength": "Se requiere que su contraseña tenga por lo menos 8 caracteres",
"maxlength": "Su contraseña no puede tener más de 50 caracteres",
"strength": "Seguridad de la contraseña:"
},
"confirmpassword": {
"required": "Se requiere que confirme la contraseña.",
"minlength": "Se requiere que su contraseña de confirmación tenga por lo menos 4 caracteres",
"minlength": "Se requiere que su contraseña de confirmación tenga por lo menos 8 caracteres",
"maxlength": "Su contraseña de confirmación no puede tener más de 50 caracteres"
},
"email": {

View File

@ -26,7 +26,7 @@
"precio": "Precio",
"pPreguntaCerrada": "P Pregunta Cerrada",
"pPreguntaAbierta": "P Pregunta Abierta",
"categoria": "Categoria",
"categoria": "Categoría",
"usuarioExtra": "Usuario Extra"
}
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"PreguntaCerradaTipo": {
"null": "",
"SINGLE": "SINGLE",
"MULTIPLE": "MULTIPLE"
"SINGLE": "Única",
"MULTIPLE": "Múltiple"
}
}
}

View File

@ -17,7 +17,7 @@
"adminsuccess": "<strong>¡Registro guardado!</strong> Por favor, revise el correo electrónico para confirmar.",
"error": {
"fail": "<strong>¡El registro ha fallado!</strong> Por favor, inténtelo de nuevo más tarde.",
"userexists": "<strong>¡El nombre de usuario ya está registrado!</strong> Por favor, escoja otro usuario.",
"userexists": "<strong>¡El correo electrónico ya está en uso!</strong> Por favor, escoja otro correo.",
"emailexists": "<strong>¡El correo electrónico ya está en uso!</strong> Por favor, escoja otro email."
}
}

View File

@ -2,8 +2,8 @@
"dataSurveyApp": {
"RolColaborador": {
"null": "",
"READ": "READ",
"WRITE": "WRITE"
"READ": "Lector",
"WRITE": "Escritor"
}
}
}

View File

@ -2,27 +2,29 @@
"dataSurveyApp": {
"usuarioExtra": {
"home": {
"title": "Usuario Extras",
"title": "Usuarios",
"refreshListLabel": "Refrescar lista",
"createLabel": "Crear nuevo Usuario Extra",
"createOrEditLabel": "Crear o editar Usuario Extra",
"notFound": "Ningún Usuario Extras encontrado"
"createLabel": "Crear nuevo administrador",
"createOrEditLabel": "Crear o editar usuario",
"notFound": "Ningún usuario encontrado"
},
"created": "Un nuevo Usuario Extra ha sido creado con el identificador {{ param }}",
"updated": "Un Usuario Extra ha sido actualizado con el identificador {{ param }}",
"deleted": "Un Usuario Extra ha sido eliminado con el identificador {{ param }}",
"created": "Un nuevo usuario ha sido creado",
"updated": "El usuario con el identificador {{ param }} ha sido actualizado",
"deleted": "El usuario con el identificador {{ param }} ha sido eliminado",
"delete": {
"question": "¿Seguro que quiere eliminar Usuario Extra {{ id }}?"
"question": "¿Seguro que quiere eliminar el usuario {{ id }}?"
},
"detail": {
"title": "Usuario Extra"
"title": "Usuario"
},
"id": "ID",
"rol": "Rol",
"nombre": "Nombre",
"iconoPerfil": "Icono Perfil",
"fechaNacimiento": "Fecha Nacimiento",
"iconoPerfil": "Icono",
"fechaNacimiento": "Fecha de Nacimiento",
"estado": "Estado",
"user": "User",
"user": "Usuario",
"correo": "Correo electrónico",
"encuesta": "Encuesta",
"usuarioEncuesta": "Usuario Encuesta",
"plantilla": "Plantilla"