diff --git a/GPW.CORE.Data/Controllers/GPWController.cs b/GPW.CORE.Data/Controllers/GPWController.cs index 5a630b4..773b10a 100644 --- a/GPW.CORE.Data/Controllers/GPWController.cs +++ b/GPW.CORE.Data/Controllers/GPWController.cs @@ -84,7 +84,7 @@ namespace GPW.CORE.Data.Controllers rawRegAtt = localDbCtx .DbSetRegAttivita .Where(x => x.IdxDipendente == idxDipendente && dtInizio <= x.Inizio && x.Inizio <= dtFine) - .Include(a => a.FasiNav).ThenInclude(p=>p.ProgettoNav) + .Include(a => a.FasiNav).ThenInclude(p=>p.ProgettoNav).ThenInclude(c => c.ClienteNav) .ToList(); // calcolo intervallo date... diff --git a/GPW.CORE.Data/DbModels/RegAttivitaModel.cs b/GPW.CORE.Data/DbModels/RegAttivitaModel.cs index 426ccd4..66c74e3 100644 --- a/GPW.CORE.Data/DbModels/RegAttivitaModel.cs +++ b/GPW.CORE.Data/DbModels/RegAttivitaModel.cs @@ -22,6 +22,26 @@ namespace GPW.CORE.Data.DbModels /// Ore Attività - prima era ([dbo].[f_hourInterval]([inizio],[fine])) poi sostituita per performance /// public decimal? OreTot { get; set; } + + [NotMapped] + public TimeSpan Durata + { + get + { + TimeSpan valore = TimeSpan.FromHours(0); + if (OreTot != null) + { + try + { + valore = TimeSpan.FromHours((double)OreTot); + } + catch (Exception exc) + { } + } + return valore; + } + } + public decimal? Importo { get; set; } [ForeignKey("IdxDipendente")] diff --git a/GPW.CORE.UI/Components/RegAtt.razor b/GPW.CORE.UI/Components/RegAtt.razor index 8c63b30..e78c120 100644 --- a/GPW.CORE.UI/Components/RegAtt.razor +++ b/GPW.CORE.UI/Components/RegAtt.razor @@ -6,13 +6,22 @@