From 00e5c68ea5ff44b8524404582cc8aa1e97ae9b48 Mon Sep 17 00:00:00 2001 From: troogs Date: Thu, 1 Oct 2026 18:22:45 +0200 Subject: [PATCH] feat: enhance summary display by adding conditional name visibility --- public/checkout.html | 2 +- public/checkout.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) 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", {