diff options
author | Joris | 2019-10-23 22:41:51 +0200 |
---|---|---|
committer | Joris | 2019-10-23 22:41:51 +0200 |
commit | c53198a7dd46f1575a33f823c29fa02126429e8f (patch) | |
tree | fd0b90588a566848a4b601dfd518093d72f5e101 /client | |
parent | e4b32ce15f8c92f3b477d3f3d4d301ba08f9b5e3 (diff) |
Go to initial page after adding an income
Diffstat (limited to 'client')
-rw-r--r-- | client/src/View/Income/Income.hs | 1 | ||||
-rw-r--r-- | client/src/View/Income/Table.hs | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/client/src/View/Income/Income.hs b/client/src/View/Income/Income.hs index 90f1fde..2f0b8f5 100644 --- a/client/src/View/Income/Income.hs +++ b/client/src/View/Income/Income.hs @@ -64,6 +64,7 @@ view input = do , Table._in_init = init , Table._in_currency = _in_currency input , Table._in_incomes = incomes + , Table._in_resetPage = () <$ addIncome } return () diff --git a/client/src/View/Income/Table.hs b/client/src/View/Income/Table.hs index f865fd9..c754a77 100644 --- a/client/src/View/Income/Table.hs +++ b/client/src/View/Income/Table.hs @@ -30,6 +30,7 @@ data In t = In , _in_init :: Init , _in_currency :: Currency , _in_incomes :: Dynamic t [Income] + , _in_resetPage :: Event t () } data Out t = Out @@ -46,7 +47,7 @@ view input = do , Table._in_rows = R.ffor (_in_incomes input) $ reverse . L.sortOn _income_date , Table._in_cell = cell (_in_init input) (_in_currency input) , Table._in_perPage = 7 - , Table._in_resetPage = R.never + , Table._in_resetPage = _in_resetPage input , Table._in_cloneModal = \income -> Form.view $ Form.In { Form._in_operation = Form.Clone CreateIncomeForm income |