blob: d1430c944f01e892d3944a3cc8e8256d3b2fb1d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
module View.Payment
( widget
, PaymentIn(..)
, PaymentOut(..)
) where
import Reflex.Dom (MonadWidget)
import qualified Reflex.Dom as R
import Common.Model (Init(..))
import View.Payment.Pages (PagesIn(..))
import qualified View.Payment.Pages as Pages
import View.Payment.Table (TableIn(..))
import qualified View.Payment.Table as Table
data PaymentIn = PaymentIn
{ _paymentIn_init :: Init
}
data PaymentOut = PaymentOut
{
}
widget :: forall t m. MonadWidget t m => PaymentIn -> m PaymentOut
widget paymentIn = do
R.divClass "payment" $ do
_ <- Table.widget $ TableIn
{ _tableIn_init = _paymentIn_init paymentIn
}
_ <- Pages.widget $ PagesIn
{ _pagesIn_payments = _init_payments . _paymentIn_init $ paymentIn
}
return $ PaymentOut {}
|