Merge branch 'develop' of https://gitlab.steamware.net/steamware/gpw_next into develop
This commit is contained in:
@@ -8,6 +8,19 @@ namespace GPW.CORE.Comp
|
||||
{
|
||||
public class CalendarEvent
|
||||
{
|
||||
public CalendarEvent(int id, DateTime Inizio, DateTime Fine, string cssClass, string Title, string Description, string Icon, string Type, string ToolTip)
|
||||
{
|
||||
this.id = id;
|
||||
this.Inizio = Inizio;
|
||||
this.Fine = Fine;
|
||||
this.CssClass = CssClass;
|
||||
this.Title = Title;
|
||||
this.Description = Description;
|
||||
this.Icon = Icon;
|
||||
this.Type = Type;
|
||||
this.ToolTip = ToolTip;
|
||||
|
||||
}
|
||||
public int id { get; set; } = 0;
|
||||
public DateTime Inizio { get; set; } = DateTime.Today.AddHours(8);
|
||||
public DateTime Fine { get; set; } = DateTime.Today.AddHours(10);
|
||||
|
||||
@@ -39,6 +39,35 @@ else
|
||||
<span @onclick="() => clickDay(giorno)" class="@spanCss(giorno)">
|
||||
@($"{giorno:dd}")
|
||||
</span>
|
||||
@if (!(giorno.DayOfWeek == DayOfWeek.Saturday || giorno.DayOfWeek == DayOfWeek.Sunday))
|
||||
{
|
||||
<div class="pallini">
|
||||
@if (hasDot(giorno, "MAL"))
|
||||
{
|
||||
<div class="malattie">
|
||||
|
||||
</div>
|
||||
}
|
||||
@if (hasDot(giorno, "FER"))
|
||||
{
|
||||
<div class="ferie">
|
||||
|
||||
</div>
|
||||
}
|
||||
@if (hasDot(giorno, "PERM"))
|
||||
{
|
||||
<div class="permessi">
|
||||
|
||||
</div>
|
||||
}
|
||||
@if (hasDot(giorno, "104"))
|
||||
{
|
||||
<div class="permessi104">
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.ObjectPool;
|
||||
using System.Formats.Asn1;
|
||||
using System.Text;
|
||||
|
||||
namespace GPW.CORE.Comp
|
||||
{
|
||||
@@ -162,6 +165,22 @@ namespace GPW.CORE.Comp
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private bool hasDot(DateTime dtCurr, string type)
|
||||
{
|
||||
bool answ = false;
|
||||
if(EventList != null)
|
||||
{
|
||||
foreach(var item in EventList)
|
||||
{
|
||||
if(item.Inizio.Date == dtCurr.Date && item.Type == type)
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private async Task clickDay(DateTime dtClick)
|
||||
{
|
||||
// se è mese prec/successivo --> sposto data rif
|
||||
@@ -181,6 +200,10 @@ namespace GPW.CORE.Comp
|
||||
{
|
||||
// altrimenti riporto evento
|
||||
await DateSelected.InvokeAsync(dtClick);
|
||||
if (EventList != null)
|
||||
{
|
||||
var eventListWeekly = EventList.Where(x => SingleWeekRow.Contains(dtClick)).ToList();
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #34495E;
|
||||
transition: height 0.3s cubic-bezier(0.54, 0.57, 0.36, 0.98) 0.2s;
|
||||
}
|
||||
.cssTable tr {
|
||||
margin: 0 1rem 0 1rem;
|
||||
@@ -27,4 +28,91 @@
|
||||
.selDate {
|
||||
background-color: #E67E22;
|
||||
color: #000;
|
||||
}
|
||||
.pallini {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.divAll {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
}
|
||||
@keyframes dotEntranceMal {
|
||||
0% {
|
||||
left: -50px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes dotEntranceFer {
|
||||
0% {
|
||||
left: -50px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes dotEntrancePerm {
|
||||
0% {
|
||||
left: -50px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
@keyframes dotEntranceCent {
|
||||
0% {
|
||||
left: -50px;
|
||||
}
|
||||
100% {
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.malattie {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
background-color: #039BE5;
|
||||
position: relative;
|
||||
animation-name: dotEntranceMal;
|
||||
animation-duration: 1.1s;
|
||||
}
|
||||
.ferie {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
background-color: #00FF00;
|
||||
position: relative;
|
||||
animation-name: dotEntranceFer;
|
||||
animation-duration: 0.8s;
|
||||
}
|
||||
.permessi {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
background-color: #9966DE;
|
||||
position: relative;
|
||||
animation-name: dotEntrancePerm;
|
||||
animation-duration: 0.5s;
|
||||
}
|
||||
.permessi104 {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
background-color: #DE00AB;
|
||||
position: relative;
|
||||
animation-name: dotEntranceCent;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #34495E;
|
||||
transition: height 0.3s cubic-bezier(0.54, 0.57, 0.36, 0.98) 0.2s;
|
||||
}
|
||||
|
||||
.cssTable tr {
|
||||
@@ -34,3 +35,82 @@
|
||||
color: #000;
|
||||
}
|
||||
|
||||
|
||||
.pallini {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.divAll {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 0.3rem;
|
||||
border-radius: 50%;
|
||||
color: transparent;
|
||||
}
|
||||
@keyframes dotEntranceMal {
|
||||
0% {
|
||||
left: -50px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes dotEntranceFer {
|
||||
0% {
|
||||
left: -50px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
@keyframes dotEntrancePerm {
|
||||
0% {
|
||||
left: -50px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
@keyframes dotEntranceCent {
|
||||
0% {
|
||||
left: -50px
|
||||
}
|
||||
|
||||
100% {
|
||||
left: 0
|
||||
}
|
||||
}
|
||||
|
||||
.malattie {
|
||||
.divAll;
|
||||
background-color: #039BE5;
|
||||
position: relative;
|
||||
animation-name: dotEntranceMal;
|
||||
animation-duration: 1.1s;
|
||||
}
|
||||
.ferie {
|
||||
.divAll;
|
||||
background-color: #00FF00;
|
||||
position: relative;
|
||||
animation-name: dotEntranceFer;
|
||||
animation-duration: 0.8s;
|
||||
}
|
||||
.permessi {
|
||||
.divAll;
|
||||
background-color: #9966DE;
|
||||
position: relative;
|
||||
animation-name: dotEntrancePerm;
|
||||
animation-duration: 0.5s;
|
||||
}
|
||||
.permessi104 {
|
||||
.divAll;
|
||||
background-color: #DE00AB;
|
||||
position: relative;
|
||||
animation-name: dotEntranceCent;
|
||||
animation-duration: 0.3s;
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.cssTable{border-radius:12px;width:100%;height:100%;background-color:#34495e;}.cssTable tr{margin:0 1rem 0 1rem;}.cssTable td{padding:.6rem 0 .4rem 0;border:0;}.cssTable thead tr{margin-top:.625rem;}.meseAnno{text-transform:capitalize;color:#fff;}.containerBtnTemp{position:relative;align-items:center;display:flex;justify-content:center;}.selDate{background-color:#e67e22;color:#000;}
|
||||
.cssTable{border-radius:12px;width:100%;height:100%;background-color:#34495e;transition:height .3s cubic-bezier(.54,.57,.36,.98) .2s;}.cssTable tr{margin:0 1rem 0 1rem;}.cssTable td{padding:.6rem 0 .4rem 0;border:0;}.cssTable thead tr{margin-top:.625rem;}.meseAnno{text-transform:capitalize;color:#fff;}.containerBtnTemp{position:relative;align-items:center;display:flex;justify-content:center;}.selDate{background-color:#e67e22;color:#000;}.pallini{display:flex;justify-content:space-evenly;}.divAll{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;}@keyframes dotEntranceMal{0%{left:-50px;}100%{left:0;}}@keyframes dotEntranceFer{0%{left:-50px;}100%{left:0;}}@keyframes dotEntrancePerm{0%{left:-50px;}100%{left:0;}}@keyframes dotEntranceCent{0%{left:-50px;}100%{left:0;}}.malattie{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#039be5;position:relative;animation-name:dotEntranceMal;animation-duration:1.1s;}.ferie{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#0f0;position:relative;animation-name:dotEntranceFer;animation-duration:.8s;}.permessi{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#9966de;position:relative;animation-name:dotEntrancePerm;animation-duration:.5s;}.permessi104{padding:0;margin:0;height:.3rem;border-radius:50%;color:transparent;background-color:#de00ab;position:relative;animation-name:dotEntranceCent;animation-duration:.3s;}
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="col-12">
|
||||
@if (!isLoading)
|
||||
{
|
||||
<CalendarMonth DtRif="@dtCurr" MainCss="table table-dark table-borderless" DateSelected="DisplayDate" MonthChanged="ReloadMonth" DateCheckBlock="@DateCFF" DateCheck="@DateRDip" 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" DateCheckBlock="@DateCFF" EventList=@eventList SingleWeek="@showDetail" SelDayCss="selDate rounded-top p-2" HeadStyle="color: #E67E22"></CalendarMonth>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -183,8 +183,8 @@ namespace GPW.CORE.Smart.Pages
|
||||
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";
|
||||
string cssChius = "bg-warning text-dark";
|
||||
string cssFest = "bg-danger text-warning rounded-pill ";
|
||||
string cssChius = "bg-warning text-dark rounded-pill ";
|
||||
string cssRichFer = "bg-warning text-dark rounded-circle p-2";
|
||||
string cssRichPerm = "bg-info text-light rounded-circle p-2";
|
||||
string cssMal = "bg-dark text-light rounded-circle p-2";
|
||||
@@ -216,7 +216,10 @@ namespace GPW.CORE.Smart.Pages
|
||||
cssSpec = item.codGiust == "FEST" ? cssFest : cssChius;
|
||||
if (!DateCFF.ContainsKey(item.data))
|
||||
{
|
||||
DateCFF.Add(item.data, cssSpec);
|
||||
if (item.data.DayOfWeek != DayOfWeek.Saturday && item.data.DayOfWeek != DayOfWeek.Sunday)
|
||||
{
|
||||
DateCFF.Add(item.data, cssSpec);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -266,8 +269,10 @@ namespace GPW.CORE.Smart.Pages
|
||||
if (!DateRDip.ContainsKey(dtIns))
|
||||
{
|
||||
DateRDip.Add(dtIns, cssSpec);
|
||||
|
||||
}
|
||||
}
|
||||
eventList.Add(new CalendarEvent(0, item.DtStart, item.DtEnd, item.CodGiust, "", item.CodGiust, "", item.CodGiust, ""));
|
||||
}
|
||||
}
|
||||
// recupero e converto le malattie...
|
||||
@@ -303,6 +308,7 @@ namespace GPW.CORE.Smart.Pages
|
||||
DateRDip.Add(dtIns, cssSpec);
|
||||
}
|
||||
}
|
||||
eventList.Add(new CalendarEvent(0, item.DtInizio, item.DtInizio.AddDays(item.NumGG), "MAL", "MAL", "MAL", "", "MAL", ""));
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
@@ -325,6 +331,7 @@ namespace GPW.CORE.Smart.Pages
|
||||
}
|
||||
private Dictionary<DateTime, string> DateCFF = new Dictionary<DateTime, string>();
|
||||
private Dictionary<DateTime, string> DateRDip = new Dictionary<DateTime, string>();
|
||||
private List<CalendarEvent> eventList = new List<CalendarEvent>();
|
||||
private async void updateDetail()
|
||||
{
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Reference in New Issue
Block a user