-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #12
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 #12
Conversation
Changed the license badge from MIT to GPL, updated the repository clone URL, and removed most emojis for a cleaner look. Also made minor formatting improvements for consistency.
Renamed BudgetDashboard to BudgetDashboardModel and updated all references accordingly. Introduced IBudgetService interface and BudgetService class for budget-related operations. Updated DebtStatus enum to DebtStatusType with revised statuses. Added warning icon resource to project.
All namespaces throughout the project have been updated from 'FinTrack' to 'FinTrackForWindows' to reflect the new project identity. Project and solution files have also been renamed accordingly. Entity Framework migration files were removed, likely to reset or reinitialize the database context for the new namespace.
Changed the namespace from FinTrack to FinTrackForWindows in App.xaml.cs to reflect the application's platform-specific implementation.
Updated debt status references from DebtStatus to DebtStatusType for consistency and clarity. Changed namespaces from FinTrack to FinTrackForWindows across models, viewmodels, and views. Adjusted XAML model namespace import to match new structure.
Replaces the single full name field with separate first and last name fields throughout registration flow, including DTOs, view models, service interfaces, and UI. Updates API endpoints and package versions in the project file. Improves user data handling and aligns with backend requirements.
Corrected 'FistName' to 'FirstName' in RegisterRequestDto and updated all references. Improved full name formatting in RegisterViewModel by removing spaces. Added a new command in OtpVerificationViewModel to handle navigation and logging when returning to the registration page.
Introduces DTO classes for accounts, budgets, and transactions to support API integration. Refactors BudgetModel and related view models to use new DTOs, improves API service with enum serialization and list fetching, and updates UI bindings for budget management. Adds password validation to registration and improves dashboard data loading from API.
Refactored AccountViewModel, TransactionsViewModel, and FinBotViewModel to use IApiService for CRUD operations, replacing sample data with API calls. Added ChatRequestDto and ChatResponseDto for chat functionality. Updated AccountCreateDto and AccountUpdateDto to include new properties and use enums. Modified AccountModel and TransactionModel to use integer IDs. Improved quick actions and chat handling in FinBotViewModel.
…e property Replaces CurrentBalance and TargetBalance with a single Balance property in AccountModel and updates related view models and views accordingly. Removes progress bar and target balance UI elements, simplifies balance display logic, and introduces AccountResponseDto for API responses. Also improves logging for currency parsing and centers header text in ApplicationRecognizeSlideView.
…ccount model Added LiveCharts-based statistics chart to AccountView, including a new BrushToLvcPaintConverter helper. Refactored AccountModel to use BaseCurrencyType and made balance nullable. Removed Balance from AccountCreateDto and AccountUpdateDto. Enhanced AccountViewModel to support chart data, currency/account type selection, and improved transaction history loading. Updated AccountType enum with descriptions and added ScottPlot.WPF package.
Removed unnecessary using directives and fixed minor formatting issues across multiple ViewModel and service files. These changes improve code readability and maintain consistency without affecting functionality.
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 implements a comprehensive namespace change from FinTrack to FinTrackForWindows across the entire codebase and introduces significant new functionality with DTOs for API integration. The changes aim to align the codebase with a more platform-specific naming convention and enhance data transfer capabilities between the client and server.
- Namespace refactoring from
FinTracktoFinTrackForWindowsacross all files - Addition of comprehensive DTO classes for accounts, budgets, transactions, and chat functionality
- Enhanced user registration flow with separate first name and last name fields
- Updated API service configuration and endpoints
Reviewed Changes
Copilot reviewed 159 out of 160 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updated project title, license change from MIT to GPL, and repository URL correction |
| Views/.xaml and Views/.xaml.cs | Namespace updates and UI improvements including registration form changes |
| ViewModels/*.cs | Namespace updates and integration with new API services and DTOs |
| Models/*.cs | Namespace updates and model structure improvements |
| Dtos/*.cs | New DTO classes for API communication (accounts, budgets, transactions, chat) |
| Services/*.cs | Updated API service endpoints and authentication flow |
| Core/*.cs | Namespace updates and addition of FirstName/LastName properties |
| FinTrackForWindows.csproj | Package version updates and project file renaming |
Files not reviewed (1)
- FinTrack/Migrations/20250626151252_InitialCreate.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)
README.md:110
- The repository URL should reflect the new project name 'FinTrackForWindows' to be consistent with the namespace changes throughout the project.
git clone https://github.com/EnesEfeTokta/FinTrack.git
FinTrack/ViewModels/BudgetViewModel.cs:104
- The variable 'selectedBudget' should use Pascal case 'SelectedBudget' to match C# naming conventions and be consistent with the property name.
await _apiService.PutAsync<BudgetModel>($"Budgets/{selectedBudget.Id}", budgetDto);
| NewUserInformationManager.FullName = FullName_RegisterView_TextBox; | ||
| NewUserInformationManager.FirstName = FirstName_RegisterView_TextBox; | ||
| NewUserInformationManager.LastName = LastName_RegisterView_TextBox; | ||
| NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Replace(" ", "").Trim() + "_" + LastName_RegisterView_TextBox.Replace(" ", "").Trim(); |
Copilot
AI
Jul 25, 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.
[nitpick] The FullName generation logic removes spaces and joins with underscore, which may not be the intended format for a full name. Consider using a space separator or documenting this specific formatting requirement.
| NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Replace(" ", "").Trim() + "_" + LastName_RegisterView_TextBox.Replace(" ", "").Trim(); | |
| NewUserInformationManager.FullName = FirstName_RegisterView_TextBox.Trim() + " " + LastName_RegisterView_TextBox.Trim(); |
| if (string.IsNullOrEmpty(NewUserInformationManager.FirstName) || | ||
| string.IsNullOrEmpty(NewUserInformationManager.LastName) || | ||
| string.IsNullOrEmpty(NewUserInformationManager.Email) || | ||
| string.IsNullOrEmpty(NewUserInformationManager.Password)) |
Copilot
AI
Jul 25, 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 condition logic is inverted. The code should execute the registration when fields are NOT null/empty, but the condition checks if they ARE null/empty and then proceeds with registration.
| if (string.IsNullOrEmpty(NewUserInformationManager.FirstName) || | |
| string.IsNullOrEmpty(NewUserInformationManager.LastName) || | |
| string.IsNullOrEmpty(NewUserInformationManager.Email) || | |
| string.IsNullOrEmpty(NewUserInformationManager.Password)) | |
| if (!string.IsNullOrEmpty(NewUserInformationManager.FirstName) && | |
| !string.IsNullOrEmpty(NewUserInformationManager.LastName) && | |
| !string.IsNullOrEmpty(NewUserInformationManager.Email) && | |
| !string.IsNullOrEmpty(NewUserInformationManager.Password)) |
| var response = await _httpClient.GetAsync(endpoint); | ||
| response.EnsureSuccessStatusCode(); | ||
|
|
||
| var strean = await response.Content.ReadAsStreamAsync(); |
Copilot
AI
Jul 25, 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 code reads from the response stream on line 95 but then calls GetFromJsonAsync which will try to read the already consumed stream, potentially causing issues. Either use the stream approach or the GetFromJsonAsync approach, not both.
| var strean = await response.Content.ReadAsStreamAsync(); |
| var jsonPayload = JsonSerializer.Serialize(data); | ||
| var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json"); | ||
|
|
Copilot
AI
Jul 25, 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 code creates a JSON payload on lines 168-169 but then doesn't use it, instead using PostAsJsonAsync directly with the data object. The manual JSON serialization should be removed.
| var jsonPayload = JsonSerializer.Serialize(data); | |
| var content = new StringContent(jsonPayload, System.Text.Encoding.UTF8, "application/json"); |
Replaced 'selectedBudget' with 'SelectedBudget' to match the correct property casing in API update and logging statements within BudgetViewModel.
Introduces new DTOs for currency data transfer, removes ScottPlot.WPF dependency, and updates CurrencyModel to include an Id. Refactors CurrenciesViewModel to fetch live currency data from the API instead of using sample data, and updates the currencies list UI for better virtualization. Also translates static text in AccountViewModel from Turkish to English.
…ViewModel Moved the FinTrackForWindows.Enums using directive to the top for consistency and removed an unnecessary duplicate. Also fixed minor whitespace formatting in object initialization.
This pull request introduces significant changes to the project, primarily focused on renaming the namespace from
FinTracktoFinTrackForWindowsand adding new DTOs for accounts, budgets, and chats. These updates aim to align the codebase with a more platform-specific naming convention and enhance data transfer capabilities.Namespace Renaming:
FinTracktoFinTrackForWindows, affecting multiple files, includingApp.xaml,App.xaml.cs, and core classes likeISecureTokenStorage,SessionManager, andTokenValidator. [1] [2] [3] [4] [5]Core Enhancements:
FirstNameandLastNameproperties toNewUserInformationManagerfor better user data management.DTO Additions:
AccountCreateDto,AccountDto,AccountResponseDto, andAccountUpdateDto, to standardize data structures for account-related operations. [1] [2] [3] [4]BudgetCreateDto,BudgetDto,BudgetCategoryCreateDto,BudgetCategoryDto, and their update counterparts, to facilitate budget management. [1] [2] [3] [4] [5] [6]ChatRequestDtoto handle chat-related requests.These changes provide a clearer structure and improve the maintainability and scalability of the codebase.