feat: add amount to Bag Finished events
This commit is contained in:
parent
f750107bb1
commit
ab9d4bfa13
1 changed files with 10 additions and 4 deletions
|
|
@ -239,10 +239,16 @@ pub(crate) async fn update_bag(
|
||||||
action: "finished".to_string(),
|
action: "finished".to_string(),
|
||||||
occurred_at: chrono::Utc::now(),
|
occurred_at: chrono::Utc::now(),
|
||||||
title: format!("{}", roast.name),
|
title: format!("{}", roast.name),
|
||||||
details: vec![TimelineEventDetail {
|
details: vec![
|
||||||
label: "Roaster".to_string(),
|
TimelineEventDetail {
|
||||||
value: roaster.name,
|
label: "Roaster".to_string(),
|
||||||
}],
|
value: roaster.name,
|
||||||
|
},
|
||||||
|
TimelineEventDetail {
|
||||||
|
label: "Amount".to_string(),
|
||||||
|
value: format!("{}g", bag.amount),
|
||||||
|
},
|
||||||
|
],
|
||||||
tasting_notes: vec![],
|
tasting_notes: vec![],
|
||||||
};
|
};
|
||||||
let _ = state.timeline_repo.insert(event).await;
|
let _ = state.timeline_repo.insert(event).await;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue