Skip to content

Commit

Permalink
Merge branch 'master' into error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
vyruz1986 authored Aug 18, 2022
2 parents f755878 + d477229 commit c0495ca
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion Types/TransactionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ public enum TransactionType
[Description("Fixed costs")]
CreditFixedCosts,
[Description("Internal bank transfer")]
InternalBank
InternalBank,
[Description("Sale of consumables")]
DebitSaleConsumables,
[Description("Sale of goods and services")]
DebitSaleGoodsAndServices
}
2 changes: 1 addition & 1 deletion Web/Models/TransactionForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public TransactionForm()
Counterparty = new AutocompleteCounterparty(string.Empty, null);
TransactionTypeAmounts = new List<TransactionTypeAmountForm>()
{
new(TransactionType.DebitWorkshopFee, 0)
new(TransactionType.DebitMemberFee, 0)
};
TransactionAttachments = new List<TransactionAttachment>();
}
Expand Down
2 changes: 1 addition & 1 deletion Web/Pages/Transactions/NewTransaction.razor
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@code {
private readonly Models.TransactionForm _newTransaction = new();

private TransactionTypeGroup _selectedTransactionTypeGroup = TransactionTypeGroup.Credit;
private TransactionTypeGroup _selectedTransactionTypeGroup = TransactionTypeGroup.Debit;

private async Task AddTransaction()
{
Expand Down
8 changes: 5 additions & 3 deletions Web/Pages/Transactions/TransactionForm.razor
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@
{
<MudItem xs="6">
<MudNumericField @bind-Value="transactionType.Amount"
Label="Bedrag (€)"
Label="Amount (€)"
Min="0"
T="decimal">
</MudNumericField>
</MudItem>

<MudItem xs="6">
<MudSelect @bind-Value="transactionType.TransactionType"
Label="Selecteer transactie type"
Label="Select transaction type"
Variant="Variant.Outlined">
@foreach (var item in _transactionTypes)
{
Expand Down Expand Up @@ -277,7 +277,9 @@
TransactionType.DebitWorkshopFee,
TransactionType.DebitDonation,
TransactionType.DebitMemberFee,
TransactionType.InternalBank
TransactionType.InternalBank,
TransactionType.DebitSaleConsumables,
TransactionType.DebitSaleGoodsAndServices
}.OrderBy(x => x.GetDescription()).ToList();
}
return new List<TransactionType>
Expand Down

0 comments on commit c0495ca

Please sign in to comment.