From ad25c0c8ab80cecf57afa99787a0c3cb5495f170 Mon Sep 17 00:00:00 2001 From: Eric McNiece Date: Sat, 15 Oct 2016 20:51:56 -0700 Subject: [PATCH 1/4] Fixing day-schedule config/storage --- config/config.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/config.js b/config/config.js index 95675c5..c3b193c 100644 --- a/config/config.js +++ b/config/config.js @@ -43,13 +43,17 @@ app.controller('SchedulerCtrl', ['$scope', function ($scope) { return; } } - $scope.config.daySelection.push(day); + $scope.config.daySelection.push(day.value); }; $scope.isDaySelected = function (day) { + if(!$scope.config.daySelection){ + $scope.config.daySelection = []; + } + for (var i = 0; i < $scope.config.daySelection.length; i++) { var obj = $scope.config.daySelection[i]; - if (day.value === obj.value) { + if (day.value === obj) { return true; } } From 408980157675110c7202e3b9d44edc8b6651c296 Mon Sep 17 00:00:00 2001 From: Eric McNiece Date: Sat, 15 Oct 2016 21:03:46 -0700 Subject: [PATCH 2/4] Repairing logo --- static/icon.png | Bin 35855 -> 1981 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/static/icon.png b/static/icon.png index 72eb8b2e7a8d08944eb7497ae18e88713a22a6de..af78925b92a124b9f2a94df40aac3b6a44e7a531 100644 GIT binary patch delta 1681 zcmaJ?X;f236n=mr1_@e478P?s6@p~n14I&%uqGlz#0B-`y%z|O#UyHM#egXX5iN3} z0>uha@#raTh@e(6f=lZHiW?1D&}u{qhzc%<+J{TqU!5~Ecjlh??)~PwbIuf%I-mB0 z3ld~e9vD9i0015_(V|4uQbvcHD>^T9ev^+HU!yq1n50!2*MNEi5Wrdmf{RguX-Fah z!fRLlhJ*ot%SM$v#h48`GO2Ya8UTu8nNGOk96p&vgs5~Hj?E=enOqu& z5rU&ps4OytL8fwvR5}ms3<~aZ!}E&=gjSA|zqQqgGy!K)XK4&PgE0|NTC<$|CmZBz zbqF~TF=$umA(V+S0B=<|5u9+=zA--La6Fov1gl^kjYg%inF^SQARv>-U~?cMh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c{tLwZMwZ&V9t;f&WEIlj=AdYsk_xjp^rW?Z9rT1Q?FQU~gI+wZc(o@F^C zy_-A?4f}s-!quAtWU0K7?KlIk?a1XVuLUb1`Ub((jX2|MNAB)rJEQf4EP3bsg-{66 zHwdZ%g|-Q@WL;K^TJt1Xwr)#JhrGH0SG%iA=H~ob)S5iWT3C=L3mM?W&4%BUY2G%t0;WpPNvlO^qFK1 z%kdHj+k(OA>Ux|~5n@40P(oX@QQ>IC=(| zG;@E_gfsWp_yh+9g#_5L3<3$A`f-|s&KP;0Fy2W07IIzABj{8%QX9h$Jp% zI+nhQ%#P_@0;R@LNWVpos!y~3O7sq2G98vkKS8w8RAVE!v)N}rOE5LicRJiu`c+*r z|22p59DYl}rf3M-;MWvwwRJ5Gl=`|>=y$oYgx6uUdS^1@HQ-|zuGTbKmezW$)*LI# zYvlv?xe1xP@@QtX?2=`#LhH+MMtiy}NtM{bz`t~4srCZ@k-97yb+1hwZ=EK~M!D8i z;Ob2iWN9Z~=n8mySx4T9*Yp8GPtuWMIwK3?%#IvWQr$;fBfle`RhO zcjksTe}8GfHLGsV>PiaTZ6$_rF83(HagB`JOg5qbuFh#-x>6(Dd@6^G_NThWJK7|3Z4({pAF|sU9GYE(bPRQv`b$Bgq*xvYhMyMr2 zo~>b+`lLOmZLP(taJ*it^6b)S<0niQm-2J|o0_`zYTzmdcICiM{3t^?uqy|4<-o2S v*p)MO<%}IB$I2PIa>fo{Je4zcc;E2<*Nk1c%tX1&M7hjFxy+=;WhVazTh5Dm From c7b9514bc02f5313a075a12610e4c4a45d6868a1 Mon Sep 17 00:00:00 2001 From: Eric McNiece Date: Sat, 15 Oct 2016 21:39:45 -0700 Subject: [PATCH 3/4] Ensure value check for toggleDaySelection as well --- config/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.js b/config/config.js index c3b193c..e1b3c7a 100644 --- a/config/config.js +++ b/config/config.js @@ -38,7 +38,7 @@ app.controller('SchedulerCtrl', ['$scope', function ($scope) { $scope.toggleDaySelection = function (day) { for (var i = 0; i < $scope.config.daySelection.length; i++) { var obj = $scope.config.daySelection[i]; - if (day.value === obj.value) { + if (day.value === obj) { $scope.config.daySelection.splice(i, 1); return; } From 014928796d583688e8927a77ddc9d250c934de68 Mon Sep 17 00:00:00 2001 From: Eric McNiece Date: Sat, 15 Oct 2016 21:53:55 -0700 Subject: [PATCH 4/4] Update utilities for flattened array storage --- lib/utils.js | 2 +- test/utils_test.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/utils.js b/lib/utils.js index 0e726ca..82969bf 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -48,7 +48,7 @@ var utils ={ getNextScheduledTime: function getNextScheduledTime(branchConfig){ var frequency = branchConfig.frequency , time = moment(branchConfig.time) - , days = _.flatten(branchConfig.daySelection, 'value') + , days = branchConfig.daySelection , now = utils.getNow() , timeMinutes = time.minutes() , timeHours = time.hours() diff --git a/test/utils_test.js b/test/utils_test.js index 7553a2d..5cbf86a 100644 --- a/test/utils_test.js +++ b/test/utils_test.js @@ -46,7 +46,7 @@ describe("utils", function() { time: moment("1976-10-01 4:30 +0000", "YYYY-MM-DD HH:mm Z"), daySelection:[ // Wednedays only - {key: 'Wednesday', value:3} + 3 ] }; var time = utils.getNextScheduledTime(config); @@ -64,7 +64,7 @@ describe("utils", function() { time: moment("1976-10-01 4:30 +0000", "YYYY-MM-DD HH:mm Z"), daySelection:[ // Sundays only, but the time above has passed already - {key: 'Sunday', value:0} + 0 ] }; var time = utils.getNextScheduledTime(config); @@ -81,8 +81,8 @@ describe("utils", function() { frequency: 60 * 60 * 1000 * 24, //daily time: moment("1976-10-01 4:30 +0000", "YYYY-MM-DD HH:mm Z"), daySelection:[ - {key: 'Friday', value:5}, - {key: 'Tuesday', value:2} + 5, + 2 ] }; var time = utils.getNextScheduledTime(config); @@ -99,7 +99,7 @@ describe("utils", function() { frequency: 60 * 60 * 1000 * 24, //daily time: moment('2014-10-13T01:48:26.433Z'), //format as expected from JSON objects daySelection:[ - {key: 'Wednesday', value:3} + 3 ] }; var time = utils.getNextScheduledTime(config);