aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Update/LoggedIn
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Update/LoggedIn')
-rw-r--r--src/client/elm/Update/LoggedIn/Account.elm16
-rw-r--r--src/client/elm/Update/LoggedIn/Add.elm10
-rw-r--r--src/client/elm/Update/LoggedIn/Monthly.elm8
3 files changed, 17 insertions, 17 deletions
diff --git a/src/client/elm/Update/LoggedIn/Account.elm b/src/client/elm/Update/LoggedIn/Account.elm
index cf4c834..c7a66dd 100644
--- a/src/client/elm/Update/LoggedIn/Account.elm
+++ b/src/client/elm/Update/LoggedIn/Account.elm
@@ -25,11 +25,11 @@ updateAccount : AccountAction -> Account -> Account
updateAccount action account =
case action of
ToggleDetail ->
- { account | visibleDetail <- not account.visibleDetail }
+ { account | visibleDetail = not account.visibleDetail }
UpdatePayer userId creation amountDiff ->
- { account | payers <- updatePayers account.payers userId creation amountDiff }
+ { account | payers = updatePayers account.payers userId creation amountDiff }
ToggleIncomeEdition ->
- { account | incomeEdition <-
+ { account | incomeEdition =
if isJust account.incomeEdition
then Nothing
else Just (initIncomeEdition (Maybe.withDefault 0 (getCurrentIncome account)))
@@ -37,28 +37,28 @@ updateAccount action account =
UpdateIncomeEdition income ->
case account.incomeEdition of
Just incomeEdition ->
- { account | incomeEdition <- Just { incomeEdition | income <- income } }
+ { account | incomeEdition = Just { incomeEdition | income = income } }
Nothing ->
account
UpdateEditionError error ->
case account.incomeEdition of
Just incomeEdition ->
- { account | incomeEdition <- Just { incomeEdition | error <- Just error } }
+ { account | incomeEdition = Just { incomeEdition | error = Just error } }
Nothing ->
account
UpdateIncome currentTime amount ->
{ account
- | payers <-
+ | payers =
account.payers
|> Dict.update account.me (\mbPayer ->
case mbPayer of
Just payer ->
Just
{ payer
- | incomes <- payer.incomes ++ [{ creation = currentTime, amount = amount }]
+ | incomes = payer.incomes ++ [{ creation = currentTime, amount = amount }]
}
Nothing ->
Nothing
)
- , incomeEdition <- Nothing
+ , incomeEdition = Nothing
}
diff --git a/src/client/elm/Update/LoggedIn/Add.elm b/src/client/elm/Update/LoggedIn/Add.elm
index 1f28997..92bdb7e 100644
--- a/src/client/elm/Update/LoggedIn/Add.elm
+++ b/src/client/elm/Update/LoggedIn/Add.elm
@@ -15,15 +15,15 @@ updateAddPayment : AddPaymentAction -> AddPayment -> AddPayment
updateAddPayment action addPayment =
case action of
UpdateName name ->
- { addPayment | name <- name }
+ { addPayment | name = name }
UpdateCost cost ->
- { addPayment | cost <- cost }
+ { addPayment | cost = cost }
AddError nameError costError ->
{ addPayment
- | nameError <- nameError
- , costError <- costError
+ | nameError = nameError
+ , costError = costError
}
ToggleFrequency ->
{ addPayment
- | frequency <- if addPayment.frequency == Punctual then Monthly else Punctual
+ | frequency = if addPayment.frequency == Punctual then Monthly else Punctual
}
diff --git a/src/client/elm/Update/LoggedIn/Monthly.elm b/src/client/elm/Update/LoggedIn/Monthly.elm
index 1379323..275b3e8 100644
--- a/src/client/elm/Update/LoggedIn/Monthly.elm
+++ b/src/client/elm/Update/LoggedIn/Monthly.elm
@@ -15,13 +15,13 @@ updateMonthly : MonthlyAction -> Monthly -> Monthly
updateMonthly action monthly =
case action of
ToggleDetail ->
- { monthly | visibleDetail <- not monthly.visibleDetail }
+ { monthly | visibleDetail = not monthly.visibleDetail }
AddPayment payment ->
{ monthly
- | payments <- payment :: monthly.payments
- , visibleDetail <- True
+ | payments = payment :: monthly.payments
+ , visibleDetail = True
}
DeletePayment id ->
{ monthly
- | payments <- List.filter (\payment -> payment.id /= id) monthly.payments
+ | payments = List.filter (\payment -> payment.id /= id) monthly.payments
}