From 7ff39c993f6fa753512a9fc4d1cf2c4c80a67728 Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Fri, 22 Sep 2023 22:42:44 -0700 Subject: [PATCH] moved quick transaction to folder module --- .../mod.rs} | 7 ++++ src/uis/quick_transaction/paycheck.rs | 35 +++++++++++++++++++ 2 files changed, 42 insertions(+) rename src/uis/{quick_transaction.rs => quick_transaction/mod.rs} (93%) create mode 100644 src/uis/quick_transaction/paycheck.rs diff --git a/src/uis/quick_transaction.rs b/src/uis/quick_transaction/mod.rs similarity index 93% rename from src/uis/quick_transaction.rs rename to src/uis/quick_transaction/mod.rs index c7e4af4..d27d55c 100644 --- a/src/uis/quick_transaction.rs +++ b/src/uis/quick_transaction/mod.rs @@ -1,3 +1,6 @@ + +pub mod paycheck; + use crate::app::App; use crossterm::event::{KeyCode, KeyEvent, KeyEventKind}; use ratatui::{ @@ -9,6 +12,10 @@ use ratatui::{ Frame, }; +enum SelectedQuickEntry { + Paycheck, +} + pub struct QuickTransactionState { } diff --git a/src/uis/quick_transaction/paycheck.rs b/src/uis/quick_transaction/paycheck.rs new file mode 100644 index 0000000..ac276d7 --- /dev/null +++ b/src/uis/quick_transaction/paycheck.rs @@ -0,0 +1,35 @@ + +use ratatui::{ + backend::Backend, + layout::{Constraint, Direction, Layout, Rect}, + style::{Color, Style}, + text::{Line, Span, Text}, + widgets::{Block, Borders, List, ListItem, Paragraph}, + Frame, +}; + +use crate::app::App; + +pub struct QuickPaycheckState { + pub gross_amount: String, + pub net_amount: String, +} + +impl QuickPaycheckState { + pub fn new() -> QuickPaycheckState { + QuickPaycheckState { + net_amount: "".to_string(), + gross_amount: "".to_string(), + } + } + + pub fn render(f: &mut Frame, body_rect: Rect, app: &mut App) { + + } +} + +impl Default for QuickPaycheckState { + fn default() -> Self { + Self::new() + } +}