Add lamassu-admin-elm to this repo (#185)
This commit is contained in:
parent
5ee7e40872
commit
f4fc9d6328
134 changed files with 28171 additions and 83 deletions
15
lamassu-admin-elm/src/AccountEncoder.elm
Normal file
15
lamassu-admin-elm/src/AccountEncoder.elm
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
module AccountEncoder exposing (..)
|
||||
|
||||
import Json.Encode exposing (..)
|
||||
import AccountTypes exposing (..)
|
||||
import List
|
||||
import FieldSet.Rest exposing (..)
|
||||
|
||||
|
||||
encodeAccount : Account -> Value
|
||||
encodeAccount account =
|
||||
Json.Encode.object
|
||||
[ ( "code", string account.code )
|
||||
, ( "display", string account.display )
|
||||
, ( "fields", list (List.filterMap encodeField account.fields) )
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue