renamed NewTransactionTabState
This commit is contained in:
parent
1b5bc3ceee
commit
6108ff164a
2 changed files with 8 additions and 8 deletions
|
@ -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<T> = std::result::Result<T, Box<dyn std::error::Error>>;
|
||||
|
||||
|
@ -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,
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue