Adjust fallenPanda's PR

* Use enum for frequency in task model
* Adjust ui of task selection
* Correct check for hasStarted
* Remove semicolons
* Set default start day to today
* Correct perfect day and resting in inn tests to have dailies with start dates of a week ago
* Add tests for dailies/weeklies functionality
This commit is contained in:
Blade Barringer
2015-05-17 21:10:40 -05:00
committed by Allen Pan
parent dd1b2a4b07
commit 664bf491d2
5 changed files with 374 additions and 15 deletions

View File

@@ -51,8 +51,7 @@ var checklist = [{
var DailySchema = new Schema(
_.defaults({
type: {type: String, 'default': 'daily'},
//TODO: Cleaner to store interval as enum instead of str?
frequency: {type: String, 'default': 'weekly'}, // 'daily', 'weekly'
frequency: {type: String, 'default': 'weekly', enum: ['daily', 'weekly']},
everyX: {type: Number, 'default': 1}, // e.g. once every X weeks
startDate: {type: Date},
history: Array,