diff --git a/app/controllers/pms.js b/app/controllers/pms.js index 970da51..6585bf7 100644 --- a/app/controllers/pms.js +++ b/app/controllers/pms.js @@ -201,13 +201,13 @@ function filterClientsByFrequency(month, frequency) { Object.keys(client.frequencies).forEach(function(frequencyName) { var monthData = client.frequencies[frequencyName]; - if (monthData[month] || month === undefined) { + + if (month ? monthData[month] : _.some(monthData, Boolean)) { if (!frequency || frequency == frequencyName) { enabledFrequencies.push(frequencyName); } } }); - if (enabledFrequencies.length > 0) { client.frequencies = enabledFrequencies; results.push(client); diff --git a/config/routes.js b/config/routes.js index 1e2d1ed..47498a0 100644 --- a/config/routes.js +++ b/config/routes.js @@ -23,6 +23,13 @@ module.exports = function(app, auth, piler, calendar, directory, config) { piler.addJsFile("/js/filters.js"); piler.addJsFile("/js/services.js"); + app.get('/crash', function(req, res) { + console.log('Commiting Suicide for Science!'); + process.nextTick(function() { + throw new Error("Ermergerd!"); + }); + }); + app.all('/api/*', auth.requiresApiAccess); var posts = require('../app/controllers/posts'); diff --git a/public/partials/schedule/report.html b/public/partials/schedule/report.html index bd6efe1..f61eb9c 100644 --- a/public/partials/schedule/report.html +++ b/public/partials/schedule/report.html @@ -28,6 +28,7 @@ +