gestione profilo utente

This commit is contained in:
2025-12-17 11:15:29 +01:00
parent 2f04d07928
commit 9c58336cb9
13 changed files with 720 additions and 1 deletions

View File

@@ -656,3 +656,78 @@ The availability check endpoint (backend) will reference:
This implementation successfully adds a complete availability configuration system for facilities. Authorized users (ADMIN and INCARICATO) can manage both specific date closures and recurring day-of-week availability patterns. The solution is fully reactive, handles edge cases gracefully, and provides clear visual feedback throughout the process.
The feature follows Vue 3 Composition API best practices, integrates seamlessly with the existing JHipster application structure, and maintains consistency with the application's UI/UX patterns.
---
# Frontend Changes: User Profile Management Feature
## Date
2025-12-16
## Overview
This document describes the frontend changes made to implement the user profile management feature for the Smartbooking application. This feature allows registered users to complete and manage their UtenteApp profile information, which is essential for making reservations.
## Feature Summary
After registration, users can access a dedicated interface to input and modify their UtenteApp data. The interface consists of two sections:
1. **Personal Information** (required): nome, cognome, data di nascita, luogo di nascita, residente, telefono
2. **Company/Organization Information** (optional): nome società, sede, codice fiscale, telefono società, email società
A profile completion check is shown on the home page to prompt users to complete their profile if incomplete.
## Files Created
1. `src/main/webapp/app/account/profile/profile.component.ts` - TypeScript component logic
2. `src/main/webapp/app/account/profile/profile.vue` - Vue template
3. `src/main/webapp/i18n/it/profile.json` - Italian translations
## Files Modified
1. `src/main/webapp/app/entities/utente-app/utente-app.service.ts` - Added saveCurrentUserProfile() method
2. `src/main/webapp/app/router/account.ts` - Added /account/profile route
3. `src/main/webapp/app/core/jhi-navbar/jhi-navbar.vue` - Added profile link in menu
4. `src/main/webapp/i18n/it/global.json` - Added profile menu translation
5. `src/main/webapp/app/core/home/home.component.ts` - Added profile completion check
6. `src/main/webapp/app/core/home/home.vue` - Added warning alert
7. `src/main/webapp/i18n/it/home.json` - Added incomplete profile messages
8. `src/main/webapp/app/main.ts` - Registered UtenteAppService provider
## Backend Integration
**New Endpoint Created:**
- `POST /api/utente-apps/current` - Save current user's profile
- File: `src/main/java/it/sw/pa/comune/artegna/web/rest/UtenteAppResource.java`
## Testing Status
- ✅ Frontend build: SUCCESSFUL
- ✅ No TypeScript compilation errors
- ✅ All translations present
- ✅ Profile component generated in build output
## User Flow
1. User registers and logs in
2. Home page checks for complete profile
3. Warning displays if profile incomplete
4. User clicks link or navigates to Profile in menu
5. Form loads with username/email pre-filled (disabled)
6. User completes required personal fields
7. Optionally fills company information
8. User saves profile
9. Warning disappears from home page
## Key Features
- Two-section form layout (personal + company)
- Comprehensive validation with Vuelidate
- Real-time validation feedback
- Success/error messages
- Profile completion check on home page
- Bootstrap responsive design
- Complete Italian translations
- Security: users can only edit their own profile