about summary refs log tree commit diff
path: root/client/src/Manager.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-01T22·04+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-01T22·04+0100
commit249e3113ffbcda047bd9461f01aaa64aa2dd94f1 (patch)
tree6f3edd19086b88a60e48fa66a74cbc501e776b35 /client/src/Manager.elm
parent54eb29eae0398dd19f5fdaed278f29453b0b7e44 (diff)
Support creating Trips from the frontend
*sigh* ... spent way too much time encoding/decoding date types...

I need my database, server, client, and JSON need to agree on types.

TL;DR:
- Add CSS for elm/datepicker library
- Create Common.allErrors to display UI errors
- Prefer Data.Time.Calendar.Day instead of newtype Date wrapper around Text
Diffstat (limited to 'client/src/Manager.elm')
-rw-r--r--client/src/Manager.elm11
1 files changed, 2 insertions, 9 deletions
diff --git a/client/src/Manager.elm b/client/src/Manager.elm
index b7f36cfd46bb..7cf5dc3107c3 100644
--- a/client/src/Manager.elm
+++ b/client/src/Manager.elm
@@ -1,6 +1,7 @@
 module Manager exposing (render)
 
 import Array
+import Common
 import Html exposing (..)
 import Html.Attributes exposing (..)
 import Html.Events exposing (..)
@@ -33,14 +34,6 @@ render model =
                         { label = "Logout"
                         , handleClick = State.AttemptLogout
                         }
-                    , case model.logoutError of
-                        Nothing ->
-                            text ""
-
-                        Just e ->
-                            UI.errorBanner
-                                { title = "Error logging out"
-                                , body = Utils.explainHttpError e
-                                }
+                    , Common.allErrors model
                     ]
                 ]