| 1 |
-- The cash accounts screen, like the accounts screen but restricted to cash accounts. |
| 2 |
|
| 3 |
module Hledger.UI.CashScreen |
| 4 |
(csNew |
| 5 |
,csUpdate |
| 6 |
,csDraw |
| 7 |
,csHandle |
| 8 |
) |
| 9 |
where |
| 10 |
|
| 11 |
import Brick |
| 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 |
csDraw :: UIState -> [Widget Name] |
| 23 |
csDraw ui = dbgui "csDraw" $ asDrawHelper ui ropts' scrname |
| 24 |
where |
| 25 |
scrname = "cash balances" |
| 26 |
ropts' = (_rsReportOpts $ reportspec_ $ uoCliOpts $ aopts ui){balanceaccum_=Historical} |
| 27 |
|
| 28 |
csHandle :: BrickEvent Name AppEvent -> EventM Name UIState () |
| 29 |
csHandle = asHandle . dbgui "csHandle" |