-
Notifications
You must be signed in to change notification settings - Fork 6
/
Model.elm
57 lines (42 loc) · 968 Bytes
/
Model.elm
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
54
55
56
57
module Model exposing (..)
import Material
import Date exposing (Date, Month)
import Http
type alias Model =
{ httpError : Result Http.Error ()
, loading : Bool
, today : Date
, currentDate : Date
, entries : List DateEntries
, totalHours : Maybe Float
, hourBalanceOfCurrentMonth : Maybe Float
, user : User
, holidays : List Holiday
, specialTasks : SpecialTasks
, previousBalanceString : String
, previousBalance : Float
, mdl : Material.Model
}
type alias User =
{ firstName : String
, lastName : String
, previousBalance : Float
}
type alias DateEntries =
{ date : Date
, entries : List Entry
}
type alias Entry =
{ hours : Float
, taskId : Int
}
type alias Holiday =
{ date : Date
, name : String
}
type alias HarvestTask =
{ id : Int }
type alias SpecialTasks =
{ ignore : List HarvestTask
, subtract : List HarvestTask
}