Merge pull request #25 from Quantum-P3/fix/sprint-1

Fix/sprint 1
This commit is contained in:
Eduardo Quiros 2021-07-12 05:39:32 +00:00 committed by GitHub
commit e86e81ad81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 19 deletions

View File

@ -6,7 +6,7 @@
<button <button
id="jh-create-entity" id="jh-create-entity"
data-cy="entityCreateButton" data-cy="entityCreateButton"
class="btn btn-primary jh-create-entity create-categoria ds-btn ds-btn-primary" class="jh-create-entity create-categoria ds-btn ds-btn--primary"
[routerLink]="['/categoria/new']" [routerLink]="['/categoria/new']"
> >
<fa-icon icon="plus"></fa-icon> <fa-icon icon="plus"></fa-icon>
@ -33,7 +33,6 @@
<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.categoria.nombre">Nombre</span></th> <th scope="col"><span jhiTranslate="dataSurveyApp.categoria.nombre">Nombre</span></th>
<th scope="col"><span jhiTranslate="dataSurveyApp.categoria.estado">Estado</span></th> <th scope="col"><span jhiTranslate="dataSurveyApp.categoria.estado">Estado</span></th>
<th scope="col"></th> <th scope="col"></th>
@ -41,9 +40,6 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let categoria of categorias | filter: 'nombre':searchString; trackBy: trackId" data-cy="entityTable"> <tr *ngFor="let categoria of categorias | filter: 'nombre':searchString; trackBy: trackId" data-cy="entityTable">
<td>
<a [routerLink]="['/categoria', categoria.id, 'view']">{{ categoria.id }}</a>
</td>
<td>{{ categoria.nombre }}</td> <td>{{ categoria.nombre }}</td>
<td jhiTranslate="{{ 'dataSurveyApp.EstadoCategoria.' + categoria.estado }}">{{ categoria.estado }}</td> <td jhiTranslate="{{ 'dataSurveyApp.EstadoCategoria.' + categoria.estado }}">{{ categoria.estado }}</td>
<td class="text-right"> <td class="text-right">
@ -51,19 +47,14 @@
<button <button
type="submit" type="submit"
[routerLink]="['/categoria', categoria.id, 'edit']" [routerLink]="['/categoria', categoria.id, 'edit']"
class="btn btn-primary btn-sm ds-btn ds-btn-primary" class="btn-sm ds-btn ds-btn--primary"
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 <button type="submit" (click)="delete(categoria)" class="btn-sm ds-btn ds-btn--danger" data-cy="entityDeleteButton">
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> <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>

View File

@ -64,7 +64,7 @@ export class CategoriaUpdateComponent implements OnInit {
protected categoryExists(categoria: ICategoria): boolean { protected categoryExists(categoria: ICategoria): boolean {
this.loadAll(); this.loadAll();
var condicion = this.categorias!.some(cat => cat.nombre === categoria.nombre); var condicion = this.categorias!.some(cat => cat.nombre!.toLowerCase() === categoria.nombre!.toLowerCase());
return condicion; return condicion;
} }

View File

@ -77,7 +77,7 @@
<li class="position-absolute fixed-bottom w-100 mb-5"> <li class="position-absolute fixed-bottom w-100 mb-5">
<a (click)="logout()" class="p-3 w-100 m-0 text-center"> <a (click)="logout()" class="p-3 w-100 m-0 text-center">
<!-- <i class="nc-icon nc-user-run"></i> --> <!-- <i class="nc-icon nc-user-run"></i> -->
<p style="letter-spacing: 0.3rem">Cerrar Sesion</p> <p style="letter-spacing: 0.3rem">Cerrar Sesión</p>
</a> </a>
</li> </li>
<li class="position-absolute fixed-bottom w-100 mb-5" style="bottom: -4rem"> <li class="position-absolute fixed-bottom w-100 mb-5" style="bottom: -4rem">

View File

@ -110,19 +110,19 @@
<small <small
class="form-text text-danger" class="form-text text-danger"
*ngIf="loginForm.get('username')?.errors?.invalid" *ngIf="loginForm.get('username')?.errors?.email"
jhiTranslate="global.messages.validate.email.invalid" jhiTranslate="global.messages.validate.email.invalid"
> >
Your email is invalid Your email is invalid
</small> </small>
<small <!--<small
class="form-text text-danger" class="form-text text-danger"
*ngIf="loginForm.get('username')?.errors?.minlength" *ngIf="loginForm.get('username')?.errors?.minlength"
jhiTranslate="global.messages.validate.email.minlength" jhiTranslate="global.messages.validate.email.minlength"
> >
Your email is required to be at least 5 characters Your email is required to be at least 5 characters
</small> </small> -->
<small <small
class="form-text text-danger" class="form-text text-danger"

View File

@ -27,7 +27,7 @@ export class LoginComponent implements OnInit, AfterViewInit {
errorUserExists = false; errorUserExists = false;
loginForm = this.fb.group({ loginForm = this.fb.group({
username: [null, [Validators.required, Validators.email, Validators.minLength(5), Validators.maxLength(254)]], username: [null, [Validators.required, Validators.email, Validators.maxLength(254)]],
password: [null, [Validators.required, Validators.minLength(8), Validators.maxLength(50)]], password: [null, [Validators.required, Validators.minLength(8), Validators.maxLength(50)]],
rememberMe: [false], rememberMe: [false],
}); });

View File

@ -2,7 +2,7 @@
"register": { "register": {
"title": "Registro", "title": "Registro",
"form": { "form": {
"button": "Crear la cuenta" "button": "Guardar"
}, },
"messages": { "messages": {
"validate": { "validate": {