From 0a91c685ac3f11fa0c641e0a6b3a0953fd625e9a Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Thu, 29 Jan 2026 02:07:31 +0100 Subject: [PATCH] Fix admin phase change UI and ensure cookies on requests --- wwwroot/app.js | 3 +++ wwwroot/js/api.js | 1 + 2 files changed, 4 insertions(+) diff --git a/wwwroot/app.js b/wwwroot/app.js index 63be5b5..d69eeca 100644 --- a/wwwroot/app.js +++ b/wwwroot/app.js @@ -341,7 +341,10 @@ function setupHandlers() { try { await adminApi.setPhase(phase); toast("Phase updated"); + state.prevPhase = state.phase; state.phase = phase; + state.votesRendered = false; + renderPhasePill(); $("phase-select").dataset.userEditing = ""; await refreshPhaseData(); } catch (err) { diff --git a/wwwroot/js/api.js b/wwwroot/js/api.js index 1f4001a..b078dcf 100644 --- a/wwwroot/js/api.js +++ b/wwwroot/js/api.js @@ -11,6 +11,7 @@ const withBase = (path) => `${basePath}${path}`; async function request(path, { method = "GET", body } = {}) { const res = await fetch(withBase(path), { method, + credentials: "same-origin", headers: defaultHeaders, body: body ? JSON.stringify(body) : undefined, });