From 8777ceb25b622f5f7e9b5826a706436764aa5876 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Thu, 5 Feb 2026 21:18:11 +0000 Subject: [PATCH] fix(brews): carry over quick notes when using "Brew Again" - Add quick_notes_raw field to BrewView with comma-separated form values - Include quick_notes hidden input in all three brew-again forms (homepage, brew list desktop, brew list mobile) --- src/presentation/web/views/brews.rs | 7 +++++++ templates/pages/home.html | 1 + templates/partials/lists/brew_list.html | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/presentation/web/views/brews.rs b/src/presentation/web/views/brews.rs index 620ae71..696a299 100644 --- a/src/presentation/web/views/brews.rs +++ b/src/presentation/web/views/brews.rs @@ -44,6 +44,7 @@ pub struct BrewView { pub ratio: String, pub quick_notes: Vec, pub quick_notes_label: String, + pub quick_notes_raw: String, pub created_date: String, pub created_time: String, pub relative_date_label: String, @@ -77,6 +78,11 @@ impl BrewView { .map(|n| n.label.as_str()) .collect::>() .join(", "); + let quick_notes_raw = quick_notes + .iter() + .map(|n| n.form_value.as_str()) + .collect::>() + .join(","); Self { id: brew.brew.id.to_string(), @@ -101,6 +107,7 @@ impl BrewView { ratio, quick_notes, quick_notes_label, + quick_notes_raw, created_date: brew.brew.created_at.format("%Y-%m-%d").to_string(), created_time: brew.brew.created_at.format("%H:%M").to_string(), relative_date_label: relative_date(brew.brew.created_at), diff --git a/templates/pages/home.html b/templates/pages/home.html index f786d20..04c6d71 100644 --- a/templates/pages/home.html +++ b/templates/pages/home.html @@ -119,6 +119,7 @@ {% endif %} +