Avancement du projet

This commit is contained in:
thatscringebro
2026-03-10 10:36:11 -04:00
parent b267360b2e
commit 7b8312af12
6 changed files with 48 additions and 27 deletions

View File

@@ -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();
}
_ => {}
},