Skip to content

Commit 114983c

Browse files
committed
refactor(*.cs): Refactor AccountType enum and clean up unused usings
Moved AccountType enum to a new Enums/AccountType.cs file and updated references in AccountModel. Removed unused using directives across multiple files for improved code clarity and maintainability. Minor formatting and whitespace adjustments were also made.
1 parent 9d1beb9 commit 114983c

File tree

12 files changed

+34
-33
lines changed

12 files changed

+34
-33
lines changed

FinTrack/App.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
using Microsoft.Extensions.Hosting;
99
using Microsoft.Extensions.Logging;
1010
using Serilog;
11-
using System;
1211
using System.Windows;
1312

1413
namespace FinTrack

FinTrack/Enums/AccountType.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace FinTrack.Enums
2+
{
3+
public enum AccountType
4+
{
5+
Checking,
6+
Savings,
7+
CreditCard,
8+
Cash,
9+
Investment,
10+
Loan,
11+
Other,
12+
} // Kontrol, Tasarruf, Kredi Kartı, Nakit, Yatırım, Kredi, Diğer
13+
}

FinTrack/Models/AccountModel.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System.ComponentModel.DataAnnotations;
1+
using FinTrack.Enums;
2+
using System.ComponentModel.DataAnnotations;
23
using System.ComponentModel.DataAnnotations.Schema;
3-
using System.Windows.Media;
44

55
namespace FinTrack.Models
66
{
@@ -49,15 +49,4 @@ public class AccountModel
4949

5050
public virtual ICollection<TransactionModel> Transactions { get; set; } = new List<TransactionModel>();
5151
}
52-
53-
public enum AccountType
54-
{
55-
Checking,
56-
Savings,
57-
CreditCard,
58-
Cash,
59-
Investment,
60-
Loan,
61-
Other,
62-
} // Kontrol, Tasarruf, Kredi Kartı, Nakit, Yatırım, Kredi, Diğer
6352
}

FinTrack/Models/BudgetModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.ComponentModel.DataAnnotations;
22
using System.ComponentModel.DataAnnotations.Schema;
3-
using System.Windows.Media;
43

54
namespace FinTrack.Models
65
{

FinTrack/Models/Dashboard/TransactionDashboard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.Windows.Media;
2-
using FinTrack.Enums;
1+
using FinTrack.Enums;
2+
using System.Windows.Media;
33

44
namespace FinTrack.Models.Dashboard
55
{

FinTrack/Services/Api/ApiService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.Net.Http;
44
using System.Net.Http.Headers;
55
using System.Text.Json;
6-
using System.Windows;
76

87
namespace FinTrack.Services.Api
98
{

FinTrack/Services/IAuthService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ public interface IAuthService
55
Task<string> LoginAsync(string email, string password);
66
void Logout();
77
Task<bool> InitiateRegistrationAsnc(string userName, string email, string password);
8-
Task <bool> VerifyOtpAndRegisterCodeAsync(string email, string code);
8+
Task<bool> VerifyOtpAndRegisterCodeAsync(string email, string code);
99
}
1010
}

FinTrack/ViewModels/AuthenticatorViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using CommunityToolkit.Mvvm.ComponentModel;
2-
using Microsoft.Extensions.Logging;
32

43
namespace FinTrack.ViewModels
54
{

FinTrack/ViewModels/DashboardViewModel.cs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
using CommunityToolkit.Mvvm.ComponentModel;
2-
using FinTrack.Models;
2+
using FinTrack.Models.Dashboard;
3+
using Microsoft.Extensions.Logging;
34
using System.Collections.ObjectModel;
4-
using System.Windows.Media;
55
using System.Windows;
6-
using Microsoft.Extensions.Logging;
7-
using FinTrack.Models.Dashboard;
6+
using System.Windows.Media;
87

98
namespace FinTrack.ViewModels
109
{
@@ -89,12 +88,18 @@ private void LoadData()
8988
CurrentMembership_DashboardView_Multiple = new MembershipDashboard { Level = "Pro | AKTF", StartDate = "01.01.2025", RenewalDate = "01.02.2025", Price = "9.99$" };
9089

9190
// [TEST]
92-
CurrentDebt_DashboardView_Multiple = new DebtDashboard
91+
CurrentDebt_DashboardView_Multiple = new DebtDashboard
9392
{
94-
LenderName = "Ali Veli", LenderIconPath = "https://i.pinimg.com/236x/be/a3/49/bea3491915571d34a026753f4a872000.jpg",
95-
BorrowerName = "Ahmet Mehmet", BorrowerIconPath = "https://pbs.twimg.com/profile_images/1144861916734451712/D76C3ugh_400x400.jpg",
96-
Status = "Ödenmemiş", StatusBrush = "StatusGreenBrush", Amount = "1.000$" ,
97-
CreationDate = "01.01.2025", DueDate = "01.02.2025", ReviewDate = "01.03.2025"
93+
LenderName = "Ali Veli",
94+
LenderIconPath = "https://i.pinimg.com/236x/be/a3/49/bea3491915571d34a026753f4a872000.jpg",
95+
BorrowerName = "Ahmet Mehmet",
96+
BorrowerIconPath = "https://pbs.twimg.com/profile_images/1144861916734451712/D76C3ugh_400x400.jpg",
97+
Status = "Ödenmemiş",
98+
StatusBrush = "StatusGreenBrush",
99+
Amount = "1.000$",
100+
CreationDate = "01.01.2025",
101+
DueDate = "01.02.2025",
102+
ReviewDate = "01.03.2025"
98103
};
99104

100105
// [TEST]

FinTrack/ViewModels/OtpVerificationViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
using CommunityToolkit.Mvvm.Input;
33
using FinTrack.Core;
44
using FinTrack.Services;
5-
using System.Windows;
65
using Microsoft.Extensions.Logging;
6+
using System.Windows;
77

88
namespace FinTrack.ViewModels
99
{

0 commit comments

Comments
 (0)