Pagina di ringraziamento
This commit is contained in:
@ -202,10 +202,19 @@
|
||||
_navManager.NavigateTo($"/Grazie");
|
||||
}
|
||||
|
||||
public void SetDatiCliente()
|
||||
public async Task SetDatiCliente()
|
||||
{
|
||||
iscrizione.DestinazioneId = invito.DestinazioneId;
|
||||
iscrizione.ClienteId = invito.ClienteId;
|
||||
iscrizione.RagioneSociale = invito.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();
|
||||
}
|
||||
|
||||
public void NoCliente()
|
||||
{
|
||||
destinazioniList = new List<DestinazioneViewModel>() { new DestinazioneViewModel() { RagioneSociale = "--Nessuna" } };
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,14 @@
|
||||
@page "/Grazie"
|
||||
@using StandManager.Components.Layout
|
||||
|
||||
@layout PublicLayout
|
||||
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<PageTitle>Grazie</PageTitle>
|
||||
|
||||
<div class="page page-center">
|
||||
<div class="container container-tight py-4">
|
||||
<div class="card card-md">
|
||||
@ -47,6 +55,6 @@
|
||||
@code {
|
||||
private void goToHome()
|
||||
{
|
||||
Navigation.NavigateTo("/");
|
||||
_navManager.NavigateTo("/");
|
||||
}
|
||||
}
|
||||
@ -60,8 +60,10 @@
|
||||
|
||||
private void onClienteToggleChanged(bool value)
|
||||
{
|
||||
showCodiceCliente = value;
|
||||
if (!value)
|
||||
registrazione.NoCliente();
|
||||
|
||||
showCodiceCliente = value;
|
||||
showForm = true;
|
||||
}
|
||||
|
||||
@ -80,7 +82,7 @@
|
||||
invito.DestinazioneId = destinazione.Id;
|
||||
invito.CodiceFornito = codiceFornito;
|
||||
invito.RagioneSociale = destinazione.Cliente?.RagioneSociale ?? string.Empty;
|
||||
registrazione.SetDatiCliente();
|
||||
await registrazione.SetDatiCliente();
|
||||
}
|
||||
|
||||
showForm = true;
|
||||
|
||||
Reference in New Issue
Block a user