aboutsummaryrefslogtreecommitdiff
path: root/client/src/View/Payment/Add.hs
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/View/Payment/Add.hs')
-rw-r--r--client/src/View/Payment/Add.hs15
1 files changed, 3 insertions, 12 deletions
diff --git a/client/src/View/Payment/Add.hs b/client/src/View/Payment/Add.hs
index bd10e5a..d2d2dc4 100644
--- a/client/src/View/Payment/Add.hs
+++ b/client/src/View/Payment/Add.hs
@@ -37,6 +37,7 @@ import qualified Util.WaitFor as WaitFor
data AddIn t = AddIn
{ _addIn_categories :: [Category]
, _addIn_paymentCategories :: Dynamic t [PaymentCategory]
+ , _addIn_frequency :: Dynamic t Frequency
, _addIn_cancel :: Event t ()
}
@@ -92,16 +93,6 @@ view addIn = do
(const currentDay <$> reset)
confirm)
- frequency <- _selectOut_value <$> (Component.select $ SelectIn
- { _selectIn_label = Msg.get Msg.Payment_Frequency
- , _selectIn_initialValue = Punctual
- , _selectIn_value = R.never
- , _selectIn_values = R.constDyn frequencies
- , _selectIn_reset = reset
- , _selectIn_isValid = const True
- , _selectIn_validate = confirm
- })
-
let setCategory =
R.fmapMaybe id
. R.updated
@@ -122,13 +113,13 @@ view addIn = do
c <- cost
d <- date
cat <- category
- f <- frequency
+ f <- _addIn_frequency addIn
return (CreatePayment
<$> ValidationUtil.nelError n
<*> ValidationUtil.nelError c
<*> ValidationUtil.nelError d
<*> ValidationUtil.nelError cat
- <*> ValidationUtil.nelError f)
+ <*> V.Success f)
(addPayment, cancel, confirm) <- R.divClass "buttons" $ do
rec