-
This currency has unique code @item.UniqueCode.
- @if (item.IsDefault)
- {
-
This is a default currency used for displaying outcomes.
- }
-
-
- @if (!item.IsDefault)
+
+ }
+ else
+ {
+ @foreach (var item in Models)
+ {
+
+
+
+ @item.Symbol
+
+
+
+
This currency has unique code @item.UniqueCode.
+ @if (item.IsDefault)
{
-
+
This is a default currency used for displaying outcomes.
}
- @if (Models.Count > 1)
- {
-
- }
+
+ @if (!item.IsDefault)
+ {
+
+ }
-
+ @if (Models.Count > 1)
+ {
+
+ }
- @if (Models.Count > 1 && !item.IsDefault)
- {
-
- }
+
+
+ @if (Models.Count > 1 && !item.IsDefault)
+ {
+
+ }
+
-
+ }
}
-}
+
diff --git a/src/Money.UI.Blazor/Pages/Currencies.cshtml.cs b/src/Money.UI.Blazor/Pages/Currencies.cshtml.cs
index cd150556..8694562e 100644
--- a/src/Money.UI.Blazor/Pages/Currencies.cshtml.cs
+++ b/src/Money.UI.Blazor/Pages/Currencies.cshtml.cs
@@ -3,6 +3,7 @@
using Money.Events;
using Money.Models;
using Money.Models.Confirmation;
+using Money.Models.Loading;
using Money.Models.Queries;
using Neptuo.Commands;
using Neptuo.Events;
@@ -59,13 +60,16 @@ protected bool IsCreateExchangeRateVisible
public List
Models { get; private set; } = new List();
public CurrencyModel Selected { get; protected set; }
protected DeleteContext Delete { get; } = new DeleteContext();
+ protected LoadingContext Loading { get; } = new LoadingContext();
protected override async Task OnInitAsync()
{
BindEvents();
Delete.Confirmed += async model => await Commands.HandleAsync(new DeleteCurrency(model.UniqueCode));
Delete.MessageFormatter = model => $"Do you really want to delete currency '{model.Symbol}'?";
- await LoadDataAsync();
+
+ using (Loading.Start())
+ await LoadDataAsync();
}
protected async void OnEvent()