@page "/ispezioni" @attribute [Authorize] @using SteUp.Shared.Components.Layout @using SteUp.Shared.Components.SingleElements.Card @using SteUp.Shared.Core.Entities @using SteUp.Shared.Core.Interface.LocalDb @inject IIspezioniService IspezioniService
@if (_loading) { @* Scheletri, non uno spinner in mezzo al contenuto: la pagina ha gia' la forma che avra', e non salta quando i dati arrivano. *@ } else if (Ispezioni.Count == 0) {

Nessuna ispezione

Tocca + nella barra in basso per aprire la prima ispezione su un punto vendita.

} else {
}
@code{ private List Ispezioni { get; set; } = []; private bool _loading = true; private string? Subtitle => _loading || Ispezioni.Count == 0 ? null : Ispezioni.Count == 1 ? "1 ispezione" : $"{Ispezioni.Count} ispezioni"; protected override async Task OnInitializedAsync() { Ispezioni = await IspezioniService.GetAllIspezioniWithSchedeAsync(UserSession.User.Username); _loading = false; StateHasChanged(); } private void OnClickIspezione(Ispezione ispezione) { SteupDataService.InspectionPageState.Ispezione = ispezione; NavigationManager.NavigateTo("/ispezione"); } }