diff --git a/composables/useSort.js b/composables/useSort.js new file mode 100644 index 0000000..821370c --- /dev/null +++ b/composables/useSort.js @@ -0,0 +1,18 @@ +export const useSort = (items,column,direction) => { + + + + + + + + + + + + if(!searchString) { + return items + } + + return items.filter(i => JSON.stringify(i).toLowerCase().includes(searchString.toLowerCase())) +} \ No newline at end of file diff --git a/composables/useWorkingTimePDFGenerator.js b/composables/useWorkingTimePDFGenerator.js index e91f417..af15628 100644 --- a/composables/useWorkingTimePDFGenerator.js +++ b/composables/useWorkingTimePDFGenerator.js @@ -102,7 +102,7 @@ export const useCreateWorkingTimesPdf = async (input,backgroundSourceBuffer) => y: getCoordinatesForPDFLib(20,70,pages[pageCounter -1]).y, size: 10, }) - pages[pageCounter - 1].drawText(`Bestätigt: ${Math.floor(input.sumWorkingMinutesApproved/60)}:${String(input.sumWorkingMinutesApproved % 60).padStart(2,"0")} Std`,{ + /*pages[pageCounter - 1].drawText(`Bestätigt: ${Math.floor(input.sumWorkingMinutesApproved/60)}:${String(input.sumWorkingMinutesApproved % 60).padStart(2,"0")} Std`,{ x: getCoordinatesForPDFLib(20,75,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(20,75,pages[pageCounter -1]).y, size: 10, @@ -149,10 +149,10 @@ export const useCreateWorkingTimesPdf = async (input,backgroundSourceBuffer) => x: getCoordinatesForPDFLib(100,110,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(100,110,pages[pageCounter -1]).y, size: 10, - }) + })*/ - let rowHeight = 115 + let rowHeight = 85 input.times.forEach(time => { pages[pageCounter - 1].drawText(`${dayjs(time.startDate).format("HH:mm DD.MM.YY")}`,{ @@ -161,7 +161,7 @@ export const useCreateWorkingTimesPdf = async (input,backgroundSourceBuffer) => size: 10, }) - pages[pageCounter - 1].drawText(`${dayjs(time.startDate).format("HH:mm DD.MM.YY")}`,{ + pages[pageCounter - 1].drawText(`${dayjs(time.endDate).format("HH:mm DD.MM.YY")}`,{ x: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).x, y: getCoordinatesForPDFLib(60,rowHeight,pages[pageCounter -1]).y, size: 10, diff --git a/pages/createDocument/index.vue b/pages/createDocument/index.vue index 2418f52..de8ed43 100644 --- a/pages/createDocument/index.vue +++ b/pages/createDocument/index.vue @@ -102,7 +102,7 @@ {{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}} -