Umstellung auf anzeige x h y min

This commit is contained in:
2026-02-13 12:21:43 +01:00
parent 23c255438b
commit af1f6efb40
8 changed files with 117 additions and 94 deletions

View File

@@ -3,7 +3,7 @@
const express = require('express');
const path = require('path');
const { db } = require('./database');
const { getCurrentDate, getCurrentTime, updateTotalHours } = require('./helpers/utils');
const { getCurrentDate, getCurrentTime, updateTotalHours, formatHoursMin } = require('./helpers/utils');
const checkinApp = express();
const CHECKIN_PORT = 3334;
@@ -139,7 +139,7 @@ checkinApp.get('/api/checkout/:userId', (req, res) => {
return sendResponse(req, res, false, { error: 'Fehler beim Aktualisieren', status: 500 });
}
const successTitle = 'Schönen Feierabend, du wurdest erfolgreich ausgecheckt';
const successMessage = `End-Zeit erfasst: ${currentTime}. Gesamtstunden: ${totalHours.toFixed(2)} h`;
const successMessage = `End-Zeit erfasst: ${currentTime}. Gesamtstunden: ${formatHoursMin(totalHours)}`;
sendResponse(req, res, true, {
title: successTitle,
message: successMessage,