Skip to content

Commit

Permalink
Fix ModifySchedule being broken
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterOdin committed Sep 8, 2018
1 parent aade26f commit d3274a7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/controllers/ModifyScheduleCtrl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var ctrl_name = 'ModifyScheduleCtrl';
angular.module(ctrl_name, []).controller(ctrl_name, ['$scope', '$http', '$q', 'AuthService', function($scope, $http, $q, AuthService) {
angular.module(ctrl_name, []).controller(ctrl_name, ['$scope', '$http', '$q', 'AuthService', 'DateService', function($scope, $http, $q, AuthService, DateService) {
var currentDate = new Date();
currentDate.setHours(12, 0, 0, 0);
$scope.currentWeek = new Date(currentDate.getTime() - (currentDate.getDay() * 86400000));

$scope.currentWeekCrews = [];
$scope.upcomingWeekCrews = [];
$scope.members = [];
Expand All @@ -20,7 +24,7 @@ angular.module(ctrl_name, []).controller(ctrl_name, ['$scope', '$http', '$q', 'A
$http({
method: 'POST',
url: '.crews.php',
data: "session_id=" + AuthService.getSessionId(),
data: "session_id=" + AuthService.getSessionId() + "&view_date=" + DateService.formatViewDate($scope.currentWeek),
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}),
$http({
Expand Down

0 comments on commit d3274a7

Please sign in to comment.