aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/elm/Dialog/AddPaymentButton/View.elm2
-rw-r--r--src/client/elm/LoggedIn/Home/Header/View.elm36
-rw-r--r--src/client/elm/LoggedIn/Home/View/Paging.elm8
-rw-r--r--src/client/elm/LoggedIn/Home/View/Table.elm2
-rw-r--r--src/client/elm/LoggedIn/Income/View.elm2
-rw-r--r--src/client/elm/Model/Payment.elm2
6 files changed, 26 insertions, 26 deletions
diff --git a/src/client/elm/Dialog/AddPaymentButton/View.elm b/src/client/elm/Dialog/AddPaymentButton/View.elm
index 16616fe..585b1b7 100644
--- a/src/client/elm/Dialog/AddPaymentButton/View.elm
+++ b/src/client/elm/Dialog/AddPaymentButton/View.elm
@@ -62,7 +62,7 @@ addPaymentForm loggedData addPayment =
]
[ htmlMap <| Form.textInput loggedData.translations addPayment "payment" "name"
, htmlMap <| Form.textInput loggedData.translations addPayment "payment" "cost"
- , if (Maybe.map .frequency <| Form.getOutput addPayment) == Just Punctual
+ , if (Form.getFieldAsString "frequency" addPayment).value == Just (toString Punctual)
then htmlMap <| Form.textInput loggedData.translations addPayment "payment" "date"
else text ""
, htmlMap <| Form.radioInputs loggedData.translations addPayment "payment" "frequency" [ toString Punctual, toString Monthly ]
diff --git a/src/client/elm/LoggedIn/Home/Header/View.elm b/src/client/elm/LoggedIn/Home/Header/View.elm
index 6ddd846..95cef3c 100644
--- a/src/client/elm/LoggedIn/Home/Header/View.elm
+++ b/src/client/elm/LoggedIn/Home/Header/View.elm
@@ -36,25 +36,23 @@ import Utils.Tuple as Tuple
view : LoggedData -> Home.Model -> Payments -> Frequency -> Html Msg
view loggedData { search } payments frequency =
- Html.div
- [ class "header" ]
- [ ExceedingPayers.view loggedData
- , searchLine loggedData search frequency
- , infos loggedData payments
- ]
-
-searchLine : LoggedData -> Form String Home.Search -> Frequency -> Html Msg
-searchLine loggedData search frequency =
let currentDate = Date.fromTime loggedData.currentTime
in Html.div
- [ class "searchLine" ]
- [ searchForm loggedData search
- , AddPaymentButton.view
- loggedData
- (DialogModel.addPaymentInitial loggedData.translations currentDate frequency)
- "AddPayment"
- (text (getMessage "AddPayment" loggedData.translations))
- Nothing
+ [ class "header" ]
+ [ div
+ [ class "payerAndAdd" ]
+ [ ExceedingPayers.view loggedData
+ , AddPaymentButton.view
+ loggedData
+ (DialogModel.addPaymentInitial loggedData.translations currentDate frequency)
+ "AddPayment"
+ (text (getMessage "AddPayment" loggedData.translations))
+ Nothing
+ ]
+ , Html.div
+ [ class "searchLine" ]
+ [ searchForm loggedData search ]
+ , infos loggedData payments
]
searchForm : LoggedData -> Form String Home.Search -> Html Msg
@@ -78,7 +76,9 @@ infos loggedData payments =
sum = paymentsSum loggedData.conf payments
in div
[ class "infos" ]
- [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations
+ [ span
+ [ class "total" ]
+ [ text <| getParamMessage [ count, sum ] "Worth" loggedData.translations ]
, span
[ class "partition" ]
[ text <| paymentsPartition loggedData payments ]
diff --git a/src/client/elm/LoggedIn/Home/View/Paging.elm b/src/client/elm/LoggedIn/Home/View/Paging.elm
index 90ae522..5bcb827 100644
--- a/src/client/elm/LoggedIn/Home/View/Paging.elm
+++ b/src/client/elm/LoggedIn/Home/View/Paging.elm
@@ -60,7 +60,7 @@ firstPage homeModel =
]
, onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| 1)
]
- [ FontAwesome.fast_backward grey 15 ]
+ [ FontAwesome.fast_backward grey 13 ]
previousPage : HomeModel.Model -> Html Msg
previousPage homeModel =
@@ -71,7 +71,7 @@ previousPage homeModel =
then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage - 1)
else Msg.NoOp
]
- [ FontAwesome.backward grey 15 ]
+ [ FontAwesome.backward grey 13 ]
nextPage : HomeModel.Model -> Int -> Html Msg
nextPage homeModel maxPage =
@@ -82,7 +82,7 @@ nextPage homeModel maxPage =
then (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| homeModel.currentPage + 1)
else Msg.NoOp
]
- [ FontAwesome.forward grey 15 ]
+ [ FontAwesome.forward grey 13 ]
lastPage : HomeModel.Model -> Int -> Html Msg
lastPage homeModel maxPage =
@@ -90,7 +90,7 @@ lastPage homeModel maxPage =
[ class "page"
, onClick (Msg.UpdateLoggedIn << LoggedInMsg.HomeMsg << HomeMsg.UpdatePage <| maxPage)
]
- [ FontAwesome.fast_forward grey 15 ]
+ [ FontAwesome.fast_forward grey 13 ]
paymentsPage : HomeModel.Model -> Int -> Html Msg
paymentsPage homeModel page =
diff --git a/src/client/elm/LoggedIn/Home/View/Table.elm b/src/client/elm/LoggedIn/Home/View/Table.elm
index 05c9e06..429632c 100644
--- a/src/client/elm/LoggedIn/Home/View/Table.elm
+++ b/src/client/elm/LoggedIn/Home/View/Table.elm
@@ -131,7 +131,7 @@ paymentLine loggedData homeModel frequency payment =
text ""
else
let dialogConfig =
- { className = "paymentDialog"
+ { className = "deletePaymentDialog"
, title = getMessage "ConfirmPaymentDelete" loggedData.translations
, body = always <| text ""
, confirm = getMessage "Confirm" loggedData.translations
diff --git a/src/client/elm/LoggedIn/Income/View.elm b/src/client/elm/LoggedIn/Income/View.elm
index 9638ddc..2b69806 100644
--- a/src/client/elm/LoggedIn/Income/View.elm
+++ b/src/client/elm/LoggedIn/Income/View.elm
@@ -113,7 +113,7 @@ incomeView loggedData (incomeId, income) =
, text " − "
, text <| Format.price loggedData.conf income.amount
, let dialogConfig =
- { className = "incomeDialog"
+ { className = "deleteIncomeDialog"
, title = getMessage "ConfirmIncomeDelete" loggedData.translations
, body = always <| text ""
, confirm = getMessage "Confirm" loggedData.translations
diff --git a/src/client/elm/Model/Payment.elm b/src/client/elm/Model/Payment.elm
index b08166e..b986148 100644
--- a/src/client/elm/Model/Payment.elm
+++ b/src/client/elm/Model/Payment.elm
@@ -28,7 +28,7 @@ import Model.Date exposing (dateDecoder)
import Utils.List as List
perPage : Int
-perPage = 8
+perPage = 7
type alias Payments = List Payment