module Hledger.UI.BalancesheetScreen
(bsNew
,bsUpdate
,bsDraw
,bsHandle
)
where
import Brick hiding (bsDraw)
import Hledger
import Hledger.Cli hiding (mode, progname, prognameandversion)
import Hledger.UI.UIOptions
import Hledger.UI.UITypes
import Hledger.UI.UIUtils
import Hledger.UI.UIScreens
import Hledger.UI.AccountsScreen (asHandle, asDrawHelper)
bsDraw :: UIState -> [Widget Name]
bsDraw :: UIState -> [Widget Name]
bsDraw UIState
ui = forall a. String -> a -> a
dbgui String
"bsDraw" forall a b. (a -> b) -> a -> b
$ UIState -> ReportOpts -> String -> [Widget Name]
asDrawHelper UIState
ui ReportOpts
ropts' String
scrname
where
scrname :: String
scrname = String
"balance sheet balances"
ropts' :: ReportOpts
ropts' = (ReportSpec -> ReportOpts
_rsReportOpts forall a b. (a -> b) -> a -> b
$ CliOpts -> ReportSpec
reportspec_ forall a b. (a -> b) -> a -> b
$ UIOpts -> CliOpts
uoCliOpts forall a b. (a -> b) -> a -> b
$ UIState -> UIOpts
aopts UIState
ui){balanceaccum_ :: BalanceAccumulation
balanceaccum_=BalanceAccumulation
Historical}
bsHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
bsHandle :: BrickEvent Name AppEvent -> EventM Name UIState ()
bsHandle = BrickEvent Name AppEvent -> EventM Name UIState ()
asHandle forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. String -> a -> a
dbgui String
"bsHandle"