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:
2026-03-02 00:26:09 +02:00
parent b772870d98
commit 2741df45ad
3 changed files with 516 additions and 1 deletions

View File

@@ -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)