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})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user