diff --git a/src/app/features/store/pages/account-page/account-layout/account-layout.scss b/src/app/features/store/pages/account-page/account-layout/account-layout.scss
index 8d9f665..9c60500 100644
--- a/src/app/features/store/pages/account-page/account-layout/account-layout.scss
+++ b/src/app/features/store/pages/account-page/account-layout/account-layout.scss
@@ -1,9 +1,7 @@
.account-layout {
display: flex;
- max-width: 1200px;
margin: 0 auto;
- padding: 40px 20px;
- gap: 40px;
+ gap: 100px;
background-color: #f7f7f7;
min-height: calc(100vh - 100px);
}
diff --git a/src/app/features/store/pages/account-page/components/profile-form/profile-form.html b/src/app/features/store/pages/account-page/components/profile-form/profile-form.html
index e703057..120a401 100644
--- a/src/app/features/store/pages/account-page/components/profile-form/profile-form.html
+++ b/src/app/features/store/pages/account-page/components/profile-form/profile-form.html
@@ -50,7 +50,7 @@
diff --git a/src/app/features/store/pages/account-page/components/profile-form/profile-form.scss b/src/app/features/store/pages/account-page/components/profile-form/profile-form.scss
index 2cbd674..11756e8 100644
--- a/src/app/features/store/pages/account-page/components/profile-form/profile-form.scss
+++ b/src/app/features/store/pages/account-page/components/profile-form/profile-form.scss
@@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
gap: 16px;
- max-width: 500px;
+ width: 100%;
}
.form-actions {
display: flex;
diff --git a/src/app/features/store/pages/account-page/components/profile-form/profile-form.ts b/src/app/features/store/pages/account-page/components/profile-form/profile-form.ts
index 3301877..cda9727 100644
--- a/src/app/features/store/pages/account-page/components/profile-form/profile-form.ts
+++ b/src/app/features/store/pages/account-page/components/profile-form/profile-form.ts
@@ -1,7 +1,8 @@
-import { Component } from '@angular/core';
+import { Component, OnInit, inject } from '@angular/core';
import { ReactiveFormsModule, FormBuilder, FormGroup } from '@angular/forms';
import { InputComponent } from '../../../../../../shared/components/input/input.component';
import { ButtonComponent } from '../../../../../../shared/components/button/button.component';
+import { AuthService } from '../../../../../../core/services/auth/auth.service';
@Component({
selector: 'app-profile-form',
@@ -10,8 +11,9 @@ import { ButtonComponent } from '../../../../../../shared/components/button/butt
templateUrl: './profile-form.html',
styleUrl: './profile-form.scss',
})
-export class ProfileForm {
+export class ProfileForm implements OnInit {
profileForm: FormGroup;
+ private authService = inject(AuthService);
constructor(private fb: FormBuilder) {
this.profileForm = this.fb.group({
@@ -22,4 +24,18 @@ export class ProfileForm {
password: ['']
});
}
+
+ ngOnInit(): void {
+ this.authService.loadCurrentUser().subscribe({
+ next: (user) => {
+ this.profileForm.patchValue({
+ fullName: user.nombre_apellido,
+ email: user.email,
+ dni: user.dni || '',
+ phone: user.telefono || ''
+ });
+ },
+ error: (err) => console.error('Error fetching user profile', err)
+ });
+ }
}
diff --git a/src/app/features/store/pages/account-page/components/purchase-list-item/purchase-list-item.scss b/src/app/features/store/pages/account-page/components/purchase-list-item/purchase-list-item.scss
index 4a6f0f8..f98829b 100644
--- a/src/app/features/store/pages/account-page/components/purchase-list-item/purchase-list-item.scss
+++ b/src/app/features/store/pages/account-page/components/purchase-list-item/purchase-list-item.scss
@@ -2,7 +2,8 @@
display: flex;
justify-content: space-between;
align-items: center;
- padding: 16px;
+ padding: 16px;
+ padding-left:0;
border-bottom: 1px solid #e0e0e0;
transition: background-color 0.2s, border-radius 0.2s;
cursor: pointer;
diff --git a/src/app/features/store/pages/account-page/components/purchase-list/purchase-list.scss b/src/app/features/store/pages/account-page/components/purchase-list/purchase-list.scss
index 5cda089..3b99a13 100644
--- a/src/app/features/store/pages/account-page/components/purchase-list/purchase-list.scss
+++ b/src/app/features/store/pages/account-page/components/purchase-list/purchase-list.scss
@@ -1,5 +1,5 @@
.purchase-list-container {
display: flex;
flex-direction: column;
- max-width: 600px;
+ width: 100%;
}
diff --git a/src/app/features/store/pages/account-page/pages/profile-page/profile-page.scss b/src/app/features/store/pages/account-page/pages/profile-page/profile-page.scss
index 5097d4d..6bc995f 100644
--- a/src/app/features/store/pages/account-page/pages/profile-page/profile-page.scss
+++ b/src/app/features/store/pages/account-page/pages/profile-page/profile-page.scss
@@ -1,6 +1,8 @@
.page-container {
display: flex;
flex-direction: column;
+ width: 100%;
+ max-width: 600px;
}
.page-title {
font-size: 16px;
diff --git a/src/app/features/store/pages/account-page/pages/purchases-page/purchases-page.scss b/src/app/features/store/pages/account-page/pages/purchases-page/purchases-page.scss
index 5097d4d..6bc995f 100644
--- a/src/app/features/store/pages/account-page/pages/purchases-page/purchases-page.scss
+++ b/src/app/features/store/pages/account-page/pages/purchases-page/purchases-page.scss
@@ -1,6 +1,8 @@
.page-container {
display: flex;
flex-direction: column;
+ width: 100%;
+ max-width: 600px;
}
.page-title {
font-size: 16px;