-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #4
Conversation
…rn ComboBox style Introduces NotificationView and FeedbackView user controls with their code-behind files. Updates MainWindow to display NotificationView. Adds modern ComboBox styles to ModernStyles.xaml for improved UI consistency.
Introduced Entity Framework Core models for users, accounts, transactions, categories, budgets, notifications, and user settings. Added AppDatabaseContext with full entity configuration and relationships. Updated project dependencies for EF Core 9.0.6 and tools. Added initial migration and model snapshot for local SQLite database setup.
- Updated `App.xaml` to include a new `ResourceDictionary` for styles. - Changed application startup to display `LoginWindow`. - Removed `DBScheme.cs` and updated `UserRepository.cs` for connection management. - Simplified `LoginPanelViewModel` and `SessionManager.cs`. - Introduced `RelayCommand` and `InvertedBooleanToVisibilityConverter` for MVVM support. - Added new views for login, registration, and OTP verification. - Enhanced UI with new styles in `ModernStyles.xaml`. - Added multiple PNG image files for UI elements and icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request establishes core application functionalities by setting up the database context and migrations, defining user-related models and DTOs, and implementing new authentication and session management features. Key changes include updating viewmodels and views to support OTP verification and adding new services for authentication and session handling.
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| FinTrack/Views/OtpVerificationView.xaml | Updated binding commands for OTP verification buttons. |
| FinTrack/ViewModels/RegisterViewModel.cs | Added async registration flow with OTP navigation events. |
| FinTrack/ViewModels/OtpVerificationViewModel.cs | Refactored property names and updated OTP verification logic. |
| FinTrack/Models/DebtModel.cs | Introduced an empty DebtModel class. |
| FinTrack/Core/SessionManager.cs | Added session management with token storage and clearance. |
| FinTrack/Migrations/* | Added initial migration and updated database schema. |
Files not reviewed (1)
- FinTrack/Migrations/20250626151252_InitialCreate.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)
FinTrack/ViewModels/OtpVerificationViewModel.cs:13
- [nitpick] The property name 'verificationCode_OtpVerificationView_TextBox' is overly verbose; consider renaming it to a more concise format (e.g., 'OtpCode') for clarity and consistency.
private string? verificationCode_OtpVerificationView_TextBox;
| private async Task Register_RegisterView_Button() | ||
| { | ||
| Console.WriteLine("Register denendi."); | ||
| NavigateToOtpVerificationRequested?.Invoke(); |
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OTP navigation event is being invoked twice in the registration process. Consider removing the first invocation to avoid navigating away before validating the input.
| NavigateToOtpVerificationRequested?.Invoke(); |
| @@ -0,0 +1,6 @@ | |||
| namespace FinTrack.Models | |||
| { | |||
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DebtModel class is currently empty; if it is intended as a placeholder, consider adding a comment to indicate future implementation or removing it if not needed.
| { | |
| { | |
| // Placeholder for future implementation of DebtModel |
FinTrack/Core/SessionManager.cs
Outdated
| { | ||
| public static class SessionManager | ||
| { | ||
| public static string CurrentToken { get; private set; } |
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CurrentToken is assigned a null value in ClearToken but is declared as a non-nullable string. Consider changing its type to 'string?' to accurately represent potential null values.
| public static string CurrentToken { get; private set; } | |
| public static string? CurrentToken { get; private set; } |
Eliminated unnecessary using statements from multiple ViewModel and View files to improve code clarity and maintainability. This reduces clutter and potential confusion, making the codebase easier to read and maintain.
This pull request introduces significant new functionality and structural enhancements to the
FinTrackapplication, including a database context setup, DTOs for user authentication, and session management. The changes also add migration files for initializing the database schema and update package dependencies for improved compatibility and tooling.Database and ORM Setup:
AppDatabaseContextinFinTrack/Data/AppDatabaseContext.csto configure the database context, includingDbSetproperties for various models and relationships between entities. It uses SQLite as the database provider and includes configuration for cascading deletes and unique constraints.InitialCreatemigration file inFinTrack/Migrations/20250626151252_InitialCreate.csto define the database schema, including tables forAccounts,Budgets,Categories,Transactions, andNotifications.Models and DTOs:
AccountModelinFinTrack/Models/AccountModel.csto represent user accounts with properties such asName,Balance, andAccountType. It includes validation attributes and relationships withTransactionModel.LoginRequestDto,LoginResponseDto,RegisterRequestDto, andOtpVerifyCodeRequestDtoinFinTrack/Dtosto handle user authentication and registration requests and responses. [1] [2]Session and User Management:
SessionManagerinFinTrack/Core/SessionManager.csto manage user sessions, including methods to set, clear, and check the current session token.NewUserInformationManagerinFinTrack/Core/NewUserInformationManager.csfor temporarily storing new user information during the registration process.Dependency Updates:
Microsoft.EntityFrameworkCore.Sqlitepackage to version9.0.6and addedMicrosoft.EntityFrameworkCore.Toolsfor database migrations inFinTrack/FinTrack.csproj.These changes collectively establish the foundation for database operations, user authentication, and session handling in the application.