Merge branch 'release/AutoRefresh'

This commit is contained in:
Samuele Locatelli
2022-01-21 11:07:53 +01:00
10 changed files with 58 additions and 16 deletions
+2 -2
View File
@@ -28,8 +28,8 @@
<div class="@cssDropContent border border-dark table-dark text-light rounded p-2">
<div class="row">
<div class="col-12 pr-0">
<div class="text-light text-left"><b>@($"{CurrData.FasiNav?.ProgettoNav?.ClienteNav?.RagSociale}")</b> - <span>@($"{CurrData.FasiNav?.ProgettoNav?.NomeProj}")</span> | <span class="text-info text-left" title="@CurrData.FasiNav?.DescrizioneFase">@($"{CurrData.FasiNav?.DescrizioneFase}")</span></div>
<div class="text-warning text-left textTrim max20Char" title="@CurrData.Descrizione">@($"{CurrData.Descrizione}")</div>
<div class="text-light text-left"><b>@($"{CurrData.FasiNav?.ProgettoNav?.ClienteNav?.RagSociale}")</b> - <span class="textTrim" title="@CurrData.FasiNav?.ProgettoNav?.NomeProj">@($"{CurrData.FasiNav?.ProgettoNav?.NomeProj}")</span> | <span class="text-info text-left textTrim" title="@CurrData.FasiNav?.DescrizioneFase">@($"{CurrData.FasiNav?.DescrizioneFase}")</span></div>
<div class="text-warning text-left textTrim" title="@CurrData.Descrizione">@($"{CurrData.Descrizione}")</div>
</div>
</div>
@if (AppMServ.PayloadOk)
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>3.0.2201.1808</Version>
<Version>3.0.2201.2111</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
+3
View File
@@ -116,6 +116,9 @@ else if (ListTimbr != null)
<i class="fas fa-angle-double-right"></i>
<input @bind="endHour" style="width: 3em;" type="number" />
</div>
<div class="py-1 px-2">
<span>@lastRefresh.ToString("dddd dd.MM.yyyy HH:mm:ss")</span>
</div>
<div class="py-1 px-2">
@if (clonedRA != null)
{
+44 -2
View File
@@ -13,7 +13,7 @@ namespace GPW.CORE.UI.Pages
/// modale: vedere qui: https://gist.github.com/conficient/ba98d1662c659e170ec16650acea05c8
/// </summary>
//[Authorize(Roles = "SuperAdmin, Admin")]
public partial class Planner
public partial class Planner : IDisposable
{
#region Private Fields
@@ -298,6 +298,7 @@ namespace GPW.CORE.UI.Pages
await Task.Delay(100);
checkHourRange();
await Task.Delay(100);
lastRefresh = DateTime.Now;
isLoading = false;
}
@@ -339,10 +340,51 @@ namespace GPW.CORE.UI.Pages
DtRifTempRil = dataRif;
showTemp = true;
}
/// <summary>
/// TImer per refresh dati
/// </summary>
protected System.Timers.Timer timer;
protected DateTime lastRefresh = DateTime.Now;
protected override void OnInitialized()
{
// avvio un timer infinito x refresh pagina COMUNQUE ogni 60 sec anche non succedesse nulla...
timer = new System.Timers.Timer
{
Interval = 1000 * 60,
AutoReset = true,
Enabled = true
};
timer.Elapsed += async (s, ea) => await TryReload();
}
public void Dispose()
{
timer?.Dispose();
}
protected async Task TryReload()
{
await Task.Delay(1);
// effettuo reload SOLO SE no ho editing in corso...
if (!modeEdit)
{
await ReloadData();
await InvokeAsync(StateHasChanged);
}
}
protected bool modeEdit
{
get => (currRecord != null || ListTimbr != null || showTemp);
//get => (selPeriod || showTemp || currRecord != null || weekStatList != null || ListTimbr != null);
}
protected async Task ReloadPeriodo()
{
selPeriod = false;
showTemp=false;
showTemp = false;
weekStatList = null;
currRecord = null;
ListTimbr = null;
+3 -4
View File
@@ -8,11 +8,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
@*<link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />*@
<link rel="stylesheet" href="lib/bootstrap/css/bootstrap.min.css" />
<link href="css/site.css" rel="stylesheet" />
<link href="lib/font-awesome/css/all.css" rel="stylesheet" />
<link href="GPW.CORE.UI.styles.css" rel="stylesheet" />
<link rel="stylesheet"href="css/site.css" />
<link rel="stylesheet"href="lib/font-awesome/css/all.css" />
<link rel="stylesheet"href="GPW.CORE.UI.styles.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
+1 -2
View File
@@ -11,12 +11,11 @@
<div class="top-row px-4 auth">
<LoginDisplay />
</div>
<article class="content pt-1">
@Body
</article>
<div class="fixed-bottom bottom-row px-2">
<GPW.CORE.UI.Components.CmpFooter></GPW.CORE.UI.Components.CmpFooter>
<CmpFooter></CmpFooter>
</div>
</main>
</div>
+1 -2
View File
@@ -1,5 +1,4 @@
///Setup del chart desiderato con id univoco
///Setup del chart desiderato con id univoco
window.setup = (id, config) => {
var ctx = document.getElementById(id).getContext('2d');
//let currentDate = new Date();
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>GPW - Gestione Presenze Web</i>
<h4>Versione: 3.0.2201.1808</h4>
<h4>Versione: 3.0.2201.2111</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
3.0.2201.1808
3.0.2201.2111
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>3.0.2201.1808</version>
<version>3.0.2201.2111</version>
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
<mandatory>false</mandatory>