Avancement du projet
This commit is contained in:
@@ -4,7 +4,7 @@ mod entities;
|
||||
mod enums;
|
||||
mod ui;
|
||||
use crate::{app::App, enums::*, ui::ui};
|
||||
use entities::{Account, AccountType};
|
||||
use entities::{Account, AccountType, Transaction};
|
||||
use ratatui::{
|
||||
Terminal,
|
||||
crossterm::{
|
||||
@@ -101,9 +101,13 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, app: &mut App) -> io::Result<
|
||||
_ => {}
|
||||
},
|
||||
CurrentScreen::NewTransaction => match key.code {
|
||||
KeyCode::Enter => {}
|
||||
KeyCode::Enter => {
|
||||
app.save_new_tr();
|
||||
app.current_screen = CurrentScreen::Main;
|
||||
}
|
||||
KeyCode::Esc => {
|
||||
app.current_screen = CurrentScreen::Main;
|
||||
app.new_transaction = Transaction::new_empty();
|
||||
}
|
||||
_ => {}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user