fix: correct spelling of "contraseña" in various components and templates

This commit is contained in:
2026-07-08 12:26:46 -03:00
parent 036b2a950f
commit 56355569f2
12 changed files with 26 additions and 28 deletions

View File

@@ -160,8 +160,8 @@ describe('app routes', () => {
expect(placeholders).toEqual([
'Nombre y Apellido',
'Email',
'Contrasena',
'Repetir Contrasena'
'Contraseña',
'Repetir Contraseña'
]);
});

View File

@@ -2,7 +2,6 @@
display: flex;
margin: 0 auto;
gap: 100px;
background-color: #f7f7f7;
min-height: calc(100vh - 100px);
}
.account-sidebar {

View File

@@ -3,7 +3,6 @@
<label>Nombre y Apellido:</label>
<app-input
type="text"
placeholder="Nombre y Apellido"
[value]="profileForm.controls['fullName'].value"
(valueChange)="profileForm.controls['fullName'].setValue($event)"
></app-input>
@@ -16,7 +15,6 @@
<label>Email:</label>
<app-input
type="email"
placeholder="Email"
[value]="profileForm.controls['email'].value"
(valueChange)="profileForm.controls['email'].setValue($event)"
></app-input>
@@ -29,7 +27,6 @@
<label>DNI:</label>
<app-input
type="text"
placeholder="DNI"
[value]="profileForm.controls['dni'].value"
(valueChange)="profileForm.controls['dni'].setValue($event)"
></app-input>
@@ -42,7 +39,6 @@
<label>Teléfono:</label>
<app-input
type="text"
placeholder="Teléfono"
[value]="profileForm.controls['phone'].value"
(valueChange)="profileForm.controls['phone'].setValue($event)"
></app-input>
@@ -55,7 +51,6 @@
<label>Contraseña (dejar en blanco para no modificar):</label>
<app-input
type="password"
placeholder="Contraseña"
[value]="profileForm.controls['password'].value"
(valueChange)="profileForm.controls['password'].setValue($event)"
></app-input>

View File

@@ -1,4 +1,4 @@
import { Component, inject, effect, signal } from '@angular/core';
import { Component, inject, effect, signal, OnInit } from '@angular/core';
import { ReactiveFormsModule, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { InputComponent } from '../../../../../../shared/components/input/input.component';
import { ButtonComponent } from '../../../../../../shared/components/button/button.component';
@@ -12,7 +12,7 @@ import { ToastService } from '../../../../../../core/services/toast.service';
templateUrl: './profile-form.html',
styleUrl: './profile-form.scss',
})
export class ProfileForm {
export class ProfileForm implements OnInit {
profileForm: FormGroup;
private authService = inject(AuthService);
private toastService = inject(ToastService);
@@ -40,6 +40,11 @@ export class ProfileForm {
});
}
ngOnInit() {
// Refresh user data directly from the API to ensure consistency
this.authService.loadCurrentUser().subscribe();
}
getControlError(controlName: string): string | null {
const control = this.profileForm.get(controlName);
if (!control || !control.errors || (!control.touched && !this.isSubmitting())) return null;

View File

@@ -4,6 +4,8 @@
<span class="purchase-date">Fecha de compra: {{ purchase.date }}</span>
</div>
<div class="purchase-action">
<span class="arrow-icon"></span>
<svg width="8" height="14" viewBox="0 0 8 14" fill="none" xmlns="http://www.w3.org/2000/svg" class="arrow-icon">
<path d="M1 1L7 7L1 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
</div>

View File

@@ -4,11 +4,11 @@
align-items: center;
padding: 16px;
padding-left:0;
transition: background-color 0.2s, border-radius 0.2s;
transition: box-shadow 0.2s, border-radius 0.2s;
cursor: pointer;
}
.purchase-item:hover {
background-color: #f0f0f0;
box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.07);
border-radius: 8px;
}
.purchase-item:hover .arrow-icon {
@@ -29,7 +29,8 @@
font-size: 12px;
}
.arrow-icon {
font-size: 24px;
width: 8px;
height: 14px;
color: #888;
transition: color 0.2s;
}

View File

@@ -12,7 +12,6 @@
<app-input
id="checkout-nombre"
type="text"
placeholder="Descripcion"
[value]="form().controls.nombre.value"
[invalid]="showControlError('nombre')"
[disabled]="form().controls.nombre.disabled"
@@ -30,7 +29,6 @@
<app-input
id="checkout-email"
type="email"
placeholder="Descripcion"
[value]="form().controls.email.value"
[invalid]="showControlError('email')"
[disabled]="form().controls.email.disabled"
@@ -48,7 +46,6 @@
<app-input
id="checkout-dni"
type="text"
placeholder="Descripcion"
[value]="form().controls.dni.value"
[invalid]="showControlError('dni')"
[disabled]="form().controls.dni.disabled"
@@ -66,7 +63,6 @@
<app-input
id="checkout-telefono"
type="text"
placeholder="Descripcion"
[value]="form().controls.telefono.value"
[invalid]="showControlError('telefono')"
[disabled]="form().controls.telefono.disabled"

View File

@@ -27,11 +27,11 @@
}
<div class="d-grid gap-1">
<label class="visually-hidden" for="login-password">Contrasena</label>
<label class="visually-hidden" for="login-password">Contraseña</label>
<app-input
id="login-password"
type="password"
placeholder="Contrasena"
placeholder="Contraseña"
[value]="form.controls.password.value"
[invalid]="showControlError('password')"
(valueChange)="updatePassword($event)"
@@ -41,7 +41,7 @@
}
<div class="text-end">
<button type="button" class="login-page__forgot-password btn btn-link p-0 border-0 text-decoration-none">
Olvide mi contrasena
Olvide mi contraseña
</button>
</div>
</div>

View File

@@ -35,11 +35,11 @@
<small class="text-danger">{{ errorMessage }}</small>
}
<label class="visually-hidden" for="register-password">Contrasena</label>
<label class="visually-hidden" for="register-password">Contraseña</label>
<app-input
id="register-password"
type="password"
placeholder="Contrasena"
placeholder="Contraseña"
[value]="form.controls.password.value"
[invalid]="showControlError('password')"
(valueChange)="updateField('password', $event)"
@@ -48,11 +48,11 @@
<small class="text-danger">{{ errorMessage }}</small>
}
<label class="visually-hidden" for="register-password-repeat">Repetir Contrasena</label>
<label class="visually-hidden" for="register-password-repeat">Repetir Contraseña</label>
<app-input
id="register-password-repeat"
type="password"
placeholder="Repetir Contrasena"
placeholder="Repetir Contraseña"
[value]="form.controls.password_confirmation.value"
[invalid]="showControlError('password_confirmation')"
(valueChange)="updateField('password_confirmation', $event)"

View File

@@ -102,7 +102,7 @@ describe('RegisterPageComponent', () => {
component.onSubmit();
expect(authService.register).not.toHaveBeenCalled();
expect(component.getControlError('password_confirmation')).toBe('Las contrasenas no coinciden.');
expect(component.getControlError('password_confirmation')).toBe('Las contraseñas no coinciden.');
});
it('validates max length and password minimum length before submit', async () => {

View File

@@ -151,7 +151,7 @@ export class RegisterPageComponent {
}
if (controlName === 'password_confirmation' && this.form.hasError('passwordMismatch')) {
return 'Las contrasenas no coinciden.';
return 'Las contraseñas no coinciden.';
}
return 'El valor ingresado no es valido.';

View File

@@ -46,7 +46,7 @@
type="button"
class="input-icon"
[disabled]="disabled()"
[attr.aria-label]="isPasswordVisible() ? 'Ocultar contrasena' : 'Mostrar contrasena'"
[attr.aria-label]="isPasswordVisible() ? 'Ocultar contraseña' : 'Mostrar contraseña'"
(click)="togglePasswordVisibility()"
>
<i