Add counts to Dashboard (#2)

Also refactored database parameters with a few extension methods; ready for profile view page
This commit is contained in:
2021-01-04 23:05:53 -05:00
parent fe3510b818
commit 97b3de1cea
15 changed files with 325 additions and 93 deletions

View File

@@ -0,0 +1,23 @@
@using NodaTime
@using NodaTime.Text
@using System.Globalization
@Translated
@code {
/// <summary>
/// The pattern with which dates will be formatted
/// </summary>
private static InstantPattern pattern = InstantPattern.Create("ld<D> ' at ' lt<t>", CultureInfo.CurrentCulture);
/// <summary>
/// The date to be formatted
/// </summary>
[Parameter]
public Instant TheDate { get; set; }
/// <summary>
/// The formatted date
/// </summary>
private string Translated => pattern.Format(TheDate);
}

View File

@@ -1,5 +1,6 @@
@inherits LayoutComponentBase
@inject IJSRuntime js
@using Blazored.Toast.Configuration
<div class="page">
<div class="sidebar">
@@ -20,6 +21,8 @@
</div>
</div>
<BlazoredToasts Position="ToastPosition.BottomRight"
ShowProgressBar="true" />
@code {
async void PlayJobs() => await js.InvokeVoidAsync("Audio.play", "pelosijobs");