|
|
|
@ -207,7 +207,11 @@ async function getActualDataAndFillView(monat = currentDate.getMonth() + 1, jahr
|
|
|
|
document.getElementById('monthHourOther').innerText = formatDuration(sumDurations(filteredEntries,3,true), true)
|
|
|
|
document.getElementById('monthHourOther').innerText = formatDuration(sumDurations(filteredEntries,3,true), true)
|
|
|
|
|
|
|
|
|
|
|
|
// Jahres Ansicht füllen
|
|
|
|
// Jahres Ansicht füllen
|
|
|
|
var yearData = await filterEntriesByMonthYear(null, currentDate.getFullYear());
|
|
|
|
var requestYear = currentDate.getFullYear()
|
|
|
|
|
|
|
|
if (currentDate.getMonth() +1 >= 9) {
|
|
|
|
|
|
|
|
requestYear += 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var yearData = await filterEntriesByMonthYear(null, requestYear)
|
|
|
|
yearData = formatDuration(sumDurations(yearData, null, true), true)
|
|
|
|
yearData = formatDuration(sumDurations(yearData, null, true), true)
|
|
|
|
document.getElementById('yearHours').innerText = yearData
|
|
|
|
document.getElementById('yearHours').innerText = yearData
|
|
|
|
document.getElementById('yearRest').innerText = 600 - parseInt(yearData)
|
|
|
|
document.getElementById('yearRest').innerText = 600 - parseInt(yearData)
|
|
|
|
@ -382,15 +386,25 @@ document.getElementById('dashbord_month_area').addEventListener('click', () =>{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('btn-month-before').addEventListener('click', () =>{
|
|
|
|
document.getElementById('btn-month-before').addEventListener('click', () =>{
|
|
|
|
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'September') ? diffMonth - 1 : diffMonth;
|
|
|
|
if (diffMonth === 0) {
|
|
|
|
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
|
|
|
|
diffMonth = 11;
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'September') ? diffMonth - 1 : diffMonth;
|
|
|
|
|
|
|
|
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
|
|
|
|
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
|
|
|
|
};
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
document.getElementById('btn-month-next').addEventListener('click', () =>{
|
|
|
|
document.getElementById('btn-month-next').addEventListener('click', () =>{
|
|
|
|
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'August') ? diffMonth + 1 : diffMonth;
|
|
|
|
if (diffMonth === 11) {
|
|
|
|
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
|
|
|
|
diffMonth = 0;
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
diffMonth = ((monate[new Date().getMonth() + diffMonth]) != 'August') ? diffMonth + 1 : diffMonth;
|
|
|
|
|
|
|
|
// document.getElementById('actualMonthName').innerHTML = monate[new Date().getMonth() + diffMonth];
|
|
|
|
|
|
|
|
getActualDataAndFillView(new Date().getMonth() + diffMonth + 1)
|
|
|
|
|
|
|
|
};
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
function setNewCalsOfMonth(TheMonth) {
|
|
|
|
function setNewCalsOfMonth(TheMonth) {
|
|
|
|
|