rename some standalone projects
This commit is contained in:
27
projects/_standalone/habit-puzzles/source/Entry.kiss
Normal file
27
projects/_standalone/habit-puzzles/source/Entry.kiss
Normal file
@@ -0,0 +1,27 @@
|
||||
(defNew [&prop &mut :EntryType type
|
||||
&prop &mut :Array<EntryLabel> labels
|
||||
&prop &mut :Bool topPriority])
|
||||
|
||||
(method toString []
|
||||
"$?(when topPriority "! ")$(case type
|
||||
((Daily days lastDayDone)
|
||||
(+
|
||||
(.join (for day days
|
||||
(case day
|
||||
(1 "M")
|
||||
(2 "T")
|
||||
(3 "W")
|
||||
(4 "Th")
|
||||
(5 "F")
|
||||
(6 "S")
|
||||
(7 "Su")
|
||||
(otherwise (throw "bad day")))) "")
|
||||
" "
|
||||
lastDayDone
|
||||
": "))
|
||||
((Monthly days lastDayDone)
|
||||
"$(days.join ",") ${lastDayDone}: ")
|
||||
((Interval days lastDayDone)
|
||||
"$days ${lastDayDone}: ")
|
||||
(otherwise ""))$(.join (for label labels
|
||||
"${label.label} $(HabitModel.pointsStr label.points)") "/")")
|
Reference in New Issue
Block a user