Update stile display (test) x GPW cal

This commit is contained in:
Samuele Locatelli
2023-01-03 19:30:35 +01:00
parent d49b9ca2fe
commit 1055cb60d2
6 changed files with 96 additions and 3 deletions
+21
View File
@@ -24,6 +24,27 @@ body {
.table-sm td {
padding: 0.2rem;
}
.gFerConf {
background-color: #0033AA;
color: white;
}
.gFerNC {
background-color: #6699FF;
}
.gPerConf {
background-color: #AA3300;
color: white;
}
.gPerNC {
background-color: #FF9966;
}
.g104Conf {
background-color: #CC9933;
color: white;
}
.g104NC {
background-color: #FFAA66;
}
/*------------------------------------------------------------------
[ Shortcuts / .shortcuts ]
*/
+25
View File
@@ -29,6 +29,31 @@ body {
padding: .2rem;
}
.gFerConf {
background-color: #0033AA;
color: white;
}
.gFerNC {
background-color: #6699FF;
}
.gPerConf {
background-color: #AA3300;
color: white;
}
.gPerNC {
background-color: #FF9966;
}
.g104Conf {
background-color: #CC9933;
color: white;
}
.g104NC {
background-color: #FFAA66;
}
/*------------------------------------------------------------------
[ Shortcuts / .shortcuts ]
*/
+1 -1
View File
@@ -1 +1 @@
body{font:'Roboto',sans-serif;}.body-content{font:'Roboto',sans-serif;}.textCondens{font-family:'Roboto Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.table-sm th,.table-sm td{padding:.2rem;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9.9rem;min-height:5.5rem;display:inline-block;padding:.77rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.55rem;}.shortcuts .shortcut-sm{min-width:4.95rem;min-height:3.3rem;display:inline-block;padding:.275rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8.8rem;min-height:4.4rem;}}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}input,select,textarea{max-width:100%;}}.elTimbSmart{padding:.2em;font-size:1.1em;line-height:1.3em;}.ui-input-btn input{opacity:.5;}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}
body{font:'Roboto',sans-serif;}.body-content{font:'Roboto',sans-serif;}.textCondens{font-family:'Roboto Condensed',sans-serif;}.textNormal{font-family:'Roboto',sans-serif;}.textBig{font-size:1.5em;}.table-sm th,.table-sm td{padding:.2rem;}.gFerConf{background-color:#03a;color:#fff;}.gFerNC{background-color:#69f;}.gPerConf{background-color:#a30;color:#fff;}.gPerNC{background-color:#f96;}.g104Conf{background-color:#c93;color:#fff;}.g104NC{background-color:#fa6;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:9.9rem;min-height:5.5rem;display:inline-block;padding:.77rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:.55rem;}.shortcuts .shortcut-sm{min-width:4.95rem;min-height:3.3rem;display:inline-block;padding:.275rem 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1.1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2.2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8.8rem;min-height:4.4rem;}}@media screen and (min-width:768px){.jumbotron{margin-top:20px;}.body-content{padding:0;}input,select,textarea{max-width:100%;}}.elTimbSmart{padding:.2em;font-size:1.1em;line-height:1.3em;}.ui-input-btn input{opacity:.5;}.GridPager a,.GridPager span{display:block;height:1.5em;min-width:1.1em;text-align:center;text-decoration:none;}.GridPager a{background-color:#f5f5f5;color:#969696;}.GridPager span{background-color:#a1dcf2;color:#000;font-weight:bold;}
@@ -76,8 +76,6 @@
</div>
</ItemTemplate>
</asp:TemplateField>
<%--<asp:BoundField DataField="DtStart" HeaderText="Inizio" ReadOnly="True" SortExpression="DtStart" DataFormatString="{0:yyyy-MM-dd HH:mm}" />
<asp:BoundField DataField="DtEnd" HeaderText="Fine" ReadOnly="True" SortExpression="DtEnd" DataFormatString="{0:yyyy-MM-dd HH:mm}" />--%>
<asp:TemplateField HeaderText="Giust" SortExpression="CodGiust">
<EditItemTemplate>
<asp:DropDownList runat="server" ID="ddlCodGiust" SelectedValue='<%# Bind("CodGiust") %>'>
@@ -68,11 +68,17 @@ namespace GPW_Admin.WebUserControls
}
protected List<DS_Applicazione.CalendFesteFerieRow> listCFF { get; set; }
protected List<DS_Applicazione.RegistroRichiesteRow> listRR { get; set; }
#endregion Protected Properties
#region Protected Methods
/// <summary>
/// colorazione calendario da eventi registrati....
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void calDisplay_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
bool isFest = false;
@@ -87,6 +93,34 @@ namespace GPW_Admin.WebUserControls
e.Cell.CssClass = thisDate.codGiust == "FEST" ? "bg-danger text-warning" : "bg-warning";
}
}
// coloro se fa parte delle richieste dipendenti...
if (listRR != null && listRR.Count > 0)
{
if (e.Day.Date.DayOfWeek != DayOfWeek.Saturday && e.Day.Date.DayOfWeek != DayOfWeek.Sunday)
{
// cerco riga...
var thisDate = listRR.Where(x => e.Day.Date >= x.DtStart && e.Day.Date <= x.DtEnd).FirstOrDefault();
if (thisDate != null && e.Cell.CssClass != "text-light")
{
isFest = true;
switch (thisDate.CodGiust)
{
case "104":
e.Cell.CssClass = thisDate.Conf ? "g104Conf" : "g104NC";
break;
case "FER":
e.Cell.CssClass = thisDate.Conf ? "gFerConf" : "gFerNC";
break;
case "PERM":
e.Cell.CssClass = thisDate.Conf ? "gPerConf" : "gPerNC";
break;
default:
e.Cell.CssClass = "bg-dark text-light";
break;
}
}
}
}
// se sab/dom --> grigio
if (!isFest && e.Cell.CssClass != "text-light")
{
@@ -100,6 +134,7 @@ namespace GPW_Admin.WebUserControls
protected void doUpdateCal()
{
listCFF = CffListByAnno(anno);
listRR = RRListByAnno(anno);
}
protected void lbtSave_Click(object sender, EventArgs e)
@@ -229,6 +264,17 @@ namespace GPW_Admin.WebUserControls
List<DS_Applicazione.CalendFesteFerieRow> result = DataProxy.DP.taCFF.getPeriod(inizio, fine).ToList();
return result;
}
/// <summary>
/// Elenco Richieste Dipendenti x anno
/// </summary>
/// <param name="reqYear"></param>
private List<DS_Applicazione.RegistroRichiesteRow> RRListByAnno(int reqYear)
{
DateTime inizio = new DateTime(reqYear, 1, 1);
DateTime fine = inizio.AddYears(1);
List<DS_Applicazione.RegistroRichiesteRow> result = DataProxy.DP.taRR.getPeriod(0, inizio, fine).ToList();
return result;
}
private void setupFestAnno(int reqYear)
{
+3
View File
@@ -49,6 +49,7 @@ namespace GPW_data
public DS_ApplicazioneTableAdapters.RegistroEventiTableAdapter taRE;
public DS_ApplicazioneTableAdapters.RilievoTempTableAdapter taRT;
public DS_ApplicazioneTableAdapters.ListTagDDTableAdapter taListTDD;
public DS_ApplicazioneTableAdapters.RegistroRichiesteTableAdapter taRR;
public DS_ApplicazioneTableAdapters.TagMeseTableAdapter taTagMese;
public DS_ApplicazioneTableAdapters.TimbratureTableAdapter taTimb;
public DS_ApplicazioneTableAdapters.TimbratureExplTableAdapter taTimbExpl;
@@ -200,6 +201,7 @@ namespace GPW_data
taTimbRegAtt = new DS_ApplicazioneTableAdapters.TE_RA_ExplTableAdapter();
taRE = new DS_ApplicazioneTableAdapters.RegistroEventiTableAdapter();
taCFF = new DS_ApplicazioneTableAdapters.CalendFesteFerieTableAdapter();
taRR = new DS_ApplicazioneTableAdapters.RegistroRichiesteTableAdapter();
taRT = new DS_ApplicazioneTableAdapters.RilievoTempTableAdapter();
taHT = new DS_ApplicazioneTableAdapters.HistTempTableAdapter();
taNextVal = new DS_UtilityTableAdapters.nextValContatoreTableAdapter();
@@ -239,6 +241,7 @@ namespace GPW_data
taTimbRegAtt.Connection.ConnectionString = connGPW;
taRE.Connection.ConnectionString = connGPW;
taCFF.Connection.ConnectionString = connGPW;
taRR.Connection.ConnectionString = connGPW;
taRT.Connection.ConnectionString = connGPW;
taHT.Connection.ConnectionString = connGPW;
taNextVal.Connection.ConnectionString = connGPW;