feat: Implementazione CalendarView e VisitFormView - Issue #75#98
Merged
feat: Implementazione CalendarView e VisitFormView - Issue #75#98
Conversation
…r validation support - issue #75
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📅 Implementazione Calendario Mensile e Registrazione Visite - Issue #75
🎯 Obiettivo
Implementare la vista calendario mensile per la gestione degli appuntamenti programmati e il form di registrazione delle visite effettive.
✨ Funzionalità Implementate
1️⃣ CalendarView - Vista Calendario Mensile
2️⃣ VisitFormView - Form Registrazione Visite
🏗️ Architettura Implementata
ViewModels (5 nuovi)
CalendarViewModel (
src/PTRP.ViewModels/Calendar/CalendarViewModel.cs)DayViewModel (
src/PTRP.ViewModels/Calendar/DayViewModel.cs)AppointmentSummaryViewModel (
src/PTRP.ViewModels/Calendar/AppointmentSummaryViewModel.cs)VisitFormViewModel (
src/PTRP.ViewModels/Visits/VisitFormViewModel.cs)ObservableValidatorper supporto Data AnnotationsValidate()per testingOperatorCheckboxViewModel (
src/PTRP.ViewModels/Visits/OperatorCheckboxViewModel.cs)Views XAML (2 nuove)
CalendarView.xaml (
src/PTRP.App/Views/Calendar/CalendarView.xaml)VisitFormView.xaml (
src/PTRP.App/Views/Visits/VisitFormView.xaml)Converters (3 nuovi)
BoolToColorConverter.cs- Converte bool → Color con parametroBoolToFontWeightConverter.cs- Converte bool → FontWeight (Bold/Normal)InverseBooleanToVisibilityConverter.cs- Già esistente, riutilizzatoDependency Injection
App.xaml.csMainViewModel Integration
NavigateToCalendarCommand(async)OnCurrentViewModelChanged🧪 Test Unitari
CalendarViewModelTests.cs - 26 test
VisitFormViewModelTests.cs - 23 test
Totale: 49 unit test, tutti passano ✅
🔧 Fix Applicati Durante Sviluppo
📊 Statistiche
File Creati: 12
File Modificati: 3
Codice
Commit: 29
✅ Checklist
Funzionalità
Qualità
Integrazione
Documentazione
🎨 Screenshots
CalendarView
VisitFormView
🚀 Prossimi Step (Non in questa PR)
📝 Note per i Reviewer
Testing: Tutti i 49 test unitari passano. Per testare manualmente, cliccare su "Calendario" nel menu laterale.
Validazione: Il form VisitFormView implementa validazione completa con Data Annotations. I campi invalidi mostrano bordi rossi e messaggi di errore.
Permessi: Solo gli educatori assegnati a un appuntamento vedono i pulsanti di azione (CanManage).
Dati: Se il calendario appare vuoto, significa che non ci sono appuntamenti programmati nel database seed. La funzionalità è comunque completa e testata.
Performance: La generazione del calendario (42 giorni) è ottimizzata con binding XAML efficiente.
Closes #75