UI
This commit is contained in:
@ -109,7 +109,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 mb-3">
|
<div class="col-6 mb-3">
|
||||||
<RadzenFormField Text="Giorno presenza" Variant="Variant.Flat" Style="width: 100%;">
|
<RadzenFormField Text="Giorno presenza" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
<RadzenDatePicker @bind-Value=@iscrizione.GiornoPresenza Name="GiornoPresenza" ShowCalendarWeek ShowTime="false" DateFormat="dd/MM/yyyy" />
|
<RadzenDatePicker @bind-Value=@iscrizione.GiornoPresenza Name="GiornoPresenza" ShowCalendarWeek ShowTime="false"
|
||||||
|
DateFormat="dd/MM/yyyy" Min="inizioEvento" Max="fineEvento" InitialViewDate="inizioEvento" />
|
||||||
</RadzenFormField>
|
</RadzenFormField>
|
||||||
<ValidationMessage For="@(() => iscrizione.GiornoPresenza)" />
|
<ValidationMessage For="@(() => iscrizione.GiornoPresenza)" />
|
||||||
</div>
|
</div>
|
||||||
@ -165,6 +166,9 @@
|
|||||||
private bool presaVisionePrivacy { get; set; }
|
private bool presaVisionePrivacy { get; set; }
|
||||||
private bool presaVisioneDatiPersonali { get; set; }
|
private bool presaVisioneDatiPersonali { get; set; }
|
||||||
|
|
||||||
|
private DateTime inizioEvento { get; set; }
|
||||||
|
private DateTime fineEvento { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
base.OnInitializedAsync();
|
base.OnInitializedAsync();
|
||||||
@ -180,6 +184,13 @@
|
|||||||
x => x.Eliminato == false,
|
x => x.Eliminato == false,
|
||||||
ordinamento: x => x.OrderBy(y => y.Provincia)))
|
ordinamento: x => x.OrderBy(y => y.Provincia)))
|
||||||
.Select(x => (ProvinciaViewModel)x).ToList();
|
.Select(x => (ProvinciaViewModel)x).ToList();
|
||||||
|
|
||||||
|
var evento = invito.EventoId.HasValue
|
||||||
|
? await _managerService.EventoService.RicercaPer(x => x.Id == invito.EventoId)
|
||||||
|
: (await _managerService.EventoService.RicercaQueryable(x => x.DataA > DateTime.Now,
|
||||||
|
ordinamento:y => y.OrderBy(z => z.DataA))).FirstOrDefault();
|
||||||
|
inizioEvento = evento?.DataDa ?? DateTime.Now.AddDays(-7);
|
||||||
|
fineEvento = evento?.DataA ?? DateTime.Now.AddDays(7);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task onIscrizioneSave()
|
private async Task onIscrizioneSave()
|
||||||
|
|||||||
@ -35,8 +35,8 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Property="@nameof(EventoViewModel.Id)" Filterable="false" Title="ID" Width="200px" TextAlign="TextAlign.Center" />
|
<RadzenDataGridColumn Property="@nameof(EventoViewModel.Id)" Filterable="false" Title="ID" Width="200px" TextAlign="TextAlign.Center" />
|
||||||
<RadzenDataGridColumn Property="@nameof(EventoViewModel.Titolo)" Title="Titolo" Width="250px" />
|
<RadzenDataGridColumn Property="@nameof(EventoViewModel.Titolo)" Title="Titolo" Width="250px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(EventoViewModel.DataDa)" Title="Dal" Width="250px" />
|
<RadzenDataGridColumn Property="@nameof(EventoViewModel.DataDa)" FormatString="{0:dd/MM/yyyy}" Title="Dal" Width="250px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(EventoViewModel.DataA)" Title="Al" Width="250px" />
|
<RadzenDataGridColumn Property="@nameof(EventoViewModel.DataA)" FormatString="{0:dd/MM/yyyy}" Title="Al" Width="250px" />
|
||||||
|
|
||||||
<RadzenDataGridColumn Context="evento" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
<RadzenDataGridColumn Context="evento" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
||||||
<Template Context="evento">
|
<Template Context="evento">
|
||||||
|
|||||||
Reference in New Issue
Block a user