aboutsummaryrefslogtreecommitdiff
path: root/client/src/View/Payment/Add.hs
diff options
context:
space:
mode:
authorJoris2019-08-10 14:53:41 +0200
committerJoris2019-08-10 14:53:41 +0200
commitfb8f0fe577e28dae69903413b761da50586e0099 (patch)
tree91149151facf24348ce1f9798edd5c70be795d11 /client/src/View/Payment/Add.hs
parent3943c50d5320f7137bd5acec4485dd56a2aa52b3 (diff)
downloadbudget-fb8f0fe577e28dae69903413b761da50586e0099.tar.gz
budget-fb8f0fe577e28dae69903413b761da50586e0099.tar.bz2
budget-fb8f0fe577e28dae69903413b761da50586e0099.zip
Remove payment category if unused after a payment is deleted
Diffstat (limited to 'client/src/View/Payment/Add.hs')
-rw-r--r--client/src/View/Payment/Add.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/client/src/View/Payment/Add.hs b/client/src/View/Payment/Add.hs
index e0772f7..bd10e5a 100644
--- a/client/src/View/Payment/Add.hs
+++ b/client/src/View/Payment/Add.hs
@@ -23,7 +23,6 @@ import Common.Model (Category (..), CategoryId,
CreatedPayment (..), Frequency (..),
Payment (..), PaymentCategory (..))
import qualified Common.Msg as Msg
-import qualified Common.Util.Text as Text
import qualified Common.Util.Time as Time
import qualified Common.Validation.Payment as PaymentValidation
import Component (ButtonIn (..), InputIn (..),
@@ -168,4 +167,4 @@ view addIn = do
findCategory :: Text -> [PaymentCategory] -> Maybe CategoryId
findCategory paymentName =
fmap _paymentCategory_category
- . L.find ((==) (Text.formatSearch paymentName) . _paymentCategory_name)
+ . L.find ((==) (T.toLower paymentName) . _paymentCategory_name)