Changes in workingtimes.vue
This commit is contained in:
@@ -25,7 +25,7 @@ const timeInfo = ref({
|
||||
notes: null,
|
||||
})
|
||||
|
||||
const filterUser = ref(dataStore.getOwnProfile.id || "")
|
||||
const filterUser = ref(dataStore.activeProfile.id || "")
|
||||
|
||||
|
||||
const filteredRows = computed(() => {
|
||||
@@ -152,8 +152,8 @@ const stopStartedTime = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
if(dataStore.workingtimes.find(time => time.profile === dataStore.getOwnProfile.id && !time.end)) {
|
||||
runningTimeInfo.value = dataStore.workingtimes.find(time => time.profile === dataStore.getOwnProfile.id && !time.end)
|
||||
if(dataStore.workingtimes.find(time => time.profile === dataStore.activeProfile.id && !time.end)) {
|
||||
runningTimeInfo.value = dataStore.workingtimes.find(time => time.profile === dataStore.activeProfile.id && !time.end)
|
||||
}
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ const format = (date) => {
|
||||
}
|
||||
|
||||
const getDuration = (time) => {
|
||||
const minutes = Math.floor(dayjs(time.end, "HH:mm:ssZ").diff(dayjs(time.start, "HH:mm:ssZ"),'minutes',true))
|
||||
const minutes = Math.floor(dayjs(time.end, "HH:mm:ss").diff(dayjs(time.start, "HH:mm:ss"),'minutes',true))
|
||||
const hours = Math.floor(minutes/60)
|
||||
return {
|
||||
//dezimal: dez,
|
||||
@@ -448,10 +448,10 @@ const setState = async (newState) => {
|
||||
{{dayjs(row.start, "HH:mm:ss").format("HH:mm")}} Uhr
|
||||
</template>
|
||||
<template #end-data="{row}">
|
||||
{{dayjs(row.end, "HH:mm:ss").format("HH:mm")}} Uhr
|
||||
{{row.end ? dayjs(row.end, "HH:mm:ss").format("HH:mm") + " Uhr" : ""}}
|
||||
</template>
|
||||
<template #duration-data="{row}">
|
||||
{{getDuration(row).composed}}
|
||||
{{row.end ? getDuration(row).composed : ""}}
|
||||
</template>
|
||||
</UTable>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user