Compare commits
26 Commits
a82e8b2263
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e8be72f3b | |||
| ea417dc09e | |||
| 616c72cd5a | |||
| 12f70764ab | |||
| 24ff7df14f | |||
| 64a626628c | |||
| 4c6c44ce6f | |||
| 8e4daf5f2e | |||
| 50c0562c3e | |||
| 8f98a1d70e | |||
| 896e44297d | |||
| 50ff4fb3d3 | |||
| c08e9325b4 | |||
| 1f87913904 | |||
| 39246b5d16 | |||
| 8c5fbdd194 | |||
| e5ea2c9d90 | |||
| 875396e6ee | |||
| d443ece2ca | |||
| 18e39cc6a1 | |||
| 8628025291 | |||
| 8a2046841e | |||
| 0fe46a52ce | |||
| 6db8c7b938 | |||
| 8e9402c2f8 | |||
| b288ceb48b |
1
.idea/.idea.StandManager/.idea/.name
generated
Normal file
1
.idea/.idea.StandManager/.idea/.name
generated
Normal file
@ -0,0 +1 @@
|
|||||||
|
StandManager
|
||||||
2
.idea/config/applicationhost.config
generated
2
.idea/config/applicationhost.config
generated
@ -156,7 +156,7 @@
|
|||||||
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
<virtualDirectoryDefaults allowSubDirConfig="true" />
|
||||||
<site name="StandManager" id="1">
|
<site name="StandManager" id="1">
|
||||||
<application path="/" applicationPool="StandManager AppPool">
|
<application path="/" applicationPool="StandManager AppPool">
|
||||||
<virtualDirectory path="/" physicalPath="C:\Users\g.vitari\Documents\Git\StandManager\StandManager" />
|
<virtualDirectory path="/" physicalPath="C:\Users\g.vitari\Documents\Git\StandManager_Locale\StandManager" />
|
||||||
</application>
|
</application>
|
||||||
<bindings>
|
<bindings>
|
||||||
<binding protocol="http" bindingInformation="*:21401:localhost" />
|
<binding protocol="http" bindingInformation="*:21401:localhost" />
|
||||||
|
|||||||
Binary file not shown.
@ -19,6 +19,10 @@ public class Cliente : EntitaBase
|
|||||||
public Guid? AgenteId { get; set; }
|
public Guid? AgenteId { get; set; }
|
||||||
public Utente Agente { get; set; }
|
public Utente Agente { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey(nameof(Capoarea))]
|
||||||
|
public Guid? CapoareaId { get; set; }
|
||||||
|
public Utente Capoarea { get; set; }
|
||||||
|
|
||||||
[InverseProperty(nameof(Destinazione.Cliente))]
|
[InverseProperty(nameof(Destinazione.Cliente))]
|
||||||
public List<Destinazione> Destinazioni { get; set; }
|
public List<Destinazione> Destinazioni { get; set; }
|
||||||
|
|
||||||
@ -27,6 +31,7 @@ public class Cliente : EntitaBase
|
|||||||
public Guid? TipologiaClienteId { get; set; }
|
public Guid? TipologiaClienteId { get; set; }
|
||||||
public TipologiaCliente TipologiaCliente { get; set; }
|
public TipologiaCliente TipologiaCliente { get; set; }
|
||||||
public ClienteStato StatoCliente { get; set; }
|
public ClienteStato StatoCliente { get; set; }
|
||||||
|
public string? TipologiaGestionale { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum ClienteStato
|
public enum ClienteStato
|
||||||
|
|||||||
13
StandManager.Domain/Entita/ComuneIstat.cs
Normal file
13
StandManager.Domain/Entita/ComuneIstat.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class ComuneIstat : EntitaBase
|
||||||
|
{
|
||||||
|
public string Istat { get; set; }
|
||||||
|
public string Comune { get; set; }
|
||||||
|
public string Regione { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
public string Prefisso { get; set; }
|
||||||
|
public string CodFisco { get; set; }
|
||||||
|
}
|
||||||
@ -12,6 +12,7 @@ public class Destinazione : EntitaBase
|
|||||||
public string PartitaIva { get; set; }
|
public string PartitaIva { get; set; }
|
||||||
public string? CodiceFiscale { get; set; }
|
public string? CodiceFiscale { get; set; }
|
||||||
public string? Cap { get; set; }
|
public string? Cap { get; set; }
|
||||||
|
public string? Provincia { get; set; }
|
||||||
public string? Citta { get; set; }
|
public string? Citta { get; set; }
|
||||||
public string? Indirizzo { get; set; }
|
public string? Indirizzo { get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
|
|||||||
22
StandManager.Domain/Entita/Feature.cs
Normal file
22
StandManager.Domain/Entita/Feature.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class Feature : EntitaBase
|
||||||
|
{
|
||||||
|
public string Nome { get; set; }
|
||||||
|
public string Descrizione { get; set; }
|
||||||
|
public int Ordinamento { get; set; }
|
||||||
|
public Sezione Sezione { get; set; }
|
||||||
|
public FeatureType Type { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum FeatureType
|
||||||
|
{
|
||||||
|
Any = -99,
|
||||||
|
Insert = 0,
|
||||||
|
Edit,
|
||||||
|
Delete,
|
||||||
|
Capoarea = 50,
|
||||||
|
AdminGlobal = 100
|
||||||
|
}
|
||||||
@ -15,4 +15,5 @@ public class InvitoEvento : EntitaBase
|
|||||||
|
|
||||||
[InverseProperty(nameof(IscrizioneEvento.InvitoEvento))]
|
[InverseProperty(nameof(IscrizioneEvento.InvitoEvento))]
|
||||||
public List<IscrizioneEvento> IscrizioniEvento { get; set; }
|
public List<IscrizioneEvento> IscrizioniEvento { get; set; }
|
||||||
|
public string CodiceFornito { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,15 +22,19 @@ public class IscrizioneEvento : EntitaBase
|
|||||||
public Guid? DestinazioneId { get; set; }
|
public Guid? DestinazioneId { get; set; }
|
||||||
public Destinazione Destinazione { get; set; }
|
public Destinazione Destinazione { get; set; }
|
||||||
public int Partecipanti{ get; set; }
|
public int Partecipanti{ get; set; }
|
||||||
public string Note{ get; set; }
|
public string? Note{ get; set; }
|
||||||
public bool ScanCompleto{ get; set; }
|
public bool ScanCompleto{ get; set; }
|
||||||
public DateTime? DataScan{ get; set; }
|
public DateTime? DataScan{ get; set; }
|
||||||
public string? Nome{ get; set; }
|
public string? Nome{ get; set; }
|
||||||
public string? Cognome{ get; set; }
|
public string? Cognome{ get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
public string? NumeroTelefono { get; set; }
|
public string? NumeroTelefono { get; set; }
|
||||||
public string? Provincia { get; set; }
|
[ForeignKey(nameof(Provincia))]
|
||||||
public string? Comune { get; set; }
|
public Guid? ProvinciaId { get; set; }
|
||||||
|
public ProvinciaIstat Provincia { get; set; }
|
||||||
|
[ForeignKey(nameof(Comune))]
|
||||||
|
public Guid? ComuneId { get; set; }
|
||||||
|
public ComuneIstat Comune { get; set; }
|
||||||
public string? Cap { get; set; }
|
public string? Cap { get; set; }
|
||||||
public string? RagioneSociale { get; set; }
|
public string? RagioneSociale { get; set; }
|
||||||
[ForeignKey(nameof(TipologiaCliente))]
|
[ForeignKey(nameof(TipologiaCliente))]
|
||||||
@ -38,6 +42,8 @@ public class IscrizioneEvento : EntitaBase
|
|||||||
public TipologiaCliente TipologiaCliente { get; set; }
|
public TipologiaCliente TipologiaCliente { get; set; }
|
||||||
public string? EsperienzaConDAC { get; set; }
|
public string? EsperienzaConDAC { get; set; }
|
||||||
public RuoloTipo Ruolo { get; set; }
|
public RuoloTipo Ruolo { get; set; }
|
||||||
|
public string? PartitaIva { get; set; }
|
||||||
|
public DateTime GiornoPresenza { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum RuoloTipo
|
public enum RuoloTipo
|
||||||
|
|||||||
14
StandManager.Domain/Entita/Permission.cs
Normal file
14
StandManager.Domain/Entita/Permission.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class Permission : EntitaBase
|
||||||
|
{
|
||||||
|
[ForeignKey(nameof(Ruolo))]
|
||||||
|
public Guid? RuoloId { get; set; }
|
||||||
|
public Ruolo Ruolo { get; set; }
|
||||||
|
[ForeignKey(nameof(Feature))]
|
||||||
|
public Guid IdFeature { get; set; }
|
||||||
|
public Feature Feature { get; set; }
|
||||||
|
}
|
||||||
9
StandManager.Domain/Entita/ProvinciaIstat.cs
Normal file
9
StandManager.Domain/Entita/ProvinciaIstat.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class ProvinciaIstat : EntitaBase
|
||||||
|
{
|
||||||
|
public string Sigla { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
}
|
||||||
@ -12,11 +12,11 @@ public class Referente : EntitaBase
|
|||||||
public string Cognome { get; set; }
|
public string Cognome { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string NumeroTelefono { get; set; }
|
public string NumeroTelefono { get; set; }
|
||||||
public Ruolo Ruolo { get; set; }
|
public RuoloReferente Ruolo { get; set; }
|
||||||
public string RuoloNote { get; set; }
|
public string RuoloNote { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Ruolo
|
public enum RuoloReferente
|
||||||
{
|
{
|
||||||
Ruolo1 = 0,
|
Ruolo1 = 0,
|
||||||
Ruolo2,
|
Ruolo2,
|
||||||
|
|||||||
19
StandManager.Domain/Entita/Ruolo.cs
Normal file
19
StandManager.Domain/Entita/Ruolo.cs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class Ruolo : EntitaBase
|
||||||
|
{
|
||||||
|
public Ruolo()
|
||||||
|
{
|
||||||
|
Nome = string.Empty;
|
||||||
|
}
|
||||||
|
public string Nome { get; set; }
|
||||||
|
|
||||||
|
[InverseProperty(nameof(Utente.Ruolo))]
|
||||||
|
public List<Utente> Utenti { get; set; }
|
||||||
|
|
||||||
|
[InverseProperty(nameof(Permission.Ruolo))]
|
||||||
|
public virtual List<Permission> Permessi { get; set; }
|
||||||
|
}
|
||||||
12
StandManager.Domain/Entita/Sezione.cs
Normal file
12
StandManager.Domain/Entita/Sezione.cs
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
public class Sezione : EntitaBase
|
||||||
|
{
|
||||||
|
public string Nome { get; set; }
|
||||||
|
public int Ordinamento { get; set; }
|
||||||
|
[InverseProperty(nameof(Feature.Sezione))]
|
||||||
|
public List<Feature> Features { get; set; }
|
||||||
|
}
|
||||||
@ -1,4 +1,5 @@
|
|||||||
using StandManager.Domain.Entita.Base;
|
using StandManager.Domain.Entita.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace StandManager.Domain.Entita;
|
namespace StandManager.Domain.Entita;
|
||||||
|
|
||||||
@ -16,6 +17,16 @@ public class Utente : EntitaBase
|
|||||||
public string Nome { get; set; }
|
public string Nome { get; set; }
|
||||||
public string Cognome { get; set; }
|
public string Cognome { get; set; }
|
||||||
public string? CodiceAgente { get; set; }
|
public string? CodiceAgente { get; set; }
|
||||||
|
[ForeignKey(nameof(Ruolo))]
|
||||||
|
public Guid? RuoloId { get; set; }
|
||||||
|
public Ruolo Ruolo { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey(nameof(Capoarea))]
|
||||||
|
public Guid? CapoareaId { get; set; }
|
||||||
|
public Utente Capoarea { get; set; }
|
||||||
|
public bool IsCapoarea { get; set; }
|
||||||
|
public string Info => $"{Nome} {Cognome}";
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{Nome} {Cognome}";
|
return $"{Nome} {Cognome}";
|
||||||
|
|||||||
@ -12,15 +12,19 @@ public class StandManagerDbContext : OAServiceContext
|
|||||||
|
|
||||||
|
|
||||||
public DbSet<Cliente> Cliente { get; set; }
|
public DbSet<Cliente> Cliente { get; set; }
|
||||||
|
public DbSet<ComuneIstat> ComuneIstat { get; set; }
|
||||||
public DbSet<Destinazione> Destinazione { get; set; }
|
public DbSet<Destinazione> Destinazione { get; set; }
|
||||||
public DbSet<Evento> Evento { get; set; }
|
public DbSet<Evento> Evento { get; set; }
|
||||||
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
||||||
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
||||||
|
public DbSet<Permission> Permission { get; set; }
|
||||||
|
public DbSet<ProvinciaIstat> Province { get; set; }
|
||||||
public DbSet<Referente> Referente { get; set; }
|
public DbSet<Referente> Referente { get; set; }
|
||||||
|
public DbSet<Ruolo> Ruolo { get; set; }
|
||||||
|
public DbSet<Sezione> Sezione { get; set; }
|
||||||
public DbSet<TipologiaCliente> TipologiaCliente { get; set; }
|
public DbSet<TipologiaCliente> TipologiaCliente { get; set; }
|
||||||
public DbSet<Utente> Utente { get; set; }
|
public DbSet<Utente> Utente { get; set; }
|
||||||
|
|
||||||
|
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
{
|
{
|
||||||
base.OnConfiguring(optionsBuilder);
|
base.OnConfiguring(optionsBuilder);
|
||||||
@ -29,6 +33,5 @@ public class StandManagerDbContext : OAServiceContext
|
|||||||
{
|
{
|
||||||
optionsBuilder.UseSqlServer("Data Source=192.168.0.233\\SQL2019;Initial Catalog=DAC_StandManager;Persist Security Info=True;User ID=dac_user;Password=KZ4ZrUPzJV;TrustServerCertificate=True");
|
optionsBuilder.UseSqlServer("Data Source=192.168.0.233\\SQL2019;Initial Catalog=DAC_StandManager;Persist Security Info=True;User ID=dac_user;Password=KZ4ZrUPzJV;TrustServerCertificate=True");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
734
StandManager.Infrastructure/Migrations/20251215161117_PartitaIvaGiorniPresenza.Designer.cs
generated
Normal file
734
StandManager.Infrastructure/Migrations/20251215161117_PartitaIvaGiorniPresenza.Designer.cs
generated
Normal file
@ -0,0 +1,734 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using StandManager.Infrastructure.DAL.Context;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(StandManagerDbContext))]
|
||||||
|
[Migration("20251215161117_PartitaIvaGiorniPresenza")]
|
||||||
|
partial class PartitaIvaGiorniPresenza
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "9.0.11")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("StatoCliente")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("Cliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFiscale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Destinazione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Luogo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailInvito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailIscrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Titolo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Evento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("InvitoEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataScan")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EsperienzaConDAC")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenzaAl")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenzaDal")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("InvitoEventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Partecipanti")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("ScanCompleto")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("IscrizioneEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RuoloNote")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Referente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("TipologiaCliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceAgente")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Username")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Utente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany("Destinazioni")
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.InvitoEvento", "InvitoEvento")
|
||||||
|
.WithMany("IscrizioniEvento")
|
||||||
|
.HasForeignKey("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("InvitoEvento");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany("Referenti")
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Destinazioni");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Referenti");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("IscrizioniEvento");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class PartitaIvaGiorniPresenza : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Note",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "GiornoPresenzaAl",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "GiornoPresenzaDal",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PartitaIva",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GiornoPresenzaAl",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GiornoPresenzaDal",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PartitaIva",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Note",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "nvarchar(max)",
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
738
StandManager.Infrastructure/Migrations/20251216085742_CodiceInvito.Designer.cs
generated
Normal file
738
StandManager.Infrastructure/Migrations/20251216085742_CodiceInvito.Designer.cs
generated
Normal file
@ -0,0 +1,738 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using StandManager.Infrastructure.DAL.Context;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(StandManagerDbContext))]
|
||||||
|
[Migration("20251216085742_CodiceInvito")]
|
||||||
|
partial class CodiceInvito
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "9.0.11")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("StatoCliente")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("Cliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFiscale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Destinazione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Luogo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailInvito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailIscrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Titolo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Evento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFornito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("InvitoEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataScan")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EsperienzaConDAC")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenzaAl")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenzaDal")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("InvitoEventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Partecipanti")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("ScanCompleto")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("IscrizioneEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RuoloNote")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Referente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("TipologiaCliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceAgente")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Username")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Utente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany("Destinazioni")
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.InvitoEvento", "InvitoEvento")
|
||||||
|
.WithMany("IscrizioniEvento")
|
||||||
|
.HasForeignKey("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("InvitoEvento");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany("Referenti")
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Destinazioni");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Referenti");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("IscrizioniEvento");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class CodiceInvito : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "CodiceFornito",
|
||||||
|
table: "InvitoEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CodiceFornito",
|
||||||
|
table: "InvitoEvento");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
735
StandManager.Infrastructure/Migrations/20251216092931_RinominatoGiornoPresenza.Designer.cs
generated
Normal file
735
StandManager.Infrastructure/Migrations/20251216092931_RinominatoGiornoPresenza.Designer.cs
generated
Normal file
@ -0,0 +1,735 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using StandManager.Infrastructure.DAL.Context;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(StandManagerDbContext))]
|
||||||
|
[Migration("20251216092931_RinominatoGiornoPresenza")]
|
||||||
|
partial class RinominatoGiornoPresenza
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "9.0.11")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||||
|
|
||||||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("StatoCliente")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("Cliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("AgenteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Citta")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFiscale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EmailInvito")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Indirizzo")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Rid")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Destinazione");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneA")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime>("IscrizioneDa")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Luogo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailInvito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("TemplateHtmlMailIscrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Titolo")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Evento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFornito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("InvitoEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cap")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataScan")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("EsperienzaConDAC")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("EventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenza")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("InvitoEventoId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Note")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Partecipanti")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("PartitaIva")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("RagioneSociale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<bool>("ScanCompleto")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("EventoId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.ToTable("IscrizioneEvento");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<Guid?>("DestinazioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("NumeroTelefono")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ruolo")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<string>("RuoloNote")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Referente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("TipologiaCliente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceAgente")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Cognome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Password")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Username")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Utente");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany("Destinazioni")
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Evento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.IscrizioneEvento", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Evento", "Evento")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("EventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.InvitoEvento", "InvitoEvento")
|
||||||
|
.WithMany("IscrizioniEvento")
|
||||||
|
.HasForeignKey("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("Evento");
|
||||||
|
|
||||||
|
b.Navigation("InvitoEvento");
|
||||||
|
|
||||||
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
|
.WithMany("Referenti")
|
||||||
|
.HasForeignKey("DestinazioneId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Cliente", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Destinazioni");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Referenti");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("IscrizioniEvento");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class RinominatoGiornoPresenza : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GiornoPresenzaAl",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "GiornoPresenzaDal",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
newName: "GiornoPresenza");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.RenameColumn(
|
||||||
|
name: "GiornoPresenza",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
newName: "GiornoPresenzaDal");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "GiornoPresenzaAl",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "datetime2",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1000
StandManager.Infrastructure/Migrations/20251217075552_AggiuntaPermessi.Designer.cs
generated
Normal file
1000
StandManager.Infrastructure/Migrations/20251217075552_AggiuntaPermessi.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,247 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AggiuntaPermessi : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "RuoloId",
|
||||||
|
table: "Utente",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Ruolo",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Nome = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Ruolo", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Ruolo_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Ruolo_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Sezione",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Nome = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Ordinamento = table.Column<int>(type: "int", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Sezione", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Sezione_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Sezione_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Feature",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Nome = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Descrizione = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Ordinamento = table.Column<int>(type: "int", nullable: false),
|
||||||
|
SezioneId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Type = table.Column<int>(type: "int", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Feature", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Feature_Sezione_SezioneId",
|
||||||
|
column: x => x.SezioneId,
|
||||||
|
principalTable: "Sezione",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Feature_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Feature_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Permission",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
RuoloId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdFeature = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Permission", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Permission_Feature_IdFeature",
|
||||||
|
column: x => x.IdFeature,
|
||||||
|
principalTable: "Feature",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Permission_Ruolo_RuoloId",
|
||||||
|
column: x => x.RuoloId,
|
||||||
|
principalTable: "Ruolo",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Permission_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Permission_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Utente_RuoloId",
|
||||||
|
table: "Utente",
|
||||||
|
column: "RuoloId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Feature_IdUtenteCreazione",
|
||||||
|
table: "Feature",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Feature_IdUtenteModifica",
|
||||||
|
table: "Feature",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Feature_SezioneId",
|
||||||
|
table: "Feature",
|
||||||
|
column: "SezioneId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Permission_IdFeature",
|
||||||
|
table: "Permission",
|
||||||
|
column: "IdFeature");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Permission_IdUtenteCreazione",
|
||||||
|
table: "Permission",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Permission_IdUtenteModifica",
|
||||||
|
table: "Permission",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Permission_RuoloId",
|
||||||
|
table: "Permission",
|
||||||
|
column: "RuoloId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Ruolo_IdUtenteCreazione",
|
||||||
|
table: "Ruolo",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Ruolo_IdUtenteModifica",
|
||||||
|
table: "Ruolo",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Sezione_IdUtenteCreazione",
|
||||||
|
table: "Sezione",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Sezione_IdUtenteModifica",
|
||||||
|
table: "Sezione",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Utente_Ruolo_RuoloId",
|
||||||
|
table: "Utente",
|
||||||
|
column: "RuoloId",
|
||||||
|
principalTable: "Ruolo",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Utente_Ruolo_RuoloId",
|
||||||
|
table: "Utente");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Permission");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Feature");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Ruolo");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Sezione");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Utente_RuoloId",
|
||||||
|
table: "Utente");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "RuoloId",
|
||||||
|
table: "Utente");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1022
StandManager.Infrastructure/Migrations/20251217125158_Capoarea.Designer.cs
generated
Normal file
1022
StandManager.Infrastructure/Migrations/20251217125158_Capoarea.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class Capoarea : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "CapoareaId",
|
||||||
|
table: "Utente",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "CapoareaId",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Utente_CapoareaId",
|
||||||
|
table: "Utente",
|
||||||
|
column: "CapoareaId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Cliente_CapoareaId",
|
||||||
|
table: "Cliente",
|
||||||
|
column: "CapoareaId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Cliente_Utente_CapoareaId",
|
||||||
|
table: "Cliente",
|
||||||
|
column: "CapoareaId",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Utente_Utente_CapoareaId",
|
||||||
|
table: "Utente",
|
||||||
|
column: "CapoareaId",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Cliente_Utente_CapoareaId",
|
||||||
|
table: "Cliente");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Utente_Utente_CapoareaId",
|
||||||
|
table: "Utente");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Utente_CapoareaId",
|
||||||
|
table: "Utente");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Cliente_CapoareaId",
|
||||||
|
table: "Cliente");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CapoareaId",
|
||||||
|
table: "Utente");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CapoareaId",
|
||||||
|
table: "Cliente");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1025
StandManager.Infrastructure/Migrations/20251218104848_ClienteTipologiaGestionale.Designer.cs
generated
Normal file
1025
StandManager.Infrastructure/Migrations/20251218104848_ClienteTipologiaGestionale.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ClienteTipologiaGestionale : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "TipologiaGestionale",
|
||||||
|
table: "Cliente",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TipologiaGestionale",
|
||||||
|
table: "Cliente");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1028
StandManager.Infrastructure/Migrations/20251219074430_UtenteECapoarea.Designer.cs
generated
Normal file
1028
StandManager.Infrastructure/Migrations/20251219074430_UtenteECapoarea.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class UtenteECapoarea : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "IsCapoarea",
|
||||||
|
table: "Utente",
|
||||||
|
type: "bit",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "IsCapoarea",
|
||||||
|
table: "Utente");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1097
StandManager.Infrastructure/Migrations/20251219093752_ComuneIstat.Designer.cs
generated
Normal file
1097
StandManager.Infrastructure/Migrations/20251219093752_ComuneIstat.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,64 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ComuneIstat : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "ComuneIstat",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Istat = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Comune = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Regione = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Provincia = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Prefisso = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
CodFisco = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_ComuneIstat", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ComuneIstat_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_ComuneIstat_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ComuneIstat_IdUtenteCreazione",
|
||||||
|
table: "ComuneIstat",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_ComuneIstat_IdUtenteModifica",
|
||||||
|
table: "ComuneIstat",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "ComuneIstat");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1150
StandManager.Infrastructure/Migrations/20251222142449_ProvinciaIstat.Designer.cs
generated
Normal file
1150
StandManager.Infrastructure/Migrations/20251222142449_ProvinciaIstat.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ProvinciaIstat : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Provincie",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
|
Sigla = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
Provincia = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
|
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
Eliminato = table.Column<bool>(type: "bit", nullable: false),
|
||||||
|
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
|
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Provincie", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||||
|
column: x => x.IdUtenteCreazione,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||||
|
column: x => x.IdUtenteModifica,
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteCreazione",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteModifica",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteModifica");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Provincie");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1158
StandManager.Infrastructure/Migrations/20251222143554_ModificaProvSuIscrizione.Designer.cs
generated
Normal file
1158
StandManager.Infrastructure/Migrations/20251222143554_ModificaProvSuIscrizione.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ModificaProvSuIscrizione : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Provincie",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1158
StandManager.Infrastructure/Migrations/20251222143749_RinominataEntita.Designer.cs
generated
Normal file
1158
StandManager.Infrastructure/Migrations/20251222143749_RinominataEntita.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class RinominataEntita : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_Provincie",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "Provincie",
|
||||||
|
newName: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteModifica",
|
||||||
|
table: "Province",
|
||||||
|
newName: "IX_Province_IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteCreazione",
|
||||||
|
table: "Province",
|
||||||
|
newName: "IX_Province_IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_Province",
|
||||||
|
table: "Province",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Province_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Province",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteCreazione",
|
||||||
|
table: "Province",
|
||||||
|
column: "IdUtenteCreazione",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteModifica",
|
||||||
|
table: "Province",
|
||||||
|
column: "IdUtenteModifica",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Province_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteCreazione",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteModifica",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_Province",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "Province",
|
||||||
|
newName: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Province_IdUtenteModifica",
|
||||||
|
table: "Provincie",
|
||||||
|
newName: "IX_Provincie_IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Province_IdUtenteCreazione",
|
||||||
|
table: "Provincie",
|
||||||
|
newName: "IX_Provincie_IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_Provincie",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Provincie",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteCreazione",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteModifica",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1166
StandManager.Infrastructure/Migrations/20251222160003_GuidComune.Designer.cs
generated
Normal file
1166
StandManager.Infrastructure/Migrations/20251222160003_GuidComune.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class GuidComune : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Comune",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ComuneId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ComuneId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ComuneId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_ComuneIstat_ComuneId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ComuneId",
|
||||||
|
principalTable: "ComuneIstat",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_ComuneIstat_ComuneId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ComuneId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ComuneId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Comune",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1169
StandManager.Infrastructure/Migrations/20251223132320_ProvinciaInDest.Designer.cs
generated
Normal file
1169
StandManager.Infrastructure/Migrations/20251223132320_ProvinciaInDest.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ProvinciaInDest : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "Destinazione",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "Destinazione");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -34,6 +34,9 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<string>("Cap")
|
b.Property<string>("Cap")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CapoareaId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Citta")
|
b.Property<string>("Citta")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
@ -81,10 +84,15 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<Guid?>("TipologiaClienteId")
|
b.Property<Guid?>("TipologiaClienteId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("TipologiaGestionale")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("AgenteId");
|
b.HasIndex("AgenteId");
|
||||||
|
|
||||||
|
b.HasIndex("CapoareaId");
|
||||||
|
|
||||||
b.HasIndex("IdUtenteCreazione");
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
b.HasIndex("IdUtenteModifica");
|
b.HasIndex("IdUtenteModifica");
|
||||||
@ -94,6 +102,60 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.ToTable("Cliente");
|
b.ToTable("Cliente");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.ComuneIstat", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodFisco")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Comune")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Istat")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Prefisso")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Regione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("ComuneIstat");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -146,6 +208,9 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("RagioneSociale")
|
b.Property<string>("RagioneSociale")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
@ -228,6 +293,55 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.ToTable("Evento");
|
b.ToTable("Evento");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Feature", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<string>("Descrizione")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.Property<Guid>("SezioneId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<int>("Type")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("SezioneId");
|
||||||
|
|
||||||
|
b.ToTable("Feature");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -237,6 +351,10 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<Guid?>("ClienteId")
|
b.Property<Guid?>("ClienteId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("CodiceFornito")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<DateTime>("DataCreazione")
|
b.Property<DateTime>("DataCreazione")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
@ -283,8 +401,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<string>("Cognome")
|
b.Property<string>("Cognome")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Comune")
|
b.Property<Guid?>("ComuneId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<DateTime>("DataCreazione")
|
b.Property<DateTime>("DataCreazione")
|
||||||
.HasColumnType("datetime2");
|
.HasColumnType("datetime2");
|
||||||
@ -310,6 +428,9 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<Guid?>("EventoId")
|
b.Property<Guid?>("EventoId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("GiornoPresenza")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
b.Property<Guid?>("IdUtenteCreazione")
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
@ -323,7 +444,6 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Note")
|
b.Property<string>("Note")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("NumeroTelefono")
|
b.Property<string>("NumeroTelefono")
|
||||||
@ -332,9 +452,12 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<int>("Partecipanti")
|
b.Property<int>("Partecipanti")
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Provincia")
|
b.Property<string>("PartitaIva")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("ProvinciaId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("RagioneSociale")
|
b.Property<string>("RagioneSociale")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
@ -351,6 +474,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.HasIndex("ClienteId");
|
b.HasIndex("ClienteId");
|
||||||
|
|
||||||
|
b.HasIndex("ComuneId");
|
||||||
|
|
||||||
b.HasIndex("DestinazioneId");
|
b.HasIndex("DestinazioneId");
|
||||||
|
|
||||||
b.HasIndex("EventoId");
|
b.HasIndex("EventoId");
|
||||||
@ -361,11 +486,91 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.HasIndex("InvitoEventoId");
|
b.HasIndex("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasIndex("ProvinciaId");
|
||||||
|
|
||||||
b.HasIndex("TipologiaClienteId");
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
b.ToTable("IscrizioneEvento");
|
b.ToTable("IscrizioneEvento");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Permission", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid>("IdFeature")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("RuoloId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdFeature");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("RuoloId");
|
||||||
|
|
||||||
|
b.ToTable("Permission");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Provincia")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<string>("Sigla")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Province");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -424,6 +629,77 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.ToTable("Referente");
|
b.ToTable("Referente");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Ruolo", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Ruolo");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Sezione", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<DateTime>("DataCreazione")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("DataModifica")
|
||||||
|
.HasColumnType("datetime2");
|
||||||
|
|
||||||
|
b.Property<bool>("Eliminato")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteCreazione")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("Nome")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("Ordinamento")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.ToTable("Sezione");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -464,6 +740,9 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.ValueGeneratedOnAdd()
|
.ValueGeneratedOnAdd()
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CapoareaId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("CodiceAgente")
|
b.Property<string>("CodiceAgente")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
@ -490,6 +769,9 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<Guid?>("IdUtenteModifica")
|
b.Property<Guid?>("IdUtenteModifica")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<bool>("IsCapoarea")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<string>("Nome")
|
b.Property<string>("Nome")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
@ -498,16 +780,23 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("RuoloId")
|
||||||
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("Username")
|
b.Property<string>("Username")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("CapoareaId");
|
||||||
|
|
||||||
b.HasIndex("IdUtenteCreazione");
|
b.HasIndex("IdUtenteCreazione");
|
||||||
|
|
||||||
b.HasIndex("IdUtenteModifica");
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasIndex("RuoloId");
|
||||||
|
|
||||||
b.ToTable("Utente");
|
b.ToTable("Utente");
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -517,6 +806,10 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("AgenteId");
|
.HasForeignKey("AgenteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CapoareaId");
|
||||||
|
|
||||||
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("IdUtenteCreazione");
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
@ -531,6 +824,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.Navigation("Agente");
|
b.Navigation("Agente");
|
||||||
|
|
||||||
|
b.Navigation("Capoarea");
|
||||||
|
|
||||||
b.Navigation("TipologiaCliente");
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
b.Navigation("UtenteCreazione");
|
b.Navigation("UtenteCreazione");
|
||||||
@ -538,6 +833,21 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.ComuneIstat", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Destinazione", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
b.HasOne("StandManager.Domain.Entita.Utente", "Agente")
|
||||||
@ -580,6 +890,29 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Feature", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Sezione", "Sezione")
|
||||||
|
.WithMany("Features")
|
||||||
|
.HasForeignKey("SezioneId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Navigation("Sezione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.InvitoEvento", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
b.HasOne("StandManager.Domain.Entita.Cliente", "Cliente")
|
||||||
@ -613,6 +946,10 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("ClienteId");
|
.HasForeignKey("ClienteId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.ComuneIstat", "Comune")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ComuneId");
|
||||||
|
|
||||||
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("DestinazioneId");
|
.HasForeignKey("DestinazioneId");
|
||||||
@ -633,18 +970,26 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.WithMany("IscrizioniEvento")
|
.WithMany("IscrizioniEvento")
|
||||||
.HasForeignKey("InvitoEventoId");
|
.HasForeignKey("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.ProvinciaIstat", "Provincia")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ProvinciaId");
|
||||||
|
|
||||||
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("TipologiaClienteId");
|
.HasForeignKey("TipologiaClienteId");
|
||||||
|
|
||||||
b.Navigation("Cliente");
|
b.Navigation("Cliente");
|
||||||
|
|
||||||
|
b.Navigation("Comune");
|
||||||
|
|
||||||
b.Navigation("Destinazione");
|
b.Navigation("Destinazione");
|
||||||
|
|
||||||
b.Navigation("Evento");
|
b.Navigation("Evento");
|
||||||
|
|
||||||
b.Navigation("InvitoEvento");
|
b.Navigation("InvitoEvento");
|
||||||
|
|
||||||
|
b.Navigation("Provincia");
|
||||||
|
|
||||||
b.Navigation("TipologiaCliente");
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
b.Navigation("UtenteCreazione");
|
b.Navigation("UtenteCreazione");
|
||||||
@ -652,6 +997,50 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Permission", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Feature", "Feature")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdFeature")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Ruolo", "Ruolo")
|
||||||
|
.WithMany("Permessi")
|
||||||
|
.HasForeignKey("RuoloId");
|
||||||
|
|
||||||
|
b.Navigation("Feature");
|
||||||
|
|
||||||
|
b.Navigation("Ruolo");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||||
@ -673,6 +1062,36 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Ruolo", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Sezione", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteModifica")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
|
b.Navigation("UtenteModifica");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.TipologiaCliente", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
@ -690,6 +1109,10 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Utente", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("CapoareaId");
|
||||||
|
|
||||||
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("IdUtenteCreazione");
|
.HasForeignKey("IdUtenteCreazione");
|
||||||
@ -698,6 +1121,14 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("IdUtenteModifica");
|
.HasForeignKey("IdUtenteModifica");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.Ruolo", "Ruolo")
|
||||||
|
.WithMany("Utenti")
|
||||||
|
.HasForeignKey("RuoloId");
|
||||||
|
|
||||||
|
b.Navigation("Capoarea");
|
||||||
|
|
||||||
|
b.Navigation("Ruolo");
|
||||||
|
|
||||||
b.Navigation("UtenteCreazione");
|
b.Navigation("UtenteCreazione");
|
||||||
|
|
||||||
b.Navigation("UtenteModifica");
|
b.Navigation("UtenteModifica");
|
||||||
@ -717,6 +1148,18 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
{
|
{
|
||||||
b.Navigation("IscrizioniEvento");
|
b.Navigation("IscrizioniEvento");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Ruolo", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Permessi");
|
||||||
|
|
||||||
|
b.Navigation("Utenti");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("StandManager.Domain.Entita.Sezione", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Features");
|
||||||
|
});
|
||||||
#pragma warning restore 612, 618
|
#pragma warning restore 612, 618
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
StandManager.Service/ComuneIstatService.cs
Normal file
16
StandManager.Service/ComuneIstatService.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class ComuneIstatService : TService<ComuneIstat>, IComuneIstatService
|
||||||
|
{
|
||||||
|
private readonly IStandManagerUnitOfWork _unitOfWork;
|
||||||
|
|
||||||
|
public ComuneIstatService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
_unitOfWork = unitOfWork;
|
||||||
|
}
|
||||||
|
}
|
||||||
13
StandManager.Service/FeatureService.cs
Normal file
13
StandManager.Service/FeatureService.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class FeatureService : TService<Feature>, IFeatureService
|
||||||
|
{
|
||||||
|
public FeatureService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
8
StandManager.Service/Interfaces/IComuneIstatService.cs
Normal file
8
StandManager.Service/Interfaces/IComuneIstatService.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IComuneIstatService : ITService<ComuneIstat>
|
||||||
|
{
|
||||||
|
}
|
||||||
9
StandManager.Service/Interfaces/IFeatureService.cs
Normal file
9
StandManager.Service/Interfaces/IFeatureService.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using OAService.Service.Repository;
|
||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IFeatureService : ITService<Feature>
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -3,11 +3,17 @@
|
|||||||
public interface IManagerService
|
public interface IManagerService
|
||||||
{
|
{
|
||||||
public IClienteService ClienteService{ get; set; }
|
public IClienteService ClienteService{ get; set; }
|
||||||
|
public IComuneIstatService ComuneIstatService { get; set; }
|
||||||
public IDestinazioneService DestinazioneService{ get; set; }
|
public IDestinazioneService DestinazioneService{ get; set; }
|
||||||
public IEventoService EventoService{ get; set; }
|
public IEventoService EventoService{ get; set; }
|
||||||
|
public IFeatureService FeatureService{ get; set; }
|
||||||
public IInvitoEventoService InvitoEventoService{ get; set; }
|
public IInvitoEventoService InvitoEventoService{ get; set; }
|
||||||
public IIscrizioneEventoService IscrizioneEventoService{ get; set; }
|
public IIscrizioneEventoService IscrizioneEventoService{ get; set; }
|
||||||
|
public IPermissionService PermissionService{ get; set; }
|
||||||
|
public IProvinciaIstatService ProvinciaIstatService{ get; set; }
|
||||||
public IReferenteService ReferenteService{ get; set; }
|
public IReferenteService ReferenteService{ get; set; }
|
||||||
|
public IRuoloService RuoloService{ get; set; }
|
||||||
|
public ISezioneService SezioneService{ get; set; }
|
||||||
public ITipologiaClienteService TipologiaClienteService { get; set; }
|
public ITipologiaClienteService TipologiaClienteService { get; set; }
|
||||||
public IUtenteService UtenteService { get; set; }
|
public IUtenteService UtenteService { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
9
StandManager.Service/Interfaces/IPermissionService.cs
Normal file
9
StandManager.Service/Interfaces/IPermissionService.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using OAService.Service.Repository;
|
||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IPermissionService : ITService<Permission>
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IProvinciaIstatService : ITService<ProvinciaIstat> {}
|
||||||
9
StandManager.Service/Interfaces/IRuoloService.cs
Normal file
9
StandManager.Service/Interfaces/IRuoloService.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using OAService.Service.Repository;
|
||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IRuoloService : ITService<Ruolo>
|
||||||
|
{
|
||||||
|
}
|
||||||
9
StandManager.Service/Interfaces/ISezioneService.cs
Normal file
9
StandManager.Service/Interfaces/ISezioneService.cs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
using OAService.Service.Repository;
|
||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface ISezioneService : ITService<Sezione>
|
||||||
|
{
|
||||||
|
}
|
||||||
@ -5,5 +5,5 @@ namespace StandManager.Service.Interfaces;
|
|||||||
|
|
||||||
public interface IUtenteService : ITService<Utente>
|
public interface IUtenteService : ITService<Utente>
|
||||||
{
|
{
|
||||||
|
Task<List<Utente>> ListaCapoarea();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,26 +4,39 @@ namespace StandManager.Service;
|
|||||||
|
|
||||||
public class ManagerService : IManagerService
|
public class ManagerService : IManagerService
|
||||||
{
|
{
|
||||||
public ManagerService(IUtenteService utenteService, IClienteService clienteService, IDestinazioneService destinazioneService, IEventoService eventoService,
|
public ManagerService(IUtenteService utenteService, IClienteService clienteService, IComuneIstatService comuneIstatService, IDestinazioneService destinazioneService,
|
||||||
IInvitoEventoService invitoEventoService, IIscrizioneEventoService iscrizioneEventoService, IReferenteService referenteService,
|
IEventoService eventoService, IInvitoEventoService invitoEventoService, IIscrizioneEventoService iscrizioneEventoService, IReferenteService referenteService,
|
||||||
ITipologiaClienteService tipologiaClienteService)
|
ITipologiaClienteService tipologiaClienteService, IFeatureService featureService, IPermissionService permissionService, IRuoloService ruoloService,
|
||||||
|
ISezioneService sezioneService, IProvinciaIstatService provinciaIstatService)
|
||||||
{
|
{
|
||||||
UtenteService = utenteService;
|
UtenteService = utenteService;
|
||||||
ClienteService = clienteService;
|
ClienteService = clienteService;
|
||||||
|
ComuneIstatService = comuneIstatService;
|
||||||
DestinazioneService = destinazioneService;
|
DestinazioneService = destinazioneService;
|
||||||
EventoService = eventoService;
|
EventoService = eventoService;
|
||||||
InvitoEventoService = invitoEventoService;
|
InvitoEventoService = invitoEventoService;
|
||||||
IscrizioneEventoService = iscrizioneEventoService;
|
IscrizioneEventoService = iscrizioneEventoService;
|
||||||
ReferenteService = referenteService;
|
ReferenteService = referenteService;
|
||||||
TipologiaClienteService = tipologiaClienteService;
|
TipologiaClienteService = tipologiaClienteService;
|
||||||
|
FeatureService = featureService;
|
||||||
|
PermissionService = permissionService;
|
||||||
|
RuoloService = ruoloService;
|
||||||
|
SezioneService = sezioneService;
|
||||||
|
ProvinciaIstatService = provinciaIstatService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUtenteService UtenteService { get; set; }
|
public IUtenteService UtenteService { get; set; }
|
||||||
public IClienteService ClienteService { get; set; }
|
public IClienteService ClienteService { get; set; }
|
||||||
public IDestinazioneService DestinazioneService { get; set; }
|
public IDestinazioneService DestinazioneService { get; set; }
|
||||||
public IEventoService EventoService { get; set; }
|
public IEventoService EventoService { get; set; }
|
||||||
|
public IFeatureService FeatureService { get; set; }
|
||||||
public IInvitoEventoService InvitoEventoService{ get; set; }
|
public IInvitoEventoService InvitoEventoService{ get; set; }
|
||||||
public IIscrizioneEventoService IscrizioneEventoService { get; set; }
|
public IIscrizioneEventoService IscrizioneEventoService { get; set; }
|
||||||
|
public IPermissionService PermissionService { get; set; }
|
||||||
|
public IProvinciaIstatService ProvinciaIstatService { get; set; }
|
||||||
public IReferenteService ReferenteService { get; set; }
|
public IReferenteService ReferenteService { get; set; }
|
||||||
|
public IRuoloService RuoloService { get; set; }
|
||||||
|
public ISezioneService SezioneService { get; set; }
|
||||||
public ITipologiaClienteService TipologiaClienteService { get; set; }
|
public ITipologiaClienteService TipologiaClienteService { get; set; }
|
||||||
|
public IComuneIstatService ComuneIstatService { get; set; }
|
||||||
}
|
}
|
||||||
13
StandManager.Service/PermissionService.cs
Normal file
13
StandManager.Service/PermissionService.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class PermissionService : TService<Permission>, IPermissionService
|
||||||
|
{
|
||||||
|
public PermissionService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
16
StandManager.Service/ProvinciaIstatService.cs
Normal file
16
StandManager.Service/ProvinciaIstatService.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class ProvinciaIstatService : TService<ProvinciaIstat>, IProvinciaIstatService
|
||||||
|
{
|
||||||
|
private readonly IStandManagerUnitOfWork _unitOfWork;
|
||||||
|
|
||||||
|
public ProvinciaIstatService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
_unitOfWork = unitOfWork;
|
||||||
|
}
|
||||||
|
}
|
||||||
13
StandManager.Service/RuoloService.cs
Normal file
13
StandManager.Service/RuoloService.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class RuoloService : TService<Ruolo>, IRuoloService
|
||||||
|
{
|
||||||
|
public RuoloService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
13
StandManager.Service/SezioneService.cs
Normal file
13
StandManager.Service/SezioneService.cs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class SezioneService : TService<Sezione>, ISezioneService
|
||||||
|
{
|
||||||
|
public SezioneService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
using OAService.Service.Repository;
|
using OAService.Service.Repository;
|
||||||
using OAService.Service.Servizi.Implementazioni;
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
using StandManager.Domain.Entita;
|
using StandManager.Domain.Entita;
|
||||||
@ -14,4 +15,13 @@ public class UtenteService : TService<Utente>, IUtenteService
|
|||||||
{
|
{
|
||||||
_unitOfWork = unitOfWork;
|
_unitOfWork = unitOfWork;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<Utente>> ListaCapoarea()
|
||||||
|
{
|
||||||
|
return (await _unitOfWork.UtenteRepository.RicercaQueryable(x => x.IsCapoarea, skip:0, take:0)).ToList();
|
||||||
|
/*return (await _unitOfWork.UtenteRepository.RicercaQueryable(x =>
|
||||||
|
x.Ruolo.Permessi.Any(y => y.Feature.Type == FeatureType.Capoarea || y.Feature.Type == FeatureType.AdminGlobal),
|
||||||
|
includi:x => x.Include(y => y.Ruolo).ThenInclude(z => z.Permessi).ThenInclude(u => u.Feature),
|
||||||
|
skip: 0, take: 0)).ToList();*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
StandManager/Components/AppHeader.razor
Normal file
23
StandManager/Components/AppHeader.razor
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
<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 text-white" href="/management"><span class="nav-link-title">Management</span></a>
|
||||||
|
</div>
|
||||||
|
<div class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/scan"><span class="nav-link-title">Scansione</span></a>
|
||||||
|
</div>
|
||||||
|
<div class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/registrazione"><span class="nav-link-title">Registrazione</span></a>
|
||||||
|
</div>
|
||||||
|
<div class="nav-item">
|
||||||
|
<a class="nav-link text-white" href="/activate-qr-scan"><span class="nav-link-title">ScanNew</span></a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
81
StandManager/Components/ClienteToggle.razor
Normal file
81
StandManager/Components/ClienteToggle.razor
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<div class="mb-4">
|
||||||
|
<!-- Etichetta Principale -->
|
||||||
|
<label class="form-label text-center mb-3 text-lg font-semibold" style="color: #1F2937; display: block;">
|
||||||
|
Sei già un nostro cliente?
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<!-- Contenitore Tabler SelectGroup -->
|
||||||
|
<div class="form-selectgroup form-selectgroup-boxes d-flex w-100" style="display: flex; gap: 1rem;">
|
||||||
|
|
||||||
|
<!-- Opzione SI -->
|
||||||
|
<label class="form-selectgroup-item flex-fill" style="flex: 1 1 auto;">
|
||||||
|
<input type="radio"
|
||||||
|
name="clientType"
|
||||||
|
value="true"
|
||||||
|
class="form-selectgroup-input"
|
||||||
|
checked="@(Value == true)"
|
||||||
|
@onchange="@(() => OnSelectionChange(true))" />
|
||||||
|
|
||||||
|
<!-- Label visuale: Applica bordo e sfondo rosso chiaro se selezionato -->
|
||||||
|
<span class="form-selectgroup-label d-flex align-items-center justify-content-center p-3 h-100 rounded-3"
|
||||||
|
style="@(Value == true ? "border-color: #D63939; color: #D63939; background-color: rgba(214, 57, 57, 0.05);" : "")">
|
||||||
|
|
||||||
|
<span class="me-3 d-flex align-items-center">
|
||||||
|
<!-- Icona: Rossa se attiva, grigia se inattiva -->
|
||||||
|
<span class="material-icons-round text-3xl"
|
||||||
|
style="font-size: 1.875rem; @(Value == true ? "color: #D63939;" : "color: #9CA3AF;")">
|
||||||
|
<RadzenIcon Icon="check_circle" />
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span class="d-block font-medium text-lg" style="@(Value == true ? "color: #111827;" : "color: #374151;")">
|
||||||
|
Sì
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<!-- Opzione NO -->
|
||||||
|
<label class="form-selectgroup-item flex-fill" style="flex: 1 1 auto;">
|
||||||
|
<input type="radio"
|
||||||
|
name="clientType"
|
||||||
|
value="false"
|
||||||
|
class="form-selectgroup-input"
|
||||||
|
checked="@(Value == false)"
|
||||||
|
@onchange="@(() => OnSelectionChange(false))" />
|
||||||
|
|
||||||
|
<span class="form-selectgroup-label d-flex align-items-center justify-content-center p-3 h-100 rounded-3"
|
||||||
|
style="@(Value == false ? "border-color: #D63939; color: #D63939; background-color: rgba(214, 57, 57, 0.05);" : "")">
|
||||||
|
|
||||||
|
<span class="me-3 d-flex align-items-center">
|
||||||
|
<span class="material-icons-round text-3xl"
|
||||||
|
style="font-size: 1.875rem; @(Value == false ? "color: #D63939;" : "color: #9CA3AF;")">
|
||||||
|
<RadzenIcon Icon="cancel" />
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span class="d-block font-medium text-lg" style="@(Value == false ? "color: #111827;" : "color: #374151;")">
|
||||||
|
No
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public bool? Value { get; set; }
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public EventCallback<bool> ValueChanged { get; set; }
|
||||||
|
|
||||||
|
private async Task OnSelectionChange(bool selection)
|
||||||
|
{
|
||||||
|
Value = selection;
|
||||||
|
await ValueChanged.InvokeAsync(Value ?? false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -43,40 +43,14 @@
|
|||||||
<div class="container-xl">
|
<div class="container-xl">
|
||||||
<div class="row flex-column flex-md-row flex-fill align-items-center">
|
<div class="row flex-column flex-md-row flex-fill align-items-center">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
||||||
<!-- BEGIN NAVBAR MENU -->
|
<!-- BEGIN NAVBAR MENU -->
|
||||||
<ul class="navbar-nav">
|
<ul class="navbar-nav">
|
||||||
<li class="nav-item @GetActiveClass("/management")">
|
<NavigationItem currentUrl="@currentUrl" requiredUrl="/management" destination="/management" iconName="fa-home" title="Home"/>
|
||||||
<a class="nav-link" href="/management">
|
<NavigationItem currentUrl="@currentUrl" requiredUrl="/management/Utenti" destination="/management/Utenti" iconName="fa-user" title="Utenti"/>
|
||||||
<span class="nav-link-icon d-md-none d-lg-inline-block">
|
<NavigationItem currentUrl="@currentUrl" requiredUrl="/management/Clienti" destination="/management/Clienti" iconName="fa-address-card" title="Clienti"/>
|
||||||
<i class="fa-solid fa-house"></i>
|
<NavigationItem currentUrl="@currentUrl" requiredUrl="/management/Eventi" destination="/management/Eventi" iconName="fa-calendar" title="Eventi"/>
|
||||||
</span>
|
<NavigationItem currentUrl="@currentUrl" requiredUrl="/management/Ruoli" destination="/management/Ruoli" iconName="fa-lock" title="Ruoli"/>
|
||||||
<span class="nav-link-title"> Home </span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item @GetActiveClass("/management/Utenti")">
|
|
||||||
<a class="nav-link" href="/management/Utenti">
|
|
||||||
<span class="nav-link-icon d-md-none d-lg-inline-block">
|
|
||||||
<i class="fa-solid fa-house"></i>
|
|
||||||
</span>
|
|
||||||
<span class="nav-link-title"> Utenti </span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item @GetActiveClass("/management/Clienti")">
|
|
||||||
<a class="nav-link" href="/management/Clienti">
|
|
||||||
<span class="nav-link-icon d-md-none d-lg-inline-block">
|
|
||||||
<i class="fa-solid fa-address-card"></i>
|
|
||||||
</span>
|
|
||||||
<span class="nav-link-title"> Clienti </span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item @GetActiveClass("/management/Eventi")">
|
|
||||||
<a class="nav-link" href="/management/Eventi">
|
|
||||||
<span class="nav-link-icon d-md-none d-lg-inline-block">
|
|
||||||
<i class="fa-solid fa-address-card"></i>
|
|
||||||
</span>
|
|
||||||
<span class="nav-link-title"> Eventi </span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -99,20 +73,4 @@
|
|||||||
base.OnInitializedAsync();
|
base.OnInitializedAsync();
|
||||||
currentUrl = NavManager.ToBaseRelativePath(NavManager.Uri);
|
currentUrl = NavManager.ToBaseRelativePath(NavManager.Uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetActiveClass(string href)
|
|
||||||
{
|
|
||||||
string currentClean = currentUrl.Split("management").Last();
|
|
||||||
string hrefClean = href.Split("management").Last();
|
|
||||||
|
|
||||||
|
|
||||||
if (currentClean.Contains("?"))
|
|
||||||
currentClean = currentClean.Substring(0, currentClean.IndexOf("?"));
|
|
||||||
|
|
||||||
var isActive = (currentClean.Contains(hrefClean, StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(hrefClean)
|
|
||||||
|| (string.IsNullOrEmpty(hrefClean) && string.IsNullOrEmpty(currentClean)));
|
|
||||||
|
|
||||||
return isActive ? "active" : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,94 +0,0 @@
|
|||||||
@implements IDisposable
|
|
||||||
|
|
||||||
@inject NavigationManager NavigationManager
|
|
||||||
|
|
||||||
<div class="top-row ps-3 navbar navbar-dark">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="">StandManager</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
|
|
||||||
|
|
||||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
|
||||||
<nav class="flex-column">
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
|
||||||
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="counter">
|
|
||||||
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="weather">
|
|
||||||
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="auth">
|
|
||||||
<span class="bi bi-lock-nav-menu" aria-hidden="true"></span> Auth Required
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<AuthorizeView>
|
|
||||||
<Authorized>
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="/Management">
|
|
||||||
<span class="bi bi-person-fill-nav-menu" aria-hidden="true"></span> @context.User.Identity?.Name
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<input type="hidden" name="ReturnUrl" value="@currentUrl" />
|
|
||||||
<button @onclick="onLogoutPressed" class="nav-link">
|
|
||||||
<span class="bi bi-arrow-bar-left-nav-menu" aria-hidden="true"></span> Logout
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</Authorized>
|
|
||||||
<NotAuthorized>
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="Account/Register">
|
|
||||||
<span class="bi bi-person-nav-menu" aria-hidden="true"></span> Register
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
<div class="nav-item px-3">
|
|
||||||
<NavLink class="nav-link" href="/management/login">
|
|
||||||
<span class="bi bi-person-badge-nav-menu" aria-hidden="true"></span> Login
|
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
</NotAuthorized>
|
|
||||||
</AuthorizeView>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@code {
|
|
||||||
private string? currentUrl;
|
|
||||||
|
|
||||||
protected override void OnInitialized()
|
|
||||||
{
|
|
||||||
currentUrl = NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
|
|
||||||
NavigationManager.LocationChanged += OnLocationChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnLocationChanged(object? sender, LocationChangedEventArgs e)
|
|
||||||
{
|
|
||||||
currentUrl = NavigationManager.ToBaseRelativePath(e.Location);
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Dispose()
|
|
||||||
{
|
|
||||||
NavigationManager.LocationChanged -= OnLocationChanged;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onLogoutPressed()
|
|
||||||
{
|
|
||||||
var a = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,125 +0,0 @@
|
|||||||
.navbar-toggler {
|
|
||||||
appearance: none;
|
|
||||||
cursor: pointer;
|
|
||||||
width: 3.5rem;
|
|
||||||
height: 2.5rem;
|
|
||||||
color: white;
|
|
||||||
position: absolute;
|
|
||||||
top: 0.5rem;
|
|
||||||
right: 1rem;
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggler:checked {
|
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
.top-row {
|
|
||||||
height: 3.5rem;
|
|
||||||
background-color: rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-brand {
|
|
||||||
font-size: 1.1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
width: 1.25rem;
|
|
||||||
height: 1.25rem;
|
|
||||||
margin-right: 0.75rem;
|
|
||||||
top: -1px;
|
|
||||||
background-size: cover;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-house-door-fill-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-plus-square-fill-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-list-nested-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-lock-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath d='M8 1a2 2 0 0 1 2 2v4H6V3a2 2 0 0 1 2-2zm3 6V3a3 3 0 0 0-6 0v4a2 2 0 0 0-2 2v5a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2zM5 8h6a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-person-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person' viewBox='0 0 16 16'%3E%3Cpath d='M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10Z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-person-badge-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person-badge' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3zM11 8a3 3 0 1 1-6 0 3 3 0 0 1 6 0z'/%3E%3Cpath d='M4.5 0A2.5 2.5 0 0 0 2 2.5V14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2.5A2.5 2.5 0 0 0 11.5 0h-7zM3 2.5A1.5 1.5 0 0 1 4.5 1h7A1.5 1.5 0 0 1 13 2.5v10.795a4.2 4.2 0 0 0-.776-.492C11.392 12.387 10.063 12 8 12s-3.392.387-4.224.803a4.2 4.2 0 0 0-.776.492V2.5z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-person-fill-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-person-fill' viewBox='0 0 16 16'%3E%3Cpath d='M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3Zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.bi-arrow-bar-left-nav-menu {
|
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-arrow-bar-left' viewBox='0 0 16 16'%3E%3Cpath d='M12.5 15a.5.5 0 0 1-.5-.5v-13a.5.5 0 0 1 1 0v13a.5.5 0 0 1-.5.5ZM10 8a.5.5 0 0 1-.5.5H3.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L3.707 7.5H9.5a.5.5 0 0 1 .5.5Z'/%3E%3C/svg%3E");
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
padding-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item:first-of-type {
|
|
||||||
padding-top: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item:last-of-type {
|
|
||||||
padding-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item ::deep .nav-link {
|
|
||||||
color: #d7d7d7;
|
|
||||||
background: none;
|
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
height: 3rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
line-height: 3rem;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item ::deep a.active {
|
|
||||||
background-color: rgba(255,255,255,0.37);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item ::deep .nav-link:hover {
|
|
||||||
background-color: rgba(255,255,255,0.1);
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-scrollable {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-toggler:checked ~ .nav-scrollable {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-width: 641px) {
|
|
||||||
.navbar-toggler {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-scrollable {
|
|
||||||
/* Never collapse the sidebar for wide screens */
|
|
||||||
display: block;
|
|
||||||
|
|
||||||
/* Allow sidebar to scroll for tall menus */
|
|
||||||
height: calc(100vh - 3.5rem);
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,5 +1,4 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
@using StandManager.Components.Pages.Management
|
|
||||||
|
|
||||||
@Body
|
@Body
|
||||||
|
|
||||||
|
|||||||
31
StandManager/Components/NavigationItem.razor
Normal file
31
StandManager/Components/NavigationItem.razor
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<li class="nav-item @GetActiveClass()">
|
||||||
|
<a class="nav-link" href="@destination">
|
||||||
|
<span class="nav-link-icon d-md-none d-lg-inline-block">
|
||||||
|
<i class="fa-solid @iconName"></i>
|
||||||
|
</span>
|
||||||
|
<span class="nav-link-title"> @title </span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
@code{
|
||||||
|
[Parameter] public string currentUrl { get; set; } = "";
|
||||||
|
[Parameter] public string requiredUrl { get; set; } = "/";
|
||||||
|
[Parameter] public string destination { get; set; } = "/";
|
||||||
|
[Parameter] public string iconName { get; set; } = "fa-user";
|
||||||
|
[Parameter] public string title { get; set; }
|
||||||
|
|
||||||
|
private string GetActiveClass()
|
||||||
|
{
|
||||||
|
var currentClean = currentUrl.Split("management").Last();
|
||||||
|
var hrefClean = requiredUrl.Split("management").Last();
|
||||||
|
|
||||||
|
if (currentClean.Contains("?"))
|
||||||
|
currentClean = currentClean.Substring(0, currentClean.IndexOf("?"));
|
||||||
|
|
||||||
|
var isActive = (currentClean.Contains(hrefClean, StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(hrefClean)
|
||||||
|
|| (string.IsNullOrEmpty(hrefClean) && string.IsNullOrEmpty(currentClean)));
|
||||||
|
|
||||||
|
return isActive ? "active" : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
@using StandManager.Infrastructure.DAL.Context
|
@using StandManager.Infrastructure.DAL.Context
|
||||||
@using StandManager.Model
|
@using StandManager.Model
|
||||||
@using System.Security.Claims
|
@using System.Security.Claims
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
@using StandManager.Service.Interfaces
|
@using StandManager.Service.Interfaces
|
||||||
|
|
||||||
@inject IHttpContextAccessor HttpContextAccessor
|
@inject IHttpContextAccessor HttpContextAccessor
|
||||||
@ -66,7 +67,8 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task HandleValidSubmit(EditContext args)
|
private async Task HandleValidSubmit(EditContext args)
|
||||||
{
|
{
|
||||||
var user = await _managerService.UtenteService.RicercaPer(x => x.Email == model.Email);
|
var user = await _managerService.UtenteService.RicercaPer(x => x.Email == model.Email,
|
||||||
|
includi:x => x.Include(y => y.Ruolo));
|
||||||
var hasher = new PasswordHasher<Utente>();
|
var hasher = new PasswordHasher<Utente>();
|
||||||
|
|
||||||
if (user == null ||
|
if (user == null ||
|
||||||
@ -81,7 +83,8 @@
|
|||||||
{
|
{
|
||||||
new Claim(ClaimTypes.Name, user.Email),
|
new Claim(ClaimTypes.Name, user.Email),
|
||||||
new Claim(ClaimTypes.Role, "Admin"),
|
new Claim(ClaimTypes.Role, "Admin"),
|
||||||
new Claim("UserId", user.Id.ToString())
|
new Claim("UserId", user.Id.ToString()),
|
||||||
|
new Claim("RoleId", user.RuoloId?.ToString())
|
||||||
};
|
};
|
||||||
|
|
||||||
var identity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
|
var identity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
|
|||||||
256
StandManager/Components/Pages/Component_Registrazione.razor
Normal file
256
StandManager/Components/Pages/Component_Registrazione.razor
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
@using StandManager.Model
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
<EditForm Model="iscrizione" OnValidSubmit="onIscrizioneSave" FormName="iscrizioneForm">
|
||||||
|
<DataAnnotationsValidator />
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Nome" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@iscrizione.Nome" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Nome)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Cognome" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Cognome" @bind-Value="@iscrizione.Cognome" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Cognome)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="E-mail" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@iscrizione.Email" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Email)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Telefono" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="NumeroTelefono" @bind-Value="@iscrizione.NumeroTelefono" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.NumeroTelefono)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<RadzenFormField Text="Provincia" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown TValue="Guid?" @bind-bind-Value="@iscrizione.Provincia" Change="@(args => onProvinciaChanged(args))" Style="width: 100%" TextProperty="Info" ValueProperty="Id" Placeholder="Seleziona la provincia"
|
||||||
|
Data="@provList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Provincia)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<RadzenFormField Text="CAP" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Cap" @bind-Value="@iscrizione.Cap" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Cap)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<RadzenFormField Text="Comune" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown TValue="Guid?" @bind-Value="@iscrizione.Comune" Style="width: 100%" TextProperty="Info" ValueProperty="Id" Placeholder="Seleziona il comune"
|
||||||
|
Data="@comuniList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Comune)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Ragione Sociale" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@iscrizione.RagioneSociale" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.RagioneSociale)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Tipologia" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown @bind-Value="@iscrizione.TipologiaClienteId" TValue="Guid ?" Style="width: 100%" TextProperty="Description" ValueProperty="Key" Placeholder="Seleziona la tipologia"
|
||||||
|
Data="@tipologiaList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.TipologiaClienteId)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Hai già avuto un'esperienza con DAC?" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown @bind-Value="@iscrizione.EsperienzaConDAC" Style="width: 100%" TextProperty="" Placeholder="Scegli dal menù"
|
||||||
|
Data="@esperienzaList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.EsperienzaConDAC)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Ruolo" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown @bind-Value="@iscrizione.RuoloInt" TValue="int?" Style="width: 100%" TextProperty="Description" ValueProperty="Key" Placeholder="Seleziona il ruolo"
|
||||||
|
Data="@ruoloList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.RuoloInt)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Destinazione" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDropDown @bind-Value="@iscrizione.DestinazioneId" TValue="Guid ?" Style="width: 100%" ValueProperty="Id" TextProperty="Info" Placeholder="Seleziona la destinazione"
|
||||||
|
Data="@destinazioniList" Size="ButtonSize.Small" />
|
||||||
|
</RadzenFormField>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Numero di partecipanti" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenNumeric ShowUpDown="false" TValue="int" TextAlign="TextAlign.Right" Style="width: 100%" aria-label="Partecipanti" @bind-Value="@iscrizione.Partecipanti" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.Partecipanti)" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Giorno presenza" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenDatePicker @bind-Value=@iscrizione.GiornoPresenza Name="GiornoPresenza" ShowCalendarWeek ShowTime="false"
|
||||||
|
DateFormat="dd/MM/yyyy" Min="inizioEvento" Max="fineEvento" InitialViewDate="inizioEvento" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<ValidationMessage For="@(() => iscrizione.GiornoPresenza)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<RadzenFormField Text="Note" Variant="Variant.Flat" Style="width: 100%; border: none !important; box-shadow: none !important; background-color: transparent !important;">
|
||||||
|
<RadzenTextArea @bind-Value="@iscrizione.Note" Style="width: 100%;" Rows="1" />
|
||||||
|
</RadzenFormField>
|
||||||
|
<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="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="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>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<button type="submit" class="btn btn-danger w-100" disabled="@(!presaVisionePrivacy || !presaVisioneDatiPersonali)">
|
||||||
|
Invia
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</EditForm>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public InvitoEventoViewModel invito { get; set; }
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
||||||
|
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
||||||
|
private IEnumerable<LookupViewModel<Guid>> tipologiaList { get; set; }
|
||||||
|
private IEnumerable<string> esperienzaList { get; set; }
|
||||||
|
private IEnumerable<LookupViewModel<int>> ruoloList { get; set; }
|
||||||
|
|
||||||
|
private List<ProvinciaViewModel> provList { get; set; }
|
||||||
|
private List<ComuneIstatViewModel> comuniList { get; set; }
|
||||||
|
|
||||||
|
private bool presaVisionePrivacy { get; set; }
|
||||||
|
private bool presaVisioneDatiPersonali { get; set; }
|
||||||
|
|
||||||
|
private DateTime inizioEvento { get; set; }
|
||||||
|
private DateTime fineEvento { get; set; }
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
base.OnInitializedAsync();
|
||||||
|
var eUtils = new EnumUtils();
|
||||||
|
|
||||||
|
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();
|
||||||
|
esperienzaList = new List<string>() { "Si", "No" };
|
||||||
|
tipologiaList = (await _managerService.TipologiaClienteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Nome)))
|
||||||
|
.Select(x => new LookupViewModel<Guid>(x.Id, x.Nome)).ToList();
|
||||||
|
ruoloList = eUtils.GetEnumList<RuoloTipo>();
|
||||||
|
provList = (await _managerService.ProvinciaIstatService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Provincia)))
|
||||||
|
.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()
|
||||||
|
{
|
||||||
|
var model = new IscrizioneEvento()
|
||||||
|
{
|
||||||
|
EventoId = invito.EventoId,
|
||||||
|
InvitoEventoId = invito.Id,
|
||||||
|
ClienteId = invito.ClienteId,
|
||||||
|
DestinazioneId = iscrizione.DestinazioneId,
|
||||||
|
TipologiaClienteId = iscrizione.TipologiaClienteId
|
||||||
|
};
|
||||||
|
|
||||||
|
if (invito.EventoId != Guid.Empty && iscrizione.DestinazioneId == Guid.Empty)
|
||||||
|
{
|
||||||
|
_dialogService.Alert("Selezionare una destinazione valida.", "Attenzione");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
model = iscrizione.Map(model);
|
||||||
|
|
||||||
|
await _managerService.IscrizioneEventoService.Salva(model);
|
||||||
|
|
||||||
|
_navManager.NavigateTo($"/Grazie");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task SetDatiCliente()
|
||||||
|
{
|
||||||
|
iscrizione.DestinazioneId = invito.DestinazioneId;
|
||||||
|
iscrizione.ClienteId = invito.ClienteId;
|
||||||
|
iscrizione.RagioneSociale = invito.RagioneSociale;
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
|
|
||||||
|
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" } };
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task onProvinciaChanged(object args)
|
||||||
|
{
|
||||||
|
Guid parsed;
|
||||||
|
var guidId = Guid.TryParse(args.ToString(), out parsed);
|
||||||
|
var prov = await _managerService.ProvinciaIstatService.RicercaPer(x => x.Id == parsed);
|
||||||
|
|
||||||
|
if (prov == null)
|
||||||
|
{
|
||||||
|
await _dialogService.Alert("La provincia indicata non è presente", "Errore", new ConfirmOptions() { OkButtonText = "Ok" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
iscrizione.Provincia = prov.Id;
|
||||||
|
iscrizione.Comune = null;
|
||||||
|
|
||||||
|
comuniList = (await _managerService.ComuneIstatService.RicercaQueryable(x => x.Provincia == prov.Sigla))
|
||||||
|
.Select(x => (ComuneIstatViewModel)x).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,15 +9,15 @@
|
|||||||
Capitale Sociale € 3.000.000,00 i.v.<br />
|
Capitale Sociale € 3.000.000,00 i.v.<br />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 text-left">
|
<div class="col-4 text-left">
|
||||||
<i class="fa-regular fa-map"></i><b> Sede legale e amministrativa</b><br />
|
<b><i class="fa-regular fa-map footer-icon"></i> Sede legale e amministrativa</b><br />
|
||||||
Via G.Marconi, n.15 - 25020 Flero (BS)<br />
|
Via G.Marconi, n.15 - 25020 Flero (BS)<br />
|
||||||
<i class="fa-solid fa-phone"></i><b> Tel. +39 030 256 8211</b><br />
|
<b><i class="fa-solid fa-phone footer-icon"></i> Tel. +39 030 256 8211</b><br />
|
||||||
<i class="fa-regular fa-envelope"></i><b> info@gruppodac.eu</b>
|
<b><i class="fa-regular fa-envelope footer-icon"></i> info@gruppodac.eu</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 text-center">
|
<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-facebook footer-icon"></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-instagram footer-icon"></i></a>
|
||||||
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-youtube"></i></a>
|
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-youtube footer-icon"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
60
StandManager/Components/Pages/Grazie.razor
Normal file
60
StandManager/Components/Pages/Grazie.razor
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
@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">
|
||||||
|
<div class="card-body text-center py-4 p-sm-5">
|
||||||
|
<div class="mb-4">
|
||||||
|
<!-- Icona Successo -->
|
||||||
|
<div class="avatar avatar-xl rounded-circle bg-primary-lt text-primary mb-2">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
|
||||||
|
<path d="M5 12l5 5l10 -10"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<h1 class="mt-2">Ti aspettiamo!</h1>
|
||||||
|
<p class="text-secondary">
|
||||||
|
Controlla la tua email per verificare di aver ricevuto il QR code di invito.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="hr-text hr-text-center hr-text-spaceless"></div>
|
||||||
|
<div class="card-body">
|
||||||
|
<button class="btn btn-primary w-100" @onclick="goToHome">
|
||||||
|
Torna alla home
|
||||||
|
</button>
|
||||||
|
<div class="text-center text-secondary mt-3">
|
||||||
|
<a href="#" class="text-secondary" style="text-decoration: none;">Hai bisogno d'aiuto?</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--tblr-primary: #D63939;
|
||||||
|
--tblr-primary-rgb: 214, 57, 57;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-primary-lt {
|
||||||
|
background-color: rgba(214, 57, 57, 0.1) !important;
|
||||||
|
color: #D63939 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private void goToHome()
|
||||||
|
{
|
||||||
|
_navManager.NavigateTo("/");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -15,23 +15,7 @@
|
|||||||
|
|
||||||
<AuthorizeView>
|
<AuthorizeView>
|
||||||
<Authorized>
|
<Authorized>
|
||||||
<header class="navbar navbar-expand-lg navbar-transparent bg-red py-3" data-bs-theme="dark">
|
<AppHeader />
|
||||||
<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 text-white" href="/management"><span class="nav-link-title">Management</span></a>
|
|
||||||
</div>
|
|
||||||
<div class="nav-item">
|
|
||||||
<a class="nav-link text-white" href="/scan"><span class="nav-link-title">Scansione</span></a>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
</Authorized>
|
</Authorized>
|
||||||
|
|
||||||
<NotAuthorized>
|
<NotAuthorized>
|
||||||
@ -57,138 +41,7 @@
|
|||||||
{
|
{
|
||||||
@if (destinazioniList.Count() > 0)
|
@if (destinazioniList.Count() > 0)
|
||||||
{
|
{
|
||||||
<div class="row g-5 mb-3">
|
<Component_Registrazione invito="invito" @ref="registrazione" />
|
||||||
<EditForm Model="iscrizione" OnValidSubmit="onIscrizioneSave" FormName="iscrizioneForm">
|
|
||||||
<DataAnnotationsValidator />
|
|
||||||
|
|
||||||
<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="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="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-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-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.TipologiaClienteId" TValue="Guid" Style="width: 100%" TextProperty="Description" ValueProperty="Key" Placeholder="Seleziona la tipologia"
|
|
||||||
Data="@tipologiaList" Size="ButtonSize.Small" />
|
|
||||||
<ValidationMessage For="@(() => iscrizione.TipologiaClienteId)" />
|
|
||||||
</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.DestinazioneId" Style="width: 100%" ValueProperty="Id" TextProperty="RagioneSociale" Placeholder="Seleziona la destinazione"
|
|
||||||
Data="@destinazioniList" Size="ButtonSize.Small" />
|
|
||||||
<ValidationMessage For="@(() => iscrizione.DestinazioneId)" />
|
|
||||||
</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>
|
|
||||||
</EditForm>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -212,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<button type="button" class="btn btn-danger w-100" @onclick="reloadWithCode">
|
<button type="button" class="btn btn-primary w-100" @onclick="reloadWithCode">
|
||||||
Invia
|
Invia
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -221,54 +74,63 @@
|
|||||||
}
|
}
|
||||||
</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 footer-icon"></i> Sede legale e amministrativa</b><br />
|
||||||
|
Via G.Marconi, n.15 - 25020 Flero (BS)<br />
|
||||||
|
<b><i class="fa-solid fa-phone footer-icon"></i> Tel. +39 030 256 8211</b><br />
|
||||||
|
<b><i class="fa-regular fa-envelope footer-icon"></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 footer-icon"></i></a>
|
||||||
|
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-instagram footer-icon"></i></a>
|
||||||
|
<a href="#" class="text-white mx-2 text-decoration-none" aria-label="Button"><i class="fa-brands fa-youtube footer-icon"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Guid? invitationId { get; set; }
|
public Guid? invitationId { get; set; }
|
||||||
|
|
||||||
private InvitoEvento invito { get; set; }
|
|
||||||
|
|
||||||
[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<Guid>> tipologiaList { get; set; }
|
|
||||||
private IEnumerable<string> esperienzaList { get; set; }
|
|
||||||
private IEnumerable<LookupViewModel<int>> ruoloList { get; set; }
|
|
||||||
|
|
||||||
public string invitationCode { get; set; } = string.Empty;
|
public string invitationCode { get; set; } = string.Empty;
|
||||||
|
private InvitoEventoViewModel invito { get; set; }
|
||||||
private string invalidCode = string.Empty;
|
private string invalidCode = string.Empty;
|
||||||
|
|
||||||
|
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
||||||
|
private Component_Registrazione registrazione { get; set; }
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
base.OnInitializedAsync();
|
base.OnInitializedAsync();
|
||||||
invito = invitationId.GetValueOrDefault() != Guid.Empty
|
var dbInvito = invitationId.GetValueOrDefault() != Guid.Empty
|
||||||
? await _managerService.InvitoEventoService.RicercaPer(x => x.Id == invitationId && x.Eliminato == false,
|
? await _managerService.InvitoEventoService.RicercaPer(x => x.Id == invitationId && x.Eliminato == false,
|
||||||
includi: x => x.Include(y => y.Evento).Include(y => y.Cliente).ThenInclude(y => y.Destinazioni).Include(y => y.IscrizioniEvento))
|
includi: x => x.Include(y => y.Evento).Include(y => y.Cliente).ThenInclude(y => y.Destinazioni).Include(y => y.IscrizioniEvento))
|
||||||
: new();
|
: new();
|
||||||
|
|
||||||
if (invito == null)
|
invito = dbInvito;
|
||||||
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 = (await _managerService.TipologiaClienteService.RicercaQueryable(x => x.Eliminato == false))
|
var destinazioniIds = invito.IscrizioniEvento?.Select(x => x.DestinazioneId).ToList() ?? new List<Guid?>();
|
||||||
.Select(x => new LookupViewModel<Guid>(x.Id, x.Nome)).ToList();
|
destinazioniList = (await _managerService.DestinazioneService.RicercaQueryable(filtro: x => x.ClienteId == invito.ClienteId && !destinazioniIds.Any(y => y == x.Id))).Select(x => (DestinazioneViewModel)x).ToList();
|
||||||
ruoloList = eUtils.GetEnumList<RuoloTipo>();
|
StateHasChanged();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (firstRender)
|
if (firstRender)
|
||||||
await BodyClass.SetBodyClass("body-marketing body-gradient");
|
await BodyClass.SetBodyClass("body-marketing body-gradient");
|
||||||
|
if (invito.Id != Guid.Empty && registrazione != null)
|
||||||
|
await registrazione.SetDatiCliente();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void reloadWithCode()
|
private void reloadWithCode()
|
||||||
@ -287,20 +149,4 @@
|
|||||||
{
|
{
|
||||||
_navManager.NavigateTo($"/");
|
_navManager.NavigateTo($"/");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task onIscrizioneSave()
|
|
||||||
{
|
|
||||||
var model = new IscrizioneEvento() {
|
|
||||||
EventoId = invito.EventoId,
|
|
||||||
InvitoEventoId = invito.Id,
|
|
||||||
ClienteId = invito.ClienteId,
|
|
||||||
DestinazioneId = iscrizione.DestinazioneId };
|
|
||||||
model = iscrizione.Map(model);
|
|
||||||
model.TipologiaCliente = await _managerService.TipologiaClienteService.RicercaPer(x => x.Id == iscrizione.TipologiaClienteId && x.Eliminato == false);
|
|
||||||
|
|
||||||
await _managerService.IscrizioneEventoService.Salva(model);
|
|
||||||
|
|
||||||
_navManager.NavigateTo($"/");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -57,7 +57,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Agente</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Agente</RadzenText>
|
||||||
<RadzenDropDown Style="width: 100%" TValue="Guid?" @bind-Value=@destinazione.AgenteId Data=@agenti TextProperty="Info" ValueProperty="Id" Name="agenteDestDrop" />
|
<RadzenDropDown Style="width: 100%" TValue="Guid ?" @bind-Value=@destinazione.AgenteId Data=@agenti TextProperty="Info" ValueProperty="Id" Name="agenteDestDrop" Disabled="@(!canSetAgente)" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -79,6 +79,8 @@
|
|||||||
@code {
|
@code {
|
||||||
[Parameter] public Guid destinazioneId { get; set; } = Guid.Empty;
|
[Parameter] public Guid destinazioneId { get; set; } = Guid.Empty;
|
||||||
[Parameter] public Guid clienteId { get; set; } = Guid.Empty;
|
[Parameter] public Guid clienteId { get; set; } = Guid.Empty;
|
||||||
|
[Parameter] public bool canSetAgente { get; set; } = false;
|
||||||
|
[Parameter] public Guid capoareaId { get; set; } = Guid.Empty;
|
||||||
private DestinazioneViewModel destinazione { get; set; } = new();
|
private DestinazioneViewModel destinazione { get; set; } = new();
|
||||||
|
|
||||||
private IEnumerable<UtenteViewModel> agenti { get; set; } = new List<UtenteViewModel>();
|
private IEnumerable<UtenteViewModel> agenti { get; set; } = new List<UtenteViewModel>();
|
||||||
@ -92,7 +94,7 @@
|
|||||||
{
|
{
|
||||||
base.OnInitializedAsync();
|
base.OnInitializedAsync();
|
||||||
|
|
||||||
agenti = (await _managerService.UtenteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
agenti = (await _managerService.UtenteService.RicercaQueryable(x => x.Eliminato == false && !x.IsCapoarea && x.CapoareaId == capoareaId, ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
||||||
.Select(x => (UtenteViewModel)x).ToList();
|
.Select(x => (UtenteViewModel)x).ToList();
|
||||||
|
|
||||||
destinazione = destinazioneId == Guid.Empty ? new() : await _managerService.DestinazioneService.RicercaPer(x => x.Id == destinazioneId,
|
destinazione = destinazioneId == Guid.Empty ? new() : await _managerService.DestinazioneService.RicercaPer(x => x.Id == destinazioneId,
|
||||||
|
|||||||
@ -25,6 +25,10 @@
|
|||||||
<div class="btn-list">
|
<div class="btn-list">
|
||||||
<RadzenUpload class="btn-5 d-none d-sm-inline-block" Change=@onUpload ChooseText="Importa da excel" />
|
<RadzenUpload class="btn-5 d-none d-sm-inline-block" Change=@onUpload ChooseText="Importa da excel" />
|
||||||
|
|
||||||
|
<RadzenUpload class="btn-5 d-none d-sm-inline-block" Change=@onUploadComuni ChooseText="Importa comuni da excel" />
|
||||||
|
|
||||||
|
<RadzenUpload class="btn-5 d-none d-sm-inline-block" Change=@onUploadProvince ChooseText="Importa province da excel" />
|
||||||
|
|
||||||
<a href="/management/Clienti/Modifica" class="btn btn-primary btn-5 d-none d-sm-inline-block">
|
<a href="/management/Clienti/Modifica" class="btn btn-primary btn-5 d-none d-sm-inline-block">
|
||||||
Nuovo cliente
|
Nuovo cliente
|
||||||
</a>
|
</a>
|
||||||
@ -37,10 +41,11 @@
|
|||||||
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
|
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
|
||||||
Data="@clienti" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single">
|
Data="@clienti" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single">
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Property="@nameof(ClienteViewModel.Id)" Filterable="false" Title="ID" Width="200px" TextAlign="TextAlign.Center" />
|
<RadzenDataGridColumn Property="@nameof(Cliente.Id)" Filterable="false" Title="ID" Width="200px" TextAlign="TextAlign.Center" />
|
||||||
<RadzenDataGridColumn Property="@nameof(ClienteViewModel.RagioneSociale)" Title="Ragione sociale" Width="250px" />
|
<RadzenDataGridColumn Property="@nameof(Cliente.RagioneSociale)" Title="Ragione sociale" Width="250px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(ClienteViewModel.PartitaIva)" Title="Partita IVA" Width="250px" />
|
<RadzenDataGridColumn Property="@nameof(Cliente.PartitaIva)" Title="Partita IVA" Width="250px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(ClienteViewModel.NomeAgente)" Title="Agente" Width="250px" />
|
<RadzenDataGridColumn Property="Agente.Info" Title="Agente" Width="250px" />
|
||||||
|
<RadzenDataGridColumn Property="Capoarea.Info" Title="Capoarea" Width="250px" />
|
||||||
|
|
||||||
<RadzenDataGridColumn Context="cliente" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
<RadzenDataGridColumn Context="cliente" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
||||||
<Template Context="cliente">
|
<Template Context="cliente">
|
||||||
@ -59,8 +64,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
List<ClienteViewModel> clienti;
|
List<Cliente> clienti;
|
||||||
RadzenDataGrid<ClienteViewModel> clientiGrid;
|
RadzenDataGrid<Cliente> clientiGrid;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Carica l’elenco dei clienti non eliminati, includendo l’agente,
|
/// Carica l’elenco dei clienti non eliminati, includendo l’agente,
|
||||||
@ -72,9 +77,9 @@
|
|||||||
|
|
||||||
clienti = (await _managerService.ClienteService.RicercaQueryable(
|
clienti = (await _managerService.ClienteService.RicercaQueryable(
|
||||||
x => x.Eliminato == false,
|
x => x.Eliminato == false,
|
||||||
includi: x => x.Include(y => y.Agente),
|
includi: x => x.Include(y => y.Agente).Include(y => y.Capoarea),
|
||||||
ordinamento: x => x.OrderBy(y => y.RagioneSociale)))
|
ordinamento: x => x.OrderBy(y => y.RagioneSociale)))
|
||||||
.Select(x => (ClienteViewModel)x).ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -97,7 +102,7 @@
|
|||||||
{
|
{
|
||||||
await _managerService.ClienteService.Elimina(cliente.Id, await MembershipUtils.GetUserId(auth));
|
await _managerService.ClienteService.Elimina(cliente.Id, await MembershipUtils.GetUserId(auth));
|
||||||
clienti = (await _managerService.ClienteService.RicercaQueryable(x => x.Eliminato == false, includi: x => x.Include(y => y.Agente)))
|
clienti = (await _managerService.ClienteService.RicercaQueryable(x => x.Eliminato == false, includi: x => x.Include(y => y.Agente)))
|
||||||
.Select(x => (ClienteViewModel)x).ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,4 +126,46 @@
|
|||||||
await _dialogService.Alert("Si è verificato un errore durante l'importazione del file.", "Errore");
|
await _dialogService.Alert("Si è verificato un errore durante l'importazione del file.", "Errore");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task onUploadComuni(UploadChangeEventArgs args)
|
||||||
|
{
|
||||||
|
var file = args.Files.FirstOrDefault();
|
||||||
|
if (file == null ||
|
||||||
|
!file.Name.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
await _dialogService.Alert("Sono supportati solo file Excel .xlsx", "Errore");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// await using var uploadStream = file.OpenReadStream(10_000_000);
|
||||||
|
await _dialogService.OpenAsync<Comuni_Import>("Importazione comuni", new Dictionary<string, object>() { { "args", args } });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
var er = ex.Message;
|
||||||
|
await _dialogService.Alert("Si è verificato un errore durante l'importazione del file.", "Errore");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task onUploadProvince(UploadChangeEventArgs args)
|
||||||
|
{
|
||||||
|
var file = args.Files.FirstOrDefault();
|
||||||
|
if (file == null ||
|
||||||
|
!file.Name.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
await _dialogService.Alert("Sono supportati solo file Excel .xlsx", "Errore");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// await using var uploadStream = file.OpenReadStream(10_000_000);
|
||||||
|
await _dialogService.OpenAsync<Province_Import>("Importazione province", new Dictionary<string, object>() { { "args", args } });
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
var er = ex.Message;
|
||||||
|
await _dialogService.Alert("Si è verificato un errore durante l'importazione del file.", "Errore");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,31 +64,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 mb-3">
|
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Cap</RadzenText>
|
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@cliente.Cap" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3 mb-3">
|
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Citta</RadzenText>
|
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Cognome" @bind-Value="@cliente.Citta" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3 mb-3">
|
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Indirizzo</RadzenText>
|
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@cliente.Indirizzo" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Email di invito</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Email di invito</RadzenText>
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@cliente.EmailInvito" />
|
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@cliente.EmailInvito" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Agente</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Tipologia Gestionale</RadzenText>
|
||||||
<RadzenDropDown Style="width: 100%" TValue="Guid ?" @bind-Value=@cliente.AgenteId Data=@agenti TextProperty="Info" ValueProperty="Id" Name="agenteDrop" />
|
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@cliente.TipologiaGestionale" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Tipologia</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Tipologia</RadzenText>
|
||||||
@ -100,6 +82,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Agente</RadzenText>
|
||||||
|
<RadzenDropDown Style="width: 100%" TValue="Guid ?" @bind-Value=@cliente.AgenteId Data=@agenti TextProperty="Info" ValueProperty="Id" Name="agenteDrop" Disabled="@(!(cliente.CapoareaId == idClaim) && !isAdmin)" />
|
||||||
|
</div>
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Capoarea</RadzenText>
|
||||||
|
<RadzenDropDown Style="width: 100%" TValue="Guid ?" @bind-Value=@cliente.CapoareaId Data=@capiarea TextProperty="Info" ValueProperty="Id" Name="capoareaDrop" Disabled="!isAdmin" Change="(x => OnCapoareaChange(x))" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||||
@ -169,18 +162,23 @@
|
|||||||
@code {
|
@code {
|
||||||
[Parameter]
|
[Parameter]
|
||||||
public Guid? ClienteId { get; set; }
|
public Guid? ClienteId { get; set; }
|
||||||
|
public Guid idClaim { get; set; }
|
||||||
|
|
||||||
[SupplyParameterFromForm]
|
[SupplyParameterFromForm]
|
||||||
private ClienteViewModel cliente { get; set; } = new();
|
private ClienteViewModel cliente { get; set; } = new();
|
||||||
|
|
||||||
private IEnumerable<UtenteViewModel> agenti { get; set; } = new List<UtenteViewModel>();
|
private IEnumerable<UtenteViewModel> agenti { get; set; } = new List<UtenteViewModel>();
|
||||||
|
private IEnumerable<UtenteViewModel> capiarea { get; set; } = new List<UtenteViewModel>();
|
||||||
private List<TipologiaClienteViewModel> tipologiaCliente { get; set; } = new();
|
private List<TipologiaClienteViewModel> tipologiaCliente { get; set; } = new();
|
||||||
private List<LookupViewModel<int>> statoCliente { get; set; } = new List<LookupViewModel<int>>();
|
private List<LookupViewModel<int>> statoCliente { get; set; } = new();
|
||||||
RadzenDataGrid<DestinazioneViewModel> destinazioniGrid;
|
RadzenDataGrid<DestinazioneViewModel> destinazioniGrid;
|
||||||
|
|
||||||
|
private bool isAdmin { get; set; } = false;
|
||||||
|
private Guid capoareaId { get; set; } = Guid.Empty;
|
||||||
|
|
||||||
private string pageTitle => cliente?.Id == Guid.Empty ? "Nuovo cliente" : "Modifica cliente";
|
private string pageTitle => cliente?.Id == Guid.Empty ? "Nuovo cliente" : "Modifica cliente";
|
||||||
|
|
||||||
private DialogOptions editNewDialogOption { get; set; } = new DialogOptions()
|
private DialogOptions editNewDialogOption { get; set; } = new()
|
||||||
{
|
{
|
||||||
Resizable = false,
|
Resizable = false,
|
||||||
Draggable = false,
|
Draggable = false,
|
||||||
@ -194,17 +192,40 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
agenti = (await _managerService.UtenteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
idClaim = await MembershipUtils.GetUserId(auth);
|
||||||
.Select(x => (UtenteViewModel)x).ToList();
|
var idRuolo = await MembershipUtils.GetRoleId(auth);
|
||||||
|
var ruolo = await _managerService.RuoloService.RicercaPer(
|
||||||
|
x => x.Id == idRuolo && x.Permessi.Any(y => y.Feature.Type == FeatureType.Capoarea || y.Feature.Type == FeatureType.AdminGlobal),
|
||||||
|
includi:x => x.Include(y => y.Permessi).ThenInclude(z => z.Feature));
|
||||||
|
|
||||||
|
isAdmin = ruolo?.Permessi.Where(x => x.Eliminato == false)?.Any(x => x.Feature.Type == FeatureType.AdminGlobal) ?? false;
|
||||||
|
|
||||||
|
if (ClienteId.GetValueOrDefault() != Guid.Empty)
|
||||||
|
cliente = await _managerService.ClienteService.RicercaPer(x => x.Id == ClienteId, includi: x => x.Include(y => y.Agente).Include(y => y.Capoarea).Include(y => y.TipologiaCliente).Include(y => y.Destinazioni).ThenInclude(z => z.Agente));
|
||||||
|
else
|
||||||
|
cliente = new ClienteViewModel();
|
||||||
|
|
||||||
|
capoareaId = cliente.CapoareaId.GetValueOrDefault();
|
||||||
|
|
||||||
|
capiarea = isAdmin
|
||||||
|
? (await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false && x.IsCapoarea,
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
||||||
|
.Select(x => (UtenteViewModel)x).ToList()
|
||||||
|
: [await _managerService.UtenteService.RicercaPer(x => x.Id == cliente.CapoareaId)];
|
||||||
|
|
||||||
|
agenti = cliente.CapoareaId == idClaim || isAdmin
|
||||||
|
? (await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false && (isAdmin || x.CapoareaId == idClaim) && !x.IsCapoarea && x.CapoareaId == cliente.CapoareaId,
|
||||||
|
includi: x => x.Include(y => y.Capoarea),
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
||||||
|
.Select(x => (UtenteViewModel)x).ToList()
|
||||||
|
: [await _managerService.UtenteService.RicercaPer(x => x.Id == cliente.AgenteId)];
|
||||||
|
|
||||||
var eUtils = new EnumUtils();
|
var eUtils = new EnumUtils();
|
||||||
tipologiaCliente = (await _managerService.TipologiaClienteService.RicercaQueryable(ordinamento: x => x.OrderBy(y => y.Nome))).Select(x => (TipologiaClienteViewModel)x).ToList();
|
tipologiaCliente = (await _managerService.TipologiaClienteService.RicercaQueryable(ordinamento: x => x.OrderBy(y => y.Nome))).Select(x => (TipologiaClienteViewModel)x).ToList();
|
||||||
statoCliente = eUtils.GetEnumList<ClienteStato>();
|
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.TipologiaCliente).Include(y => y.Destinazioni).ThenInclude(z => z.Agente));
|
|
||||||
else
|
|
||||||
cliente = new ClienteViewModel();
|
|
||||||
|
|
||||||
_dialogService.OnClose += onDialogClose;
|
_dialogService.OnClose += onDialogClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,8 +246,6 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task onClienteSave()
|
private async Task onClienteSave()
|
||||||
{
|
{
|
||||||
var idClaim = await MembershipUtils.GetUserId(auth);
|
|
||||||
|
|
||||||
var model = await _managerService.ClienteService.RicercaPer(x => x.Id == cliente.Id, solaLettura: false)
|
var model = await _managerService.ClienteService.RicercaPer(x => x.Id == cliente.Id, solaLettura: false)
|
||||||
?? new Cliente() { Destinazioni = new List<Destinazione>() };
|
?? new Cliente() { Destinazioni = new List<Destinazione>() };
|
||||||
|
|
||||||
@ -264,7 +283,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task EditDestinazione(DestinazioneViewModel destinazione)
|
private async Task EditDestinazione(DestinazioneViewModel destinazione)
|
||||||
{
|
{
|
||||||
await _dialogService.OpenAsync<Cliente_Destinazione>($"Destinazione {destinazione.RagioneSociale}", new Dictionary<string, object>() { { "destinazioneId", destinazione.Id }, { "clienteId", cliente.Id } }, editNewDialogOption);
|
await _dialogService.OpenAsync<Cliente_Destinazione>($"Destinazione {destinazione.RagioneSociale}", new Dictionary<string, object>() { { "destinazioneId", destinazione.Id }, { "clienteId", cliente.Id }, { "canSetAgente", (cliente.CapoareaId == idClaim) || isAdmin }, { "capoareaId", capoareaId } }, editNewDialogOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -272,7 +291,7 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task onNuovaDestinazionePressed()
|
private async Task onNuovaDestinazionePressed()
|
||||||
{
|
{
|
||||||
await _dialogService.OpenAsync<Cliente_Destinazione>($"Nuova destinazione", new Dictionary<string, object>() { { "clienteId", cliente.Id } }, editNewDialogOption);
|
await _dialogService.OpenAsync<Cliente_Destinazione>($"Nuova destinazione", new Dictionary<string, object>() { { "clienteId", cliente.Id }, { "canSetAgente", (cliente.CapoareaId == idClaim) || isAdmin }, { "capoareaId", capoareaId } }, editNewDialogOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -290,4 +309,26 @@
|
|||||||
.Select(x => (DestinazioneViewModel)x).ToList();
|
.Select(x => (DestinazioneViewModel)x).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Aggiorna la drop di agenti in base al valore di capoarea
|
||||||
|
/// </summary>
|
||||||
|
private async Task OnCapoareaChange(object value)
|
||||||
|
{
|
||||||
|
var capoId = Guid.Empty;
|
||||||
|
|
||||||
|
if (Guid.TryParse(value.ToString(), out capoId))
|
||||||
|
{
|
||||||
|
capoareaId = capoId;
|
||||||
|
cliente.AgenteId = null;
|
||||||
|
|
||||||
|
agenti = cliente.CapoareaId == idClaim || isAdmin
|
||||||
|
? (await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false && (isAdmin || x.CapoareaId == idClaim) && !x.IsCapoarea && x.CapoareaId == capoareaId,
|
||||||
|
includi: x => x.Include(y => y.Capoarea),
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome)))
|
||||||
|
.Select(x => (UtenteViewModel)x).ToList()
|
||||||
|
: [await _managerService.UtenteService.RicercaPer(x => x.Id == cliente.AgenteId)];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
@using ClosedXML.Excel
|
@using ClosedXML.Excel
|
||||||
@using Microsoft.EntityFrameworkCore
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Model
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
|
|
||||||
@rendermode InteractiveServer
|
@rendermode InteractiveServer
|
||||||
@ -32,21 +33,51 @@
|
|||||||
using var workbook = new XLWorkbook(ms);
|
using var workbook = new XLWorkbook(ms);
|
||||||
var ws = workbook.Worksheet(1);
|
var ws = workbook.Worksheet(1);
|
||||||
var usedRange = ws.RangeUsed();
|
var usedRange = ws.RangeUsed();
|
||||||
|
var rows = new List<ClienteExcelViewModel>(usedRange.RowCount() - 1);
|
||||||
|
|
||||||
var ragioniSociali = ws.RangeUsed().RowsUsed().Skip(1).Select(r => new { Rid = r.Cell(1).GetString(), RagioneSociale = r.Cell(4).GetString() }).Distinct().ToList();
|
foreach (var row in usedRange.RowsUsed().Skip(1))
|
||||||
|
rows.Add(new ClienteExcelViewModel(row));
|
||||||
|
|
||||||
|
var codiciAgente = rows.Select(r => new { CodiceAgente = r.Agente, Nome = r.DescrizioneAgente, Capoarea = r.CapoArea }).Distinct().ToList();
|
||||||
|
var codiciCapoarea = rows.Select(r => new { CodiceCapoarea = r.CapoArea, Nome = r.DescrizioneCapoArea }).Distinct().ToList();
|
||||||
|
|
||||||
|
foreach (var fileCapoarea in codiciCapoarea)
|
||||||
|
{
|
||||||
|
var capoarea = await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == fileCapoarea.CodiceCapoarea, solaLettura: false);
|
||||||
|
|
||||||
|
capoarea = await mapCapoArea(capoarea ?? new Utente(), fileCapoarea.CodiceCapoarea, fileCapoarea.Nome);
|
||||||
|
await _managerService.UtenteService.Salva(capoarea, idClaim);
|
||||||
|
}
|
||||||
|
|
||||||
|
var capoareaList = await _managerService.UtenteService.ListaCapoarea();
|
||||||
|
foreach (var fileAgente in codiciAgente)
|
||||||
|
{
|
||||||
|
var agente = await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == fileAgente.CodiceAgente, solaLettura: false);
|
||||||
|
// if ((agente?.Id ?? new Guid()) != Guid.Empty)
|
||||||
|
// continue;
|
||||||
|
var capoarea = capoareaList.FirstOrDefault(x => x.CodiceAgente == fileAgente.Capoarea);
|
||||||
|
agente = await mapAgente(agente ?? new Utente(), fileAgente.CodiceAgente, fileAgente.Nome, capoarea?.Id);
|
||||||
|
await _managerService.UtenteService.Salva(agente, idClaim);
|
||||||
|
}
|
||||||
|
|
||||||
|
var ragioniSociali = rows.Select(r => new { Rid = r.CodCli, RagioneSociale = r.RagSocCliente }).Distinct().ToList();
|
||||||
clientiTotali = ragioniSociali.Count;
|
clientiTotali = ragioniSociali.Count;
|
||||||
counterLabel = " di " + clientiTotali;
|
counterLabel = " di " + clientiTotali;
|
||||||
|
|
||||||
foreach (var cliente in ragioniSociali)
|
foreach (var cliente in ragioniSociali)
|
||||||
{
|
{
|
||||||
var righeCliente = usedRange.RowsUsed().Where(r => r.Cell(1).GetString() == cliente.Rid).ToList();
|
var righeCliente = rows.Where(r => r.CodCli == cliente.Rid).ToList();
|
||||||
|
|
||||||
var clienteDb = await _managerService.ClienteService.RicercaPer(
|
var clienteDb = await _managerService.ClienteService.RicercaPer(
|
||||||
x => x.Rid == cliente.Rid && x.Eliminato == false,
|
x => x.Rid == cliente.Rid && x.Eliminato == false,
|
||||||
includi: x => x.Include(i => i.Destinazioni),
|
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);
|
clienteDb = await mapCliente(clienteDb, righeCliente, capoareaList, idClaim);
|
||||||
|
var codiceCapoarea = righeCliente.FirstOrDefault().CapoArea;
|
||||||
|
var codiceAgente = righeCliente.FirstOrDefault().Agente;
|
||||||
|
clienteDb.CapoareaId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceCapoarea))?.Id;
|
||||||
|
clienteDb.AgenteId = (await _managerService.UtenteService.RicercaPer(x => x.CodiceAgente == codiceAgente))?.Id;
|
||||||
await _managerService.ClienteService.Salva(clienteDb, idClaim);
|
await _managerService.ClienteService.Salva(clienteDb, idClaim);
|
||||||
counter += 1;
|
counter += 1;
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
@ -56,36 +87,67 @@
|
|||||||
_dialogService.Close();
|
_dialogService.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<Cliente> mapCliente(Cliente model, List<IXLRangeRow> rows)
|
private async Task<Cliente> mapCliente(Cliente model, List<ClienteExcelViewModel> rows, List<Utente> capoareaList, Guid idClaim)
|
||||||
{
|
{
|
||||||
var idClaim = await MembershipUtils.GetUserId(auth);
|
|
||||||
var firstRow = rows.First();
|
var firstRow = rows.First();
|
||||||
model.Rid = firstRow.Cell(1).GetString();
|
model.Rid = firstRow.CodCli;
|
||||||
model.RagioneSociale = firstRow.Cell(4).GetString();
|
model.RagioneSociale = firstRow.RagSocCliente;
|
||||||
model.PartitaIva = firstRow.Cell(5).GetString();
|
model.PartitaIva = firstRow.PartitaIva;
|
||||||
|
model.TipologiaGestionale = firstRow.Tipologia;
|
||||||
model.Destinazioni ??= new();
|
model.Destinazioni ??= new();
|
||||||
|
|
||||||
foreach (var destinazioneRiga in rows)
|
foreach (var destinazioneRiga in rows)
|
||||||
{
|
{
|
||||||
var destinazione = model.Destinazioni.FirstOrDefault(x => x.Rid == destinazioneRiga.Cell(2).GetString()) ?? new Destinazione();
|
var destinazione = model.Destinazioni.FirstOrDefault(x => x.Rid == destinazioneRiga.CodDes) ?? new Destinazione();
|
||||||
destinazione = mapDestinazione(destinazione, model.Id, destinazioneRiga);
|
destinazione = await mapDestinazione(destinazione, model.Id, destinazioneRiga, model.AgenteId);
|
||||||
if (destinazione.Id == Guid.Empty)
|
if (destinazione.Id == Guid.Empty)
|
||||||
model.Destinazioni.Add(destinazione);
|
model.Destinazioni.Add(destinazione);
|
||||||
}
|
}
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Destinazione mapDestinazione(Destinazione model, Guid clienteId, IXLRangeRow? row)
|
private async Task<Destinazione> mapDestinazione(Destinazione model, Guid clienteId, ClienteExcelViewModel row, Guid? agenteId)
|
||||||
{
|
{
|
||||||
model.Rid = row.Cell(2).GetString();
|
model.Rid = row.CodDes;
|
||||||
model.RagioneSociale = row.Cell(7).GetString();
|
model.RagioneSociale = row.RagSocDestinazione;
|
||||||
model.PartitaIva = row.Cell(5).GetString();
|
model.PartitaIva = row.PartitaIva;
|
||||||
model.ClienteId = clienteId;
|
model.ClienteId = clienteId;
|
||||||
model.Indirizzo = $"{row.Cell(8).GetString()} {row.Cell(9).GetString()}";
|
model.Indirizzo = $"{row.Indirizzo} {row.NumeroCivico}";
|
||||||
model.Cap = row.Cell(15).GetString();
|
model.Cap = row.Cap;
|
||||||
model.Citta = row.Cell(11).GetString();
|
model.Citta = row.Comune;
|
||||||
model.Email = row.Cell(21).GetString();
|
model.Provincia = row.Provincia;
|
||||||
model.EmailInvito = row.Cell(21).GetString();
|
model.Email = row.MailFatturazione;
|
||||||
model.NumeroTelefono = row.Cell(16).GetString();
|
model.EmailInvito = row.MailFatturazione;
|
||||||
|
model.NumeroTelefono = row.Telefono;
|
||||||
|
model.AgenteId = agenteId;
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<Utente> mapCapoArea(Utente model, string codice, string nome)
|
||||||
|
{
|
||||||
|
model.Username = nome;
|
||||||
|
model.CodiceAgente = codice;
|
||||||
|
model.Nome = nome;
|
||||||
|
model.Cognome = string.Empty;
|
||||||
|
model.Email = string.Empty;
|
||||||
|
model.Password = string.Empty;
|
||||||
|
model.IsCapoarea = true;
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<Utente> mapAgente(Utente model, string codice, string nome, Guid? capoareaId)
|
||||||
|
{
|
||||||
|
model.Username = nome;
|
||||||
|
model.CodiceAgente = codice;
|
||||||
|
model.Nome = nome;
|
||||||
|
model.Cognome = string.Empty;
|
||||||
|
model.Email = string.Empty;
|
||||||
|
model.Password = string.Empty;
|
||||||
|
model.CapoareaId = capoareaId;
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
73
StandManager/Components/Pages/Management/Comuni_Import.razor
Normal file
73
StandManager/Components/Pages/Management/Comuni_Import.razor
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
@using ClosedXML.Excel
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Model
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@inject AuthenticationStateProvider auth
|
||||||
|
|
||||||
|
<RadzenStack Gap="1rem" class="rz-m-12">
|
||||||
|
<RadzenProgressBar Value="@counter" Max="@comuniTotali" Unit="@counterLabel" AriaLabel="" />
|
||||||
|
</RadzenStack>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter] private Dialog _dialog { get; set; }
|
||||||
|
[Parameter] public UploadChangeEventArgs args { get; set; }
|
||||||
|
|
||||||
|
private int comuniTotali { get; set; } = 0;
|
||||||
|
private int counter { get; set; } = 0;
|
||||||
|
private string counterLabel { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
base.OnInitializedAsync();
|
||||||
|
var file = args.Files.FirstOrDefault();
|
||||||
|
await using var uploadStream = file.OpenReadStream(10_000_000);
|
||||||
|
var idClaim = await MembershipUtils.GetUserId(auth);
|
||||||
|
|
||||||
|
await using var ms = new MemoryStream();
|
||||||
|
await uploadStream.CopyToAsync(ms);
|
||||||
|
ms.Position = 0;
|
||||||
|
|
||||||
|
using var workbook = new XLWorkbook(ms);
|
||||||
|
var ws = workbook.Worksheet(1);
|
||||||
|
var usedRange = ws.RangeUsed();
|
||||||
|
var rows = new List<ComuneIstatExcelViewModel>(usedRange.RowCount() - 1);
|
||||||
|
|
||||||
|
foreach (var row in usedRange.RowsUsed().Skip(1))
|
||||||
|
rows.Add(new ComuneIstatExcelViewModel(row));
|
||||||
|
|
||||||
|
|
||||||
|
var comuni = rows.ToList();
|
||||||
|
comuniTotali = comuni.Count;
|
||||||
|
counterLabel = " di " + comuniTotali;
|
||||||
|
|
||||||
|
foreach (var comune in comuni)
|
||||||
|
{
|
||||||
|
var comuneDb = await _managerService.ComuneIstatService.RicercaPer(
|
||||||
|
x => x.Istat == comune.Istat && x.Eliminato == false,
|
||||||
|
solaLettura: false) ?? new ComuneIstat();
|
||||||
|
|
||||||
|
comuneDb = await mapComune(comuneDb, comune);
|
||||||
|
await _managerService.ComuneIstatService.Salva(comuneDb, idClaim);
|
||||||
|
counter += 1;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
ms.Close();
|
||||||
|
_dialogService.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<ComuneIstat> mapComune(ComuneIstat model, ComuneIstatExcelViewModel row)
|
||||||
|
{
|
||||||
|
model.Istat = row.Istat;
|
||||||
|
model.Comune = row.Comune;
|
||||||
|
model.Regione = row.Regione;
|
||||||
|
model.Provincia = row.Provincia;
|
||||||
|
model.Prefisso = row.Prefisso;
|
||||||
|
model.CodFisco = row.CodFisco;
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -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">
|
||||||
|
|||||||
@ -0,0 +1,69 @@
|
|||||||
|
@using ClosedXML.Excel
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Model
|
||||||
|
@attribute [Authorize]
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@inject AuthenticationStateProvider auth
|
||||||
|
|
||||||
|
<RadzenStack Gap="1rem" class="rz-m-12">
|
||||||
|
<RadzenProgressBar Value="@counter" Max="@provinceTotali" Unit="@counterLabel" AriaLabel="" />
|
||||||
|
</RadzenStack>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter] private Dialog _dialog { get; set; }
|
||||||
|
[Parameter] public UploadChangeEventArgs args { get; set; }
|
||||||
|
|
||||||
|
private int provinceTotali { get; set; } = 0;
|
||||||
|
private int counter { get; set; } = 0;
|
||||||
|
private string counterLabel { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
base.OnInitializedAsync();
|
||||||
|
var file = args.Files.FirstOrDefault();
|
||||||
|
await using var uploadStream = file.OpenReadStream(10_000_000);
|
||||||
|
var idClaim = await MembershipUtils.GetUserId(auth);
|
||||||
|
|
||||||
|
await using var ms = new MemoryStream();
|
||||||
|
await uploadStream.CopyToAsync(ms);
|
||||||
|
ms.Position = 0;
|
||||||
|
|
||||||
|
using var workbook = new XLWorkbook(ms);
|
||||||
|
var ws = workbook.Worksheet(1);
|
||||||
|
var usedRange = ws.RangeUsed();
|
||||||
|
var rows = new List<ProvinciaIstatExcelViewModel>(usedRange.RowCount() - 1);
|
||||||
|
|
||||||
|
foreach (var row in usedRange.RowsUsed().Skip(1))
|
||||||
|
rows.Add(new ProvinciaIstatExcelViewModel(row));
|
||||||
|
|
||||||
|
|
||||||
|
var province = rows.ToList();
|
||||||
|
provinceTotali = province.Count;
|
||||||
|
counterLabel = " di " + provinceTotali;
|
||||||
|
|
||||||
|
foreach (var provincia in province)
|
||||||
|
{
|
||||||
|
var provinciaDb = await _managerService.ProvinciaIstatService.RicercaPer(
|
||||||
|
x => x.Sigla == provincia.Sigla && x.Eliminato == false,
|
||||||
|
solaLettura: false) ?? new ProvinciaIstat();
|
||||||
|
|
||||||
|
provinciaDb = await mapProvincia(provinciaDb, provincia);
|
||||||
|
await _managerService.ProvinciaIstatService.Salva(provinciaDb, idClaim);
|
||||||
|
counter += 1;
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
ms.Close();
|
||||||
|
_dialogService.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<ProvinciaIstat> mapProvincia(ProvinciaIstat model, ProvinciaIstatExcelViewModel row)
|
||||||
|
{
|
||||||
|
model.Sigla = row.Sigla;
|
||||||
|
model.Provincia = row.Provincia;
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
}
|
||||||
97
StandManager/Components/Pages/Management/Ruoli.razor
Normal file
97
StandManager/Components/Pages/Management/Ruoli.razor
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
@attribute [Authorize]
|
||||||
|
@page "/management/Ruoli"
|
||||||
|
@using ClosedXML.Excel
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Model
|
||||||
|
@using System.Threading.Tasks
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@inject AuthenticationStateProvider auth
|
||||||
|
|
||||||
|
<PageTitle>Ruoli</PageTitle>
|
||||||
|
|
||||||
|
<div class="page-wrapper">
|
||||||
|
<!-- BEGIN PAGE BODY -->
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row row-cards">
|
||||||
|
<div class="col">
|
||||||
|
<!-- Page pre-title -->
|
||||||
|
<div class="page-pretitle">Overview</div>
|
||||||
|
<h2 class="page-title">Ruoli</h2>
|
||||||
|
</div>
|
||||||
|
<div class="col-auto ms-auto">
|
||||||
|
<div class="btn-list">
|
||||||
|
<a href="/management/Ruoli/Modifica" class="btn btn-primary btn-5 d-none d-sm-inline-block">
|
||||||
|
Nuovo ruolo
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<RadzenDataGrid AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
||||||
|
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true"
|
||||||
|
Data="@ruoli" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single">
|
||||||
|
<Columns>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(RuoloViewModel.Id)" Filterable="false" Title="ID" Width="200px" TextAlign="TextAlign.Center" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(RuoloViewModel.Nome)" Title="Nome" Width="250px" />
|
||||||
|
|
||||||
|
<RadzenDataGridColumn Context="ruolo" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="250px">
|
||||||
|
<Template Context="ruolo">
|
||||||
|
<RadzenButton Icon="edit" ButtonStyle="ButtonStyle.Light" Variant="Variant.Flat" Size="ButtonSize.Medium" class="rz-my-1 rz-ms-1" Click="@(args => EditRow(ruolo))" @onclick:stopPropagation="true" />
|
||||||
|
<RadzenButton Icon="delete" ButtonStyle="ButtonStyle.Danger" Variant="Variant.Flat" Size="ButtonSize.Medium" Shade="Shade.Lighter" class="rz-my-1 rz-ms-1" Click="@(args => DeleteRow(ruolo))" @onclick:stopPropagation="true" />
|
||||||
|
</Template>
|
||||||
|
</RadzenDataGridColumn>
|
||||||
|
</Columns>
|
||||||
|
</RadzenDataGrid>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
List<RuoloViewModel> ruoli;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Carica l’elenco dei clienti non eliminati, includendo l’agente,
|
||||||
|
/// e prepara i dati per la visualizzazione in pagina.
|
||||||
|
/// </summary>
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
await base.OnInitializedAsync();
|
||||||
|
|
||||||
|
ruoli = (await _managerService.RuoloService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Nome)))
|
||||||
|
.Select(x => (RuoloViewModel)x).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Apre la pagina di modifica per il cliente selezionato.
|
||||||
|
/// </summary>
|
||||||
|
private async Task EditRow(RuoloViewModel ruolo)
|
||||||
|
{
|
||||||
|
_navManager.NavigateTo($"/management/Ruoli/Modifica/{ruolo.Id}");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chiede conferma ed elimina il cliente scelto; se confermato,
|
||||||
|
/// aggiorna la lista ricaricandola dal database.
|
||||||
|
/// </summary>
|
||||||
|
private async Task DeleteRow(RuoloViewModel ruolo)
|
||||||
|
{
|
||||||
|
var ok = await _dialogService.Confirm($"Vuoi davvero eliminare il ruolo {ruolo.Nome}?", "Conferma eliminazione", new ConfirmOptions { OkButtonText = "Sì", CancelButtonText = "No", Width = "400px" });
|
||||||
|
|
||||||
|
if (ok == true)
|
||||||
|
{
|
||||||
|
await _managerService.RuoloService.Elimina(ruolo.Id, await MembershipUtils.GetUserId(auth));
|
||||||
|
ruoli = (await _managerService.RuoloService.RicercaQueryable(x => x.Eliminato == false))
|
||||||
|
.Select(x => (RuoloViewModel)x).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
175
StandManager/Components/Pages/Management/Ruoli_Edit.razor
Normal file
175
StandManager/Components/Pages/Management/Ruoli_Edit.razor
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
@attribute [Authorize]
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@page "/management/Ruoli/Modifica"
|
||||||
|
@page "/management/Ruoli/Modifica/{RuoloId:guid}"
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Identity
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Model
|
||||||
|
@inject AuthenticationStateProvider auth
|
||||||
|
|
||||||
|
<PageTitle>@pageTitle</PageTitle>
|
||||||
|
|
||||||
|
<div class="page-wrapper">
|
||||||
|
<!-- BEGIN PAGE HEADER -->
|
||||||
|
<div class="page-header d-print-none" aria-label="Page header">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row g-2 align-items-center">
|
||||||
|
<div class="col">
|
||||||
|
<h2 class="page-title">@pageTitle</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- END PAGE HEADER -->
|
||||||
|
<!-- BEGIN PAGE BODY -->
|
||||||
|
<div class="page-body">
|
||||||
|
<div class="container-xl">
|
||||||
|
<div class="row row-cards">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row g-5">
|
||||||
|
<EditForm Model="ruolo" OnValidSubmit="onRuoloSave" FormName="editRuoloForm">
|
||||||
|
<DataAnnotationsValidator />
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Nome</RadzenText>
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@ruolo.Nome" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||||
|
Annulla
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<button type="submit" class="btn btn-primary w-100">
|
||||||
|
Salva
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</EditForm>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="advanced-table">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<RadzenDataGrid @ref="permessiGrid" AllowFiltering="true" AllowColumnResize="true" AllowAlternatingRows="false" FilterMode="FilterMode.CheckBoxList" AllowSorting="true" PageSize="25"
|
||||||
|
AllowPaging="true" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" AllowGrouping="true"
|
||||||
|
Data="@permessi" LogicalFilterOperator="LogicalFilterOperator.Or" SelectionMode="DataGridSelectionMode.Single" Render="@OnRender">
|
||||||
|
<Columns>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Selected)" Filterable="true" Width="200px" TextAlign="TextAlign.Center">
|
||||||
|
<Template Context="permesso">
|
||||||
|
<RadzenCheckBox TValue="bool" Value="@permesso.Selected" Change=@(args => onSelected(args, permesso))></RadzenCheckBox>
|
||||||
|
</Template>
|
||||||
|
</RadzenDataGridColumn>
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Ordinamento)" Visible="false" SortOrder="SortOrder.Ascending" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.OrdinamentoFeature)" Visible="false" SortOrder="SortOrder.Ascending" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.Nome)" Groupable="true" GroupProperty="Nome" Filterable="true" Width="200px" TextAlign="TextAlign.Center" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.NomeFeature)" Title="Nome" Width="250px" />
|
||||||
|
<RadzenDataGridColumn Property="@nameof(PermissionRowViewModel.DescrizioneFeature)" Title="Descrizione" Width="250px" />
|
||||||
|
</Columns>
|
||||||
|
</RadzenDataGrid>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter]
|
||||||
|
public Guid? RuoloId { get; set; }
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private RuoloViewModel? ruolo { get; set; } = new();
|
||||||
|
private List<PermissionRowViewModel> permessi { get; set; } = new();
|
||||||
|
private RadzenDataGrid<PermissionRowViewModel> permessiGrid { get; set; }
|
||||||
|
|
||||||
|
private string pageTitle => ruolo?.Id == Guid.Empty ? "Nuovo ruolo" : "Modifica ruolo";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Recupera l’utente da modificare se è stato passato un ID,
|
||||||
|
/// altrimenti inizializza un nuovo modello vuoto.
|
||||||
|
/// </summary>
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
ruolo = RuoloId.GetValueOrDefault() != Guid.Empty
|
||||||
|
? await _managerService.RuoloService.RicercaPer(x => x.Id == RuoloId)
|
||||||
|
: new RuoloViewModel();
|
||||||
|
|
||||||
|
var sections = (await
|
||||||
|
_managerService.SezioneService.RicercaQueryable(x => x.Eliminato == false, includi: x => x.Include(y => y.Features))).ToList();
|
||||||
|
var permissions = await _managerService.PermissionService.RicercaQueryable(x => x.Ruolo.Id == ruolo.Id && x.Eliminato == false);
|
||||||
|
|
||||||
|
permessi = [];
|
||||||
|
foreach (var section in sections)
|
||||||
|
permessi.AddRange(section.Features.Where(x => !x.Eliminato).Select(x => new PermissionRowViewModel(section, x, permissions)).ToList());
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnRender(DataGridRenderEventArgs<PermissionRowViewModel> args)
|
||||||
|
{
|
||||||
|
if (!args.FirstRender) return;
|
||||||
|
args.Grid.Groups.Add(new GroupDescriptor(){ Property = "Nome", SortOrder = SortOrder.Descending });
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Salva l’utente: recupera o crea il modello, applica le modifiche dalla UI,
|
||||||
|
/// gestisce l’hash della password se inserita e registra tutto a database
|
||||||
|
/// usando l’ID dell’utente autenticato.
|
||||||
|
/// </summary>
|
||||||
|
private async Task onRuoloSave()
|
||||||
|
{
|
||||||
|
var idClaim = await MembershipUtils.GetUserId(auth);
|
||||||
|
|
||||||
|
var model = await _managerService.RuoloService.RicercaPer(x => x.Id == ruolo.Id, solaLettura: false)
|
||||||
|
?? new Ruolo();
|
||||||
|
|
||||||
|
model.Nome = ruolo.Nome;
|
||||||
|
|
||||||
|
await _managerService.RuoloService.Salva(model, idClaim);
|
||||||
|
_navManager.NavigateTo("/management/Ruoli");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Torna all’elenco ruoli senza applicare altre azioni.
|
||||||
|
/// </summary>
|
||||||
|
private void backToHome()
|
||||||
|
{
|
||||||
|
_navManager.NavigateTo("/management/Ruoli");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task onSelected(bool selected, PermissionRowViewModel permissionRow)
|
||||||
|
{
|
||||||
|
var idClaim = await MembershipUtils.GetUserId(auth);
|
||||||
|
var ruoloPermission = await _managerService.PermissionService.RicercaPer(
|
||||||
|
x => x.RuoloId == ruolo.Id && x.IdFeature == permissionRow.IdFeature && x.Eliminato == false,
|
||||||
|
includi: x => x.Include(y => y.Ruolo).Include(y => y.Feature),
|
||||||
|
solaLettura: false);
|
||||||
|
if (ruoloPermission == null && selected)
|
||||||
|
{
|
||||||
|
var permission = new Permission()
|
||||||
|
{
|
||||||
|
RuoloId = ruolo.Id,
|
||||||
|
IdFeature = permissionRow.IdFeature
|
||||||
|
};
|
||||||
|
await _managerService.PermissionService.Salva(permission, idClaim);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _managerService.PermissionService.Elimina(ruoloPermission?.Id ?? Guid.Empty, idClaim);
|
||||||
|
}
|
||||||
|
permissionRow.Selected = selected;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@page "/management/Utenti"
|
@page "/management/Utenti"
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
|
||||||
@rendermode InteractiveServer
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
@ -35,8 +36,10 @@
|
|||||||
<RadzenDataGridColumn Property="@nameof(Utente.Nome)" Title="Nome" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(Utente.Nome)" Title="Nome" Width="160px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(Utente.Cognome)" Title="Cognome" Width="160px" />
|
<RadzenDataGridColumn Property="@nameof(Utente.Cognome)" Title="Cognome" Width="160px" />
|
||||||
<RadzenDataGridColumn Property="@nameof(Utente.Email)" Title="Mail" Width="200px" />
|
<RadzenDataGridColumn Property="@nameof(Utente.Email)" Title="Mail" Width="200px" />
|
||||||
|
<RadzenDataGridColumn Property="Ruolo.Nome" Title="Ruolo" Width="200px" />
|
||||||
|
<RadzenDataGridColumn Property="Capoarea.Nome" Title="Capoarea" Width="200px" />
|
||||||
|
|
||||||
<RadzenDataGridColumn Context="order" Filterable="false" Sortable="false" TextAlign="TextAlign.Right">
|
<RadzenDataGridColumn Context="order" Filterable="false" Sortable="false" TextAlign="TextAlign.Right" Width="200px">
|
||||||
<Template Context="user">
|
<Template Context="user">
|
||||||
<RadzenButton Icon="edit" ButtonStyle="ButtonStyle.Light" Variant="Variant.Flat" Size="ButtonSize.Medium" class="rz-my-1 rz-ms-1" Click="@(args => EditRow(user))" @onclick:stopPropagation="true" />
|
<RadzenButton Icon="edit" ButtonStyle="ButtonStyle.Light" Variant="Variant.Flat" Size="ButtonSize.Medium" class="rz-my-1 rz-ms-1" Click="@(args => EditRow(user))" @onclick:stopPropagation="true" />
|
||||||
<RadzenButton Icon="delete" ButtonStyle="ButtonStyle.Danger" Variant="Variant.Flat" Size="ButtonSize.Medium" Shade="Shade.Lighter" class="rz-my-1 rz-ms-1" Click="@(args => DeleteRow(user))" @onclick:stopPropagation="true" />
|
<RadzenButton Icon="delete" ButtonStyle="ButtonStyle.Danger" Variant="Variant.Flat" Size="ButtonSize.Medium" Shade="Shade.Lighter" class="rz-my-1 rz-ms-1" Click="@(args => DeleteRow(user))" @onclick:stopPropagation="true" />
|
||||||
@ -63,7 +66,10 @@
|
|||||||
{
|
{
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
|
|
||||||
utenti = await _managerService.UtenteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome));
|
utenti = await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
includi: x => x.Include(y => y.Ruolo).Include(y => y.Capoarea),
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -80,12 +86,15 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private async Task DeleteRow(Utente user)
|
private async Task DeleteRow(Utente user)
|
||||||
{
|
{
|
||||||
var ok = await _dialogService.Confirm($"Vuoi davvero eliminare l'utente {user.ToString()}?", "Conferma eliminazione", new ConfirmOptions { OkButtonText = "Sì", CancelButtonText = "No", Width = "400px" });
|
var ok = await _dialogService.Confirm($"Vuoi davvero eliminare l'utente {user}?", "Conferma eliminazione", new ConfirmOptions { OkButtonText = "Sì", CancelButtonText = "No", Width = "400px" });
|
||||||
|
|
||||||
if (ok == true)
|
if (ok == true)
|
||||||
{
|
{
|
||||||
await _managerService.UtenteService.Elimina(user.Id, await MembershipUtils.GetUserId(auth));
|
await _managerService.UtenteService.Elimina(user.Id, await MembershipUtils.GetUserId(auth));
|
||||||
utenti = await _managerService.UtenteService.RicercaQueryable(x => x.Eliminato == false);
|
utenti = await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
includi: x => x.Include(y => y.Ruolo).Include(y => y.Capoarea),
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Cognome).ThenBy(z => z.Nome));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
@page "/management/Utenti/Modifica/{UserId:guid}"
|
@page "/management/Utenti/Modifica/{UserId:guid}"
|
||||||
|
|
||||||
@using Microsoft.AspNetCore.Identity
|
@using Microsoft.AspNetCore.Identity
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
@using StandManager.Model
|
@using StandManager.Model
|
||||||
@inject AuthenticationStateProvider auth
|
@inject AuthenticationStateProvider auth
|
||||||
|
|
||||||
@ -35,36 +36,50 @@
|
|||||||
|
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Nome</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Nome</RadzenText>
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@utente.Nome" />
|
<RadzenTextBox Style="width: 100%" aria-label="Nome" @bind-Value="@utente.Nome" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Cognome</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Cognome</RadzenText>
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Cognome" @bind-Value="@utente.Cognome" />
|
<RadzenTextBox Style="width: 100%" aria-label="Cognome" @bind-Value="@utente.Cognome" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-4 mb-3">
|
<div class="col-3 mb-3">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Email</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Email</RadzenText>
|
||||||
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@utente.Email" />
|
<RadzenTextBox Style="width: 100%" aria-label="Email" @bind-Value="@utente.Email" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="col-3 mb-3">
|
||||||
<div class="col-4 mb-3">
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Ruolo</RadzenText>
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Password</RadzenText>
|
<RadzenDropDown Style="width: 100%" TValue="Guid" @bind-Value=@utente.RuoloId Data=@ruoli TextProperty="Nome" ValueProperty="Id" Name="ruoliDrop" />
|
||||||
<RadzenPassword Style="width: 100%" aria-label="Password" @bind-Value="@utente.Password" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-3 mb-3">
|
<div class="col-3 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">E' capoarea</RadzenText>
|
||||||
|
<RadzenCheckBox TValue="bool" @bind-Value=@utente.IsCapoarea Name="isCapoarea" />
|
||||||
|
</div>
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Capoarea</RadzenText>
|
||||||
|
<RadzenDropDown Style="width: 100%" TValue="Guid" @bind-Value=@utente.CapoareaId Data=@capoareaList TextProperty="Nome" ValueProperty="Id" Name="capoareaDrop\" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-3 mb-3">
|
||||||
|
<RadzenText TextStyle="TextStyle.Subtitle2" TagName="TagName.H3">Password</RadzenText>
|
||||||
|
<RadzenPassword Style="width: 100%" aria-label="Password" @bind-Value="@utente.Password"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-4 mb-3">
|
||||||
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
<button type="button" class="btn btn-default w-100" @onclick="backToHome">
|
||||||
Annulla
|
Annulla
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3 mb-3">
|
<div class="col-4 mb-3">
|
||||||
<button type="submit" class="btn btn-primary w-100">
|
<button type="submit" class="btn btn-primary w-100">
|
||||||
Salva
|
Salva
|
||||||
</button>
|
</button>
|
||||||
@ -87,6 +102,8 @@
|
|||||||
|
|
||||||
[SupplyParameterFromForm]
|
[SupplyParameterFromForm]
|
||||||
private UtenteViewModel? utente { get; set; } = new();
|
private UtenteViewModel? utente { get; set; } = new();
|
||||||
|
private List<UtenteViewModel> capoareaList { get; set; } = new();
|
||||||
|
private List<RuoloViewModel> ruoli { get; set; } = new();
|
||||||
|
|
||||||
private string pageTitle => utente?.Id == Guid.Empty ? "Nuovo utente" : "Modifica utente";
|
private string pageTitle => utente?.Id == Guid.Empty ? "Nuovo utente" : "Modifica utente";
|
||||||
|
|
||||||
@ -97,9 +114,21 @@
|
|||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
if (UserId.GetValueOrDefault() != Guid.Empty)
|
if (UserId.GetValueOrDefault() != Guid.Empty)
|
||||||
utente = await _managerService.UtenteService.RicercaPer(x => x.Id == UserId);
|
utente = await _managerService.UtenteService.RicercaPer(
|
||||||
|
x => x.Id == UserId,
|
||||||
|
includi:x => x.Include(y => y.Ruolo).Include(y => y.Capoarea));
|
||||||
else
|
else
|
||||||
utente = new UtenteViewModel();
|
utente = new UtenteViewModel();
|
||||||
|
|
||||||
|
ruoli = (await _managerService.RuoloService.RicercaQueryable(x => x.Eliminato == false))
|
||||||
|
.Select(x => (RuoloViewModel)x).ToList();
|
||||||
|
|
||||||
|
var ruoliCapoarea = await _managerService.RuoloService.RicercaQueryable(
|
||||||
|
x => x.Permessi.Any(y => y.Feature.Type == FeatureType.AdminGlobal || y.Feature.Type == FeatureType.Capoarea),
|
||||||
|
includi:x => x.Include(y => y.Permessi).ThenInclude(z => z.Feature));
|
||||||
|
capoareaList = (await _managerService.UtenteService.RicercaQueryable(
|
||||||
|
u => ruoliCapoarea.Any(r => r.Id == u.RuoloId)
|
||||||
|
)).Select(x => (UtenteViewModel)x).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -128,6 +157,9 @@
|
|||||||
model.Password = hasher.HashPassword(model, utente.Password);
|
model.Password = hasher.HashPassword(model, utente.Password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model.RuoloId = utente.RuoloId;
|
||||||
|
model.CapoareaId = utente.CapoareaId != Guid.Empty ? utente.CapoareaId : null;
|
||||||
|
|
||||||
await _managerService.UtenteService.Salva(model, Guid.Parse(idClaim));
|
await _managerService.UtenteService.Salva(model, Guid.Parse(idClaim));
|
||||||
_navManager.NavigateTo("/management/Utenti");
|
_navManager.NavigateTo("/management/Utenti");
|
||||||
}
|
}
|
||||||
|
|||||||
74
StandManager/Components/Pages/Registrazione.razor
Normal file
74
StandManager/Components/Pages/Registrazione.razor
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using StandManager.Components.Layout
|
||||||
|
@using System.Threading.Tasks
|
||||||
|
@using StandManager.Model
|
||||||
|
|
||||||
|
@page "/Registrazione"
|
||||||
|
@layout PublicLayout
|
||||||
|
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
<PageTitle>Iscrizione Evento</PageTitle>
|
||||||
|
<AppHeader />
|
||||||
|
<div class="container my-5 py-3">
|
||||||
|
<ClienteToggle ValueChanged="onClienteToggleChanged" />
|
||||||
|
@if (showCodiceCliente)
|
||||||
|
{
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 mb-3">
|
||||||
|
<RadzenFormField Text="Codice cliente o Partita IVA" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
|
<RadzenTextBox Style="width: 100%" aria-label="Codice cliente o Partita IVA" Change="(args => onCodiceFornitoChanged(args))" />
|
||||||
|
</RadzenFormField>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (showForm)
|
||||||
|
{
|
||||||
|
<Component_Registrazione invito="invito" @ref="registrazione" />
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
|
||||||
|
@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 string codiceFornito { get; set; }
|
||||||
|
|
||||||
|
private void onClienteToggleChanged(bool value)
|
||||||
|
{
|
||||||
|
if (!value)
|
||||||
|
registrazione.NoCliente();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,7 +8,7 @@
|
|||||||
@rendermode InteractiveServer
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
<PageTitle>Scan</PageTitle>
|
<PageTitle>Scan</PageTitle>
|
||||||
|
<AppHeader />
|
||||||
<header class="hero pb-0">
|
<header class="hero pb-0">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<strong>Errore:</strong> @errorMessage
|
<strong>Errore:</strong> @errorMessage
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
<Footer />
|
||||||
@code {
|
@code {
|
||||||
private ElementReference videoRef;
|
private ElementReference videoRef;
|
||||||
private DotNetObjectReference<Scan>? objRef;
|
private DotNetObjectReference<Scan>? objRef;
|
||||||
|
|||||||
156
StandManager/Components/Pages/ScanNew.razor
Normal file
156
StandManager/Components/Pages/ScanNew.razor
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
@page "/activate-qr-scan"
|
||||||
|
@using StandManager.Components.Layout
|
||||||
|
@inject NavigationManager Nav
|
||||||
|
@layout PublicLayout
|
||||||
|
|
||||||
|
@inject IJSRuntime JS
|
||||||
|
@inject BodyClassService BodyClass
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
<PageTitle>Scan Code</PageTitle>
|
||||||
|
<div class="page" style="min-height: 100dvh;">
|
||||||
|
<div class="page-wrapper" style="min-height: 100dvh;">
|
||||||
|
<div class="container container-tight py-4 d-flex flex-column" style="min-height: 100dvh;">
|
||||||
|
|
||||||
|
<!-- Top bar -->
|
||||||
|
<div class="d-flex align-items-center justify-content-between pt-4">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-icon btn-ghost-secondary rounded-circle"
|
||||||
|
aria-label="Chiudi"
|
||||||
|
@onclick="OnClose">
|
||||||
|
<i class="fa fa-x footer-icon"></i>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="flex-fill"></div>
|
||||||
|
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-icon btn-ghost-secondary rounded-circle"
|
||||||
|
aria-label="Aiuto"
|
||||||
|
@onclick="OnHelp">
|
||||||
|
<i class="fa fa-question footer-icon"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (openManual)
|
||||||
|
{
|
||||||
|
<div class="d-flex flex-column align-items-center justify-content-center text-center flex-fill px-3">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 mb-3">
|
||||||
|
<RadzenTextBox @bind-Value="@registrationCode" Placeholder="Inserirci il codice" Style="width: 100%;" />
|
||||||
|
@if (!string.IsNullOrEmpty(invalidCode))
|
||||||
|
{
|
||||||
|
<div class="text-danger mt-1">@invalidCode</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<button type="button" class="btn btn-primary w-100" @onclick="GoTo">
|
||||||
|
Invia
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 mb-3">
|
||||||
|
<button type="button" class="btn btn-default w-100" @onclick="UndoChoice">
|
||||||
|
Annulla
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
<!-- Bottom actions -->
|
||||||
|
@if (!openManual && !openScan)
|
||||||
|
{
|
||||||
|
<!-- Center content -->
|
||||||
|
<div class="d-flex flex-column align-items-center justify-content-center text-center flex-fill px-3">
|
||||||
|
<div class="mb-5">
|
||||||
|
<div class="qr-shell">
|
||||||
|
<span class="ti ti-qrcode qr-icon"></span>
|
||||||
|
|
||||||
|
<!-- corner accents -->
|
||||||
|
<span class="qr-corner tl"></span>
|
||||||
|
<span class="qr-corner tr"></span>
|
||||||
|
<span class="qr-corner bl"></span>
|
||||||
|
<span class="qr-corner br"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="max-width: 320px;">
|
||||||
|
<h1 class="h2 mb-2 fw-bold">Scan QR Code</h1>
|
||||||
|
<p class="text-secondary mb-0">
|
||||||
|
Align the QR code within the frame to automatically detect and identify the client.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pb-4">
|
||||||
|
<div class="d-grid gap-3">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-lg btn-primary d-inline-flex align-items-center justify-content-center gap-2"
|
||||||
|
@onclick="OnScan">
|
||||||
|
<span class="ti ti-scan fs-3"></span>
|
||||||
|
<span>Scan Code</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-link text-secondary fw-bold"
|
||||||
|
@onclick="OnManual">
|
||||||
|
Enter code manually
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="height: .5rem;"></div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Parameter] public EventCallback Close { get; set; }
|
||||||
|
[Parameter] public EventCallback Help { get; set; }
|
||||||
|
[Parameter] public EventCallback Scan { get; set; }
|
||||||
|
[Parameter] public EventCallback Manual { get; set; }
|
||||||
|
|
||||||
|
private bool openManual { get; set; } = false;
|
||||||
|
private bool openScan { get; set; } = false;
|
||||||
|
private string registrationCode { get; set; }
|
||||||
|
private string invalidCode = string.Empty;
|
||||||
|
|
||||||
|
private async Task OnClose()
|
||||||
|
{
|
||||||
|
Nav.NavigateTo("/");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnHelp()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnScan()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnManual()
|
||||||
|
{
|
||||||
|
openManual = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GoTo()
|
||||||
|
{
|
||||||
|
var code = Guid.Empty;
|
||||||
|
|
||||||
|
if (Guid.TryParse(registrationCode, out code))
|
||||||
|
{
|
||||||
|
var iscrizione = await _managerService.IscrizioneEventoService.RicercaPer(filtro: x => x.Id == code);
|
||||||
|
|
||||||
|
var ok = await _dialogService.Confirm($"Il numero di persone indicate per questo evento è {iscrizione.Partecipanti}", $"Benvenuto {iscrizione.RagioneSociale}", new ConfirmOptions { OkButtonText = "Sì", CancelButtonText = "No", Width = "400px" });
|
||||||
|
}
|
||||||
|
else invalidCode = "Il codice inserito non risulta corretto!";
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task UndoChoice()
|
||||||
|
{
|
||||||
|
openManual = false;
|
||||||
|
openScan = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
65
StandManager/Components/Pages/ScanNew.razor.css
Normal file
65
StandManager/Components/Pages/ScanNew.razor.css
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
:root {
|
||||||
|
--sm-primary: #D63939;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Override "primary" in modo locale (senza toccare tutto il tema) */
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--sm-primary) !important;
|
||||||
|
border-color: var(--sm-primary) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
filter: brightness(0.92);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-shell {
|
||||||
|
position: relative;
|
||||||
|
width: 160px;
|
||||||
|
height: 160px;
|
||||||
|
border-radius: 2.5rem;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
|
||||||
|
background: color-mix(in srgb, var(--sm-primary) 10%, transparent);
|
||||||
|
box-shadow: 0 0 0 1px color-mix(in srgb, var(--sm-primary) 20%, transparent) inset;
|
||||||
|
color: var(--sm-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-icon {
|
||||||
|
font-size: 80px;
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-corner {
|
||||||
|
position: absolute;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-corner.tl {
|
||||||
|
top: -4px; left: -4px;
|
||||||
|
border-left: 4px solid var(--sm-primary);
|
||||||
|
border-top: 4px solid var(--sm-primary);
|
||||||
|
border-top-left-radius: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-corner.tr {
|
||||||
|
top: -4px; right: -4px;
|
||||||
|
border-right: 4px solid var(--sm-primary);
|
||||||
|
border-top: 4px solid var(--sm-primary);
|
||||||
|
border-top-right-radius: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-corner.bl {
|
||||||
|
bottom: -4px; left: -4px;
|
||||||
|
border-left: 4px solid var(--sm-primary);
|
||||||
|
border-bottom: 4px solid var(--sm-primary);
|
||||||
|
border-bottom-left-radius: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-corner.br {
|
||||||
|
bottom: -4px; right: -4px;
|
||||||
|
border-right: 4px solid var(--sm-primary);
|
||||||
|
border-bottom: 4px solid var(--sm-primary);
|
||||||
|
border-bottom-right-radius: 0.75rem;
|
||||||
|
}
|
||||||
64
StandManager/Model/ClienteExcelViewModel.cs
Normal file
64
StandManager/Model/ClienteExcelViewModel.cs
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
using ClosedXML.Excel;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class ClienteExcelViewModel
|
||||||
|
{
|
||||||
|
public ClienteExcelViewModel(IXLRangeRow row)
|
||||||
|
{
|
||||||
|
CodCli = row.Cell(1).GetString();
|
||||||
|
CodDes = row.Cell(2).GetString();
|
||||||
|
Tipologia = row.Cell(3).GetString();
|
||||||
|
RagSocCliente = row.Cell(4).GetString();
|
||||||
|
PartitaIva = row.Cell(5).GetString();
|
||||||
|
CodiceFiscale = row.Cell(6).GetString();
|
||||||
|
RagSocDestinazione = row.Cell(7).GetString();
|
||||||
|
Indirizzo = row.Cell(8).GetString();
|
||||||
|
NumeroCivico = row.Cell(9).GetString();
|
||||||
|
Istat = row.Cell(10).GetString();
|
||||||
|
Comune = row.Cell(11).GetString();
|
||||||
|
Provincia = row.Cell(12).GetString();
|
||||||
|
CodRegione = row.Cell(13).GetString();
|
||||||
|
Regione = row.Cell(14).GetString();
|
||||||
|
Cap = row.Cell(15).GetString();
|
||||||
|
Telefono = row.Cell(16).GetString();
|
||||||
|
Agente = row.Cell(17).GetString();
|
||||||
|
DescrizioneAgente = row.Cell(18).GetString();
|
||||||
|
CapoArea = row.Cell(19).GetString();
|
||||||
|
DescrizioneCapoArea = row.Cell(20).GetString();
|
||||||
|
MailFatturazione = row.Cell(21).GetString();
|
||||||
|
DataCreazione = row.Cell(22).GetString();
|
||||||
|
DataUltimoOrdine = row.Cell(23).GetString();
|
||||||
|
DataUltimaFattura = row.Cell(24).GetString();
|
||||||
|
CoordX = row.Cell(25).GetString();
|
||||||
|
CoordY = row.Cell(26).GetString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string CodCli { get; set; }
|
||||||
|
public string CodDes { get; set; }
|
||||||
|
public string Tipologia { get; set; }
|
||||||
|
public string RagSocCliente { get; set; }
|
||||||
|
public string PartitaIva { get; set; }
|
||||||
|
public string CodiceFiscale { get; set; }
|
||||||
|
public string RagSocDestinazione { get; set; }
|
||||||
|
public string Indirizzo { get; set; }
|
||||||
|
public string NumeroCivico { get; set; }
|
||||||
|
public string Istat { get; set; }
|
||||||
|
public string Comune { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
public string CodRegione { get; set; }
|
||||||
|
public string Regione { get; set; }
|
||||||
|
public string Cap { get; set; }
|
||||||
|
public string Telefono { get; set; }
|
||||||
|
public string Agente { get; set; }
|
||||||
|
public string DescrizioneAgente { get; set; }
|
||||||
|
public string CapoArea { get; set; }
|
||||||
|
public string DescrizioneCapoArea { get; set; }
|
||||||
|
public string MailFatturazione { get; set; }
|
||||||
|
public string DataCreazione { get; set; }
|
||||||
|
public string DataUltimoOrdine { get; set; }
|
||||||
|
public string DataUltimaFattura { get; set; }
|
||||||
|
public string CoordX { get; set; }
|
||||||
|
public string CoordY { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
@ -17,8 +17,11 @@ public class ClienteViewModel
|
|||||||
public string EmailInvito { get; set; }
|
public string EmailInvito { get; set; }
|
||||||
public string NumeroTelefono { get; set; }
|
public string NumeroTelefono { get; set; }
|
||||||
public string NomeAgente { get; set; }
|
public string NomeAgente { get; set; }
|
||||||
|
public string NomeCapoarea { get; set; }
|
||||||
public Guid? AgenteId { get; set; }
|
public Guid? AgenteId { get; set; }
|
||||||
public UtenteViewModel Agente { get; set; }
|
public UtenteViewModel Agente { get; set; }
|
||||||
|
public Guid? CapoareaId { get; set; }
|
||||||
|
public UtenteViewModel Capoarea { get; set; }
|
||||||
public List<DestinazioneViewModel> Destinazioni { get; set; }
|
public List<DestinazioneViewModel> Destinazioni { get; set; }
|
||||||
|
|
||||||
public string Rid { get; set; }
|
public string Rid { get; set; }
|
||||||
@ -26,6 +29,7 @@ public class ClienteViewModel
|
|||||||
public Guid? TipologiaClienteId { get; set; }
|
public Guid? TipologiaClienteId { get; set; }
|
||||||
public ClienteStato StatoCliente { get; set; }
|
public ClienteStato StatoCliente { get; set; }
|
||||||
public int StatoClienteInt { get; set; }
|
public int StatoClienteInt { get; set; }
|
||||||
|
public string TipologiaGestionale { get; set; }
|
||||||
|
|
||||||
public static implicit operator ClienteViewModel(Cliente model)
|
public static implicit operator ClienteViewModel(Cliente model)
|
||||||
{
|
{
|
||||||
@ -33,9 +37,12 @@ public class ClienteViewModel
|
|||||||
? null
|
? null
|
||||||
: new ClienteViewModel()
|
: new ClienteViewModel()
|
||||||
{
|
{
|
||||||
NomeAgente = model.Agente?.ToString(),
|
NomeAgente = model.Agente?.Nome.ToString(),
|
||||||
|
NomeCapoarea = model.Capoarea?.Nome.ToString(),
|
||||||
Agente = model.Agente,
|
Agente = model.Agente,
|
||||||
AgenteId = model.AgenteId,
|
AgenteId = model.AgenteId,
|
||||||
|
Capoarea = model.Capoarea,
|
||||||
|
CapoareaId = model.CapoareaId,
|
||||||
Cap = model.Cap,
|
Cap = model.Cap,
|
||||||
Citta = model.Citta,
|
Citta = model.Citta,
|
||||||
Email = model.Email,
|
Email = model.Email,
|
||||||
@ -50,7 +57,8 @@ public class ClienteViewModel
|
|||||||
TipologiaCliente = model.TipologiaCliente,
|
TipologiaCliente = model.TipologiaCliente,
|
||||||
TipologiaClienteId = model.TipologiaCliente?.Id ?? Guid.Empty,
|
TipologiaClienteId = model.TipologiaCliente?.Id ?? Guid.Empty,
|
||||||
StatoCliente = model.StatoCliente,
|
StatoCliente = model.StatoCliente,
|
||||||
StatoClienteInt = (int)model.StatoCliente
|
StatoClienteInt = (int)model.StatoCliente,
|
||||||
|
TipologiaGestionale = model.TipologiaGestionale
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +74,7 @@ public class ClienteViewModel
|
|||||||
model.NumeroTelefono = NumeroTelefono;
|
model.NumeroTelefono = NumeroTelefono;
|
||||||
model.Rid = Rid;
|
model.Rid = Rid;
|
||||||
model.StatoCliente = (ClienteStato)StatoClienteInt;
|
model.StatoCliente = (ClienteStato)StatoClienteInt;
|
||||||
|
model.TipologiaGestionale = TipologiaGestionale;
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|||||||
40
StandManager/Model/ComuneIstatExcelViewModel.cs
Normal file
40
StandManager/Model/ComuneIstatExcelViewModel.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using ClosedXML.Excel;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class ComuneIstatExcelViewModel
|
||||||
|
{
|
||||||
|
public ComuneIstatExcelViewModel()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
public ComuneIstatExcelViewModel(IXLRangeRow row)
|
||||||
|
{
|
||||||
|
Istat = row.Cell(1).GetString();
|
||||||
|
Comune = row.Cell(2).GetString();
|
||||||
|
Regione = row.Cell(3).GetString();
|
||||||
|
Provincia = row.Cell(4).GetString();
|
||||||
|
Prefisso = row.Cell(5).GetString();
|
||||||
|
CodFisco = row.Cell(6).GetString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Istat { get; set; }
|
||||||
|
public string Comune { get; set; }
|
||||||
|
public string Regione { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
public string Prefisso { get; set; }
|
||||||
|
public string CodFisco { get; set; }
|
||||||
|
|
||||||
|
public static implicit operator ComuneIstatExcelViewModel(ComuneIstat model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new ComuneIstatExcelViewModel
|
||||||
|
{
|
||||||
|
Id = model.Id,
|
||||||
|
Comune = model.Comune
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
31
StandManager/Model/ComuneIstatViewModel.cs
Normal file
31
StandManager/Model/ComuneIstatViewModel.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class ComuneIstatViewModel
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Istat { get; set; }
|
||||||
|
public string Comune { get; set; }
|
||||||
|
public string Regione { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
public string Prefisso { get; set; }
|
||||||
|
public string CodFisco { get; set; }
|
||||||
|
public string Info => $"{Comune}";
|
||||||
|
|
||||||
|
public static implicit operator ComuneIstatViewModel(ComuneIstat model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new ComuneIstatViewModel()
|
||||||
|
{
|
||||||
|
Id = model.Id,
|
||||||
|
Comune = model.Comune,
|
||||||
|
Istat = model.Istat,
|
||||||
|
Regione = model.Regione,
|
||||||
|
Provincia = model.Provincia,
|
||||||
|
Prefisso = model.Prefisso,
|
||||||
|
CodFisco = model.CodFisco
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -12,6 +12,7 @@ public class DestinazioneViewModel
|
|||||||
public string PartitaIva { get; set; }
|
public string PartitaIva { get; set; }
|
||||||
public string Cap { get; set; }
|
public string Cap { get; set; }
|
||||||
public string Citta { get; set; }
|
public string Citta { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
public string Indirizzo { get; set; }
|
public string Indirizzo { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string EmailInvito { get; set; }
|
public string EmailInvito { get; set; }
|
||||||
@ -21,6 +22,8 @@ public class DestinazioneViewModel
|
|||||||
public UtenteViewModel Agente { get; set; }
|
public UtenteViewModel Agente { get; set; }
|
||||||
public List<ReferenteViewModel> Referenti { get; set; }
|
public List<ReferenteViewModel> Referenti { get; set; }
|
||||||
|
|
||||||
|
public string Info => $"{RagioneSociale} - {Citta} ({Provincia}), {Indirizzo}";
|
||||||
|
|
||||||
public static implicit operator DestinazioneViewModel(Destinazione model)
|
public static implicit operator DestinazioneViewModel(Destinazione model)
|
||||||
{
|
{
|
||||||
return model == null
|
return model == null
|
||||||
@ -32,6 +35,7 @@ public class DestinazioneViewModel
|
|||||||
AgenteId = model.Agente?.Id,
|
AgenteId = model.Agente?.Id,
|
||||||
Cap = model.Cap,
|
Cap = model.Cap,
|
||||||
Citta = model.Citta,
|
Citta = model.Citta,
|
||||||
|
Provincia = model.Provincia,
|
||||||
Email = model.Email,
|
Email = model.Email,
|
||||||
EmailInvito = model.EmailInvito,
|
EmailInvito = model.EmailInvito,
|
||||||
Id = model.Id,
|
Id = model.Id,
|
||||||
@ -49,6 +53,7 @@ public class DestinazioneViewModel
|
|||||||
model.PartitaIva = PartitaIva;
|
model.PartitaIva = PartitaIva;
|
||||||
model.Cap = Cap;
|
model.Cap = Cap;
|
||||||
model.Citta = Citta;
|
model.Citta = Citta;
|
||||||
|
model.Provincia = Provincia;
|
||||||
model.Indirizzo = Indirizzo;
|
model.Indirizzo = Indirizzo;
|
||||||
model.Email = Email;
|
model.Email = Email;
|
||||||
model.EmailInvito = EmailInvito;
|
model.EmailInvito = EmailInvito;
|
||||||
|
|||||||
32
StandManager/Model/InvitoEventoViewModel.cs
Normal file
32
StandManager/Model/InvitoEventoViewModel.cs
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Domain.Entita.Base;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace StandManager.Model
|
||||||
|
{
|
||||||
|
public class InvitoEventoViewModel
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public Guid? EventoId { get; set; }
|
||||||
|
public Guid? ClienteId { get; set; }
|
||||||
|
public Guid? DestinazioneId { get; set; }
|
||||||
|
public string CodiceFornito { get; set; }
|
||||||
|
public string RagioneSociale { get; set; }
|
||||||
|
public List<IscrizioneEventoViewModel> IscrizioniEvento { get; set; }
|
||||||
|
|
||||||
|
public static implicit operator InvitoEventoViewModel(InvitoEvento model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new InvitoEventoViewModel()
|
||||||
|
{
|
||||||
|
ClienteId = model.ClienteId,
|
||||||
|
CodiceFornito = model.CodiceFornito,
|
||||||
|
EventoId = model.EventoId,
|
||||||
|
Id = model.Id,
|
||||||
|
IscrizioniEvento = model.IscrizioniEvento?.Select(x => (IscrizioneEventoViewModel)x).ToList(),
|
||||||
|
RagioneSociale = model.Cliente?.RagioneSociale
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,14 +9,12 @@ public class IscrizioneEventoViewModel
|
|||||||
public EventoViewModel Evento { get; set; }
|
public EventoViewModel Evento { get; set; }
|
||||||
public InvitoEvento InvitoEvento { get; set; }
|
public InvitoEvento InvitoEvento { get; set; }
|
||||||
public ClienteViewModel Cliente { get; set; }
|
public ClienteViewModel Cliente { get; set; }
|
||||||
|
public Guid? ClienteId { get; set; }
|
||||||
[Required(ErrorMessage = "La destinazione è obbligatoria")]
|
public Guid? DestinazioneId { get; set; }
|
||||||
public Guid DestinazioneId { get; set; }
|
[Range(1, int.MaxValue, ErrorMessage = "Inserire un numero di partecipanti valido")]
|
||||||
[Range(1, int.MaxValue, ErrorMessage = "Inserire un numero di partecipanti validi")]
|
|
||||||
public int Partecipanti { get; set; }
|
public int Partecipanti { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Le note sono obbligatorie")]
|
public string? Note { get; set; }
|
||||||
public string Note { get; set; }
|
|
||||||
public bool ScanCompleto { get; set; }
|
public bool ScanCompleto { get; set; }
|
||||||
public DateTime? DataScan { get; set; }
|
public DateTime? DataScan { get; set; }
|
||||||
[Required(ErrorMessage = "Il nome è obbigatorio")]
|
[Required(ErrorMessage = "Il nome è obbigatorio")]
|
||||||
@ -28,9 +26,9 @@ public class IscrizioneEventoViewModel
|
|||||||
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
|
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
|
||||||
public string NumeroTelefono { get; set; }
|
public string NumeroTelefono { get; set; }
|
||||||
[Required(ErrorMessage = "La provincia è obbigatoria")]
|
[Required(ErrorMessage = "La provincia è obbigatoria")]
|
||||||
public string Provincia { get; set; }
|
public Guid? Provincia { get; set; }
|
||||||
[Required(ErrorMessage = "Il comune è obbigatorio")]
|
[Required(ErrorMessage = "Il comune è obbigatorio")]
|
||||||
public string Comune { get; set; }
|
public Guid? Comune { get; set; }
|
||||||
[Required(ErrorMessage = "Il CAP è obbigatorio")]
|
[Required(ErrorMessage = "Il CAP è obbigatorio")]
|
||||||
public string Cap { get; set; }
|
public string Cap { get; set; }
|
||||||
[Required(ErrorMessage = "La Ragione Sociale è obbigatoria")]
|
[Required(ErrorMessage = "La Ragione Sociale è obbigatoria")]
|
||||||
@ -38,13 +36,13 @@ public class IscrizioneEventoViewModel
|
|||||||
[Required(ErrorMessage = "Il campo è obbigatorio")]
|
[Required(ErrorMessage = "Il campo è obbigatorio")]
|
||||||
public string EsperienzaConDAC { get; set; }
|
public string EsperienzaConDAC { get; set; }
|
||||||
[Required(ErrorMessage = "La tipologia è obbigatoria")]
|
[Required(ErrorMessage = "La tipologia è obbigatoria")]
|
||||||
public Guid TipologiaClienteId { get; set; }
|
public Guid? TipologiaClienteId { get; set; }
|
||||||
public RuoloTipo Ruolo { get; set; }
|
public RuoloTipo Ruolo { get; set; }
|
||||||
[Required(ErrorMessage = "Il ruolo è obbigatorio")]
|
[Required(ErrorMessage = "Il ruolo è obbigatorio")]
|
||||||
public int? RuoloInt { get; set; }
|
public int? RuoloInt { get; set; }
|
||||||
public bool PresaVisionePrivacy { get; set; }
|
public string? PartitaIva { get; set; }
|
||||||
public bool PresaVisioneDatiPersonali { get; set; }
|
[Required(ErrorMessage = "E' necessario indicare la data di partecipazione")]
|
||||||
|
public DateTime? GiornoPresenza { get; set; }
|
||||||
|
|
||||||
public IscrizioneEvento Map(IscrizioneEvento model)
|
public IscrizioneEvento Map(IscrizioneEvento model)
|
||||||
{
|
{
|
||||||
@ -56,13 +54,46 @@ public class IscrizioneEventoViewModel
|
|||||||
model.Cognome = Cognome;
|
model.Cognome = Cognome;
|
||||||
model.Email = Email;
|
model.Email = Email;
|
||||||
model.NumeroTelefono = NumeroTelefono;
|
model.NumeroTelefono = NumeroTelefono;
|
||||||
model.Provincia = Provincia;
|
|
||||||
model.Comune = Comune;
|
|
||||||
model.Cap = Cap;
|
model.Cap = Cap;
|
||||||
model.RagioneSociale = RagioneSociale;
|
model.RagioneSociale = RagioneSociale;
|
||||||
model.EsperienzaConDAC = EsperienzaConDAC;
|
model.EsperienzaConDAC = EsperienzaConDAC;
|
||||||
|
model.PartitaIva = PartitaIva;
|
||||||
|
model.GiornoPresenza = GiornoPresenza.Value;
|
||||||
|
model.ComuneId = Comune.GetValueOrDefault();
|
||||||
|
model.ProvinciaId = Provincia.GetValueOrDefault();
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static implicit operator IscrizioneEventoViewModel(IscrizioneEvento model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new IscrizioneEventoViewModel()
|
||||||
|
{
|
||||||
|
Id = model.Id,
|
||||||
|
InvitoEvento = model.InvitoEvento,
|
||||||
|
DestinazioneId = model.DestinazioneId,
|
||||||
|
ClienteId = model.Cliente?.Id,
|
||||||
|
Partecipanti = model.Partecipanti,
|
||||||
|
Note = model.Note,
|
||||||
|
ScanCompleto = model.ScanCompleto,
|
||||||
|
DataScan = model.DataScan,
|
||||||
|
Nome = model.Nome,
|
||||||
|
Cognome = model.Cognome,
|
||||||
|
Email = model.Email,
|
||||||
|
NumeroTelefono = model.NumeroTelefono,
|
||||||
|
Provincia = model.Provincia?.Id ?? Guid.Empty,
|
||||||
|
Comune = model.Comune?.Id ?? Guid.Empty,
|
||||||
|
Cap = model.Cap,
|
||||||
|
RagioneSociale = model.RagioneSociale,
|
||||||
|
EsperienzaConDAC = model.EsperienzaConDAC,
|
||||||
|
TipologiaClienteId = model.TipologiaClienteId,
|
||||||
|
Ruolo = model.Ruolo,
|
||||||
|
RuoloInt = (int?)model.Ruolo,
|
||||||
|
PartitaIva = model.PartitaIva,
|
||||||
|
GiornoPresenza = model.GiornoPresenza,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
26
StandManager/Model/PermissionRowViewModel.cs
Normal file
26
StandManager/Model/PermissionRowViewModel.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class PermissionRowViewModel
|
||||||
|
{
|
||||||
|
public PermissionRowViewModel(Sezione section, Feature feature, IQueryable<Permission> permissions)
|
||||||
|
{
|
||||||
|
Nome = section.Nome;
|
||||||
|
IdSezione = section.Id;
|
||||||
|
NomeFeature = feature.Nome;
|
||||||
|
DescrizioneFeature = feature.Descrizione;
|
||||||
|
IdFeature = feature.Id;
|
||||||
|
Ordinamento = section.Ordinamento;
|
||||||
|
OrdinamentoFeature = feature.Ordinamento;
|
||||||
|
Selected = permissions.Any(y => y.Feature.Id == feature.Id);
|
||||||
|
}
|
||||||
|
public Guid IdSezione { get; set; }
|
||||||
|
public string Nome { get; set; }
|
||||||
|
public Guid IdFeature { get; set; }
|
||||||
|
public string NomeFeature { get; set; }
|
||||||
|
public string DescrizioneFeature { get; set; }
|
||||||
|
public int Ordinamento { get; set; }
|
||||||
|
public int OrdinamentoFeature { get; set; }
|
||||||
|
public bool Selected { get; set; }
|
||||||
|
}
|
||||||
15
StandManager/Model/ProvinciaIstatExcelViewModel.cs
Normal file
15
StandManager/Model/ProvinciaIstatExcelViewModel.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using ClosedXML.Excel;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class ProvinciaIstatExcelViewModel
|
||||||
|
{
|
||||||
|
public ProvinciaIstatExcelViewModel(IXLRangeRow row)
|
||||||
|
{
|
||||||
|
Sigla = row.Cell(1).GetString();
|
||||||
|
Provincia = row.Cell(2).GetString();
|
||||||
|
}
|
||||||
|
public string Sigla { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
23
StandManager/Model/ProvinciaViewModel.cs
Normal file
23
StandManager/Model/ProvinciaViewModel.cs
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class ProvinciaViewModel
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Sigla { get; set; }
|
||||||
|
public string Provincia { get; set; }
|
||||||
|
public string Info => $"{Sigla} - {Provincia}";
|
||||||
|
|
||||||
|
public static implicit operator ProvinciaViewModel(ProvinciaIstat model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new ProvinciaViewModel()
|
||||||
|
{
|
||||||
|
Provincia = model.Provincia,
|
||||||
|
Sigla = model.Sigla,
|
||||||
|
Id = model.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,7 +9,7 @@ public class ReferenteViewModel
|
|||||||
public string Cognome { get; set; }
|
public string Cognome { get; set; }
|
||||||
public string Email { get; set; }
|
public string Email { get; set; }
|
||||||
public string NumeroTelefono { get; set; }
|
public string NumeroTelefono { get; set; }
|
||||||
public Ruolo Ruolo { get; set; }
|
public RuoloReferente Ruolo { get; set; }
|
||||||
public string RuoloNote { get; set; }
|
public string RuoloNote { get; set; }
|
||||||
|
|
||||||
public static implicit operator ReferenteViewModel(Referente model)
|
public static implicit operator ReferenteViewModel(Referente model)
|
||||||
|
|||||||
20
StandManager/Model/RuoloViewModel.cs
Normal file
20
StandManager/Model/RuoloViewModel.cs
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
|
public class RuoloViewModel
|
||||||
|
{
|
||||||
|
public Guid Id { get; set; }
|
||||||
|
public string Nome { get; set; }
|
||||||
|
|
||||||
|
public static implicit operator RuoloViewModel(Ruolo model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new RuoloViewModel()
|
||||||
|
{
|
||||||
|
Nome = model.Nome,
|
||||||
|
Id = model.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -16,6 +16,9 @@ namespace StandManager.Model
|
|||||||
public string Nome { get; set; }
|
public string Nome { get; set; }
|
||||||
[Required(ErrorMessage = "Il cognome è obbligatorio")]
|
[Required(ErrorMessage = "Il cognome è obbligatorio")]
|
||||||
public string Cognome { get; set; }
|
public string Cognome { get; set; }
|
||||||
|
public Guid RuoloId { get; set; }
|
||||||
|
public Guid CapoareaId { get; set; }
|
||||||
|
public bool IsCapoarea { get; set; }
|
||||||
public string Info => $"{Nome} {Cognome}";
|
public string Info => $"{Nome} {Cognome}";
|
||||||
|
|
||||||
public static implicit operator UtenteViewModel(Utente? model)
|
public static implicit operator UtenteViewModel(Utente? model)
|
||||||
@ -26,7 +29,10 @@ namespace StandManager.Model
|
|||||||
Username = model.Username,
|
Username = model.Username,
|
||||||
Email = model.Email,
|
Email = model.Email,
|
||||||
Nome = model.Nome,
|
Nome = model.Nome,
|
||||||
Cognome = model.Cognome
|
Cognome = model.Cognome,
|
||||||
|
RuoloId = model.Ruolo?.Id ?? Guid.Empty,
|
||||||
|
CapoareaId = model.Capoarea?.Id ?? Guid.Empty,
|
||||||
|
IsCapoarea = model.IsCapoarea
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,6 +41,7 @@ namespace StandManager.Model
|
|||||||
model.Nome = Nome;
|
model.Nome = Nome;
|
||||||
model.Cognome = Cognome;
|
model.Cognome = Cognome;
|
||||||
model.Email = Email;
|
model.Email = Email;
|
||||||
|
model.IsCapoarea = IsCapoarea;
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,4 +11,12 @@ public static class MembershipUtils
|
|||||||
|
|
||||||
return Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
return Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task<Guid> GetRoleId(AuthenticationStateProvider auth)
|
||||||
|
{
|
||||||
|
var state = await auth.GetAuthenticationStateAsync();
|
||||||
|
var idClaim = state.User.FindFirst("RoleId")?.Value;
|
||||||
|
|
||||||
|
return Guid.Parse(idClaim ?? Guid.Empty.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user