feat: restructure flow to date-first and add support for long/short days and activities

This commit is contained in:
2026-08-12 13:13:54 +02:00
parent 3d7da6c8da
commit fc01c503b7
9 changed files with 191 additions and 58 deletions
+19 -10
View File
@@ -31,16 +31,25 @@
});
summaryDate.textContent = formattedDate;
// Icon aus appsettings.json laden, falls verfügbar
fetch("appsettings.json")
.then((res) => res.json())
.then((settings) => {
const match = (settings.activities || []).find((a) => a.name === selectedActivity);
if (match && match.icon) {
activityIcon.textContent = match.icon;
}
})
.catch(() => {});
// Icons aus selectedActivities oder appsettings.json laden
let storedActivities = [];
try {
storedActivities = JSON.parse(localStorage.getItem("selectedActivities") || "[]");
} catch (e) {}
if (storedActivities.length > 0) {
activityIcon.textContent = storedActivities.map((a) => a.icon).join(" ");
} else {
fetch("appsettings.json")
.then((res) => res.json())
.then((settings) => {
const match = (settings.activities || []).find((a) => a.name === selectedActivity);
if (match && match.icon) {
activityIcon.textContent = match.icon;
}
})
.catch(() => {});
}
checkoutBtn.addEventListener("click", () => {
// Später: API / Mail-Versand / Kalendereintrag ausführen