Update x impiego DtCart shared
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
@if (IsRicTimb)
|
||||
{
|
||||
<div class="cardContainerMancTimb py-2 px-3">
|
||||
<div class="data d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<span>@($"{oraRichiesta:dddd}")</span>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<span>@($"{oraRichiesta:dd MMMM}")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oraRichiesta">
|
||||
<input @bind="oraRichiesta" type="time" step="300" />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (!isCompactMode)
|
||||
{
|
||||
<div class="cardContainer @cardCss py-2 px-3">
|
||||
<div class="data d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<span>@($"{dtCurr:dddd}")</span>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<span>@($"{dtCurr:dd MMMM}")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ora">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div>
|
||||
@($"{dtCurr:HH}")
|
||||
</div>
|
||||
<div class="@cssSec">:</div>
|
||||
<div>
|
||||
@($"{dtCurr:mm}")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="cardContainerCompact @cardCss py-1 px-3">
|
||||
<div class="dataComp">
|
||||
<div class="data d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<span>@($"{dtCurr:dddd}")</span>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
<span>@($"{dtCurr:dd MMMM}")</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ora">
|
||||
<div class="d-flex justify-content-center">
|
||||
<div>
|
||||
@($"{dtCurr:HH}")
|
||||
</div>
|
||||
<div class="@cssSec">:</div>
|
||||
<div>
|
||||
@($"{dtCurr:mm}")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
using GPW.CORE.Smart8.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GPW.CORE.Smart8.Shared.Components.Timbra
|
||||
{
|
||||
public partial class DtCard : IDisposable
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public bool IsLoading { get; set; } = true;
|
||||
|
||||
[Parameter]
|
||||
public bool IsRicTimb { get; set; } = true;
|
||||
|
||||
[Parameter]
|
||||
public bool NextIsExtrata { get; set; } = true;
|
||||
[Parameter]
|
||||
public bool isCompactMode { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (uiTimer != null)
|
||||
{
|
||||
uiTimer.Elapsed -= ElapsedTimerUi;
|
||||
uiTimer.Stop();
|
||||
uiTimer.Dispose();
|
||||
}
|
||||
MService.EA_DateChanged -= MService_EA_DateChanged;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
public void ElapsedTimerUi(object? source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
if (!IsRicTimb)
|
||||
{
|
||||
dtCurr = DateTime.Now;
|
||||
cssSec = (dtCurr.Second % 2 == 0) ? "text-light" : "text-light opacity-50";
|
||||
await Task.Delay(1);
|
||||
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
}
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
public void StartTimerUI()
|
||||
{
|
||||
// timer che scatta dopo 3sec
|
||||
uiTimer = new System.Timers.Timer(1000);
|
||||
uiTimer.Elapsed += ElapsedTimerUi;
|
||||
uiTimer.Enabled = true;
|
||||
uiTimer.AutoReset = true;
|
||||
uiTimer.Start();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string cssSec { get; set; } = "text-light";
|
||||
|
||||
[Inject]
|
||||
protected UIMessageService MService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
MService.EA_DateChanged += MService_EA_DateChanged;
|
||||
if (!IsRicTimb)
|
||||
{
|
||||
StartTimerUI();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private DateTime dtCurr = DateTime.Now;
|
||||
|
||||
private System.Timers.Timer uiTimer = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Card da collegare al tipo di stato/colore
|
||||
/// </summary>
|
||||
private string cardCss
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "defaultCard";
|
||||
if (!IsLoading)
|
||||
{
|
||||
answ = NextIsExtrata ? "cardEntrata" : "cardUscita";
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime oraRichiesta
|
||||
{
|
||||
get => MService.targetDateMancTimb;
|
||||
set => MService.targetDateMancTimb = new DateTime(MService.targetDateMancTimb.Year, MService.targetDateMancTimb.Month, MService.targetDateMancTimb.Day, value.Hour, value.Minute, 0);
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async void MService_EA_DateChanged()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
.cardContainerAll {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
|
||||
color: #fff;
|
||||
}
|
||||
.cardContainer {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
|
||||
color: #fff;
|
||||
min-height: 8.5rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
.cardContainerCompact {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
|
||||
color: #fff;
|
||||
min-height: 4rem;
|
||||
}
|
||||
.cardContainerCompact .dataComp {
|
||||
font-weight: bold;
|
||||
/*padding-top: 1.5rem;*/
|
||||
/*padding-left: 1.5rem;*/
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.cardContainerCompact .ora {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
font-size: 3.5rem;
|
||||
text-align: center;
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
.cardContainerMancTimb {
|
||||
padding-bottom: 1rem;
|
||||
min-height: 8.5rem;
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
|
||||
color: #fff;
|
||||
background-color: #2980B9;
|
||||
}
|
||||
.titolo {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.data {
|
||||
font-weight: bold;
|
||||
/*padding-top: 1.5rem;*/
|
||||
/*padding-left: 1.5rem;*/
|
||||
position: relative;
|
||||
font-size: 1.25rem;
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.ora {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
font-size: 3.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.oraRichiesta {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
.oraRichiesta input {
|
||||
border-radius: 0.5rem;
|
||||
border: none;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
.defaultCard {
|
||||
background-color: rgba(0, 128, 255, 0.8);
|
||||
}
|
||||
.cardEntrata {
|
||||
background-color: #9B59B6;
|
||||
}
|
||||
.cardUscita {
|
||||
background-color: #4CAF50;
|
||||
}
|
||||
.txtSec {
|
||||
font-weight: normal;
|
||||
font-size: 2rem;
|
||||
}
|
||||
.pulse-warning {
|
||||
/*color: rgba(255, 255, 255, 0.8);*/
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
animation: pulse-warning 2.5s infinite;
|
||||
}
|
||||
@-webkit-keyframes pulse-warning {
|
||||
0% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
color: #ffffff;
|
||||
}
|
||||
70% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
}
|
||||
100% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
@keyframes pulse-warning {
|
||||
0% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
color: #ffffff;
|
||||
}
|
||||
70% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
}
|
||||
100% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(255, 170, 0, 0.8);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0.8);
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
.cardContainerAll {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0,0,0,0.7);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cardContainer {
|
||||
.cardContainerAll;
|
||||
min-height: 8.5rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.cardContainerCompact {
|
||||
.cardContainerAll;
|
||||
min-height: 4rem;
|
||||
}
|
||||
|
||||
.cardContainerCompact .dataComp {
|
||||
font-weight: bold;
|
||||
/*padding-top: 1.5rem;*/
|
||||
/*padding-left: 1.5rem;*/
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.cardContainerCompact .ora {
|
||||
.ora;
|
||||
font-size: 2.8rem;
|
||||
}
|
||||
|
||||
.cardContainerMancTimb {
|
||||
padding-bottom: 1rem;
|
||||
min-height: 8.5rem;
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
box-shadow: 0px 3px 4px rgba(0,0,0,0.7);
|
||||
color: #fff;
|
||||
background-color: #2980B9;
|
||||
}
|
||||
|
||||
.titolo {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.data {
|
||||
font-weight: bold;
|
||||
/*padding-top: 1.5rem;*/
|
||||
/*padding-left: 1.5rem;*/
|
||||
position: relative;
|
||||
font-size: 1.25rem;
|
||||
text-transform: uppercase;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.ora {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
font-size: 3.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.oraRichiesta {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
font-size: 2rem;
|
||||
text-align: center;
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
|
||||
.oraRichiesta input {
|
||||
border-radius: 0.5rem;
|
||||
border: none;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
.defaultCard {
|
||||
background-color: rgba(0, 128, 255, .8);
|
||||
}
|
||||
|
||||
.cardEntrata {
|
||||
background-color: #9B59B6;
|
||||
}
|
||||
|
||||
.cardUscita {
|
||||
background-color: #4CAF50;
|
||||
}
|
||||
|
||||
.txtSec {
|
||||
font-weight: normal;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.pulse-warning {
|
||||
/*color: rgba(255, 255, 255, 0.8);*/
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
animation: pulse-warning 2.5s infinite;
|
||||
}
|
||||
|
||||
|
||||
@-webkit-keyframes pulse-warning {
|
||||
0% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
70% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
-webkit-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulse-warning {
|
||||
0% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
70% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
-moz-box-shadow: 0px 0px 20px 5px rgba(255, 170, 0, .8);
|
||||
box-shadow: 0px 0px 20px 5px rgba(0, 128, 255, .8);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.cardContainerAll{border-radius:12px;width:100%;box-shadow:0 3px 4px rgba(0,0,0,.7);color:#fff;}.cardContainer{border-radius:12px;width:100%;box-shadow:0 3px 4px rgba(0,0,0,.7);color:#fff;min-height:8.5rem;padding-bottom:1rem;}.cardContainerCompact{border-radius:12px;width:100%;box-shadow:0 3px 4px rgba(0,0,0,.7);color:#fff;min-height:4rem;}.cardContainerCompact .dataComp{font-weight:bold;position:relative;text-transform:uppercase;font-size:1rem;}.cardContainerCompact .ora{width:100%;font-weight:bold;position:relative;font-size:3.5rem;text-align:center;font-size:2.8rem;}.cardContainerMancTimb{padding-bottom:1rem;min-height:8.5rem;border-radius:12px;width:100%;box-shadow:0 3px 4px rgba(0,0,0,.7);color:#fff;background-color:#2980b9;}.titolo{font-size:1rem;}.data{font-weight:bold;position:relative;font-size:1.25rem;text-transform:uppercase;display:flex;justify-content:space-between;}.ora{width:100%;font-weight:bold;position:relative;font-size:3.5rem;text-align:center;}.oraRichiesta{width:100%;font-weight:bold;position:relative;font-size:2rem;text-align:center;padding-top:1.5rem;}.oraRichiesta input{border-radius:.5rem;border:0;padding:.25rem;}.defaultCard{background-color:rgba(0,128,255,.8);}.cardEntrata{background-color:#9b59b6;}.cardUscita{background-color:#4caf50;}.txtSec{font-weight:normal;font-size:2rem;}.pulse-warning{box-shadow:0 0 20px 5px rgba(0,128,255,.8);animation:pulse-warning 2.5s infinite;}@-webkit-keyframes pulse-warning{0%{-webkit-box-shadow:0 0 20px 5px rgba(0,128,255,.8);color:#fff;}70%{-webkit-box-shadow:0 0 20px 5px rgba(0,128,255,0);}100%{-webkit-box-shadow:0 0 20px 5px rgba(0,128,255,.8);color:#fff;}}@keyframes pulse-warning{0%{-moz-box-shadow:0 0 20px 5px rgba(0,128,255,.8);box-shadow:0 0 20px 5px rgba(0,128,255,.8);color:#fff;}70%{-moz-box-shadow:0 0 20px 5px rgba(0,128,255,0);box-shadow:0 0 20px 5px rgba(0,128,255,0);}100%{-moz-box-shadow:0 0 20px 5px rgba(255,170,0,.8);box-shadow:0 0 20px 5px rgba(0,128,255,.8);color:#fff;}}
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Components\Admin\" />
|
||||
<Folder Include="Components\Timbra\" />
|
||||
<Folder Include="Pages\" />
|
||||
<Folder Include="Layout\" />
|
||||
<Folder Include="wwwroot\" />
|
||||
|
||||
@@ -2,5 +2,9 @@
|
||||
{
|
||||
"outputFile": "Components/Common/CmpTop.razor.css",
|
||||
"inputFile": "Components/Common/CmpTop.razor.less"
|
||||
},
|
||||
{
|
||||
"outputFile": "Components/Timbra/DtCard.razor.css",
|
||||
"inputFile": "Components/Timbra/DtCard.razor.less"
|
||||
}
|
||||
]
|
||||
@@ -72,7 +72,6 @@ namespace GPW.CORE.Smart8.Components.Compo
|
||||
|
||||
[Inject]
|
||||
protected UIMessageService MService { get; set; } = null!;
|
||||
//protected MessageServiceLoc MService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
@using GPW.CORE.Smart8.Shared
|
||||
@using GPW.CORE.Smart8.Shared.Components
|
||||
@using GPW.CORE.Smart8.Shared.Components.Common
|
||||
@using GPW.CORE.Smart8.Shared.Components.Timbra
|
||||
|
||||
@@ -158,8 +158,10 @@ namespace GPW.CORE.Smart8.Data
|
||||
}
|
||||
}
|
||||
|
||||
#if false
|
||||
public DateTime targetDate { get; set; } = DateTime.Today;
|
||||
public DateTime targetDateMancTimb { get; set; }
|
||||
public DateTime targetDateMancTimb { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -4,17 +4,19 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>4.1.2603.3009</Version>
|
||||
<Version>4.1.2603.3010</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Components\Compo\CmpTop.razor.cs" />
|
||||
<Compile Remove="Components\Compo\DtCard.razor.cs" />
|
||||
<Compile Remove="Components\Compo\NavBottom.razor.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="compilerconfig.json" />
|
||||
<Content Remove="Components\Compo\CmpTop.razor" />
|
||||
<Content Remove="Components\Compo\DtCard.razor" />
|
||||
<Content Remove="Components\Compo\NavBottom.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -22,6 +24,9 @@
|
||||
<None Remove="Components\Compo\CmpTop.razor.css" />
|
||||
<None Remove="Components\Compo\CmpTop.razor.less" />
|
||||
<None Remove="Components\Compo\CmpTop.razor.min.css" />
|
||||
<None Remove="Components\Compo\DtCard.razor.css" />
|
||||
<None Remove="Components\Compo\DtCard.razor.less" />
|
||||
<None Remove="Components\Compo\DtCard.razor.min.css" />
|
||||
<None Remove="Components\Compo\NavBottom.razor.css" />
|
||||
<None Remove="Components\Compo\NavBottom.razor.less" />
|
||||
<None Remove="Components\Compo\NavBottom.razor.min.css" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GPW - Gestione Presenze Web</i>
|
||||
<h4>Versione: 4.1.2603.3009</h4>
|
||||
<h4>Versione: 4.1.2603.3010</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
4.1.2603.3009
|
||||
4.1.2603.3010
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>4.1.2603.3009</version>
|
||||
<version>4.1.2603.3010</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>
|
||||
|
||||
Reference in New Issue
Block a user