diff --git a/pages/workingtimes/evaluate/[id].vue b/pages/workingtimes/evaluate/[id].vue
index 99dc7f4..18a3e18 100644
--- a/pages/workingtimes/evaluate/[id].vue
+++ b/pages/workingtimes/evaluate/[id].vue
@@ -28,7 +28,7 @@ const workingtimes = ref([])
const absencerequests = ref([])
const workingTimeInfo = ref(null)
-const selectedPresetRange = ref("Dieser Monat")
+const selectedPresetRange = ref("Dieser Monat bis heute")
const selectedStartDay = ref("")
const selectedEndDay = ref("")
@@ -44,6 +44,7 @@ const setupPage = async () => {
const loadWorkingTimeInfo = async () => {
workingTimeInfo.value = await useFunctions().getWorkingTimesEvaluationData(route.params.id,selectedStartDay.value,selectedEndDay.value)
+ console.log(workingTimeInfo.value)
openTab.value = 0
}
@@ -60,6 +61,10 @@ const changeRange = () => {
selector = "M"
subtract = 0
+ } else if(selectedPresetRange.value === "Dieser Monat bis heute") {
+ selector = "M"
+ subtract = 0
+
} else if(selectedPresetRange.value === "Dieses Jahr") {
selector = "y"
subtract = 0
@@ -75,7 +80,12 @@ const changeRange = () => {
}
selectedStartDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).startOf(selector).format("YYYY-MM-DD")
- selectedEndDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).endOf(selector).format("YYYY-MM-DD")
+ if(selectedPresetRange.value === "Dieser Monat bis heute") {
+ selectedEndDay.value = dayjs().format("YYYY-MM-DD")
+ } else {
+ selectedEndDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).endOf(selector).format("YYYY-MM-DD")
+
+ }
openTab.value = 0
loadWorkingTimeInfo()
@@ -279,7 +289,7 @@ changeRange()
label="Vorlage:"
>
Genehmigt: {{Math.floor(workingTimeInfo.sumWorkingMinutesApproved/60)}}:{{String(workingTimeInfo.sumWorkingMinutesApproved % 60).padStart(2,"0")}} h
Feiertagsausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesRecreationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesRecreationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumRecreationDays}} Tage
Urlaubs-/Berufsschulausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesVacationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesVacationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumVacationDays}} Tage
-Soll Stunden: {{Math.floor(workingTimeInfo.workingMinutesTarget/60)}}:{{String(workingTimeInfo.workingMinutesTarget % 60 ).padStart(2,"0")}} h
+Soll Stunden: {{Math.floor(workingTimeInfo.timeSpanWorkingMinutes/60)}}:{{String(workingTimeInfo.timeSpanWorkingMinutes % 60 ).padStart(2,"0")}} h
-Inoffizielles Saldo(eingereichte Stunden): {{Math.sign(workingTimeInfo.saldoInOfficial) === 1 ? "" : "-"}}{{Math.floor(Math.abs(workingTimeInfo.saldoInOfficial/60))}}:{{String(Math.abs(workingTimeInfo.saldoInOfficial) % 60).padStart(2,"0")}} h
-Saldo(genehmigte Stunden): {{Math.sign(workingTimeInfo.saldo) === 1 ? "" : "-"}}{{Math.floor(Math.abs(workingTimeInfo.saldo/60))}}:{{String(Math.abs(workingTimeInfo.saldo) % 60).padStart(2,"0")}} h
+Inoffizielles Saldo(eingereichte Stunden): {{Math.sign(workingTimeInfo.saldoInOfficial) === 1 ? "+" : "-"}} {{Math.floor(Math.abs(workingTimeInfo.saldoInOfficial/60))}}:{{String(Math.abs(workingTimeInfo.saldoInOfficial) % 60).padStart(2,"0")}} h
+Saldo(genehmigte Stunden): {{Math.sign(workingTimeInfo.saldo) === 1 ? "+" : "-"}} {{Math.floor(Math.abs(workingTimeInfo.saldo/60))}}:{{String(Math.abs(workingTimeInfo.saldo) % 60).padStart(2,"0")}} h