From 75804df1cb231033f94183e41cdf79d36d8f6710 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 21 Aug 2016 14:30:40 +0200 Subject: Show a message if there is an error during a server request --- .../elm/LoggedIn/Home/View/ExceedingPayers.elm | 2 +- src/client/elm/LoggedIn/Home/View/Table.elm | 24 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/client/elm/LoggedIn/Home/View') 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 ] -- cgit v1.2.3