From cad2ed9dba6ad508d667dab4f8d0fbad54f9524a Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Sun, 25 May 2025 16:27:56 +0200 Subject: [PATCH] Added Editing for Automatic Working Hour Corrections --- pages/profiles/show/[id].vue | 134 +++++++++++++++++++++++++++++++++-- 1 file changed, 130 insertions(+), 4 deletions(-) diff --git a/pages/profiles/show/[id].vue b/pages/profiles/show/[id].vue index 66f5b45..364d0a1 100644 --- a/pages/profiles/show/[id].vue +++ b/pages/profiles/show/[id].vue @@ -7,6 +7,7 @@ import isoWeek from "dayjs/plugin/isoWeek" import isBetween from "dayjs/plugin/isBetween" import DocumentList from "~/components/DocumentList.vue"; import DocumentUpload from "~/components/DocumentUpload.vue"; +import { v4 as uuidv4 } from 'uuid'; dayjs.extend(customParseFormat) dayjs.extend(isoWeek) dayjs.extend(isBetween) @@ -131,6 +132,10 @@ const saveProfile = async () => { await dataStore.updateItem('profiles',data,oldItemInfo.value) } +const addAutomaticHourCorrection = async () => { + itemInfo.value.automaticHourCorrections.push({mode: 'correct', id: uuidv4(), weekday: 1, bookingTimeUTC: {hour: 0, minute: 0}, rangeStartUTC: {hour: 0, minute: 0}, rangeEndUTC: {hour: 0, minute: 0}}) +} +