Corrected absencerequests
Corrected RecreationDays to 2025
This commit is contained in:
@@ -31,7 +31,7 @@ const setupPage = async () => {
|
||||
if(route.params.id) itemInfo.value = profileStore.getProfileById(route.params.id)
|
||||
if(itemInfo.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
|
||||
workingtimes.value = (await supabase.from("workingtimes").select().eq("profile",itemInfo.value.id).order("startDate",{ascending:false})).data
|
||||
absencerequests.value = (await supabase.from("absencerequests").select().eq("user",itemInfo.value.id).order("start",{ascending: false})).data
|
||||
absencerequests.value = (await supabase.from("absencerequests").select().eq("profile",itemInfo.value.id).order("startDate",{ascending: false})).data
|
||||
}
|
||||
|
||||
const selectedPresetRange = ref("Dieser Monat")
|
||||
@@ -103,13 +103,13 @@ const workingTimeInfo = computed(() => {
|
||||
//console.log(times.filter(i => i.approved).length)
|
||||
//console.log(sumWorkingMinutesApproved)
|
||||
|
||||
let recreationDays = ["2024-01-01","2024-05-01","2024-10-03","2024-10-31","2024-12-25","2024-12-26"]
|
||||
let recreationDays = ["2025-01-01","2025-04-18","2025-04-21","2025-05-01","2025-05-29","2025-06-09","2024-10-03","2024-10-31","2024-12-25","2024-12-26"]
|
||||
|
||||
//Feiertagsausgleich
|
||||
let sumWorkingMinutesRecreationDays = 0
|
||||
let sumRecreationDays = 0
|
||||
recreationDays.filter(i => dayjs(i).isSameOrAfter(selectedStartDay.value) && dayjs(i).isSameOrBefore(selectedEndDay.value)).forEach(day => {
|
||||
let compensationTime = itemInfo.value.weeklyRegularWorkingHours[dayjs(day).day()]
|
||||
let compensationTime = itemInfo.value.weeklyRegularWorkingHours[dayjs(day).day()] || 0
|
||||
sumWorkingMinutesRecreationDays += compensationTime * 60
|
||||
sumRecreationDays++
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user