diff --git a/FlowHub.DataAccess/Platforms/Windows/DataAccessRepo.cs b/FlowHub.DataAccess/Platforms/Windows/DataAccessRepo.cs
index ed0b0d5..3bd37ce 100644
--- a/FlowHub.DataAccess/Platforms/Windows/DataAccessRepo.cs
+++ b/FlowHub.DataAccess/Platforms/Windows/DataAccessRepo.cs
@@ -7,7 +7,7 @@ namespace FlowHub.DataAccess;
public class DataAccessRepo : IDataAccessRepo
{
- LiteDatabaseAsync db = null;
+ LiteDatabaseAsync db;
public LiteDatabaseAsync GetDb() //this function returns the path where the db file is saved
{
string path;
diff --git a/FlowHub.Main/FlowHub.Main.csproj b/FlowHub.Main/FlowHub.Main.csproj
index ef80287..968b20e 100644
--- a/FlowHub.Main/FlowHub.Main.csproj
+++ b/FlowHub.Main/FlowHub.Main.csproj
@@ -228,6 +228,9 @@
MSBuild:Compile
+
+ MSBuild:Compile
+
@@ -273,6 +276,9 @@
UpSertIncomePageM.xaml
+
+ UpSertExpendituresPopUp.xaml
+
diff --git a/FlowHub.Main/MainPage.xaml.cs b/FlowHub.Main/MainPage.xaml.cs
index bdf7889..6356665 100644
--- a/FlowHub.Main/MainPage.xaml.cs
+++ b/FlowHub.Main/MainPage.xaml.cs
@@ -2,7 +2,7 @@
public partial class MainPage : ContentPage
{
- int count = 0;
+ int count;
public MainPage()
{
diff --git a/FlowHub.Main/PopUpPages/InputPopUpPage.xaml b/FlowHub.Main/PopUpPages/InputPopUpPage.xaml
index 6801bb5..5ce24e7 100644
--- a/FlowHub.Main/PopUpPages/InputPopUpPage.xaml
+++ b/FlowHub.Main/PopUpPages/InputPopUpPage.xaml
@@ -5,8 +5,7 @@
x:Class="FlowHub.Main.PopUpPages.InputPopUpPage"
xmlns:validation="clr-namespace:InputKit.Shared.Validations;assembly=InputKit.Maui"
xmlns:material="clr-namespace:UraniumUI.Material.Controls;assembly=UraniumUI.Material"
- CanBeDismissedByTappingOutsideOfPopup="False"
-
+ CanBeDismissedByTappingOutsideOfPopup="False"
Size="300,180"
Color="Transparent">
#201F24
+ #1B1B1B
#F2F0F4
#263238
#6B69D6
diff --git a/FlowHub.Main/Resources/Styles/Styles.xaml b/FlowHub.Main/Resources/Styles/Styles.xaml
index bcaea26..4d42fcf 100644
--- a/FlowHub.Main/Resources/Styles/Styles.xaml
+++ b/FlowHub.Main/Resources/Styles/Styles.xaml
@@ -17,7 +17,7 @@
-
+
diff --git a/FlowHub.Main/Views/Desktop/HomePageD.xaml b/FlowHub.Main/Views/Desktop/HomePageD.xaml
index da09466..c7007c7 100644
--- a/FlowHub.Main/Views/Desktop/HomePageD.xaml
+++ b/FlowHub.Main/Views/Desktop/HomePageD.xaml
@@ -49,6 +49,7 @@
Margin="1"
Padding="5"
WidthRequest="430"
+
Stroke="DarkSlateBlue"
StrokeThickness="2"
StrokeShape="RoundRectangle 8">
diff --git a/FlowHub.Main/Views/Mobile/Expenditures/ManageExpendituresM.xaml b/FlowHub.Main/Views/Mobile/Expenditures/ManageExpendituresM.xaml
index 2fe6efb..c6ca27c 100644
--- a/FlowHub.Main/Views/Mobile/Expenditures/ManageExpendituresM.xaml
+++ b/FlowHub.Main/Views/Mobile/Expenditures/ManageExpendituresM.xaml
@@ -134,7 +134,7 @@
-
+
@@ -145,24 +145,25 @@
HorizontalOptions="Start" IsVisible="{Binding ShowStatisticBtn}"
Grid.Column="0" VerticalOptions="Start" Command="{Binding GoToSpecificStatsPageCommand}"/>
-
-
-
@@ -174,13 +175,13 @@
-
-
+
+
@@ -194,10 +195,10 @@
BackgroundColor="{AppThemeBinding Dark={StaticResource BackGroundDark}, Light={StaticResource BackGroundLight}}"/>
-
+
-
+
diff --git a/FlowHub.Main/Views/Mobile/Expenditures/UpSertExpenditurePageM.xaml b/FlowHub.Main/Views/Mobile/Expenditures/UpSertExpenditurePageM.xaml
index e6311f0..d666111 100644
--- a/FlowHub.Main/Views/Mobile/Expenditures/UpSertExpenditurePageM.xaml
+++ b/FlowHub.Main/Views/Mobile/Expenditures/UpSertExpenditurePageM.xaml
@@ -114,9 +114,7 @@
-
+
diff --git a/FlowHub.Main/Views/Mobile/Incomes/ManageIncomesM.xaml b/FlowHub.Main/Views/Mobile/Incomes/ManageIncomesM.xaml
index a0250eb..cdfee71 100644
--- a/FlowHub.Main/Views/Mobile/Incomes/ManageIncomesM.xaml
+++ b/FlowHub.Main/Views/Mobile/Incomes/ManageIncomesM.xaml
@@ -19,7 +19,7 @@
-
+
diff --git a/FlowHub.Main/Views/Mobile/LoginM.xaml b/FlowHub.Main/Views/Mobile/LoginM.xaml
index 64f1330..9a6f69e 100644
--- a/FlowHub.Main/Views/Mobile/LoginM.xaml
+++ b/FlowHub.Main/Views/Mobile/LoginM.xaml
@@ -112,18 +112,24 @@
-
+
-
+
-
+
+
+
+
@@ -132,13 +138,7 @@
-
-
diff --git a/FlowHub.Main/Views/Mobile/Statistics/SingleMonthStatsPageM.xaml.cs b/FlowHub.Main/Views/Mobile/Statistics/SingleMonthStatsPageM.xaml.cs
index 1392af3..de22744 100644
--- a/FlowHub.Main/Views/Mobile/Statistics/SingleMonthStatsPageM.xaml.cs
+++ b/FlowHub.Main/Views/Mobile/Statistics/SingleMonthStatsPageM.xaml.cs
@@ -25,7 +25,7 @@ protected override void OnAppearing()
LineChart.Series = viewModel.LineSeries;
SelectedTitle.Text = "Biggest Flow Out Details";
}
- ChartPoint obj = null;
+ ChartPoint obj;
private void Chart_ChartPointPointerDown(IChartView chart, ChartPoint point)
{
if (point is not null)
diff --git a/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml b/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml
new file mode 100644
index 0000000..90f4834
--- /dev/null
+++ b/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml.cs b/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml.cs
new file mode 100644
index 0000000..7afb9b9
--- /dev/null
+++ b/FlowHub.Main/Views/UpSertExpendituresPopUp.xaml.cs
@@ -0,0 +1,69 @@
+using CommunityToolkit.Maui.Views;
+using FlowHub.Main.Utilities;
+using FlowHub.Main.ViewModels.Expenditures;
+using UraniumUI.Material.Controls;
+
+namespace FlowHub.Main.Views;
+
+public partial class UpSertExpendituresPopUp : Popup
+{
+ readonly UpSertExpenditureVM viewModel;
+ public UpSertExpendituresPopUp(UpSertExpenditureVM vm)
+ {
+ InitializeComponent();
+ viewModel = vm;
+ this.BindingContext = vm;
+ viewModel.PageLoadedCommand.Execute(null);
+
+#if ANDROID
+ var mainDisplayInfo = DeviceDisplay.MainDisplayInfo;
+ var orientation = mainDisplayInfo.Orientation;
+ var width = mainDisplayInfo.Width;
+ var height = mainDisplayInfo.Height;
+ var density = mainDisplayInfo.Density;
+ var smallestWidth = Math.Min(width, height) * density;
+ var popupWidth = smallestWidth * 0.115;
+
+ var popupHeight = (smallestWidth * 0.13) > 401 ? 350 : smallestWidth * 0.13;
+ Size = new Size(popupWidth, popupHeight);
+#elif WINDOWS
+ this.Size = new Size(400, 400);
+#endif
+ viewModel.PropertyChanged += ViewModel_PropertyChanged;
+ }
+
+ private void ViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == nameof(viewModel.ClosePopUp) && viewModel.ClosePopUp)
+ {
+ viewModel.PropertyChanged -= ViewModel_PropertyChanged;
+ if (viewModel.ThisPopUpResult == PopupResult.Cancel)
+ {
+ Close(new PopUpCloseResult() { Data = null, Result = PopupResult.Cancel });
+ return;
+ }
+ Close(new PopUpCloseResult() { Data = viewModel.SingleExpenditureDetails, Result = viewModel.ThisPopUpResult});
+ }
+ }
+
+
+
+ private void UnitPrice_TextChanged(object sender, TextChangedEventArgs e)
+ {
+ var s = sender as TextField;
+ if (s.Text?.Length == 0)
+ {
+ viewModel.SingleExpenditureDetails.UnitPrice = 0;
+ }
+
+ viewModel.UnitPriceOrQuantityChanged();
+ }
+ private void UnitPrice_Focused(object sender, FocusEventArgs e)
+ {
+ if (UnitPrice.Text == "0")
+ {
+ UnitPrice.Text = "";
+ }
+ }
+}
+
diff --git a/FlowHub.Models/UsersModel.cs b/FlowHub.Models/UsersModel.cs
index 838cd02..3335938 100644
--- a/FlowHub.Models/UsersModel.cs
+++ b/FlowHub.Models/UsersModel.cs
@@ -7,10 +7,10 @@ namespace FlowHub.Models;
public class UsersModel : INotifyPropertyChanged
{
private string? email;
- private double totalExpendituresAmount = 0;
- private double totalIncomeAmount = 0;
- private double totalInDebtAmount = 0;
- private double totalOutDebtAmount = 0;
+ private double totalExpendituresAmount;
+ private double totalIncomeAmount;
+ private double totalInDebtAmount;
+ private double totalOutDebtAmount;
public List documents { get; set; }
[BsonId]