Add lamassu-admin-elm to this repo (#185)

This commit is contained in:
Rafael Taranto 2018-10-08 16:29:06 -03:00 committed by Josh Harvey
parent 5ee7e40872
commit f4fc9d6328
134 changed files with 28171 additions and 83 deletions

View 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) )
]