diff options
Diffstat (limited to 'src/controller')
-rw-r--r-- | src/controller/payments.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/controller/payments.rs b/src/controller/payments.rs index ab4bd92..883f9e1 100644 --- a/src/controller/payments.rs +++ b/src/controller/payments.rs @@ -22,6 +22,7 @@ pub async fn table( let payments = db::payments::list_for_table(&wallet.pool, &query, PER_PAGE).await; let max_page = (count.count as f32 / PER_PAGE as f32).ceil() as i64; + let categories = db::categories::list(&wallet.pool).await; let mut context = Context::new(); context.insert("header", &templates::Header::Payments); @@ -32,6 +33,7 @@ pub async fn table( context.insert("query", &query); context.insert("count", &count.count); context.insert("total_cost", &count.total_cost); + context.insert("categories", &categories); utils::template( &wallet.assets, @@ -99,6 +101,7 @@ pub async fn create( search: None, frequency: Some(create_payment.frequency), highlight: Some(id), + category: None, }; utils::redirect(&format!( "/{}", @@ -178,6 +181,7 @@ pub async fn update( search: None, frequency: Some(frequency), highlight: Some(id), + category: None, }; utils::redirect(&format!("/{}", queries::payments_url(query))) } else { |