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([ expect(placeholders).toEqual([
'Nombre y Apellido', 'Nombre y Apellido',
'Email', 'Email',
'Contrasena', 'Contraseña',
'Repetir Contrasena' 'Repetir Contraseña'
]); ]);
}); });

View File

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

View File

@@ -3,7 +3,6 @@
<label>Nombre y Apellido:</label> <label>Nombre y Apellido:</label>
<app-input <app-input
type="text" type="text"
placeholder="Nombre y Apellido"
[value]="profileForm.controls['fullName'].value" [value]="profileForm.controls['fullName'].value"
(valueChange)="profileForm.controls['fullName'].setValue($event)" (valueChange)="profileForm.controls['fullName'].setValue($event)"
></app-input> ></app-input>
@@ -16,7 +15,6 @@
<label>Email:</label> <label>Email:</label>
<app-input <app-input
type="email" type="email"
placeholder="Email"
[value]="profileForm.controls['email'].value" [value]="profileForm.controls['email'].value"
(valueChange)="profileForm.controls['email'].setValue($event)" (valueChange)="profileForm.controls['email'].setValue($event)"
></app-input> ></app-input>
@@ -29,7 +27,6 @@
<label>DNI:</label> <label>DNI:</label>
<app-input <app-input
type="text" type="text"
placeholder="DNI"
[value]="profileForm.controls['dni'].value" [value]="profileForm.controls['dni'].value"
(valueChange)="profileForm.controls['dni'].setValue($event)" (valueChange)="profileForm.controls['dni'].setValue($event)"
></app-input> ></app-input>
@@ -42,7 +39,6 @@
<label>Teléfono:</label> <label>Teléfono:</label>
<app-input <app-input
type="text" type="text"
placeholder="Teléfono"
[value]="profileForm.controls['phone'].value" [value]="profileForm.controls['phone'].value"
(valueChange)="profileForm.controls['phone'].setValue($event)" (valueChange)="profileForm.controls['phone'].setValue($event)"
></app-input> ></app-input>
@@ -55,7 +51,6 @@
<label>Contraseña (dejar en blanco para no modificar):</label> <label>Contraseña (dejar en blanco para no modificar):</label>
<app-input <app-input
type="password" type="password"
placeholder="Contraseña"
[value]="profileForm.controls['password'].value" [value]="profileForm.controls['password'].value"
(valueChange)="profileForm.controls['password'].setValue($event)" (valueChange)="profileForm.controls['password'].setValue($event)"
></app-input> ></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 { ReactiveFormsModule, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { InputComponent } from '../../../../../../shared/components/input/input.component'; import { InputComponent } from '../../../../../../shared/components/input/input.component';
import { ButtonComponent } from '../../../../../../shared/components/button/button.component'; import { ButtonComponent } from '../../../../../../shared/components/button/button.component';
@@ -12,7 +12,7 @@ import { ToastService } from '../../../../../../core/services/toast.service';
templateUrl: './profile-form.html', templateUrl: './profile-form.html',
styleUrl: './profile-form.scss', styleUrl: './profile-form.scss',
}) })
export class ProfileForm { export class ProfileForm implements OnInit {
profileForm: FormGroup; profileForm: FormGroup;
private authService = inject(AuthService); private authService = inject(AuthService);
private toastService = inject(ToastService); 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 { getControlError(controlName: string): string | null {
const control = this.profileForm.get(controlName); const control = this.profileForm.get(controlName);
if (!control || !control.errors || (!control.touched && !this.isSubmitting())) return null; 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> <span class="purchase-date">Fecha de compra: {{ purchase.date }}</span>
</div> </div>
<div class="purchase-action"> <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>
</div> </div>

View File

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

View File

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

View File

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

View File

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

View File

@@ -102,7 +102,7 @@ describe('RegisterPageComponent', () => {
component.onSubmit(); component.onSubmit();
expect(authService.register).not.toHaveBeenCalled(); 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 () => { 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')) { 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.'; return 'El valor ingresado no es valido.';

View File

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