Reporte de vacaciones

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2025-02-06 08:47:18 -07:00
parent 458c1dbc53
commit be68906a34
2 changed files with 88 additions and 37 deletions

View File

@@ -19,13 +19,14 @@
.showMesDia {
display: none;
}
table tr th.diac {
font-size: 4px;
padding-left: 1px !important;
padding-right: 1px !important;
}
table tr th.mesc{
table tr th.mesc {
font-size: 12px;
}
@@ -91,30 +92,77 @@
/* Diciembre - Gris claro */
.TContainer {
width:100%;
width: 100%;
height: calc(100vh - 200px);
overflow:scroll;
overflow: scroll;
}
.VacClass{
background-color:darkslateblue;
}
.borderyear{
border-left: 1px solid #FFF !important;
.VacClass {
background-color: darkslateblue;
}
.yearclass{
background-color:#444;
color:#FFF;text-align: center;
.borderyear {
border-left: 1px solid #FFF !important;
}
.yearclass {
background-color: #444;
color: #FFF;
text-align: center;
font-size: 6px;
}
.yearclassB{
background-color:#999;
color:#FFF;text-align: center;
.yearclassB {
background-color: #999;
color: #FFF;
text-align: center;
font-size: 6px;
}
tr.aniorow td{
height:8px;
tr.aniorow td {
height: 8px;
}
tr.rowsticky {
position: sticky;
top: 0; /* Se mantiene pegado en la parte superior */
background-color: white; /* Para que no se superponga con otros elementos */
z-index: 1000; /* Asegura que esté sobre otros elementos */
}
tr.rowsticky:nth-child(2) {
top: 26.14px;
}
tr.rowsticky:nth-child(3) {
top: 52.14px;
}
.table-sticky tr td:nth-child(1),.table-sticky tr th:nth-child(1),
.table-sticky tr td:nth-child(2),.table-sticky tr th:nth-child(2),
.table-sticky tr td:nth-child(3),.table-sticky tr th:nth-child(3) {
position: sticky;
left: 0;
z-index: 3;
}
.table-sticky tr td:nth-child(1),.table-sticky tr td:nth-child(2),.table-sticky tr td:nth-child(3) {
background-color: #fff;
}
.table-sticky tr td:nth-child(1) div, .table-sticky tr th:nth-child(1) div{
width:72px;
}
.table-sticky tr td:nth-child(1),.table-sticky tr th:nth-child(1){
width:80px;
}
.table-sticky tr td:nth-child(2),.table-sticky tr th:nth-child(2){
width:250px;
left: 80px;
}
.table-sticky tr td:nth-child(2) div, .table-sticky tr th:nth-child(2) div{
width:242px;
}
.table-sticky tr td:nth-child(3),.table-sticky tr th:nth-child(3){
left: 330px;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
@@ -191,24 +239,22 @@
</div>
<div class="TContainer">
<table id="gvReporteVacacionesCalendar" class="table table-hover ScrollADig Widthall gvReporteVacacionesCalendar" data-rows="4" data-cols="3" data-heighterror="360">
<table id="gvReporteVacacionesCalendar" class="table table-hover table-sticky ScrollADig Widthall gvReporteVacacionesCalendar" data-rows="4" data-cols="3" data-heighterror="360">
<tbody>
<tr class="hiddentth">
<%-- <tr class="hiddentth">
<th class="showMesDia"></th>
<th class="showMesDia"></th>
<th class="showMesDia"></th>
<%-- Encabezados dinámicos para los ejercicios --%>
<asp:Repeater ID="rptx" runat="server">
<ItemTemplate>
<%--<th class="showMes" runat="server" Visible='<%# Eval("Campo").ToString() == "1" %>'></th>--%>
<th class="showMesDia"></th>
</ItemTemplate>
</asp:Repeater>
</tr>
</tr>--%>
<tr>
<tr class="rowsticky">
<th></th>
<th></th>
<th></th>
@@ -216,16 +262,19 @@
<asp:Repeater ID="rptanio" runat="server">
<ItemTemplate>
<th class="borderleft" data-toggle="tooltip" title='<%# Eval("Anio") %>' colspan='<%# Eval("DiasEjercicio") %>'><%# Eval("Anio") %></th>
<th class="borderleft" data-toggle="tooltip" title='<%# Eval("Anio") %>' colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th data-toggle="tooltip" title='<%# Eval("Anio") %>' colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th data-toggle="tooltip" title='<%# Eval("Anio") %>' colspan='<%# Eval("DiasEjercicioA") %>'><%# Eval("Anio") %></th>
<th data-toggle="tooltip" title='<%# Eval("Anio") %>' colspan='<%# Eval("DiasEjercicioB") %>'><%# Eval("Anio") %></th>
</ItemTemplate>
</asp:Repeater>
</tr>
<tr>
<tr class="rowsticky">
<th></th>
<th></th>
<th></th>
<%-- Encabezados dinámicos para los ejercicios --%>
<%-- data-toggle="tooltip"
<%-- data-toggle="tooltip"
title='<%# new System.Globalization.CultureInfo("es-ES").DateTimeFormat.GetMonthName(Eval("Mes").ToString().ToEntero()).ToUpper() %>'--%>
<asp:Repeater ID="rptMeses" runat="server">
<ItemTemplate>
@@ -235,7 +284,7 @@
</asp:Repeater>
</tr>
<tr>
<tr class="rowsticky">
<th>Código</th>
<th>Nombre Completo</th>
<th>Fecha Inicio</th>
@@ -254,13 +303,15 @@
<ItemTemplate>
<tr class="aniorow">
<%--<td><%# Eval("CvePersonal") %></td>--%>
<td rowspan="3"><asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td rowspan="3"><asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></td>
<td rowspan="3"><%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %></td>
<td rowspan="1"><div>
<div><asp:HyperLink runat="server" Text='<%# Eval("Codigo") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></div></td>
<td rowspan="1"><div>
<asp:HyperLink runat="server" Text='<%# Eval("NombreCompleto") %>' NavigateUrl='<%# Eval("CvePersonal", "~/RH/Personal.aspx?CvePersonal={0}") %>'></asp:HyperLink></div></td>
<td rowspan="1"><div><%# Eval("FechaInicio", "{0:yyyy-MM-dd}") %></div></td>
<%-- Subrepeater para los ejercicios --%>
<asp:Literal Text='<%# Eval("ColumnasinicioFin" ) %>' runat="server"></asp:Literal>
</tr>
<tr>
<%--</tr>
<tr>--%>
<asp:Literal Text='<%# Eval("ColumnasVacaciones" ) %>' runat="server"></asp:Literal>
<%-- <asp:Repeater ID="RepeaterEjercicios" runat="server" DataSource='<%# tabladias %>'>
<ItemTemplate>

View File

@@ -130,7 +130,7 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
FechaAntiguedad = row1.Field<DateTime>("FechaAntiguedad"),
Antiguedad = row1.Field<int>("Antiguedad"),
ColumnasinicioFin = strColumnasinicioFin(tabladias, tabla2.FiltraParametros(string.Format("CvePersonal = {0}", row1["CvePersonal"])), row1["anio"].ToString().ToEntero(), row1["Mes"].ToString(), row1["Dia"].ToString()),
//ColumnasinicioFin = strColumnasinicioFin(tabladias, tabla2.FiltraParametros(string.Format("CvePersonal = {0}", row1["CvePersonal"])), row1["anio"].ToString().ToEntero(), row1["Mes"].ToString(), row1["Dia"].ToString()),
ColumnasVacaciones = strColumnasVacaciones(tabladias, TDiaspersonal),
// Campo extra: Enumerable para cada Ejercicio de Tabla 3
Ejercicios = tabla3.AsEnumerable().Select(row3 =>
@@ -188,8 +188,8 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
rptMeses.DataBind();
RepetDias.DataSource = tabladias;
RepetDias.DataBind();
rptx.DataSource = tabladias;
rptx.DataBind();
//rptx.DataSource = tabladias;
//rptx.DataBind();
}
@@ -263,9 +263,9 @@ public partial class Nomina_ReporteVacaciones : ClsPaginas
DataRow hdr = TDiaspersonal.FiltroPrimero(string.Format("FechaNum={0}", dr["FechaNum"]));
if (hdr != null)
{
if (hdr["InicioM"].ToString() == "1")
if (hdr["InicioVac"].ToString() == "1")
{
stringBuilder.AppendFormat("<td class='VacClass{1}' colspan='{0}'></td>", hdr["DiasMesAnio"], (dr["MinMes"].ToString() == "1" ? " borderleft " : ""));
stringBuilder.AppendFormat("<td class='info{1} text-center' colspan='{0}'>{0}</td>", hdr["diasvac"], (dr["MinMes"].ToString() == "1" ? " borderleft " : ""));
}
}
else