Reload after series field saves to sync task list
Assisted-by: Claude Opus 4.6 via Claude Code
change pwvqvlprptnwuowpxwulopkytsttsusl
commit d074aa7826b9809e4a664be4f944f22a4e6e0fd1
author Alpha Chen <alpha@kejadlen.dev>
date
parent slmywrns
diff --git a/public/js/app.js b/public/js/app.js
index 185afcd..84f4b67 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -92,7 +92,7 @@ document.addEventListener("alpine:init", () => {
         method: "PATCH",
         headers: { "Content-Type": "application/x-www-form-urlencoded" },
         body: `interval_count=${encodeURIComponent(this.count)}&interval_unit=${encodeURIComponent(this.unit)}`,
-      })
+      }).then(() => location.reload())
     },
   }))
 
@@ -173,7 +173,7 @@ document.addEventListener("alpine:init", () => {
       ta.addEventListener("blur", () => {
         const note = editor.getValue().trim()
         if (note === (initialNote || "").trim()) return
-        saveSeriesField(seriesId, "note", note)
+        saveSeriesField(seriesId, "note", note).then(() => location.reload())
       })
 
       document.addEventListener("start-editing", () => {
@@ -186,7 +186,8 @@ document.addEventListener("alpine:init", () => {
       document.addEventListener("stop-editing", () => {
         const note = editor.getValue().trim()
         if (note !== (initialNote || "").trim()) {
-          saveSeriesField(seriesId, "note", note)
+          saveSeriesField(seriesId, "note", note).then(() => location.reload())
+          return
         }
         ta.style.pointerEvents = "none"
         ta.readOnly = true