diff --git a/src/app.rs b/src/app.rs index 9e12f6f..5138a67 100644 --- a/src/app.rs +++ b/src/app.rs @@ -9,7 +9,7 @@ use crate::db::data_cache::DataCache; use crate::db::DB; use crate::uis::history::HistoryState; use crate::uis::navigation_frame::NavigationState; -use crate::uis::new_transaction::NewTransactionTabState; +use crate::uis::new_transaction::NewTransactionState; pub type AppResult = std::result::Result>; @@ -76,7 +76,7 @@ impl<'a> App<'a> { HistoryState::handle_event(key, self); } ActiveFrame::NewTransaction => { - NewTransactionTabState::handle_event(key, self); + NewTransactionState::handle_event(key, self); } } } @@ -122,7 +122,7 @@ pub enum ActiveFrame { pub struct States<'a> { pub nav_state: NavigationState<'a>, - pub transactions: NewTransactionTabState<'a>, + pub transactions: NewTransactionState<'a>, pub history: HistoryState, pub active_frame: ActiveFrame, @@ -132,7 +132,7 @@ impl<'a> States<'a> { pub fn new() -> States<'a> { States { nav_state: NavigationState::new(), - transactions: NewTransactionTabState::new(), + transactions: NewTransactionState::new(), history: HistoryState::new(), active_frame: ActiveFrame::Navigation, diff --git a/src/uis/new_transaction.rs b/src/uis/new_transaction.rs index a18d1a9..ae1a18a 100644 --- a/src/uis/new_transaction.rs +++ b/src/uis/new_transaction.rs @@ -12,16 +12,16 @@ use ratatui::{ Frame, }; -pub struct NewTransactionTabState<'a> { +pub struct NewTransactionState<'a> { pub cur_tab_index: usize, pub tabs: Vec<&'a str>, pub manual_data: ManualData, } -impl<'a> NewTransactionTabState<'a> { - pub fn new() -> NewTransactionTabState<'a> { - NewTransactionTabState { +impl<'a> NewTransactionState<'a> { + pub fn new() -> NewTransactionState<'a> { + NewTransactionState { cur_tab_index: 0, tabs: vec!["Quick Entry", "Manual Entry"], manual_data: ManualData::new(),