AI Changes: add user management and hashed passwords, admin dashboard, report fixes
This commit is contained in:
@@ -34,15 +34,15 @@ export async function createPdf(filename: string, reportId: string, dateStart: s
|
||||
doc.setFontSize(10);
|
||||
doc.text("Selected date range: " + dateStart.slice(0, -8).replace("T", "") + " - " + dateEnd.slice(0,-8).replace("T", ""), 15, 35);
|
||||
|
||||
doc.autoTable({
|
||||
const table = doc.autoTable({
|
||||
startY: 40,
|
||||
head: [['Drink', 'Price', 'Amount', 'Total']],
|
||||
body: body,
|
||||
foot: [["", "", "Total", "€" + (Math.round(total*100)/100)]]
|
||||
});
|
||||
|
||||
let finalY = doc.autoTable.previous.finalY;
|
||||
|
||||
|
||||
const finalY = table?.lastAutoTable?.finalY ?? 40;
|
||||
|
||||
doc.text("Generated on " + new Date(Date.now()).toString(), 15, finalY + 10);
|
||||
|
||||
const filepath = "/reports/" + filename + ".pdf";
|
||||
|
||||
Reference in New Issue
Block a user