aboutsummaryrefslogtreecommitdiff
path: root/client/src/View/Payment/Form.hs
diff options
context:
space:
mode:
authorJoris2019-11-24 16:19:53 +0100
committerJoris2019-11-24 16:19:53 +0100
commit54628c70cb33de5e4309c35b9f6b57bbe9f7a07b (patch)
tree57e331cadfdf81b5598d21f76302f5269fd58344 /client/src/View/Payment/Form.hs
parent3c67fcf1d524811a18f0c4db3ef6eed1270b9a12 (diff)
downloadbudget-54628c70cb33de5e4309c35b9f6b57bbe9f7a07b.tar.gz
budget-54628c70cb33de5e4309c35b9f6b57bbe9f7a07b.tar.bz2
budget-54628c70cb33de5e4309c35b9f6b57bbe9f7a07b.zip
Compute cumulative income with a DB query
Diffstat (limited to 'client/src/View/Payment/Form.hs')
-rw-r--r--client/src/View/Payment/Form.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/client/src/View/Payment/Form.hs b/client/src/View/Payment/Form.hs
index 99dce13..064b5b3 100644
--- a/client/src/View/Payment/Form.hs
+++ b/client/src/View/Payment/Form.hs
@@ -113,6 +113,7 @@ view input cancel = do
setCategory <-
R.debounce (1 :: NominalDiffTime) (R.updated $ Input._out_raw name)
+ >>= (return . R.ffilter (\name -> T.length name >= 3))
>>= (Ajax.get . (fmap ("/api/payment/category?name=" <>)))
>>= (return . R.mapMaybe (join . EitherUtil.eitherToMaybe))