diff --git a/public/checkout.html b/public/checkout.html index 8c34e23..f8fd66b 100644 --- a/public/checkout.html +++ b/public/checkout.html @@ -41,7 +41,7 @@ -
+
👤
Name diff --git a/public/checkout.js b/public/checkout.js index f96242b..62a354b 100644 --- a/public/checkout.js +++ b/public/checkout.js @@ -7,6 +7,7 @@ const summaryActivity = document.getElementById("summaryActivity"); const summaryDate = document.getElementById("summaryDate"); const summaryName = document.getElementById("summaryName"); + const summaryNameItem = document.getElementById("summaryNameItem"); const activityIcon = document.getElementById("activityIcon"); const checkoutBtn = document.getElementById("checkoutBtn"); @@ -25,7 +26,11 @@ } summaryActivity.textContent = selectedActivity; - summaryName.textContent = selectedName || "Nicht angegeben"; + if (selectedName && selectedName.trim()) { + summaryName.textContent = selectedName; + } else { + summaryNameItem.classList.add("hidden"); + } const dateObj = new Date(`${selectedDate}T00:00:00`); const formattedDate = dateObj.toLocaleDateString("de-DE", {