From f09bcb7119ec0944a7d20927212b71641cf1b5f6 Mon Sep 17 00:00:00 2001
From: Joris
Date: Thu, 30 Jan 2020 12:44:40 +0100
Subject: Show back refund payments in green

---
 client/src/View/Payment/Table.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'client/src')

diff --git a/client/src/View/Payment/Table.hs b/client/src/View/Payment/Table.hs
index bfa0fb9..66065af 100644
--- a/client/src/View/Payment/Table.hs
+++ b/client/src/View/Payment/Table.hs
@@ -115,7 +115,9 @@ cell users categories frequency currency header payment =
       R.text $ _payment_name payment
 
     CostHeader ->
-      R.text . Format.price currency . _payment_cost $ payment
+      R.divClass (if amount < 0 then "g-Payment__Refund" else "") $
+        R.text $ Format.price currency amount
+      where amount = _payment_cost payment
 
     UserHeader ->
       R.text . Maybe.fromMaybe "" . fmap _user_name $ CM.findUser (_payment_user payment) users
-- 
cgit v1.2.3