-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.elm
More file actions
53 lines (40 loc) · 919 Bytes
/
main.elm
File metadata and controls
53 lines (40 loc) · 919 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import Html exposing (Html, button, div, input, text)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick, onInput)
main =
Html.beginnerProgram { model = model, view = view, update = update }
-- MODEL
type alias DocumentDescription = {
templateGuid : String,
documentName : String
}
type alias Model = {
kntnr : String,
anlass : String,
grund : String,
orgeinheit : String,
availableTemplates : List DocumentDescription,
selectedTemplate : DocumentDescription
}
model : Model
model =
{ kntnr = "0815",
anlass = "000061",
grund = "610002",
orgeinheit = "ECSOMMC000",
availableTemplates = [],
selectedTemplate =
{ templateGuid = "",
documentName = "none"
}
}
-- UPDATE
type Msg = Increment | Decrement
update : Msg -> Model -> Model
update msg model =
model
-- VIEW
view : Model -> Html Msg
view model =
div []
[ text model.kntnr ]