aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/LoggedIn/Home/AddPayment/Model.elm
blob: 19933fd3993587eeaf899cfda9a27b474dc3c8c2 (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 LoggedIn.Home.AddPayment.Model
  ( Model
  , init
  ) where

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

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

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

init : Frequency -> Model
init frequency =
  { name = ""
  , nameError = Nothing
  , cost = ""
  , costError = Nothing
  , frequency = frequency
  , waitingServer = False
  }