Add a Recipe/steps field to brew logging
Test and deploy / test-and-deploy (push) Successful in 1m16s
Test and deploy / test-and-deploy (push) Successful in 1m16s
Free-text recipe (bloom, pours, timings) distinct from tasting notes and next-time notes: new brews.recipe column (migration 007), form textarea, shown under the recipe summary in brew history, carried by Brew again, included in backups and the OpenAPI spec. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
16d5af83f7
commit
f781930832
@@ -122,6 +122,15 @@
|
||||
><input class="field-input" name="bloomTime" placeholder="m:ss"
|
||||
/></label>
|
||||
</div>
|
||||
<label class="field"
|
||||
><span class="field-label">Recipe / steps</span
|
||||
><textarea
|
||||
class="field-input"
|
||||
name="recipe"
|
||||
rows="3"
|
||||
placeholder="e.g. 45 g bloom, swirl · 0:45 pour to 150 g · 1:30 pour to 250 g · drawdown by 2:45"
|
||||
></textarea></label
|
||||
>
|
||||
<label class="field" style="margin-top:6px"
|
||||
><span class="field-label"
|
||||
>Rating <span class="rating-pill" id="rating-value">–</span></span
|
||||
|
||||
@@ -185,6 +185,14 @@ function renderBrews() {
|
||||
|
||||
const recipeCell = document.createElement("td");
|
||||
recipeCell.textContent = recipeText(brew);
|
||||
if (brew.recipe) {
|
||||
const steps = document.createElement("div");
|
||||
steps.className = "muted";
|
||||
steps.style.fontSize = "11.5px";
|
||||
steps.style.maxWidth = "340px";
|
||||
steps.textContent = brew.recipe;
|
||||
recipeCell.append(steps);
|
||||
}
|
||||
if (brew.tastingNotes) {
|
||||
const notes = document.createElement("div");
|
||||
notes.className = "muted";
|
||||
@@ -271,6 +279,7 @@ function startEdit(brew) {
|
||||
form.brewTime.value = fmtTime(brew.brewTimeS) ?? "";
|
||||
form.bloomTime.value = fmtTime(brew.bloomTimeS) ?? "";
|
||||
form.rating.value = brew.rating ?? 5;
|
||||
form.recipe.value = brew.recipe;
|
||||
form.tastingNotes.value = brew.tastingNotes;
|
||||
form.notes.value = brew.notes;
|
||||
updateRatio();
|
||||
@@ -318,6 +327,7 @@ document.getElementById("brew-form").addEventListener("submit", async (event) =>
|
||||
brewTimeS,
|
||||
bloomTimeS,
|
||||
rating: Number(form.rating.value),
|
||||
recipe: form.recipe.value,
|
||||
tastingNotes: form.tastingNotes.value,
|
||||
notes: form.notes.value,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user