Add green-bean inventory and cupping features

Ports inventory management and SCA-style cupping scoring from
hope_roaster: lot tracking with audit-logged consumption, cupping
sessions with server-authoritative scoring and a live radar chart,
and links from the planner (draw-from-lot, open-cupping-session).

Also fixes the Blend/Single-origin toggle layout, replaces tooltips
with an in-context "why" teaching layer, and stages the planner UI
into pre-roast vs. post-roast phases.
This commit is contained in:
2026-07-30 14:47:15 -04:00
parent 9f0a3dbc74
commit 59645e59b5
43 changed files with 7582 additions and 566 deletions
+30
View File
@@ -0,0 +1,30 @@
const form = document.querySelector("#forgot-form");
const message = document.querySelector("#message");
form.addEventListener("submit", async (event) => {
event.preventDefault();
const submitButton = form.querySelector("button[type=submit]");
submitButton.disabled = true;
try {
const response = await fetch("/api/auth/forgot", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify(Object.fromEntries(new FormData(form))),
});
if (response.status === 429) {
message.textContent = "Too many requests. Try again in a few minutes.";
message.className = "auth-message error";
return;
}
// Always show the same message, whether or not the account exists.
message.textContent =
"If that email has an account, a reset link is on its way.";
message.className = "auth-message info";
form.reset();
} catch {
message.textContent = "Could not reach the server. Try again shortly.";
message.className = "auth-message error";
} finally {
submitButton.disabled = false;
}
});