From 56488e2919a605c5e600ff36a2821ad8cdcf276c Mon Sep 17 00:00:00 2001 From: Tomas Dvorak Date: Wed, 11 Jun 2025 21:53:29 +0200 Subject: [PATCH] tes --- admin-dashboard.html | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/admin-dashboard.html b/admin-dashboard.html index 49c3d45..e515fc4 100644 --- a/admin-dashboard.html +++ b/admin-dashboard.html @@ -1798,6 +1798,14 @@ window.HARDCODED_APPS = [ description: 'Správa úkolů a projektů v přehledném kanban stylu', icon: 'fa-tasks', color: 'purple' + }, + { + id: 'hardcoded-car-reservation', + name: 'Rezervace aut', + url: '/rezervace-aut.html', + description: 'Rezervace služebních vozů', + icon: 'fa-car', + color: 'blue' } ]; @@ -4309,17 +4317,32 @@ function displayReservations(reservations) { tbody.innerHTML = reservations.map(res => { const startDate = new Date(res.start); const endDate = new Date(res.end); - const formattedStart = startDate.toLocaleString('cs-CZ'); - const formattedEnd = endDate.toLocaleString('cs-CZ'); + + // Format date as DD.MM.YYYY + const formatDate = (date) => { + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const year = date.getFullYear(); + return `${day}.${month}.${year}`; + }; + + // Format time as HH:MM + const formatTime = (date) => { + const hours = String(date.getHours()).padStart(2, '0'); + const minutes = String(date.getMinutes()).padStart(2, '0'); + return `${hours}:${minutes}`; + }; return ` ${res.driverName || '-'} ${res.vehicle || '-'} - ${formattedStart} - ${formattedEnd} + ${formatDate(startDate)} + ${formatTime(startDate)} + ${formatDate(endDate)} + ${formatTime(endDate)} ${res.purpose || '-'} - ${calculateDuration(res)} + ${calculateDuration(res)} `; }).join('');