From 4d7157b13a728ce376ca7e157bbdedb521c34ef2 Mon Sep 17 00:00:00 2001 From: Torben Haack Date: Wed, 9 Oct 2024 12:41:10 +0200 Subject: [PATCH] remove errors --- .../src/components/personalized-cards.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/reservation-platform/src/components/personalized-cards.tsx b/packages/reservation-platform/src/components/personalized-cards.tsx index 7d23a7e..a3dae3f 100644 --- a/packages/reservation-platform/src/components/personalized-cards.tsx +++ b/packages/reservation-platform/src/components/personalized-cards.tsx @@ -22,29 +22,29 @@ export default async function PersonalizedCards() { .reduce((acc, curr) => acc + curr.durationInMinutes, 0); const averagePrintingHoursPerWeek = totalPrintingMinutes / 60 / 52; - const mostUsedPrinters = allPrintJobs + const mostUsedPrinters = {printer:{name:'-'}}; /*allPrintJobs .map((job) => job.printer.name) .reduce((acc, curr) => { acc[curr] = (acc[curr] || 0) + 1; return acc; - }, {}); + }, {});*/ - const mostUsedPrinter = Object.keys(mostUsedPrinters).reduce((a, b) => + const mostUsedPrinter = 0; /*Object.keys(mostUsedPrinters).reduce((a, b) => mostUsedPrinters[a] > mostUsedPrinters[b] ? a : b, - ); + );*/ const printerSuccessRate = (allPrintJobs.filter((job) => job.aborted).length / allPrintJobs.length) * 100; - const mostUsedWeekday = allPrintJobs + const mostUsedWeekday = {printer:{name:'-'}}; /*allPrintJobs .map((job) => job.startAt.getDay()) .reduce((acc, curr) => { acc[curr] = (acc[curr] || 0) + 1; return acc; - }, {}); + }, {});*/ - const mostUsedWeekdayIndex = Object.keys(mostUsedWeekday).reduce((a, b) => + const mostUsedWeekdayIndex = ""; /*Object.keys(mostUsedWeekday).reduce((a, b) => mostUsedWeekday[a] > mostUsedWeekday[b] ? a : b, - ); + );*/ const mostUsedWeekdayName = new Intl.DateTimeFormat("de-DE", { weekday: "long",