Merge branch 'dev' into beta
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
@@ -104,7 +104,7 @@ export const useFunctions = () => {
|
||||
const useSendTelegramNotification = async (message) => {
|
||||
const {data:{session:{access_token}}} = await supabase.auth.getSession()
|
||||
|
||||
const {data} = await axios({
|
||||
const {data,error} = await axios({
|
||||
method: "POST",
|
||||
url: `${baseURL}/functions/sendtelegramnotification`,
|
||||
data: {
|
||||
@@ -114,6 +114,12 @@ export const useFunctions = () => {
|
||||
Authorization: `Bearer ${access_token}`
|
||||
}
|
||||
})
|
||||
|
||||
if(error){
|
||||
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
const useBankingCheckInstitutions = async (bic) => {
|
||||
|
||||
@@ -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})
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -80,7 +94,7 @@ const addEntry = async () => {
|
||||
<UButton
|
||||
v-if="profileStore.currentTenant === 5"
|
||||
variant="outline"
|
||||
disabled
|
||||
@click="closeTicket"
|
||||
>
|
||||
Ticket Schließen
|
||||
</UButton>
|
||||
|
||||
@@ -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}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'}]"
|
||||
>
|
||||
<template #tenant-data="{ row }">
|
||||
{{row.tenant.name}}
|
||||
</template>
|
||||
<template #status-data="{ row }">
|
||||
<span v-if="row.status === 'Offen'" class="text-yellow-500">Offen</span>
|
||||
<span v-else-if="row.status === 'Geschlossen'" class="text-primary">Geschlossen</span>
|
||||
</template>
|
||||
<template #created_by-data="{ row }">
|
||||
{{row.created_by.fullName}}
|
||||
</template>
|
||||
|
||||
@@ -337,6 +337,7 @@ changeRange()
|
||||
<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>Urlaubs-/Berufsschulausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesVacationDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesVacationDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumVacationDays}} Tage</p>
|
||||
<p>Krankheitsausgleich: {{Math.floor(workingTimeInfo.sumWorkingMinutesSickDays/60)}}:{{String(workingTimeInfo.sumWorkingMinutesSickDays % 60).padStart(2,"0")}} h / {{workingTimeInfo.sumSickDays}} Tage</p>
|
||||
<p>Soll Stunden: {{Math.floor(workingTimeInfo.timeSpanWorkingMinutes/60)}}:{{String(workingTimeInfo.timeSpanWorkingMinutes % 60 ).padStart(2,"0")}} h</p>
|
||||
|
||||
<!-- <p>Abwesend: </p>
|
||||
|
||||
@@ -537,8 +537,8 @@ export const useDataStore = defineStore('data', () => {
|
||||
showTabs: [{label: 'Informationen'},{label: 'Dateien'}]
|
||||
},
|
||||
absencerequests: {
|
||||
label: "Abwesenheitsanträge",
|
||||
labelSingle: "Abwesenheitsantrag",
|
||||
label: "Abwesenheiten",
|
||||
labelSingle: "Abwesenheit",
|
||||
isStandardEntity: true,
|
||||
supabaseSortColumn:"startDate",
|
||||
supabaseSortAscending: false,
|
||||
|
||||
Reference in New Issue
Block a user