aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model/View/LoggedIn/AddPayment.elm
blob: c7680bba9fc2356797515a5c7d4f729ee31b54c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
module Model.View.LoggedIn.AddPayment
  ( AddPayment
  , initAddPayment
  ) where

import Result as Result exposing (Result(..))
import Json.Decode exposing ((:=))

import Model.Translations exposing (..)
import Model.Payment exposing (PaymentFrequency(..))

type alias AddPayment =
  { name : String
  , nameError : Maybe String
  , cost : String
  , costError : Maybe String
  , frequency : PaymentFrequency
  , waitingServer : Bool
  }

initAddPayment : PaymentFrequency -> AddPayment
initAddPayment frequency =
  { name = ""
  , nameError = Nothing
  , cost = ""
  , costError = Nothing
  , frequency = frequency
  , waitingServer = False
  }