Accessing your profile
To edit your profile:- Log in to your BarberApp account
- Navigate to your dashboard (Client or Specialist view)
- Click on your profile or the “Edit Profile” option
- You’ll be directed to the profile editing form
Profile information
Available fields
All users can edit the following information:First name
- 2-30 characters
- Must be a valid name format
- Required field
Last name
- 2-30 characters
- Must be a valid name format
- Required field
Sex
- Select from predefined options
- Required field
- Used for demographic purposes
Phone number
- 8-15 digits
- Optional field
- Used for appointment reminders
UserEditFormComponent (user-edit-form.component.ts:46).
Specialist-specific fields
If you’re logged in as a specialist, you also have access to:Specialties
- Select one or more specialties you offer
- Required field (at least 1 specialty)
- Determines which appointment types you can handle
- Accessed via a modal selector
- View all available specialties in BarberApp
- Select multiple specialties
- See how many are currently selected
- Confirm or cancel changes
SpecialtySelectorComponent (user-edit-form.component.ts:75-78)
Profile picture
Uploading a photo
BarberApp uses Cloudinary for image hosting and management.Select an image
- Choose an image file from your device
- Supported formats: Standard image types (JPEG, PNG, etc.)
- The file input accepts
image/*types
Preview your selection
The new image appears immediately as a preview using
URL.createObjectURL().The image is not uploaded yet - it’s only a local preview until you save.
- File selection is handled through a hidden
<input type="file"> - Preview is generated using
URL.createObjectURL() - Actual upload occurs during form submission via
cloudinaryService.uploadImage()
Default profile picture
If you don’t upload a custom photo:- A default profile picture is displayed
- Provided by
cloudinaryService.defaultProfilePictureUrl(user-edit-form.component.ts:112) - You can upload a custom picture anytime
Form validation
Real-time validation
The form validates your input as you type:| Field | Validation Rules | Error Examples |
|---|---|---|
| First Name | 2-30 characters, valid name format | ”Name too short”, “Invalid characters” |
| Last Name | 2-30 characters, valid name format | ”Name too short”, “Invalid characters” |
| DNI | 7-9 digits (cannot be edited) | N/A - read-only |
| Phone | 8-15 digits (optional) | “Phone number must be 8-15 digits” |
| Specialties | At least 1 (specialists only) | “Select at least one specialty” |
CustomValidators (user-edit-form.component.ts:92-97):
CustomValidators.name(2, 30)- Name format validationCustomValidators.dni(7, 9)- DNI number validationCustomValidators.phoneOptional(8, 15)- Optional phone validation
Save button behavior
The “Guardar cambios” (Save changes) button is: ✅ Enabled when:- Form is valid (all required fields filled correctly)
- At least one field has changed from the original value
- Not currently saving
- Form has validation errors
- No changes have been made
- Save operation is in progress
- The system compares current form values with original user data
- For specialists, it performs deep comparison of specialty arrays
- File selection triggers change detection immediately
Saving changes
The save process
When you click “Guardar cambios”:Image upload (if applicable)
If you selected a new profile picture:
- The image is uploaded to Cloudinary
- A new profile picture URL is generated
- This URL is added to your profile data
cloudinaryService.uploadImage() (user-edit-form.component.ts:143)Profile update
Your updated data is sent to Firebase:
- All form fields are included
- Your user ID is automatically attached
- The update is processed by
userFacade.updateUser()
Loading states
While saving:- The save button shows a loading spinner
- Button text changes to “Guardando…” (Saving…)
- The button is disabled to prevent double-submission
- Loading state is managed by
userFacade.isSavingsignal
Important restrictions
Contact information for assistance
The form displays help text with contact details (user-edit-form.component.html:106-108):To modify your DNI or email address, contact:
- Email: Available in the app configuration
- Phone: Available in the app configuration
APP_SHARED_INFO.contact (user-edit-form.component.ts:61-62)Important notes
Data propagation
Important: Changes to your profile only affect future appointments. Information in existing appointments remains unchanged to maintain accurate historical records.
“La información de tus turnos ya registrados no se actualizará por los cambios que hagas en esta sección. La modificación de datos recién tomará efecto en tus próximos movimientos.”
Form structure
The edit form uses Angular Reactive Forms with:- Form validation through
FormBuilder - Real-time change detection via signals
- Computed properties for enable/disable logic
- Effect hooks to populate initial values
Specialty selection (specialists only)
Opening the specialty modal
Specialists see a “Servicios” (Services) field:- Shows count of selected specialties
- Clicking opens a modal overlay
- Modal displays all available specialties
Using the specialty selector
Select/deselect specialties
- Click specialty cards to toggle selection
- Previously selected specialties are pre-checked
- Visual feedback shows selected state
Profile form layout
The form is organized in a responsive grid:- Profile picture section: Full width, centered on mobile
- Form fields: Arranged in columns (responsive: 1-3 columns)
- Information notice: Full width at bottom
- Save button: Centered, full width on mobile
- Mobile: Single column layout
- Medium screens: 2 columns (md:w-input-group)
- Large screens: Up to 3 fields per row
Related topics
- User authentication - How login and user sessions work
- Technical services - Cloudinary image upload and Firebase integration
- Client dashboard - Your profile in the dashboard