From 1bac464268eeb1868eb41f799bae50bc1bffbd38 Mon Sep 17 00:00:00 2001 From: Brian Bjarke Jensen Date: Wed, 3 Dec 2025 19:20:56 +0100 Subject: [PATCH] streamlined logging workflow --- src/baby_monitor/static/index.html | 39 ++---------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/src/baby_monitor/static/index.html b/src/baby_monitor/static/index.html index 153c7b2..c053243 100644 --- a/src/baby_monitor/static/index.html +++ b/src/baby_monitor/static/index.html @@ -510,7 +510,7 @@ ` : ` - `; @@ -802,42 +802,7 @@ } function showStartSleepModal() { - const modal = document.getElementById("startSleepModal"); - const childSelect = document.getElementById("modalSleepChildId"); - - // Clear and populate child select or show single child - if (userChildren.length === 1) { - // Single child: replace dropdown with text display - const child = userChildren[0]; - const formGroup = childSelect.parentElement; - formGroup.innerHTML = ` - - - - `; - } else { - // Multiple children: show dropdown - childSelect.innerHTML = ''; - userChildren.forEach((child) => { - const option = document.createElement("option"); - option.value = child.id; - option.textContent = child.name; - childSelect.appendChild(option); - }); - - // Set default based on last sleep - if (lastSleep) { - childSelect.value = lastSleep.child_id; - } - } - - modal.classList.add("show"); + window.location.href = "/log-sleep.html"; } function closeStartSleepModal() {