From 4496b9c240c4e61b01a27c88e508fad97f9cec80 Mon Sep 17 00:00:00 2001 From: Dobie Wollert Date: Mon, 6 Jul 2015 07:09:17 -0400 Subject: [PATCH] Latest changes --- app/controllers/pms.js | 4 ++-- config/routes.js | 7 ++++++ public/partials/schedule/report.html | 3 ++- server.js | 36 ++++++++++++++++++++++++++-- start_this_bitch.sh | 3 +++ 5 files changed, 48 insertions(+), 5 deletions(-) create mode 100755 start_this_bitch.sh 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 @@ +