- Lavoro su pagina IscrizioneEvento (Home.razor)
This commit is contained in:
@ -18,6 +18,8 @@
|
||||
<link href="/libs/Fontawesome/css/regular.min.css" rel="stylesheet" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
<RadzenTheme Theme="material" />
|
||||
|
||||
<link href="/app.css" rel="stylesheet" />
|
||||
<HeadOutlet />
|
||||
</head>
|
||||
|
||||
|
||||
@ -15,16 +15,18 @@
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<header class="navbar navbar-expand-lg navbar-transparent py-3">
|
||||
<div class="container">
|
||||
<div class="collapse navbar-collapse">
|
||||
<header class="navbar navbar-expand-lg navbar-transparent bg-red py-3" data-bs-theme="dark">
|
||||
<div class="container position-relative">
|
||||
|
||||
<img src="/Logo_dac.png" alt="Logo DAC" class="d-block mx-auto" style="height: 80px;" />
|
||||
|
||||
<div class="collapse navbar-collapse position-absolute end-0 top-50 translate-middle-y pe-3">
|
||||
<nav class="navbar-nav ms-auto">
|
||||
<div class="nav-item">
|
||||
<a class="nav-link" href="/management"><span class="nav-link-title">Management</span></a>
|
||||
<a class="nav-link text-white" href="/management"><span class="nav-link-title">Management</span></a>
|
||||
</div>
|
||||
|
||||
<div class="nav-item">
|
||||
<a class="nav-link" href="/scan"><span class="nav-link-title">Scansione</span></a>
|
||||
<a class="nav-link text-white" href="/scan"><span class="nav-link-title">Scansione</span></a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@ -33,12 +35,15 @@
|
||||
</Authorized>
|
||||
|
||||
<NotAuthorized>
|
||||
<header class="navbar navbar-expand-lg navbar-transparent py-3">
|
||||
<div class="container">
|
||||
<div class="collapse navbar-collapse">
|
||||
<header class="navbar navbar-expand-lg navbar-transparent bg-red py-3" data-bs-theme="dark">
|
||||
<div class="container position-relative">
|
||||
|
||||
<img src="/Logo_dac.png" alt="Logo DAC" class="d-block mx-auto" style="height: 80px;" />
|
||||
|
||||
<div class="collapse navbar-collapse position-absolute end-0 top-50 translate-middle-y pe-3">
|
||||
<nav class="navbar-nav ms-auto">
|
||||
<div class="nav-item">
|
||||
<a class="nav-link" href="/management"><span class="nav-link-title">Management</span></a>
|
||||
<a class="nav-link text-white" href="/management"><span class="nav-link-title">Management</span></a>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
@ -47,107 +52,201 @@
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
<header class="hero pb-0">
|
||||
<div class="container">
|
||||
@if (invitationId.HasValue && invito != null)
|
||||
<div class="container my-5 py-3">
|
||||
@if (invitationId.HasValue && invito != null)
|
||||
{
|
||||
@if (destinazioniList.Count() > 0)
|
||||
{
|
||||
<div class="mb-2">
|
||||
<h1 class="hero-title">Ciao @invito.Cliente.RagioneSociale - Sei stato invitato a: @invito.Evento.Titolo</h1>
|
||||
<p class="hero-description mt-4">
|
||||
L'evento si terrà dal @invito.Evento.DataDa.ToString("dd/MM/yyyy") al @invito.Evento.DataA.ToString("dd/MM/yyyy"), presso: @invito.Evento.Luogo
|
||||
</p>
|
||||
</div>
|
||||
<div class="row g-5 mb-3">
|
||||
<EditForm Model="iscrizione" OnValidSubmit="onIscrizioneSave" FormName="iscrizioneForm">
|
||||
<DataAnnotationsValidator />
|
||||
|
||||
@if (destinazioniList.Count() > 0)
|
||||
{
|
||||
<div class="row row-cards">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Compila le destinazioni mancanti
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Nome</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@iscrizione.Nome" />
|
||||
<ValidationMessage For="@(() => iscrizione.Nome)" />
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row g-5">
|
||||
<EditForm Model="iscrizione" OnValidSubmit="onIscrizioneSave" FormName="iscrizioneForm">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Cognome</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="Cognome" @bind-Value="@iscrizione.Cognome" />
|
||||
<ValidationMessage For="@(() => iscrizione.Cognome)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-8 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Destinazione</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.Destinazione" Style="width: 100%" TextProperty="RagioneSociale"
|
||||
Data="@destinazioniList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.Destinazione)" />
|
||||
</div>
|
||||
<div class="col-4 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Numero di partecipanti</RadzenText>
|
||||
<RadzenNumeric ShowUpDown="false" TValue="int" TextAlign="TextAlign.Right" Style="width: 100%" aria-label="Partecipanti" @bind-Value="@iscrizione.Partecipanti" />
|
||||
<ValidationMessage For="@(() => iscrizione.Partecipanti)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">E-mail</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@iscrizione.Email" />
|
||||
<ValidationMessage For="@(() => iscrizione.Email)" />
|
||||
</div>
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Telefono</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="NumeroTelefono" @bind-Value="@iscrizione.NumeroTelefono" />
|
||||
<ValidationMessage For="@(() => iscrizione.NumeroTelefono)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Note</RadzenText>
|
||||
<RadzenTextArea @bind-Value="@iscrizione.Note" Style="width: 100%;" Rows="3" />
|
||||
<ValidationMessage For="@(() => iscrizione.Note)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Comune</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.Comune" Style="width: 100%" TextProperty="" Placeholder="Seleziona il comune"
|
||||
Data="@comuneList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.Comune)" />
|
||||
</div>
|
||||
<div class="col-4 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Cap</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="Cap" @bind-Value="@iscrizione.Cap" />
|
||||
<ValidationMessage For="@(() => iscrizione.Cap)" />
|
||||
</div>
|
||||
<div class="col-4 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Provincia</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.Provincia" Style="width: 100%" TextProperty="" Placeholder="Seleziona la provincia"
|
||||
Data="@provinciaList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.Provincia)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3 mb-3">
|
||||
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||
Torna all'inserimento codice
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Salva
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Ragione Sociale</RadzenText>
|
||||
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@iscrizione.RagioneSociale" />
|
||||
<ValidationMessage For="@(() => iscrizione.RagioneSociale)" />
|
||||
</div>
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Tipologia</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.TipologiaInt" TValue="int?" Style="width: 100%" TextProperty="Description" ValueProperty="Key" Placeholder="Seleziona la tipologia"
|
||||
Data="@tipologiaList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.TipologiaInt)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Hai già avuto un'esperienza con DAC?</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.EsperienzaConDAC" Style="width: 100%" TextProperty="" Placeholder="Scegli dal menù"
|
||||
Data="@esperienzaList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.EsperienzaConDAC)" />
|
||||
</div>
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Ruolo</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.RuoloInt" TValue="int?" Style="width: 100%" TextProperty="Description" ValueProperty="Key" Placeholder="Seleziona il ruolo"
|
||||
Data="@ruoloList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.RuoloInt)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Destinazione</RadzenText>
|
||||
<RadzenDropDown @bind-Value="@iscrizione.Destinazione" Style="width: 100%" TextProperty="RagioneSociale" Placeholder="Seleziona la destinazione"
|
||||
Data="@destinazioniList" Size="ButtonSize.Small" />
|
||||
<ValidationMessage For="@(() => iscrizione.Destinazione)" />
|
||||
</div>
|
||||
<div class="col-6 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Numero di partecipanti</RadzenText>
|
||||
<RadzenNumeric ShowUpDown="false" TValue="int" TextAlign="TextAlign.Right" Style="width: 100%" aria-label="Partecipanti" @bind-Value="@iscrizione.Partecipanti" />
|
||||
<ValidationMessage For="@(() => iscrizione.Partecipanti)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Note</RadzenText>
|
||||
<RadzenTextArea @bind-Value="@iscrizione.Note" Style="width: 100%;" Rows="3" />
|
||||
<ValidationMessage For="@(() => iscrizione.Note)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6 mb-3">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<RadzenCheckBox class="form-check-input" @bind-Value=@iscrizione.PresaVisionePrivacy Name="PresaVisionePrivacy" TValue="bool" />
|
||||
<label class="rz-ms-2" for="PresaVisionePrivacy" style="cursor: pointer;">
|
||||
Presa visione dell'informativa Privacy* (<a href="/" target="_blank">leggi</a>)
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<RadzenCheckBox class="form-check-input" @bind-Value=@iscrizione.PresaVisioneDatiPersonali Name="PresaVisioneDatiPersonali" TValue="bool" />
|
||||
<label class="rz-ms-2" for="PresaVisioneDatiPersonali" style="cursor: pointer;">
|
||||
Autorizzazione al trattamento dati* (<a href="/" target="_blank">leggi</a>)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||
Torna all'inserimento codice
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<button type="submit" class="btn btn-danger w-100" disabled="@(!iscrizione.PresaVisionePrivacy || !iscrizione.PresaVisioneDatiPersonali)">
|
||||
Invia
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="text-danger mt-1">Non sono presenti destinazioni da compilare per questo evento!</div>
|
||||
}
|
||||
|
||||
</EditForm>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mb-2">
|
||||
<h1 class="hero-title">Iscriviti ad un evento, inserisci il tuo codice di invito</h1>
|
||||
</div>
|
||||
<div class="text-danger mt-1">Non sono presenti destinazioni da compilare per questo evento!</div>
|
||||
}
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-9 mb-3">
|
||||
<RadzenTextBox @bind-Value="@invitationCode" Placeholder="Inserirci il codice invito" Style="width: 100%;" />
|
||||
@if (!string.IsNullOrEmpty(invalidCode))
|
||||
{
|
||||
<div class="text-danger mt-1">@invalidCode</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<button type="button" class="btn btn-primary w-100" @onclick="reloadWithCode">
|
||||
Invia
|
||||
</button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="mb-2">
|
||||
<h1 class="hero-title">Iscriviti ad un evento, inserisci il tuo codice di invito</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row">
|
||||
<div class="col-9 mb-3">
|
||||
<RadzenTextBox @bind-Value="@invitationCode" Placeholder="Inserirci il codice invito" Style="width: 100%;" />
|
||||
@if (!string.IsNullOrEmpty(invalidCode))
|
||||
{
|
||||
<div class="text-danger mt-1">@invalidCode</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<button type="button" class="btn btn-danger w-100" @onclick="reloadWithCode">
|
||||
Invia
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<footer class="footer bg-red text-white">
|
||||
<div class="container-xl">
|
||||
<div class="row align-items-start">
|
||||
<h3><b>DAC S.p.A.</b></h3>
|
||||
<div class="col-4 text-left">
|
||||
C.F. / P. IVA: IT03038290171<br />
|
||||
Reg. Imp. di città n. 03038290171<br />
|
||||
R.E.A. n. BS-313463<br />
|
||||
Capitale Sociale € 3.000.000,00 i.v.<br />
|
||||
</div>
|
||||
<div class="col-4 text-left">
|
||||
<b><i class="fa-regular fa-map"></i> Sede legale e amministrativa</b><br />
|
||||
Via G.Marconi, n.15 - 25020 Flero (BS)<br />
|
||||
<b><i class="fa-solid fa-phone"></i> Tel. +39 030 256 8211</b><br />
|
||||
<b><i class="fa-regular fa-envelope"></i> info@gruppodac.eu</b>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-facebook"></i></a>
|
||||
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-instagram"></i></a>
|
||||
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-youtube"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
</footer>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public Guid? invitationId { get; set; }
|
||||
|
||||
@ -155,7 +254,12 @@
|
||||
|
||||
[SupplyParameterFromForm]
|
||||
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
||||
private IEnumerable<string> comuneList { get; set; }
|
||||
private IEnumerable<string> provinciaList { get; set; }
|
||||
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
||||
private IEnumerable<LookupViewModel<int>> tipologiaList { get; set; }
|
||||
private IEnumerable<string> esperienzaList { get; set; }
|
||||
private IEnumerable<LookupViewModel<int>> ruoloList { get; set; }
|
||||
|
||||
public string invitationCode { get; set; } = string.Empty;
|
||||
private string invalidCode = string.Empty;
|
||||
@ -172,8 +276,15 @@
|
||||
invalidCode = "Il codice inserito non risulta corretto";
|
||||
else
|
||||
{
|
||||
iscrizione.RagioneSociale = invito?.Cliente?.RagioneSociale ?? "";
|
||||
var destinazioniIds = invito.IscrizioniEvento?.Select(x => x.DestinazioneId).ToList() ?? new List<Guid?>();
|
||||
destinazioniList = (await _managerService.DestinazioneService.RicercaQueryable(filtro: x => x.ClienteId == invito.ClienteId && !destinazioniIds.Any(y => y == x.Id))).Select(x => (DestinazioneViewModel)x).ToList();
|
||||
comuneList = new List<string>() { "Brescia" };
|
||||
provinciaList = new List<string>() { "BS" };
|
||||
esperienzaList = new List<string>() { "Si", "No" };
|
||||
var eUtils = new EnumUtils();
|
||||
tipologiaList = eUtils.GetEnumList<ClienteTipo>();
|
||||
ruoloList = eUtils.GetEnumList<RuoloTipo>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -94,6 +94,10 @@
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Tipologia</RadzenText>
|
||||
<RadzenDropDown Style="width: 100%" TValue="int" @bind-Value=@cliente.TipologiaClienteInt Data=@tipologiaCliente TextProperty="Description" ValueProperty="Key" Name="tipologiaClienteDrop" />
|
||||
</div>
|
||||
<div class="col-3 mb-3">
|
||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Stato</RadzenText>
|
||||
<RadzenDropDown Style="width: 100%" TValue="int" @bind-Value=@cliente.StatoClienteInt Data=@statoCliente TextProperty="Description" ValueProperty="Key" Name="statoClienteDrop" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@ -171,6 +175,7 @@
|
||||
|
||||
private IEnumerable<UtenteViewModel> agenti { get; set; } = new List<UtenteViewModel>();
|
||||
private List<LookupViewModel<int>> tipologiaCliente { get; set; } = new List<LookupViewModel<int>>();
|
||||
private List<LookupViewModel<int>> statoCliente { get; set; } = new List<LookupViewModel<int>>();
|
||||
RadzenDataGrid<DestinazioneViewModel> destinazioniGrid;
|
||||
|
||||
private string pageTitle => cliente?.Id == Guid.Empty ? "Nuovo cliente" : "Modifica cliente";
|
||||
@ -193,6 +198,7 @@
|
||||
.Select(x => (UtenteViewModel)x).ToList();
|
||||
var eUtils = new EnumUtils();
|
||||
tipologiaCliente = eUtils.GetEnumList<ClienteTipo>();
|
||||
statoCliente = eUtils.GetEnumList<ClienteStato>();
|
||||
|
||||
if (ClienteId.GetValueOrDefault() != Guid.Empty)
|
||||
cliente = await _managerService.ClienteService.RicercaPer(x => x.Id == ClienteId, includi: x => x.Include(y => y.Agente).Include(y => y.Destinazioni).ThenInclude(z => z.Agente));
|
||||
|
||||
@ -23,6 +23,8 @@ public class ClienteViewModel
|
||||
public string Rid { get; set; }
|
||||
public ClienteTipo TipologiaCliente { get; set; }
|
||||
public int TipologiaClienteInt { get; set; }
|
||||
public ClienteStato StatoCliente { get; set; }
|
||||
public int StatoClienteInt { get; set; }
|
||||
|
||||
public static implicit operator ClienteViewModel(Cliente model)
|
||||
{
|
||||
@ -45,7 +47,9 @@ public class ClienteViewModel
|
||||
RagioneSociale = model.RagioneSociale,
|
||||
Rid = model.Rid,
|
||||
TipologiaCliente = model.TipologiaCliente,
|
||||
TipologiaClienteInt = (int)model.TipologiaCliente
|
||||
TipologiaClienteInt = (int)model.TipologiaCliente,
|
||||
StatoCliente = model.StatoCliente,
|
||||
StatoClienteInt = (int)model.StatoCliente
|
||||
};
|
||||
}
|
||||
|
||||
@ -60,7 +64,8 @@ public class ClienteViewModel
|
||||
model.EmailInvito = EmailInvito;
|
||||
model.NumeroTelefono = NumeroTelefono;
|
||||
model.Rid = Rid;
|
||||
model.TipologiaCliente = TipologiaCliente;
|
||||
model.TipologiaCliente = (ClienteTipo)TipologiaClienteInt;
|
||||
model.StatoCliente = (ClienteStato)StatoClienteInt;
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ public class IscrizioneEventoViewModel
|
||||
|
||||
[Required(ErrorMessage = "La destinazione è obbligatoria")]
|
||||
public DestinazioneViewModel Destinazione { get; set; }
|
||||
[Range(1, int.MaxValue, ErrorMessage = "Inserire un numero di partecipanti validi")]
|
||||
public int Partecipanti { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Le note sono obbligatorie")]
|
||||
@ -19,6 +20,34 @@ public class IscrizioneEventoViewModel
|
||||
public string QrCodeCode { get; set; }
|
||||
public bool ScanCompleto { get; set; }
|
||||
public DateTime? DataScan { get; set; }
|
||||
[Required(ErrorMessage = "Il nome è obbigatorio")]
|
||||
public string Nome { get; set; }
|
||||
[Required(ErrorMessage = "Il cognome è obbigatorio")]
|
||||
public string Cognome { get; set; }
|
||||
[Required(ErrorMessage = "La E-mail è obbigatoria")]
|
||||
public string Email { get; set; }
|
||||
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
|
||||
public string NumeroTelefono { get; set; }
|
||||
[Required(ErrorMessage = "La provincia è obbigatoria")]
|
||||
public string Provincia { get; set; }
|
||||
[Required(ErrorMessage = "Il comune è obbigatorio")]
|
||||
public string Comune { get; set; }
|
||||
[Required(ErrorMessage = "Il CAP è obbigatorio")]
|
||||
public string Cap { get; set; }
|
||||
[Required(ErrorMessage = "La Ragione Sociale è obbigatoria")]
|
||||
public string RagioneSociale { get; set; }
|
||||
[Required(ErrorMessage = "Il campo è obbigatorio")]
|
||||
public string EsperienzaConDAC { get; set; }
|
||||
|
||||
public ClienteTipo Tipologia { get; set; }
|
||||
[Required(ErrorMessage = "La tipologia è obbigatoria")]
|
||||
public int? TipologiaInt { get; set; }
|
||||
public RuoloTipo Ruolo { get; set; }
|
||||
[Required(ErrorMessage = "Il ruolo è obbigatorio")]
|
||||
public int? RuoloInt { get; set; }
|
||||
public bool PresaVisionePrivacy { get; set; }
|
||||
public bool PresaVisioneDatiPersonali { get; set; }
|
||||
|
||||
|
||||
public static implicit operator IscrizioneEventoViewModel(IscrizioneEvento model)
|
||||
{
|
||||
@ -35,7 +64,20 @@ public class IscrizioneEventoViewModel
|
||||
Note = model.Note,
|
||||
QrCodeCode = model.QrCodeCode,
|
||||
ScanCompleto = model.ScanCompleto,
|
||||
DataScan = model.DataScan
|
||||
DataScan = model.DataScan,
|
||||
Nome = model.Nome,
|
||||
Cognome = model.Cognome,
|
||||
Email = model.Email,
|
||||
NumeroTelefono = model.NumeroTelefono,
|
||||
Provincia = model.Provincia,
|
||||
Comune = model.Comune,
|
||||
Cap = model.Cap,
|
||||
RagioneSociale = model.RagioneSociale,
|
||||
EsperienzaConDAC = model.EsperienzaConDAC,
|
||||
Tipologia = model.Tipologia,
|
||||
TipologiaInt = (int)model.Tipologia,
|
||||
Ruolo = model.Ruolo,
|
||||
RuoloInt = (int)model.Ruolo,
|
||||
};
|
||||
}
|
||||
|
||||
@ -46,6 +88,17 @@ public class IscrizioneEventoViewModel
|
||||
model.QrCodeCode = QrCodeCode;
|
||||
model.ScanCompleto = ScanCompleto;
|
||||
model.DataScan = DataScan;
|
||||
model.Nome = Nome;
|
||||
model.Cognome = Cognome;
|
||||
model.Email = Email;
|
||||
model.NumeroTelefono = NumeroTelefono;
|
||||
model.Provincia = Provincia;
|
||||
model.Comune = Comune;
|
||||
model.Cap = Cap;
|
||||
model.RagioneSociale = RagioneSociale;
|
||||
model.EsperienzaConDAC = EsperienzaConDAC;
|
||||
model.Tipologia = (ClienteTipo)TipologiaInt;
|
||||
model.Ruolo = (RuoloTipo)RuoloInt;
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@ -42,9 +42,9 @@ h1:focus {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
.blazor-error-boundary::after {
|
||||
content: "An error has occurred."
|
||||
}
|
||||
|
||||
.darker-border-checkbox.form-check-input {
|
||||
border-color: #929292;
|
||||
|
||||
Reference in New Issue
Block a user