Add budgets view with progress bars and management
Month selector, summary of total budgeted vs spent, per-category progress bars with green/yellow/red color coding based on percentage. Add budget dialog with category picker and amount. Edit and delete budgets with confirmation.
This commit is contained in:
@@ -2,6 +2,7 @@ use adw::prelude::*;
|
||||
use outlay_core::db::Database;
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::budgets_view::BudgetsView;
|
||||
use crate::charts_view::ChartsView;
|
||||
use crate::history_view::HistoryView;
|
||||
use crate::log_view::LogView;
|
||||
@@ -53,8 +54,12 @@ impl MainWindow {
|
||||
let charts_view = ChartsView::new(db.clone());
|
||||
content_stack.add_named(&charts_view.container, Some("charts"));
|
||||
|
||||
// Budgets view
|
||||
let budgets_view = BudgetsView::new(db.clone());
|
||||
content_stack.add_named(&budgets_view.container, Some("budgets"));
|
||||
|
||||
// Remaining pages are placeholders for now
|
||||
for item in &SIDEBAR_ITEMS[3..] {
|
||||
for item in &SIDEBAR_ITEMS[4..] {
|
||||
let page = adw::StatusPage::builder()
|
||||
.title(item.label)
|
||||
.icon_name(item.icon)
|
||||
|
||||
Reference in New Issue
Block a user