This commit is contained in:
2024-03-18 10:22:11 +01:00
parent 39a2f19b0d
commit e4a41d9126
2 changed files with 17 additions and 25 deletions

View File

@@ -30,28 +30,16 @@ build-imapsync:
- docker build -t $IMAGE_TAG tools/imapsync
- docker push $IMAGE_TAG
build-hardware-gateway:
stage: build
tags:
- shell
- docker-daemon
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-HARDWAREGATEWAY
script:
- echo $IMAGE_TAG
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build -t $IMAGE_TAG tools/hardwareGateway
- docker push $IMAGE_TAG
#build-backend:
#build-hardware-gateway:
# stage: build
# tags:
# - shell
# - docker-daemon
# variables:
# IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-BACKEND
# IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-HARDWAREGATEWAY
# script:
# - echo $IMAGE_TAG
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# - docker build -t $IMAGE_TAG backend
# - docker build -t $IMAGE_TAG tools/hardwareGateway
# - docker push $IMAGE_TAG

View File

@@ -57,23 +57,27 @@ const workingTimeInfo = computed(() => {
let times = dataStore.getWorkingTimesByProfileId(itemInfo.value.id)
times = times.filter(i => dayjs(i.date).isBetween(selectedStartDay.value,selectedEndDay.value,'day'))
times = times.filter(i => dayjs(i.date).isBetween(selectedStartDay.value,selectedEndDay.value,'day') && i.end)
let weekFactor = 4.35
let monthlyWorkingHours = itemInfo.value.weeklyWorkingHours * weekFactor
//Eingreicht
let sumWorkingMinutesEingereicht = 0
dataStore.getWorkingTimesByProfileId(itemInfo.value.id).filter(i => !i.approved).forEach(time => {
const minutes = Math.floor(dayjs(time.end, "HH:mm:ssZ").diff(dayjs(time.start, "HH:mm:ssZ"),'minutes'))
times.filter(i => !i.approved).forEach(time => {
console.log(time)
const minutes = dayjs(time.end, "HH:mm:ss").diff(dayjs(time.start, "HH:mm:ss"),'minutes')
console.log(minutes)
sumWorkingMinutesEingereicht = sumWorkingMinutesEingereicht + minutes
})
//Bestätigt
let sumWorkingMinutesApproved = 0
dataStore.getWorkingTimesByProfileId(itemInfo.value.id).filter(i => i.approved).forEach(time => {
const minutes = Math.floor(dayjs(time.end, "HH:mm:ssZ").diff(dayjs(time.start, "HH:mm:ssZ"),'minutes'))
times.filter(i => i.approved).forEach(time => {
const minutes = Math.floor(dayjs(time.end, "HH:mm:ss").diff(dayjs(time.start, "HH:mm:ss"),'minutes'))
sumWorkingMinutesApproved = sumWorkingMinutesApproved + minutes
})
@@ -95,7 +99,7 @@ const workingTimeInfo = computed(() => {
})
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,
@@ -244,7 +248,7 @@ changeRange()
</div>
<UTable
:rows="dataStore.getWorkingTimesByProfileId(dataStore.getOwnProfile.id)"
:rows="dataStore.getWorkingTimesByProfileId(dataStore.activeProfile.id)"
:columns="[
{
key: 'state',
@@ -275,10 +279,10 @@ changeRange()
</template>
<template #start-data="{row}">
{{dayjs(row.start, "HH:mm:ssZ").format("HH:mm")}} Uhr
{{dayjs(row.start, "HH:mm:ss").format("HH:mm")}} Uhr
</template>
<template #end-data="{row}">
{{dayjs(row.end, "HH:mm:ssZ").format("HH:mm")}} Uhr
{{dayjs(row.end, "HH:mm:ss").format("HH:mm")}} Uhr
</template>
<template #duration-data="{row}">
{{getDuration(row).composed}}