feat: restructure flow to date-first and add support for long/short days and activities
This commit is contained in:
+19
-10
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user