klnodekb/public/js/workingtime.js

522 lines
22 KiB
JavaScript

//const employee = require("../../models/employee");
function convertMinsToHrsMins(minutes) {
var h = Math.floor(minutes / 60);
var m = minutes % 60;
h = h < 10 ? '0' + h : h;
m = m < 10 ? '0' + m : m;
return h + ':' + m;
}
// Táblázat sorainak generálása
function renderWorkingTimesTable(wtList)
{
$('#monthHoursTable > tbody').empty();
var weekendCol;
var color='#64b4da';
$.each(wtList,function(i,wt){
if (wt.weekends>0)
{
weekendCol='</td><td style="text-align:center;color:#FB667A">'+wt.weekends;
}
else
{
weekendCol='</td><td style="text-align:center;color:#64b4da">'+wt.weekend.days;
}
var newRow = $('<tr class="clickable-row" id='+wt.employeeId+' data-href=/employee/detailstemp/'+wt.employeeId+'>"');
if (wt.isStudent==='on')
{
newRow.append('<td style="text-align:right">'+(i+1)+
'</td><td class="student" data-ribbon=".">'+wt.name+
'</td><td style="text-align:center">'+wt.vacationYear+' / '+wt.vacationUsed+
weekendCol+
'</td><td style="text-align:center">'+wt.redLetterDays+
'</td><td style="text-align:center">'+wt.state+
'</td><td style="text-align:center">'+wt.device+
'</td><td style="text-align:center">'+wt.location+
'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.month.fullHours)+//workHours)+
'</td>');
} else
{
if (wt.isSubcontractor==='on')
{
newRow.append('<td style="text-align:right">'+(i+1)+
'</td><td class="prova" data-ribbon="★">'+wt.name+
'</td><td style="text-align:center">'+wt.vacationYear+' / '+wt.vacationUsed+
weekendCol+
'</td><td style="text-align:center">'+wt.redLetterDays+
'</td><td style="text-align:center">'+wt.state+
'</td><td style="text-align:center">'+wt.device+
'</td><td style="text-align:center">'+wt.location+
'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.month.fullHours)+//workHours)+
'</td>');
}
else
if (wt.isSubcontractor===null || wt.isSubcontractor==='off')
{
newRow.append('<td style="text-align:right">'+(i+1)+
'</td><td class="td">'+wt.name+
'</td><td style="text-align:center">'+wt.vacationYear+' / '+wt.vacationUsed+
weekendCol+
'</td><td style="text-align:center">'+wt.redLetterDays+
'</td><td style="text-align:center">'+wt.state+
'</td><td style="text-align:center">'+wt.device+
'</td><td style="text-align:center">'+wt.location+
'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.month.fullHours)+//workHours)+
'</td>');
}
}
$('#monthHoursTable > tbody:last-child').append (newRow);
})
}
// Ellenőrzi, hogy a tömb tartalmazza e az adott elemet, ha igen true-vel visszatér
var contains = function(needle) {
// Per spec, the way to identify NaN is that it is not equal to itself
var findNaN = needle !== needle;
var indexOf;
if(!findNaN && typeof Array.prototype.indexOf === 'function') {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function(needle) {
var i = -1, index = -1;
for(i = 0; i < this.length; i++) {
var item = this[i];
if((findNaN && item !== item) || item === needle) {
index = i;
break;
}
}
return index;
};
}
return indexOf.call(this, needle) > -1;
};
// Táblázat sorainak generálása jelenléti ív részletes egy munkavállalóra egy havi
function renderWorkingTimesTableDetailed(wtList)
{
var monthWorkHours=0;
var workDays=[];
var weekendDays=[];
var overTime=0;
$('#monthHoursTableDetails > tbody').empty();
$.each(wtList,function(i,wt){
var newRow = $('<tr class="clickable-row" id='+wt.employeeId+' data-href=/employee/detailstemp/'+wt.employeeId+'>"');
var day = moment(wt.date,'YYYY.MM.DD.').day();
var color='#64b4da';
var isWeekend = (day === 6) || (day === 0); // 6 = Saturday, 0 = Sunday
var ot= 0;
overTime='-';
if (wt.isHoliday===false)
{
if (isWeekend)
{
// Ha hétvége wt.date;wt.workhours;wt.timeArrive;wt.timeGetaway;wt.location
color='#FB667A';
if (!contains.call(weekendDays,wt.date))
{
weekendDays.push(wt.date);
}
}
else
{
monthWorkHours+= wt.workHours
// Ha hétköznap
wdays=workDays.find(e=>e.date===wt.date);
if (wdays)
{
wdays.hours+=wt.workHours;
wdays.start.push(wt.timeArrive);
wdays.stop.push(wt.timeGetaway);
if (wdays.hours>540) wdays.overtime=wdays.hours-540;
}
else
{
//if (wt.workHours>540) ot=convertMinsToHrsMins((wt.workHours-540));
if (wt.workHours>540) ot=(wt.workHours-540);
workDays.push({date:wt.date,start:[wt.timeArrive],stop:[wt.timeGetaway],hours:wt.workHours,overtime:ot});
}
}
if (wt.timeGetaway==='-')
{
wt.timeGetaway=wt.timeGetaway;
}
else
{
wt.timeGetaway=moment(wt.timeGetaway,'YYYY.MM.DD. HH:mm').format('HH:mm');
}
//if (wt.workHours>540) overTime=convertMinsToHrsMins((wt.workHours-540));
//if (wdays.hours>540) overTime=convertMinsToHrsMins((wdays.hours-540));
newRow.append(
'<td style="text-align:right">'+moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('DD')+
'</td><td class="td" style="text-align:left;color:'+color+'">'+moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('dddd')+
'</td><td style="text-align:left">'+wt.location+
'</td><td style="text-align:center">'+moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('HH:mm')+
'</td><td style="text-align:center">'+wt.timeGetaway+
//'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.workHours)+
'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.workHours)+
'</td><td style="text-align:right">'+overTime+
'</td><td style="text-align:left">'+wt.notes+
'</td>');
}
if (wt.isHoliday===true)
{
newRow.append(
'<td style="text-align:right">'+moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('DD')+
'</td><td class="td" style="text-align:left;color:'+color+'">'+moment(wt.date,'YYYY.MM.DD. HH:mm').format('dddd')+
'</td><td style="text-align:left"> ----'+
'</td><td style="text-align:center"> --:--'+
'</td><td style="text-align:center"> --:--'+
//'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.workHours)+
'</td><td style="text-align:right"> 0:00'+
'</td><td style="text-align:right"> 0:00'+
'</td><td style="text-align:left"> Szabadság'+
'</td>');
}
$('#monthHoursTableDetails > tbody:last-child').append (newRow);
document.getElementById('weekendsCount').value=weekendDays.length;
})
// személyi adatok lekérése
var uid=document.getElementById('uid').textContent;
$.get('/employee/persondata/'+uid, function(employee) {
document.getElementById('vacations').value=employee.vacationYear+' / '+employee.vacationUsed;
});
// Túlórák számítása
var overTime=0;
workDays.forEach(element => {
if(element.hours>540)
{
overTime+=(element.hours-540);
}
else
{
// monthWorkHours+=element.hours;
}
});
document.getElementById('weekDayFullHours').value=workDays.length;
document.getElementById('weekHourWork').value=convertMinsToHrsMins(monthWorkHours);
document.getElementById('overTime').value=convertMinsToHrsMins(overTime);
}
// Táblázat sorainak generálása jelenléti ív részletes egy munkavállalóra egy havi
function renderWorkingTimesTableDetailed2(wtList)
{
var monthWorkHours=wtList.monthWorkHours;
var workDays=[];
var weekendDays=[];
var monthOverTime=wtList.monthOverTime;
var fullWorkHoursMonth=wtList.monthWorkHours+wtList.monthOverTime;
var hol=0;
var modifyColumn='';
$('#print2').data('key',wtList.wd);
var getBackMyJSON = $('#print2').data('key');
console.log(getBackMyJSON);
$('#monthHoursTableDetails > tbody').empty();
$('#monthSumTable > tbody').empty();
$.each(wtList.wd,function(idx,wt){
var arrives="";
var getaways="";
var locs="";
var newRow = $('<tr class="clickable-row" id='+wt.employeeId+' data-href=/employee/detailstemp/'+wt.employeeId+'>"');
//var newRow = '<tr>';$('<tr class="clickable-row" id='+wt.employeeId+' data-href=/employee/detailstemp/'+wt.employeeId+'>"');
var day = moment(wt.date,'YYYY.MM.DD.').day();
var color='#64b4da';
var isWeekend = (day === 6) || (day === 0); // 6 = Saturday, 0 = Sunday
var ot= 0;
var drName='<span>';
var drShift='';
var notes="";
//var companyNotes="";
/* if (wt.dailyReport==='')
{
drName='<span>';
drShift='';
}
else
{
drShift='';
//drShift='<span></span><br>';
$.each(wt.dailyReport,function(i,drs){
drShift+='<span></span><br>';
drName+='<span style="color:yellow;font-size: 9px;">'+i+' '+drs.name+'<br><span style="color:#64b4da;font-size: 14px;">';
})
}*/
//overTime='-';
if (wt.isHoliday===false)
{
if (wt.dailyReport==='')
{
drName='<span>';
drShift='';
}
else
{
drShift='';
//drShift='<span></span><br>';
$.each(wt.dailyReport,function(i,drs){
drShift+='<span></span><br>';
drName+='<span style="color:yellow;font-size: 9px;">'+i+' '+drs.name+'<br><span style="color:#64b4da;font-size: 14px;">';
})
}
if (wt.isWeekend)
{
// Ha hétvége
color='#FB667A';
}
//document.getElementById("modifyColumn").rowSpan = wt.startStop.length;
/*if (wt.startStop.length>1)
{
modifyColumn='</td><td rowspan=\"'+wt.startStop.length+'\">';//<td>';
}
else
{*/
modifyColumn='</td><td>';
deleteColumn='</td><td>';
//}
$.each(wt.startStop,function(i,interval){//</a><span class="glyphicon glyphicon-edit"></span>
arrives+=moment(interval.start,'YYYY.MM.DD. HH:mm').format('HH:mm')+"<br>";
/* if (wt.state=='ENDED')
//if (wtList.wd.length>idx+1)
{
}*/
if (interval.stop==='-')
{
modifyColumn+='<div>'+drShift+'<a.disabledLink href=\"#\" class=\"disabledLink\" style=\"color:gray;cursor:not-allowed;\"></a><span class="glyphicon glyphicon-edit disabledLink"></span></div>';
deleteColumn+='<div>'+drShift+'<a.disabledLink href=\"#\" class=\".disabledLink\" style=\"color:gray;cursor:not-allowed;\"></a><span class="glyphicon glyphicon-trash disabledLink"></span></div>';
getaways+="-";
}
else
{
modifyColumn+='<div>'+drShift+'<a.openModal href=\"#\" data-toggle=\"modal\" data-id=\"'+interval.id+'\" data-target=\"#wtimeEditModal\" class=\"openModal\" style=\"color:green\"></a><span class="glyphicon glyphicon-edit normal"></span></div>';
deleteColumn+='<div>'+drShift+'<a.delete-worktime href=\"#\" , data-id=\"'+interval.id+'\" class=\"delete-worktime\" style=\"color:red\"></a><span class="glyphicon glyphicon-trash normal"></span></div>';
getaways+=moment(interval.stop,'YYYY.MM.DD. HH:mm').format('HH:mm')+"<br>";
}
})
$.each(wt.locations,function(i,loc){
if (loc.arriveCoords.lat!='N/A' && loc.arriveCoords.lat!=null)
{
locs+="<a href='https://www.google.com/maps/search/?api=1&query="+loc.arriveCoords.lat+","+loc.arriveCoords.lon+"' target=\"_blank\" rel=\"noopener noreferrer\">"+loc.arriveLoc+"</a>"+" - ";// +"<a href='https://www.google.com/maps/search/?api=1&query="+loc.getavayCoords.lat+","+loc.getavayCoords.lon+"' target=\"_blank\" rel=\"noopener noreferrer\">"+loc.getawayLoc+"</a>"+"<br>";
}
else
{
locs+=loc.arriveLoc +' - ';// +loc.getawayLoc+"<br>";
}
if (loc.getavayCoords.lat!='N/A' && loc.getavayCoords.lat!=null)
{
locs+="<a href='https://www.google.com/maps/search/?api=1&query="+loc.getavayCoords.lat+","+loc.getavayCoords.lon+"' target=\"_blank\" rel=\"noopener noreferrer\">"+loc.getawayLoc+"</a>"+"<br>";
}
else
{
locs+=loc.getawayLoc+"<br>";
}
//'a(href="/articles/"+article._id+"/"+work._id)='+loc.arriveLoc
})//arriveCoords
$.each(wt.notes,function(i,note){
notes+='<div class="ibr">'+note.userNote+'<span2>'+ ' '+note.companyNote+'</span2></div>'
})
newRow.append(
'<td style="text-align:right">'+moment(wt.date,'YYYY.MM.DD. HH:mm').format('DD')+'</td>'+
'<td class="td" style="text-align:left;color:'+color+'">'+moment(wt.date,'YYYY.MM.DD. HH:mm').format('dddd')+'</td>'+
'<td style="text-align:center">'+drName+locs+'</span>'+'</td>'+//wt.location+
'<td style="text-align:center">'+drShift+arrives+'</td>'+//moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('HH:mm')+
'<td style="text-align:center">'+drShift+getaways+'</td>'+
modifyColumn+
deleteColumn+
//'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.workHours)+
'<td style="text-align:right">'+drShift+convertMinsToHrsMins(wt.hours)+'</td>'+
'<td style="text-align:right">'+drShift+convertMinsToHrsMins(wt.overTime)+'</td>'+
//'<td style="text-align:left;><div class="ibr">'+wt.notes+'<span2>'+ ' '+wt.companyNotes+'</span2></div>'+'</td>'
'<td style="text-align:left">'+notes+'</td>'
);
}
else
{
if (wt.isHoliday===true)
{
hol++;
newRow.append(
'<td style="text-align:right">'+moment(wt.date,'YYYY.MM.DD. HH:mm').format('DD')+
'</td><td class="td" style="text-align:left;color:'+color+'">'+moment(wt.date,'YYYY.MM.DD. HH:mm').format('dddd')+
'</td><td style="text-align:center"> ---- '+//wt.location+
'</td><td style="text-align:center"> --:-- '+//moment(wt.timeArrive,'YYYY.MM.DD. HH:mm').format('HH:mm')+
'</td><td style="text-align:center"> --:--'+
'</td><td>'+
'</td><td>'+
//'</td><td style="text-align:right">'+convertMinsToHrsMins(wt.workHours)+
'</td><td style="text-align:right"> --:--'+
'</td><td style="text-align:right"> --:--'+
'</td><td style="text-align:left"> Szabadság'+
'</td>');
}
}
$('#monthHoursTableDetails > tbody:last-child').append (newRow);
// document.getElementById('weekendsCount').value=wtList.weekend.days;//weekendDays.length;
})
// személyi adatok lekérése
var uid=document.getElementById('uid').textContent;
$.get('/employee/persondata/'+uid, function(employee) {
if (employee.isSubcontractor===null)
{
document.getElementById('vacations').value=(employee.vacationYear-employee.vacationUsed);
document.getElementById('vacationsY').value=employee.vacationYear;
document.getElementById('munkaszunet').value=wtList.munkaszunet.length;
newRow=$('<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Munkaszüneti napokra elszámolt órák: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.munkaszunet.length*480))+'</td>'+
'<td style="text-align:center;font-size: 16px;"> --:--'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.munkaszunet.length*480))+'</td>'+
'<td style="text-align:center;font-size: 16px;"> -'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.munkaszunet.length*480))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Szabadságra elszámolt órák: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((hol*480))+'</td>'+
'<td style="text-align:center;font-size: 16px;"> --:--'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((hol*480))+'</td>'+
'<td style="text-align:center;font-size: 16px;"> -'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((hol*480))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Munkanapok: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> -'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours)+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Szombat: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.fullWorkHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> 50%'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.weekend.Saturday.fullWorkHours*1.5))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Vasárnap: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.fullWorkHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> 100%'+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.weekend.Sunday.fullWorkHours*2))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-weight:bold;font-size: 16px;"> Összesen: '+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.workHours+
wtList.weekend.Saturday.workHours+
wtList.weekend.Sunday.workHours+
(wtList.munkaszunet.length*480)+
(hol*480)
)+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.overTime+
wtList.weekend.Saturday.overTime+
wtList.weekend.Sunday.overTime
)+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours+
wtList.weekend.Saturday.fullWorkHours+
wtList.weekend.Sunday.fullWorkHours+
(wtList.munkaszunet.length*480)+
(hol*480)
)+'</td>'+
'<td>'+'</td>'+
'<td style="text-align:center;color: red;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours+
(wtList.weekend.Saturday.fullWorkHours*1.5)+
(wtList.weekend.Sunday.fullWorkHours*2)+
(wtList.munkaszunet.length*480)+
(hol*480)
)+'</td>'+
'"</tr>'
);
}
else
{ // Vállalkozó
newRow=$(
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Munkanapok: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours)+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> -'+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours)+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Szombat: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Saturday.fullWorkHours)+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> 50%'+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.weekend.Saturday.fullWorkHours*1.5))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-size: 16px;"> Vasárnap: '+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.workHours)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.overTime)+'</td>'+
'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins(wtList.weekend.Sunday.fullWorkHours)+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> 100%'+'</td>'+
//'<td style="text-align:center;font-size: 16px;"> '+convertMinsToHrsMins((wtList.weekend.Sunday.fullWorkHours*2))+'</td>'+
'"</tr>'+
'<tr>"'+
'<td style="text-align:left;color: white;font-weight:bold;font-size: 16px;"> Összesen: '+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.workHours+
wtList.weekend.Saturday.workHours+
wtList.weekend.Sunday.workHours
)+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.overTime+
wtList.weekend.Saturday.overTime+
wtList.weekend.Sunday.overTime
)+'</td>'+
'<td style="text-align:center;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours+
wtList.weekend.Saturday.fullWorkHours+
wtList.weekend.Sunday.fullWorkHours
)+'</td>'+
//'<td>'+'</td>'+
/*'<td style="text-align:center;color: red;font-weight:bold;font-size: 16px;"> '+convertMinsToHrsMins(wtList.month.fullWorkHours+
(wtList.weekend.Saturday.fullWorkHours*1.5)+
(wtList.weekend.Sunday.fullWorkHours*2)
)+'</td>'*/+
'"</tr>'
);
}
$('#monthSumTable > tbody:last-child').append (newRow);
});
}
$("#monthHoursTable").on('click','tr',function(ev) {
//console.log($(this).attr("data-href"));
document.location = $(this).attr("data-href");
});