From abc5b8ff3838b909e258376e004fc163d1814828 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Mon, 10 Feb 2025 12:11:46 +0100 Subject: [PATCH 1/7] Fixed Shortcuts --- composables/useDashboard.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/composables/useDashboard.ts b/composables/useDashboard.ts index 1607b7b..9f1c4a9 100644 --- a/composables/useDashboard.ts +++ b/composables/useDashboard.ts @@ -8,14 +8,14 @@ const _useDashboard = () => { defineShortcuts({ 'g-h': () => router.push('/'), - 'g-a': () => router.push('/tasks'), - 'g-d': () => router.push('/documents'), - 'g-k': () => router.push('/customers'), - 'g-l': () => router.push('/vendors'), + 'g-a': () => router.push('/standardEntity/tasks'), + 'g-d': () => router.push('/files'), + 'g-k': () => router.push('/standardEntity/customers'), + 'g-l': () => router.push('/standardEntity/vendors'), 'g-s': () => router.push('/settings'), - 'g-p': () => router.push('/projects'), - 'g-v': () => router.push('/contracts'), - 'g-o': () => router.push('/plants'), + 'g-p': () => router.push('/standardEntity/projects'), + 'g-v': () => router.push('/standardEntity/contracts'), + 'g-o': () => router.push('/standardEntity/plants'), '?': () => isHelpSlideoverOpen.value = !isHelpSlideoverOpen.value, n: () => isNotificationsSlideoverOpen.value = !isNotificationsSlideoverOpen.value }) From 1dc71d57916e319552fb86c471a018623f0cf86c Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 11 Feb 2025 19:22:05 +0100 Subject: [PATCH 2/7] Added Sick Days --- composables/useWorkingTimePDFGenerator.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/composables/useWorkingTimePDFGenerator.js b/composables/useWorkingTimePDFGenerator.js index 665162f..000d937 100644 --- a/composables/useWorkingTimePDFGenerator.js +++ b/composables/useWorkingTimePDFGenerator.js @@ -118,21 +118,26 @@ export const useCreateWorkingTimesPdf = async (input,backgroundSourceBuffer) => y: getCoordinatesForPDFLib(20,85,pages[pageCounter -1]).y, size: 10, }) - pages[pageCounter - 1].drawText(`Soll Stunden: ${Math.floor(input.timeSpanWorkingMinutes/60)}:${String(input.timeSpanWorkingMinutes % 60).padStart(2,"0")} Std`,{ + pages[pageCounter - 1].drawText(`Krankheitsausgleich: ${Math.floor(input.sumWorkingMinutesSickDays/60)}:${String(input.sumWorkingMinutesSickDays % 60).padStart(2,"0")} Std`,{ x: getCoordinatesForPDFLib(20,90,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(20,90,pages[pageCounter -1]).y, size: 10, }) - pages[pageCounter - 1].drawText(`Inoffizielles Saldo: ${Math.sign(input.saldoInOfficial) === 1 ? "" : "-"}${Math.floor(Math.abs(input.saldoInOfficial/60))}:${String(Math.abs(input.saldoInOfficial) % 60).padStart(2,"0")} Std`,{ + pages[pageCounter - 1].drawText(`Soll Stunden: ${Math.floor(input.timeSpanWorkingMinutes/60)}:${String(input.timeSpanWorkingMinutes % 60).padStart(2,"0")} Std`,{ x: getCoordinatesForPDFLib(20,95,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(20,95,pages[pageCounter -1]).y, size: 10, }) - pages[pageCounter - 1].drawText(`Saldo: ${Math.sign(input.saldo) === 1 ? "" : "-"}${Math.floor(Math.abs(input.saldo/60))}:${String(Math.abs(input.saldo) % 60).padStart(2,"0")} Std`,{ + pages[pageCounter - 1].drawText(`Inoffizielles Saldo: ${Math.sign(input.saldoInOfficial) === 1 ? "+" : "-"} ${Math.floor(Math.abs(input.saldoInOfficial/60))}:${String(Math.abs(input.saldoInOfficial) % 60).padStart(2,"0")} Std`,{ x: getCoordinatesForPDFLib(20,100,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(20,100,pages[pageCounter -1]).y, size: 10, }) + pages[pageCounter - 1].drawText(`Saldo: ${Math.sign(input.saldo) === 1 ? "+" : "-"} ${Math.floor(Math.abs(input.saldo/60))}:${String(Math.abs(input.saldo) % 60).padStart(2,"0")} Std`,{ + x: getCoordinatesForPDFLib(20,105,pages[pageCounter -1]).x, + y: getCoordinatesForPDFLib(20,105,pages[pageCounter -1]).y, + size: 10, + }) pages[pageCounter - 1].drawText(`Start:`,{ x: getCoordinatesForPDFLib(20,110,pages[pageCounter -1]).x, @@ -178,8 +183,6 @@ export const useCreateWorkingTimesPdf = async (input,backgroundSourceBuffer) => }) - - uri.value = await pdfDoc.saveAsBase64({dataUri: true}) } From 80af06966944b83e48214cc042e8139502d4cdc5 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 11 Feb 2025 19:22:49 +0100 Subject: [PATCH 3/7] Added Status to Tickets Fixed Telegram Notification in Tickets Added Ticket Closing --- pages/support/create.vue | 3 ++- pages/support/index.vue | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/support/create.vue b/pages/support/create.vue index d683999..19b99f1 100644 --- a/pages/support/create.vue +++ b/pages/support/create.vue @@ -32,8 +32,9 @@ const createTicket = async () => { if(messageError) { console.log(messageError) } else { + console.log(ticketData) + useFunctions().useSendTelegramNotification(`Ticket von ${profileStore.activeProfile.fullName} erstellt : ${itemInfo.value.content}`) router.push(`/support/${ticketData.id}`) - await useFunctions().useSendTelegramNotification(`Ticket von ${profileStore.activeProfile.fullName} erstellt : ${itemInfo.value.content}`) } } } diff --git a/pages/support/index.vue b/pages/support/index.vue index 19dc77e..3c3bb3c 100644 --- a/pages/support/index.vue +++ b/pages/support/index.vue @@ -34,11 +34,15 @@ setup() :rows="tickets" :empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: `Keine Tickets anzuzeigen` }" @select="(i) => router.push(`/support/${i.id}`)" - :columns="[{key:'created_at',label:'Datum'}, ...profileStore.currentTenant === 5 ? [{key:'tenant',label:'Tenant'}] : [],{key:'title',label:'Titel'},{key:'created_by',label:'Ersteller'},{key:'ticketmessages',label:'Nachrichten'}]" + :columns="[{key:'created_at',label:'Datum'}, ...profileStore.currentTenant === 5 ? [{key:'tenant',label:'Tenant'}] : [],{key:'status',label:'Status'},{key:'title',label:'Titel'},{key:'created_by',label:'Ersteller'},{key:'ticketmessages',label:'Nachrichten'}]" > + From b0d99f0a86b4b5d9317e414893858f51c354b134 Mon Sep 17 00:00:00 2001 From: florianfederspiel Date: Tue, 11 Feb 2025 19:22:52 +0100 Subject: [PATCH 4/7] Added Status to Tickets Fixed Telegram Notification in Tickets Added Ticket Closing --- pages/support/[id].vue | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pages/support/[id].vue b/pages/support/[id].vue index 0ab3c49..a998a80 100644 --- a/pages/support/[id].vue +++ b/pages/support/[id].vue @@ -33,7 +33,9 @@ const addMessage = async () => { toast.add({title: "Erstellen erfolgreich"}) messageContent.value="" setup() - await useFunctions().useSendTelegramNotification(`Neue Nachricht im Ticket ${useRoute().params.id} von ${profileStore.activeProfile.fullName}: ${data.content}`) + if(profileStore.currentTenant !== 5) { + await useFunctions().useSendTelegramNotification(`Neue Nachricht im Ticket ${useRoute().params.id} von ${profileStore.activeProfile.fullName}: ${data.content}`) + } } } @@ -60,6 +62,18 @@ const addEntry = async () => { } } +const closeTicket = async () => { + const {data, error} = await supabase.from("tickets").update({status: "Geschlossen"}).eq("id",useRoute().params.id).single() + + if(error) { + console.log(error) + } else { + console.log(data) + } + + setup() +} +