Import
This commit is contained in:
@ -3,6 +3,8 @@
|
|||||||
<component name="DataSourcePerFileMappings">
|
<component name="DataSourcePerFileMappings">
|
||||||
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
||||||
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console_1.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console_1.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
||||||
|
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console_2.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
||||||
|
<file url="file://$APPLICATION_CONFIG_DIR$/consoles/db/3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba/console_3.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
||||||
<file url="file://$PROJECT_DIR$/.idea/.idea.StandManager/.idea/queries/Query.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
<file url="file://$PROJECT_DIR$/.idea/.idea.StandManager/.idea/queries/Query.sql" value="3724eeb7-f7cc-4309-8bf7-54ce3ccd67ba" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -5,6 +5,10 @@ namespace StandManager.Domain.Entita;
|
|||||||
|
|
||||||
public class Destinazione : EntitaBase
|
public class Destinazione : EntitaBase
|
||||||
{
|
{
|
||||||
|
public Destinazione()
|
||||||
|
{
|
||||||
|
DataCreazione = DateTime.Now;
|
||||||
|
}
|
||||||
[ForeignKey(nameof(Cliente))]
|
[ForeignKey(nameof(Cliente))]
|
||||||
public Guid? ClienteId { get; set; }
|
public Guid? ClienteId { get; set; }
|
||||||
public Cliente Cliente { get; set; }
|
public Cliente Cliente { get; set; }
|
||||||
|
|||||||
@ -131,7 +131,8 @@
|
|||||||
<div class="d-flex align-items-center">
|
<div class="d-flex align-items-center">
|
||||||
<RadzenCheckBox class="form-check-input" @bind-Value="presaVisioneDatiPersonali" Name="presaVisioneDatiPersonali" TValue="bool" />
|
<RadzenCheckBox class="form-check-input" @bind-Value="presaVisioneDatiPersonali" Name="presaVisioneDatiPersonali" TValue="bool" />
|
||||||
<label class="rz-ms-2" for="presaVisioneDatiPersonali" style="cursor: pointer;">
|
<label class="rz-ms-2" for="presaVisioneDatiPersonali" style="cursor: pointer;">
|
||||||
Autorizzazione al trattamento dati* (<a href="https://www.gruppodac.eu/tutela-e-privacy/" target="_blank">leggi</a>)
|
Autorizzazione al trattamento dati*<br/>
|
||||||
|
I dati forniti saranno utilizzati esclusivamente per l’invio del biglietto. (<a href="https://www.gruppodac.eu/tutela-e-privacy/" target="_blank">leggi</a>)
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -151,6 +152,8 @@
|
|||||||
[Parameter] public InvitoEventoViewModel invito { get; set; }
|
[Parameter] public InvitoEventoViewModel invito { get; set; }
|
||||||
[Parameter] public bool hasCliente { get; set; }
|
[Parameter] public bool hasCliente { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public Func<object?, IscrizioneEvento, Task>? OnSubmitCompletedAsync { get; set; }
|
||||||
|
|
||||||
[SupplyParameterFromForm]
|
[SupplyParameterFromForm]
|
||||||
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
||||||
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
||||||
@ -210,8 +213,11 @@
|
|||||||
|
|
||||||
model = iscrizione.Map(model);
|
model = iscrizione.Map(model);
|
||||||
|
|
||||||
await _managerService.IscrizioneEventoService.Salva(model);
|
var saved = await _managerService.IscrizioneEventoService.Salva(model);
|
||||||
|
if (OnSubmitCompletedAsync is not null)
|
||||||
|
{
|
||||||
|
await OnSubmitCompletedAsync(this, saved);
|
||||||
|
}
|
||||||
_navManager.NavigateTo($"/Grazie");
|
_navManager.NavigateTo($"/Grazie");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -81,11 +81,11 @@
|
|||||||
includi: x => x.Include(i => i.Destinazioni).Include(y => y.Agente).Include(z => z.Capoarea),
|
includi: x => x.Include(i => i.Destinazioni).Include(y => y.Agente).Include(z => z.Capoarea),
|
||||||
solaLettura: false) ?? new Cliente();
|
solaLettura: false) ?? new Cliente();
|
||||||
|
|
||||||
clienteDb = await mapCliente(clienteDb, righeCliente, capoareaList, idClaim);
|
|
||||||
var codiceCapoarea = righeCliente.FirstOrDefault().CapoArea;
|
var codiceCapoarea = righeCliente.FirstOrDefault().CapoArea;
|
||||||
var codiceAgente = righeCliente.FirstOrDefault().Agente;
|
var codiceAgente = righeCliente.FirstOrDefault().Agente;
|
||||||
clienteDb.CapoareaId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceCapoarea))?.Id;
|
clienteDb.CapoareaId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceCapoarea))?.Id;
|
||||||
clienteDb.AgenteId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceAgente))?.Id;
|
clienteDb.AgenteId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceAgente))?.Id;
|
||||||
|
clienteDb = await mapCliente(clienteDb, righeCliente, capoareaList, idClaim);
|
||||||
await _managerService.ClienteService.Salva(clienteDb, idClaim);
|
await _managerService.ClienteService.Salva(clienteDb, idClaim);
|
||||||
counter += 1;
|
counter += 1;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
@using StandManager.Components.Layout
|
@using StandManager.Components.Layout
|
||||||
@using StandManager.Components.Widget
|
@using StandManager.Components.Widget
|
||||||
@using StandManager.Model
|
|
||||||
|
|
||||||
@page "/"
|
@page "/"
|
||||||
@page "/Registrazione"
|
@page "/Registrazione"
|
||||||
@ -91,7 +90,8 @@
|
|||||||
Body = string.Empty,
|
Body = string.Empty,
|
||||||
Sent = false,
|
Sent = false,
|
||||||
Subject = "Registrazione",
|
Subject = "Registrazione",
|
||||||
DataCreazione = DateTime.Now
|
DataCreazione = DateTime.Now,
|
||||||
|
Args = "Social"
|
||||||
};
|
};
|
||||||
await _managerService.MailQueueService.Salva(queue);
|
await _managerService.MailQueueService.Salva(queue);
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
@using StandManager.Components.Layout
|
@using StandManager.Components.Layout
|
||||||
@using System.Threading.Tasks
|
|
||||||
@using StandManager.Model
|
@using StandManager.Model
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
@page "/RegistrazioneInFiera"
|
@page "/registrazioneInFiera"
|
||||||
@layout PublicLayout
|
@layout PublicLayout
|
||||||
|
|
||||||
@rendermode InteractiveServer
|
@rendermode InteractiveServer
|
||||||
|
|||||||
83
StandManager/Components/Pages/RegistrazioneSocial.razor
Normal file
83
StandManager/Components/Pages/RegistrazioneSocial.razor
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Components.Layout
|
||||||
|
@using StandManager.Model
|
||||||
|
|
||||||
|
@page "/registrazione-campagna-socialmedia-dac-expo-tecnocom-2026"
|
||||||
|
@layout PublicLayout
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
<PageTitle>Iscrizione Evento</PageTitle>
|
||||||
|
<AppHeader ShowNavigation="false"/>
|
||||||
|
|
||||||
|
<div class="container my-5 py-3">
|
||||||
|
<Component_Registrazione
|
||||||
|
invito="invito"
|
||||||
|
hasCliente="hasCliente"
|
||||||
|
@ref="registrazione"
|
||||||
|
OnSubmitCompletedAsync="@((sender, model) => onSubmitCompleted(model))"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<DacFooter />
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private bool showCodiceCliente { get; set; } = false;
|
||||||
|
private bool showForm { get; set; } = false;
|
||||||
|
private InvitoEventoViewModel invito { get; set; } = new InvitoEventoViewModel();
|
||||||
|
private Component_Registrazione registrazione { get; set; } = new();
|
||||||
|
private bool hasCliente { get; set; }
|
||||||
|
|
||||||
|
private string codiceFornito { get; set; }
|
||||||
|
|
||||||
|
private void onClienteToggleChanged(bool value)
|
||||||
|
{
|
||||||
|
if (!value)
|
||||||
|
{
|
||||||
|
hasCliente = false;
|
||||||
|
registrazione.NoCliente();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hasCliente = true;
|
||||||
|
registrazione.HasCliente();
|
||||||
|
}
|
||||||
|
|
||||||
|
showCodiceCliente = value;
|
||||||
|
showForm = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task onCodiceFornitoChanged(string text)
|
||||||
|
{
|
||||||
|
codiceFornito = text;
|
||||||
|
invito.CodiceFornito = codiceFornito;
|
||||||
|
|
||||||
|
var destinazione = (await _managerService.DestinazioneService.RicercaPer(
|
||||||
|
x => x.PartitaIva == codiceFornito || x.CodiceFiscale == codiceFornito || x.Rid == codiceFornito || x.Cliente.Rid == codiceFornito,
|
||||||
|
includi: x => x.Include(y => y.Cliente)));
|
||||||
|
|
||||||
|
if (destinazione != null)
|
||||||
|
{
|
||||||
|
invito.ClienteId = destinazione.ClienteId;
|
||||||
|
invito.DestinazioneId = destinazione.Id;
|
||||||
|
invito.CodiceFornito = codiceFornito;
|
||||||
|
invito.RagioneSociale = destinazione.Cliente?.RagioneSociale ?? string.Empty;
|
||||||
|
await registrazione.SetDatiCliente();
|
||||||
|
}
|
||||||
|
|
||||||
|
showForm = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task onSubmitCompleted(IscrizioneEvento model)
|
||||||
|
{
|
||||||
|
var queue = new MailQueue()
|
||||||
|
{
|
||||||
|
ToList = model.Email ?? string.Empty,
|
||||||
|
From = MailFrom.Registrazione,
|
||||||
|
Body = string.Empty,
|
||||||
|
Sent = false,
|
||||||
|
Subject = "Registrazione",
|
||||||
|
DataCreazione = DateTime.Now
|
||||||
|
};
|
||||||
|
await _managerService.MailQueueService.Salva(queue);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user