Changed Soll stunden
Added dieser monat bis heute
This commit is contained in:
@@ -28,7 +28,7 @@ const workingtimes = ref([])
|
|||||||
const absencerequests = ref([])
|
const absencerequests = ref([])
|
||||||
|
|
||||||
const workingTimeInfo = ref(null)
|
const workingTimeInfo = ref(null)
|
||||||
const selectedPresetRange = ref("Dieser Monat")
|
const selectedPresetRange = ref("Dieser Monat bis heute")
|
||||||
const selectedStartDay = ref("")
|
const selectedStartDay = ref("")
|
||||||
const selectedEndDay = ref("")
|
const selectedEndDay = ref("")
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ const setupPage = async () => {
|
|||||||
|
|
||||||
const loadWorkingTimeInfo = async () => {
|
const loadWorkingTimeInfo = async () => {
|
||||||
workingTimeInfo.value = await useFunctions().getWorkingTimesEvaluationData(route.params.id,selectedStartDay.value,selectedEndDay.value)
|
workingTimeInfo.value = await useFunctions().getWorkingTimesEvaluationData(route.params.id,selectedStartDay.value,selectedEndDay.value)
|
||||||
|
console.log(workingTimeInfo.value)
|
||||||
openTab.value = 0
|
openTab.value = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +61,10 @@ const changeRange = () => {
|
|||||||
selector = "M"
|
selector = "M"
|
||||||
subtract = 0
|
subtract = 0
|
||||||
|
|
||||||
|
} else if(selectedPresetRange.value === "Dieser Monat bis heute") {
|
||||||
|
selector = "M"
|
||||||
|
subtract = 0
|
||||||
|
|
||||||
} else if(selectedPresetRange.value === "Dieses Jahr") {
|
} else if(selectedPresetRange.value === "Dieses Jahr") {
|
||||||
selector = "y"
|
selector = "y"
|
||||||
subtract = 0
|
subtract = 0
|
||||||
@@ -75,8 +80,13 @@ const changeRange = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectedStartDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).startOf(selector).format("YYYY-MM-DD")
|
selectedStartDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).startOf(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")
|
selectedEndDay.value = dayjs().subtract(subtract,selector === "isoWeek" ? "week" : selector).endOf(selector).format("YYYY-MM-DD")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
openTab.value = 0
|
openTab.value = 0
|
||||||
loadWorkingTimeInfo()
|
loadWorkingTimeInfo()
|
||||||
}
|
}
|
||||||
@@ -279,7 +289,7 @@ changeRange()
|
|||||||
label="Vorlage:"
|
label="Vorlage:"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:options="['Diese Woche', 'Dieser Monat', 'Dieses Jahr', 'Letzte Woche', 'Letzter Monat', 'Letztes Jahr']"
|
:options="['Dieser Monat bis heute','Diese Woche', 'Dieser Monat', 'Dieses Jahr', 'Letzte Woche', 'Letzter Monat', 'Letztes Jahr']"
|
||||||
v-model="selectedPresetRange"
|
v-model="selectedPresetRange"
|
||||||
@change="changeRange"
|
@change="changeRange"
|
||||||
/>
|
/>
|
||||||
@@ -326,14 +336,14 @@ changeRange()
|
|||||||
<p>Genehmigt: {{Math.floor(workingTimeInfo.sumWorkingMinutesApproved/60)}}:{{String(workingTimeInfo.sumWorkingMinutesApproved % 60).padStart(2,"0")}} h</p>
|
<p>Genehmigt: {{Math.floor(workingTimeInfo.sumWorkingMinutesApproved/60)}}:{{String(workingTimeInfo.sumWorkingMinutesApproved % 60).padStart(2,"0")}} h</p>
|
||||||
<p>Feiertagsausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesRecreationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesRecreationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumRecreationDays}} Tage</p>
|
<p>Feiertagsausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesRecreationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesRecreationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumRecreationDays}} Tage</p>
|
||||||
<p>Urlaubs-/Berufsschulausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesVacationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesVacationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumVacationDays}} Tage</p>
|
<p>Urlaubs-/Berufsschulausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesVacationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesVacationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumVacationDays}} Tage</p>
|
||||||
<p>Soll Stunden: {{Math.floor(workingTimeInfo.workingMinutesTarget/60)}}:{{String(workingTimeInfo.workingMinutesTarget % 60 ).padStart(2,"0")}} h</p>
|
<p>Soll Stunden: {{Math.floor(workingTimeInfo.timeSpanWorkingMinutes/60)}}:{{String(workingTimeInfo.timeSpanWorkingMinutes % 60 ).padStart(2,"0")}} h</p>
|
||||||
|
|
||||||
<!-- <p>Abwesend: </p>
|
<!-- <p>Abwesend: </p>
|
||||||
|
|
||||||
<p>Ausgleich:</p>
|
<p>Ausgleich:</p>
|
||||||
-->
|
-->
|
||||||
<p>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</p>
|
<p>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</p>
|
||||||
<p>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</p>
|
<p>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</p>
|
||||||
</UCard>
|
</UCard>
|
||||||
|
|
||||||
<div style="overflow-y: scroll; height: 45vh">
|
<div style="overflow-y: scroll; height: 45vh">
|
||||||
@@ -341,6 +351,7 @@ changeRange()
|
|||||||
v-if="workingTimeInfo"
|
v-if="workingTimeInfo"
|
||||||
:rows="workingTimeInfo.times"
|
:rows="workingTimeInfo.times"
|
||||||
@select="(row) => router.push(`/workingtimes/edit/${row.id}`)"
|
@select="(row) => router.push(`/workingtimes/edit/${row.id}`)"
|
||||||
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: `Keine Anwesenheiten anzuzeigen` }"
|
||||||
:columns="[
|
:columns="[
|
||||||
{
|
{
|
||||||
key: 'state',
|
key: 'state',
|
||||||
|
|||||||
Reference in New Issue
Block a user