| 1 |
-- The balance sheet screen, like the accounts screen but restricted to balance sheet accounts. |
| 2 |
|
| 3 |
module Hledger.UI.BalancesheetScreen |
| 4 |
(bsNew |
| 5 |
,bsUpdate |
| 6 |
,bsDraw |
| 7 |
,bsHandle |
| 8 |
) |
| 9 |
where |
| 10 |
|
| 11 |
import Brick hiding (bsDraw) |
| 12 |
|
| 13 |
import Hledger |
| 14 |
import Hledger.Cli hiding (mode, progname, prognameandversion) |
| 15 |
import Hledger.UI.UIOptions |
| 16 |
import Hledger.UI.UITypes |
| 17 |
import Hledger.UI.UIUtils |
| 18 |
import Hledger.UI.UIScreens |
| 19 |
import Hledger.UI.AccountsScreen (asHandle, asDrawHelper) |
| 20 |
|
| 21 |
|
| 22 |
bsDraw :: UIState -> [Widget Name] |
| 23 |
bsDraw ui = dbgui "bsDraw" $ asDrawHelper ui ropts' scrname |
| 24 |
where |
| 25 |
scrname = "balance sheet balances" |
| 26 |
ropts' = (_rsReportOpts $ reportspec_ $ uoCliOpts $ aopts ui){balanceaccum_=Historical} |
| 27 |
|
| 28 |
bsHandle :: BrickEvent Name AppEvent -> EventM Name UIState () |
| 29 |
bsHandle = asHandle . dbgui "bsHandle" |