Merge branch 'release/UpdateSmartDisplCFF'

This commit is contained in:
Samuele Locatelli
2023-04-20 19:30:06 +02:00
9 changed files with 52 additions and 8 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ using System.Diagnostics;
namespace GPW.CORE.Api.Data
{
public class ApiDataService
public class ApiDataService : IDisposable
{
#region Public Fields
+1 -1
View File
@@ -9,7 +9,7 @@ else
{
<div style="background-color: #34495E; border-radius: 12px; width:100%" class="pb-1 mb-5">
<CalendarMonth DtRif="@dtCurr" MainCss="table table-dark table-borderless" DateSelected="DisplayDate" MonthChanged="ReloadMonth" DateCheck="@DateCheck" SingleWeek="@showDetail" SelDayCss="selDate rounded-top p-2" HeadStyle="color: #E67E22"></CalendarMonth>
<CalendarMonth DtRif="@dtCurr" MainCss="table table-dark table-borderless" DateSelected="DisplayDate" MonthChanged="ReloadMonth" DateCheck="@DateCheck" DateCheckBlock="@DateCFF" SingleWeek="@showDetail" SelDayCss="selDate rounded-top p-2" HeadStyle="color: #E67E22"></CalendarMonth>
@if (showDetail)
{
<div class="statsContainer m-2 mt-0">
@@ -1,7 +1,9 @@
using EgwCoreLib.Razor.Data;
using GPW.CORE.Data;
using GPW.CORE.Data.DbModels;
using GPW.CORE.Data.DTO;
using GPW.CORE.Smart.Data;
using GPW.CORE.Smart.Pages;
using Microsoft.AspNetCore.Components;
namespace GPW.CORE.Smart.Components
@@ -29,6 +31,19 @@ namespace GPW.CORE.Smart.Components
}
}
[Parameter]
public List<CalFesteFerieModel>? ListFermateAzienda
{
get => listCFF;
set
{
if (listCFF != value)
{
listCFF = value;
}
}
}
[Parameter]
public List<RegRichiesteModel>? ListRecordsRichieste
{
@@ -47,11 +62,14 @@ namespace GPW.CORE.Smart.Components
#endregion Public Properties
private Dictionary<DateTime, string> DateCFF = new Dictionary<DateTime, string>();
#region Public Methods
public void Dispose()
{
DateCheck = new Dictionary<DateTime, string>();
DateCFF = new Dictionary<DateTime, string>();
ListRecords = null;
listRecordsRichieste = null;
GC.Collect();
@@ -109,6 +127,7 @@ namespace GPW.CORE.Smart.Components
private DateTime dtCurr { get; set; } = DateTime.Today;
private List<DailyDataDTO>? listRecords { get; set; } = null;
private List<CalFesteFerieModel>? listCFF { get; set; } = null;
private List<RegRichiesteModel>? listRecordsRichieste { get; set; } = null;
@@ -178,9 +197,31 @@ namespace GPW.CORE.Smart.Components
private void ReloadData()
{
DateCheck = new Dictionary<DateTime, string>();
DateCFF = new Dictionary<DateTime, string>();
string cssOkComm = "bg-success text-light rounded-circle p-2";
string cssOkLav = "bg-warning text-light rounded-circle p-2";
string cssToday = "bg-info text-dark rounded-circle p-2";
string cssFest = "bg-danger text-warning rounded-pill2 px-0 opacity-50";
string cssChius = "bg-warning text-dark rounded-pill2 px-0 opacity-50";
// recupero le fermate aziendali
if (ListFermateAzienda!=null && ListFermateAzienda.Count > 0)
{
string cssSpec = "";
foreach (var item in ListFermateAzienda)
{
cssSpec = item.codGiust == "FEST" ? cssFest : cssChius;
if (!DateCFF.ContainsKey(item.data))
{
if (item.data.DayOfWeek != DayOfWeek.Saturday && item.data.DayOfWeek != DayOfWeek.Sunday)
{
DateCFF.Add(item.data, cssSpec);
}
}
}
}
if (ListRecords != null)
{
string currCss = "";
+1 -1
View File
@@ -21,7 +21,7 @@ else
</div>
<div class="row mt-2">
<div class="col">
<Calendario IdxDipendente="@IdxDipCurr" ListRecords="@listRecords" currMode="@modoCal" ReqReload="ForceReload" ListRecordsRichieste="@listRecordsRichieste"></Calendario>
<Calendario IdxDipendente="@IdxDipCurr" ListRecords="@listRecords" currMode="@modoCal" ReqReload="ForceReload" ListRecordsRichieste="@listRecordsRichieste" ListFermateAzienda="@listCFF"></Calendario>
</div>
</div>
}
@@ -23,6 +23,7 @@ namespace GPW.CORE.Smart.Components
MService.EA_CalModeChanged -= MService_EA_CalModeChanged;
listRecords = null;
listRecordsRichieste = null;
listCFF = null;
GC.Collect();
}
@@ -63,6 +64,7 @@ namespace GPW.CORE.Smart.Components
private List<DailyDataDTO>? listRecords = null;
private List<RegRichiesteModel>? listRecordsRichieste = null;
private List<CalFesteFerieModel>? listCFF { get; set; } = null;
#endregion Private Fields
@@ -145,6 +147,7 @@ namespace GPW.CORE.Smart.Components
DateTime MeseEnd = MeseStart.AddMonths(1);
listRecords = await CDService.DailyDetails(IdxDipCurr, MeseStart, MeseEnd);
listRecordsRichieste = await CDService.RegRichiesteGetByDip(IdxDipCurr, MeseStart, MeseEnd);
listCFF = await CDService.CalFestFeriePeriodo(MeseStart, MeseEnd);
// recupero dati che mi servono...
await updateNextTimb();
await Task.Delay(25);
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>3.0.2304.0309</Version>
<Version>3.0.2304.2019</Version>
<ImplicitUsings>enable</ImplicitUsings>
<PackageProjectUrl>www.egalware.com</PackageProjectUrl>
<Description>GPW Smart UI</Description>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>GPW - Gestione Presenze Web</i>
<h4>Versione: 3.0.2304.1116</h4>
<h4>Versione: 3.0.2304.2019</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
3.0.2304.1116
3.0.2304.2019
+2 -2
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>3.0.2304.1116</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<version>3.0.2304.2019</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.Smart.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>
</item>