Cambiata visualizzazione calendario e aggiunto formAttività
This commit is contained in:
@@ -5,24 +5,42 @@
|
||||
@if (Back)
|
||||
{
|
||||
<div class="left-section">
|
||||
<MudButton StartIcon="@Icons.Material.Outlined.ArrowBackIosNew"
|
||||
<MudButton StartIcon="@(!Cancel ? Icons.Material.Outlined.ArrowBackIosNew : "")"
|
||||
OnClick="GoBack"
|
||||
Color="Color.Info"
|
||||
Style="text-transform: none"
|
||||
Variant="Variant.Text">@BackTo</MudButton>
|
||||
Variant="Variant.Text">
|
||||
@BackTo
|
||||
</MudButton>
|
||||
</div>
|
||||
}
|
||||
|
||||
<h3 class="page-title">@Title</h3>
|
||||
|
||||
<div class="right-section">
|
||||
@if (ShowFilter)
|
||||
@if (LabelSave.IsNullOrEmpty())
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.FilterAlt" Color="Color.Dark" />
|
||||
@if (ShowFilter)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Outlined.FilterAlt" Color="Color.Dark"/>
|
||||
}
|
||||
@if (ShowNotifications)
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Notifications" Color="Color.Dark"/>
|
||||
}
|
||||
@if (ShowCalendarToggle)
|
||||
{
|
||||
<MudIconButton OnClick="OnCalendarToggle" Icon="@Icons.Material.Filled.CalendarMonth" Color="Color.Dark"/>
|
||||
}
|
||||
}
|
||||
@if (ShowNotifications)
|
||||
else
|
||||
{
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Notifications" Color="Color.Dark" />
|
||||
<MudButton OnClick="OnSave"
|
||||
Color="Color.Info"
|
||||
Style="text-transform: none"
|
||||
Variant="Variant.Text">
|
||||
@LabelSave
|
||||
</MudButton>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,6 +53,19 @@
|
||||
[Parameter] public bool Back { get; set; }
|
||||
[Parameter] public string BackTo { get; set; } = "";
|
||||
|
||||
[Parameter] public bool Cancel { get; set; }
|
||||
[Parameter] public string? LabelSave { get; set; }
|
||||
[Parameter] public EventCallback OnSave { get; set; }
|
||||
|
||||
[Parameter] public bool ShowCalendarToggle { get; set; }
|
||||
[Parameter] public EventCallback OnCalendarToggle { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
Back = !Back ? !Back && Cancel : Back;
|
||||
BackTo = Cancel ? "Annulla" : BackTo;
|
||||
}
|
||||
|
||||
private async Task GoBack()
|
||||
{
|
||||
await JS.InvokeVoidAsync("goBack");
|
||||
|
||||
Reference in New Issue
Block a user