aboutsummaryrefslogtreecommitdiff
path: root/client/src/View
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/View')
-rw-r--r--client/src/View/Payment/Add.hs8
-rw-r--r--client/src/View/Payment/Header.hs6
-rw-r--r--client/src/View/SignIn.hs2
3 files changed, 9 insertions, 7 deletions
diff --git a/client/src/View/Payment/Add.hs b/client/src/View/Payment/Add.hs
index 2eaec0f..5ff09dd 100644
--- a/client/src/View/Payment/Add.hs
+++ b/client/src/View/Payment/Add.hs
@@ -8,6 +8,7 @@ import Control.Monad.IO.Class (liftIO)
import qualified Data.Map as M
import qualified Data.Maybe as Maybe
import qualified Data.Text as T
+import qualified Data.Time.Calendar as Calendar
import qualified Data.Time.Clock as Time
import Reflex.Dom (Event, MonadWidget)
import qualified Reflex.Dom as R
@@ -17,7 +18,6 @@ import Common.Model (Category (..), CreatePayment (..),
Frequency (..))
import qualified Common.Msg as Msg
import qualified Common.Util.Time as Time
-import qualified Common.View.Format as Format
import Component (ButtonIn (..), InputIn (..),
InputOut (..), SelectIn (..),
SelectOut (..))
@@ -49,8 +49,10 @@ view addIn = do
date <- _inputOut_value <$> (Component.input $
Component.defaultInputIn
- { _inputIn_label = Msg.get Msg.Payment_Cost
- , _inputIn_initialValue = Format.shortDay currentDay
+ { _inputIn_label = Msg.get Msg.Payment_Date
+ , _inputIn_initialValue = T.pack . Calendar.showGregorian $ currentDay
+ , _inputIn_inputType = "date"
+ , _inputIn_hasResetButton = False
})
frequency <- _selectOut_value <$> (Component.select $ SelectIn
diff --git a/client/src/View/Payment/Header.hs b/client/src/View/Payment/Header.hs
index d01dec6..fd46c25 100644
--- a/client/src/View/Payment/Header.hs
+++ b/client/src/View/Payment/Header.hs
@@ -104,10 +104,8 @@ payerAndAdd incomes payments users categories currency = do
searchLine :: forall t m. MonadWidget t m => m (Dynamic t Text, Dynamic t Frequency)
searchLine = do
R.divClass "searchLine" $ do
- searchName <- _inputOut_value <$> (Component.input $ InputIn
- { _inputIn_reset = R.never
- , _inputIn_label = Msg.get Msg.Search_Name
- , _inputIn_initialValue = ""
+ searchName <- _inputOut_value <$> (Component.input $ Component.defaultInputIn
+ { _inputIn_label = Msg.get Msg.Search_Name
})
let frequencies = M.fromList
diff --git a/client/src/View/SignIn.hs b/client/src/View/SignIn.hs
index 912aea2..21d0fcc 100644
--- a/client/src/View/SignIn.hs
+++ b/client/src/View/SignIn.hs
@@ -30,8 +30,10 @@ view signInMessage =
rec
input <- Component.input $ InputIn
{ _inputIn_reset = R.ffilter Either.isRight signInResult
+ , _inputIn_hasResetButton = True
, _inputIn_label = Msg.get Msg.SignIn_EmailLabel
, _inputIn_initialValue = ""
+ , _inputIn_inputType = "text"
}
button <- Component.button $