diff --git a/crates/ui/src/admin/alerts.rs b/crates/ui/src/admin/alerts.rs index f2baee2b4..88db93f2f 100644 --- a/crates/ui/src/admin/alerts.rs +++ b/crates/ui/src/admin/alerts.rs @@ -56,7 +56,12 @@ fn author(update: &AlertUpdate) -> String { /// The current alerts, `cards`, newest first, each with posting an update on /// it, and a link to the alerts that cleared, at `previous`. #[component] -pub async fn alert_list<'a>(cards: &'a [AlertCard<'a>], previous: &'a str) -> Result { +pub async fn alert_list<'a>( + /// The alerts, newest first. + cards: &'a [AlertCard<'a>], + /// Where the cleared alerts are listed. + previous: &'a str, +) -> Result { Ok(view! { page_head( title: "Alerts", @@ -76,8 +81,11 @@ pub async fn alert_list<'a>(cards: &'a [AlertCard<'a>], previous: &'a str) -> Re /// `limit`, and a link back to the current ones, at `current`. #[component] pub async fn previous_alerts<'a>( + /// The cleared alerts, most recently cleared first. cards: &'a [AlertCard<'a>], + /// Where the current alerts are listed. current: &'a str, + /// The most alerts shown. limit: u32, ) -> Result { let full = u32::try_from(cards.len()).is_ok_and(|shown| shown >= limit); @@ -102,7 +110,10 @@ pub async fn previous_alerts<'a>( /// One alert: what it says, when it was raised, last seen and cleared, the /// updates posted on it, newest first, and posting one while it is current. #[component] -async fn alert_card<'a>(card: &'a AlertCard<'a>) -> Result { +async fn alert_card<'a>( + /// The alert shown. + card: &'a AlertCard<'a>, +) -> Result { let detail = card.detail; let alert = &detail.alert; let subject = alert.alert.as_ref().map_or(Alert::UNKNOWN, Alert::subject); @@ -157,8 +168,11 @@ async fn alert_card<'a>(card: &'a AlertCard<'a>) -> Result { pub async fn alert_update_fields<'a>( #[into] #[default] + /// The status the form holds, if a refused update set one. status: Option, - #[default] note: &'a str, + /// The note the form holds. + #[default] + note: &'a str, ) -> Result { Ok(view! {