@page "/anagrafiche/{*Rest}" @page "/crm/{*Rest}" @page "/vendite/{*Rest}" @page "/acquisti/{*Rest}" @page "/magazzino/{*Rest}" @page "/contabilita/{*Rest}" @page "/scadenzario/{*Rest}" @page "/fatturazione-elettronica/{*Rest}" @page "/cespiti/{*Rest}" @page "/servizi/{*Rest}" @page "/canali/{*Rest}" @page "/report/{*Rest}" @page "/tabelle/{*Rest}" @page "/automazioni/{*Rest}" @page "/amministrazione/{*Rest}" @attribute [Authorize] @inject ShellSession Session @inject NavigationManager Navigation @* The menu shows every area the licence and the permissions allow (SPEC ยง10.2); the areas of later milestones land here, which says when they arrive and what they will hold. Each real page replaces its route as it is built. *@ @if (Area is null || !Session.CanSee(Area)) {

@T["Pages.AccessDenied.Title"]

@T["Pages.AccessDenied.Lead"]

@T["Common.BackHome"]
} else {

@Title

@(Area.Milestone is { } milestone ? T.Format("Pages.ComingSoon.Lead", milestone) : T["Pages.ComingSoon.LeadUnknown"])

@if (Area.Children.Count > 0) {

@T["Pages.ComingSoon.Areas"]

    @foreach (var child in Area.Children) {
  • @T[child.Key]
  • }
}
} @code { /// The rest of the address, after the area. [Parameter] public string? Rest { get; set; } private MenuItem? Area { get; set; } private MenuItem? Entry { get; set; } private string Title => Entry is null ? T["Pages.ComingSoon.Title"] : T[Entry.Key]; // A tab keeps its page alive and has one address, so the address is read once. /// protected override async Task OnInitializedAsync() { await Session.EnsureLoadedAsync(); var path = "/" + Navigation.ToBaseRelativePath(Navigation.Uri).Split('?', '#')[0]; Area = MenuCatalog.FindArea(path); Entry = MenuCatalog.Find(path); } }