Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gwalus committed Jun 13, 2024
2 parents bc07344 + 585c6e8 commit 4605720
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<div align="center">
<img src="assets/dollet_logo.png" alt="logo" width="400"/>

<div style="margin-top: 1rem;">

[![100commitów](https://img.shields.io/badge/100-commitow-darkgreen.svg)](https://100commitow.pl/) [![.NET 8](https://img.shields.io/badge/.NET-8.0-darkgreen.svg)](https://learn.microsoft.com/pl-pl/dotnet/core/whats-new/dotnet-8/overview/) [![MAUI](https://img.shields.io/badge/.NET-MAUI-darkgreen.svg)](https://learn.microsoft.com/pl-pl/dotnet/maui/?view=net-maui-8.0) ![example workflow](https://github.com/gwalus/Dollet/actions/workflows/dotnet.yml/badge.svg)
</div>
<p></p>

[![100commitów](https://img.shields.io/badge/100-commitow-green.svg)](https://100commitow.pl/) [![.NET 8](https://img.shields.io/badge/.NET-8.0-green.svg)](https://learn.microsoft.com/pl-pl/dotnet/core/whats-new/dotnet-8/overview/) [![MAUI](https://img.shields.io/badge/.NET-MAUI-green.svg)](https://learn.microsoft.com/pl-pl/dotnet/maui/?view=net-maui-8.0) ![example workflow](https://github.com/gwalus/Dollet/actions/workflows/dotnet.yml/badge.svg) [![Download](https://img.shields.io/badge/Download-📲-green.svg)](https://github.com/gwalus/Dollet/releases/latest/download/dollet.apk)
</div>

# Dollet 💸💼
# Dollet 💸
Personal budget management application.

Ever wondered where "Dollet" comes from? It's a mashup of "Dol-" from Dollar 💵 and "-let" from Wallet 👜. This app helps store information about bank accounts and more in one place, while also tracking personal budgets by adding expenses and income.

It's like having a digital wallet for all financial needs! 💲💲💲
It's like having a digital wallet for all financial needs! 💲

## Tech Stack

Expand Down Expand Up @@ -97,6 +95,12 @@ It's like having a digital wallet for all financial needs! 💲💲💲
<img src="assets/expenses_dark.jpg" alt="logo" width="300"/>
</div>

### Transactions (Expenses - Details)
<div align="left">
<img src="assets/expenses_details_light.jpg" alt="logo" width="300"/>
<img src="assets/expenses_details_dark.jpg" alt="logo" width="300"/>
</div>

### Transactions (New Expense)
<div align="left">
<img src="assets/new_expense_light.jpg" alt="logo" width="300"/>
Expand Down Expand Up @@ -131,4 +135,6 @@ It's like having a digital wallet for all financial needs! 💲💲💲
- ⬜️ Change default account image
- ⬜️ Wallets
- ⬜️ Settings
- ⬜️ Increase app performance
- ⬜️ Increase app performance

## Download [📲](https://github.com/gwalus/Dollet/releases/latest/download/dollet.apk)
Binary file added assets/expenses_details_dark.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/expenses_details_light.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public partial class EditExpensePageViewModel(IUnitOfWork unitOfWork) : Observab
private int id;

[ObservableProperty]
decimal _amount;
[NotifyCanExecuteChangedFor(nameof(EditExpenseCommand))]
decimal? _amount;

[ObservableProperty]
Account _selectedAccount;
Expand Down Expand Up @@ -68,12 +69,12 @@ async Task Appearing()
SelectedCategory = Categories[categoryIndex];
}

[RelayCommand]
[RelayCommand(CanExecute = nameof(CanEditExpense))]
async Task EditExpense()
{
var selectedAccount = Accounts.FirstOrDefault(x => x.Id == SelectedAccount.Id);

var difference = Amount - initialAmount;
var difference = (Amount ?? 0) - initialAmount;

if (difference > 0)
selectedAccount.Amount -= difference;
Expand All @@ -82,8 +83,8 @@ async Task EditExpense()

var expense = await _unitOfWork.ExpensesRepository.GetAsync(id);

expense.Amount = Amount;
//expense.Account = selectedAccount;
expense.Amount = Amount.Value;
expense.Account = selectedAccount;
expense.Category = SelectedCategory;
expense.Date = Date;
expense.Comment = Comment;
Expand All @@ -105,5 +106,7 @@ await Toast

await Shell.Current.GoToAsync("..", true, navigationParameter);
}

bool CanEditExpense() => Amount.HasValue;
}
}

0 comments on commit 4605720

Please sign in to comment.