-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathAppTypes.elm
More file actions
46 lines (35 loc) · 902 Bytes
/
Copy pathAppTypes.elm
File metadata and controls
46 lines (35 loc) · 902 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
module AppTypes exposing (..)
import Essential exposing (EssentialModel)
import Diff
type alias UIState =
{ error : Maybe String
, studentEmailField : String
, courseNameField : String
, enrollmentStudentIdField : String
, enrollmentCourseIdField : String
}
initUiState : UIState
initUiState =
{ error = Nothing
, studentEmailField = ""
, courseNameField = ""
, enrollmentStudentIdField = ""
, enrollmentCourseIdField = ""
}
type alias Model =
{ uiState : UIState
, essential : EssentialModel
}
initModel : Model
initModel =
Model initUiState Essential.emptyModel
type Message
= Noop
| StudentEmailFieldChange String
| CourseNameFieldChange String
| EnrollmentStudendIdFieldChange String
| EnrollmentCourseIdFieldChange String
| AddStudent
| AddCourse
| AddEnrollment
| Patch Diff.ModelDiff