diff options
author | Joris | 2019-08-11 22:40:09 +0200 |
---|---|---|
committer | Joris | 2019-08-11 22:40:09 +0200 |
commit | 2d79ab0e0a11f55255fc21a5dfab1598d3beeba3 (patch) | |
tree | 80ab3cd98cebfb9694f66aa7718f6bc5d1c83d22 /client/src/View/Payment.hs | |
parent | c542424b7b41c78a170763f6996c12f56b359860 (diff) |
Add payment clone
Diffstat (limited to 'client/src/View/Payment.hs')
-rw-r--r-- | client/src/View/Payment.hs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/client/src/View/Payment.hs b/client/src/View/Payment.hs index f363b06..ab83447 100644 --- a/client/src/View/Payment.hs +++ b/client/src/View/Payment.hs @@ -11,9 +11,9 @@ import Prelude hiding (init) import Reflex.Dom (Dynamic, Event, MonadWidget, Reflex) import qualified Reflex.Dom as R -import Common.Model (CreatedPayment (..), Frequency, Init (..), - Payment (..), PaymentCategory (..), - PaymentId) +import Common.Model (Frequency, Init (..), Payment (..), + PaymentCategory (..), PaymentId, + SavedPayment (..)) import qualified Common.Util.Text as T import View.Payment.Header (HeaderIn (..), HeaderOut (..)) import qualified View.Payment.Header as Header @@ -36,15 +36,19 @@ widget paymentIn = do rec let init = _paymentIn_init paymentIn paymentsPerPage = 7 + savedPayments = R.leftmost + [ _headerOut_addPayment header + , _tableOut_addPayment table + ] payments <- getPayments (_init_payments init) - (_createdPayment_payment <$> _headerOut_addPayment header) + (_savedPayment_payment <$> savedPayments) (_tableOut_deletePayment table) paymentCategories <- getPaymentCategories (_init_paymentCategories init) - (_createdPayment_paymentCategory <$> _headerOut_addPayment header) + (_savedPayment_paymentCategory <$> savedPayments) payments (_tableOut_deletePayment table) |