diff options
author | Joris | 2016-08-21 14:30:40 +0200 |
---|---|---|
committer | Joris | 2016-08-21 14:30:40 +0200 |
commit | 75804df1cb231033f94183e41cdf79d36d8f6710 (patch) | |
tree | 48b7932285091fdbdaba6d77586859c1e1750ce0 /src/client/elm/LoggedIn/Home | |
parent | 3889d21ab58fbbc0134854b95013196a82e8d510 (diff) |
Show a message if there is an error during a server request
Diffstat (limited to 'src/client/elm/LoggedIn/Home')
-rw-r--r-- | src/client/elm/LoggedIn/Home/Header/View.elm | 6 | ||||
-rw-r--r-- | src/client/elm/LoggedIn/Home/View/ExceedingPayers.elm | 2 | ||||
-rw-r--r-- | src/client/elm/LoggedIn/Home/View/Table.elm | 24 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/client/elm/LoggedIn/Home/Header/View.elm b/src/client/elm/LoggedIn/Home/Header/View.elm index e6b2444..b67fb3b 100644 --- a/src/client/elm/LoggedIn/Home/Header/View.elm +++ b/src/client/elm/LoggedIn/Home/Header/View.elm @@ -46,7 +46,7 @@ view loggedData { search } payments frequency = loggedData (AddPayment.initialAdd loggedData.translations currentDate frequency) "AddPayment" - (text (getMessage "AddPayment" loggedData.translations)) + (text (getMessage loggedData.translations "AddPayment")) Nothing ] , Html.div @@ -78,7 +78,7 @@ infos loggedData payments = [ class "infos" ] [ span [ class "total" ] - [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations ] + [ text <| getParamMessage [ count, sum ] loggedData.translations "Worth" ] , span [ class "partition" ] [ text <| paymentsPartition loggedData payments ] @@ -95,7 +95,7 @@ paymentsPartition loggedData payments = |> List.sortBy fst |> List.reverse |> List.map (\(sum, user) -> - getParamMessage [ user.name, Format.price loggedData.conf sum ] "By" loggedData.translations + getParamMessage [ user.name, Format.price loggedData.conf sum ] loggedData.translations "By" ) ) diff --git a/src/client/elm/LoggedIn/Home/View/ExceedingPayers.elm b/src/client/elm/LoggedIn/Home/View/ExceedingPayers.elm index 15f5cf5..6f2439c 100644 --- a/src/client/elm/LoggedIn/Home/View/ExceedingPayers.elm +++ b/src/client/elm/LoggedIn/Home/View/ExceedingPayers.elm @@ -24,7 +24,7 @@ view loggedData = in div [ class "exceedingPayers" ] ( if List.isEmpty exceedingPayers - then [ text <| getMessage "PaymentsAreBalanced" loggedData.translations ] + then [ text <| getMessage loggedData.translations "PaymentsAreBalanced" ] else (List.map (exceedingPayer loggedData) exceedingPayers) ) diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm index 6c12f31..6423bf9 100644 --- a/src/client/elm/LoggedIn/Home/View/Table.elm +++ b/src/client/elm/LoggedIn/Home/View/Table.elm @@ -48,7 +48,7 @@ view loggedData homeModel payments frequency = then div [ class "emptyTableMsg" ] - [ text <| getMessage "NoPayment" loggedData.translations ] + [ text <| getMessage loggedData.translations "NoPayment" ] else text "" ] @@ -57,11 +57,11 @@ headerLine : LoggedData -> Frequency -> Html Msg headerLine loggedData frequency = div [ class "header" ] - [ div [ class "cell category" ] [ text <| getMessage "Name" loggedData.translations ] - , div [ class "cell cost" ] [ text <| getMessage "Cost" loggedData.translations ] - , div [ class "cell user" ] [ text <| getMessage "Payer" loggedData.translations ] + [ div [ class "cell category" ] [ text <| getMessage loggedData.translations "Name" ] + , div [ class "cell cost" ] [ text <| getMessage loggedData.translations "Cost" ] + , div [ class "cell user" ] [ text <| getMessage loggedData.translations "Payer" ] , case frequency of - Punctual -> div [ class "cell date" ] [ text <| getMessage "Date" loggedData.translations ] + Punctual -> div [ class "cell date" ] [ text <| getMessage loggedData.translations "Date" ] Monthly -> text "" , div [ class "cell" ] [] , div [ class "cell" ] [] @@ -108,7 +108,7 @@ paymentLine loggedData homeModel frequency payment = (AddPayment.initialClone loggedData.translations currentDate payment) "ClonePayment" (FontAwesome.clone Color.chestnutRose 18) - (Just (getMessage "Clone" loggedData.translations)) + (Just (getMessage loggedData.translations "Clone")) ] , div [ class "cell button" ] @@ -121,7 +121,7 @@ paymentLine loggedData homeModel frequency payment = (AddPayment.initialEdit loggedData.translations payment) "EditPayment" (FontAwesome.pencil Color.chestnutRose 18) - (Just (getMessage "Edit" loggedData.translations)) + (Just (getMessage loggedData.translations "Edit")) ] , div [ class "cell button" ] @@ -131,14 +131,14 @@ paymentLine loggedData homeModel frequency payment = else let dialogConfig = { className = "deletePaymentDialog" - , title = getMessage "ConfirmPaymentDelete" loggedData.translations + , title = getMessage loggedData.translations "ConfirmPaymentDelete" , body = always <| text "" - , confirm = getMessage "Confirm" loggedData.translations - , confirmMsg = always <| Msg.Dialog <| Dialog.UpdateAndClose <| Msg.UpdateLoggedIn <| LoggedInMsg.DeletePayment payment.id - , undo = getMessage "Undo" loggedData.translations + , confirm = getMessage loggedData.translations "Confirm" + , confirmMsg = always <| Msg.Dialog <| Dialog.UpdateAndClose <| Msg.DeletePayment payment.id + , undo = getMessage loggedData.translations "Undo" } in button - ( Tooltip.show Msg.Tooltip (getMessage "Delete" loggedData.translations) + ( Tooltip.show Msg.Tooltip (getMessage loggedData.translations "Delete") ++ [ onClick (Msg.Dialog <| Dialog.Open dialogConfig) ] ) [ FontAwesome.trash Color.chestnutRose 18 ] |