- FIX Destinazione visibile in RegistrazioneInFiera

This commit is contained in:
2026-01-22 12:47:27 +01:00
parent 8b5003ab05
commit 36dc2ad664
2 changed files with 10 additions and 4 deletions

View File

@ -149,6 +149,7 @@
@code { @code {
[Parameter] public InvitoEventoViewModel invito { get; set; } [Parameter] public InvitoEventoViewModel invito { get; set; }
[Parameter] public bool hasCliente { get; set; }
[SupplyParameterFromForm] [SupplyParameterFromForm]
private IscrizioneEventoViewModel iscrizione { get; set; } = new(); private IscrizioneEventoViewModel iscrizione { get; set; } = new();
@ -162,7 +163,6 @@
private bool presaVisionePrivacy { get; set; } private bool presaVisionePrivacy { get; set; }
private bool presaVisioneDatiPersonali { get; set; } private bool presaVisioneDatiPersonali { get; set; }
private bool hasCliente { get; set; }
private DateTime inizioEvento { get; set; } private DateTime inizioEvento { get; set; }
private DateTime fineEvento { get; set; } private DateTime fineEvento { get; set; }
@ -231,13 +231,12 @@
public void NoCliente() public void NoCliente()
{ {
destinazioniList = new List<DestinazioneViewModel>() { new() { RagioneSociale = "--Nessuna" } }; destinazioniList = new List<DestinazioneViewModel>() { new() { RagioneSociale = "--Nessuna" } };
hasCliente = false;
iscrizione.EsperienzaConDAC = "No"; iscrizione.EsperienzaConDAC = "No";
} }
public void HasCliente() public void HasCliente()
{ {
hasCliente = true; iscrizione.EsperienzaConDAC = "Si";
} }
private async Task onProvinciaChanged(object args) private async Task onProvinciaChanged(object args)

View File

@ -28,7 +28,7 @@
@if (showForm) @if (showForm)
{ {
<Component_Registrazione invito="invito" @ref="registrazione" /> <Component_Registrazione invito="invito" hasCliente="hasCliente" @ref="registrazione" />
} }
</div> </div>
@ -40,15 +40,22 @@
private bool showForm { get; set; } = false; private bool showForm { get; set; } = false;
private InvitoEventoViewModel invito { get; set; } = new InvitoEventoViewModel(); private InvitoEventoViewModel invito { get; set; } = new InvitoEventoViewModel();
private Component_Registrazione registrazione { get; set; } = new(); private Component_Registrazione registrazione { get; set; } = new();
private bool hasCliente { get; set; }
private string codiceFornito { get; set; } private string codiceFornito { get; set; }
private void onClienteToggleChanged(bool value) private void onClienteToggleChanged(bool value)
{ {
if (!value) if (!value)
{
hasCliente = false;
registrazione.NoCliente(); registrazione.NoCliente();
}
else else
{
hasCliente = true;
registrazione.HasCliente(); registrazione.HasCliente();
}
showCodiceCliente = value; showCodiceCliente = value;
showForm = true; showForm = true;