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
This commit is contained in:
parent
54eb29eae0
commit
249e3113ff
10 changed files with 534 additions and 115 deletions
|
|
@ -5,6 +5,7 @@ import Html.Attributes exposing (..)
|
|||
import Html.Events exposing (..)
|
||||
import RemoteData
|
||||
import State
|
||||
import Common
|
||||
import Tailwind
|
||||
import UI
|
||||
import Utils
|
||||
|
|
@ -78,22 +79,5 @@ render model =
|
|||
, case model.adminTab of
|
||||
State.Users ->
|
||||
allUsers model
|
||||
, case model.logoutError of
|
||||
Nothing ->
|
||||
text ""
|
||||
|
||||
Just e ->
|
||||
UI.errorBanner
|
||||
{ title = "Error logging out"
|
||||
, body = Utils.explainHttpError e
|
||||
}
|
||||
, case model.deleteUserError of
|
||||
Nothing ->
|
||||
text ""
|
||||
|
||||
Just e ->
|
||||
UI.errorBanner
|
||||
{ title = "Error attempting to delete user"
|
||||
, body = Utils.explainHttpError e
|
||||
}
|
||||
, Common.allErrors model
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue