var CrudConfig, TaskPlanStore, TeacherTaskPlanConfig, _, actions, extendConfig, makeSimpleStore, ref, ref1, store;
_ = require('underscore');
ref = require('./helpers'), CrudConfig = ref.CrudConfig, makeSimpleStore = ref.makeSimpleStore, extendConfig = ref.extendConfig;
TaskPlanStore = require('./task-plan').TaskPlanStore;
TeacherTaskPlanConfig = {
_loaded: function(obj, id) {
var plans;
plans = obj.plans;
return this._local[id] = plans;
},
exports: {
getActiveCoursePlans: function(id) {
var plans;
plans = this._local[id] || [];
return _.filter(plans, function(plan) {
return !TaskPlanStore.isDeleteRequested(plan.id);
});
}
}
};
extendConfig(TeacherTaskPlanConfig, new CrudConfig());
ref1 = makeSimpleStore(TeacherTaskPlanConfig), actions = ref1.actions, store = ref1.store;
module.exports = {
TeacherTaskPlanActions: actions,
TeacherTaskPlanStore: store
};
|