From 703496a49315f7b67442abf0e0df3c41d3605d3b Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Fri, 15 Aug 2025 16:02:40 +0000 Subject: task-012 (#2) Co-authored-by: Joe Carstairs Reviewed-on: https://git.joeac.net/joeac/schist/pulls/2 Co-authored-by: Joe Carstairs Co-committed-by: Joe Carstairs --- schist_desktop_gui/src/dummy_data.rs | 70 ------------------------------------ 1 file changed, 70 deletions(-) delete mode 100644 schist_desktop_gui/src/dummy_data.rs (limited to 'schist_desktop_gui/src/dummy_data.rs') diff --git a/schist_desktop_gui/src/dummy_data.rs b/schist_desktop_gui/src/dummy_data.rs deleted file mode 100644 index 079b687..0000000 --- a/schist_desktop_gui/src/dummy_data.rs +++ /dev/null @@ -1,70 +0,0 @@ -use schist_models::{ - account::Account, bucket::Bucket, budget_period_unit::BudgetPeriodUnit, date_utc::DateUtc, -}; - -#[derive(Clone, Debug)] -pub struct Error {} - -impl From for Error { - fn from(_value: anyhow::Error) -> Self { - Error {} - } -} - -pub async fn fetch_accounts() -> Result, Error> { - Ok(vec![ - Account { - id: 0, - name: String::from("Nationwide current account"), - opening_balance: 0, - opening_date: DateUtc::from_ymd(2024, 06, 12)?, - }, - Account { - id: 1, - name: String::from("cash account"), - opening_balance: 0, - opening_date: DateUtc::from_ymd(2024, 06, 12)?, - }, - Account { - id: 2, - name: String::from("YBS savings account"), - opening_balance: 0, - opening_date: DateUtc::from_ymd(2024, 06, 12)?, - }, - ]) -} - -pub async fn fetch_buckets() -> Result, Error> { - Ok(vec![ - Bucket { - id: 0, - name: String::from("groceries"), - balance: 123, - balance_date: DateUtc::from_ymd(2025, 8, 10)?, - budget_period: 1, - budget_period_unit: BudgetPeriodUnit::Month, - budget_quantity: 300, - group: String::from("normal expenses"), - }, - Bucket { - id: 1, - name: String::from("outdoor trips"), - balance: -11, - balance_date: DateUtc::from_ymd(2025, 8, 10)?, - budget_period: 1, - budget_period_unit: BudgetPeriodUnit::Month, - budget_quantity: 110, - group: String::from("outdoors"), - }, - Bucket { - id: 2, - name: String::from("salary"), - balance: 1018, - balance_date: DateUtc::from_ymd(2025, 8, 10)?, - budget_period: 1, - budget_period_unit: BudgetPeriodUnit::Month, - budget_quantity: -2196, - group: String::from("income"), - }, - ]) -} -- cgit v1.2.3