|
@@ -497,8 +497,6 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
// Debug
|
|
// Debug
|
|
|
var debug = false;
|
|
var debug = false;
|
|
|
if (debug) {
|
|
if (debug) {
|
|
@@ -556,10 +554,10 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
console.error(e);
|
|
console.error(e);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //console.log('$scope.results', $scope.results);
|
|
|
|
|
|
|
+ console.log('$scope.results', results, '=>',$scope.results);
|
|
|
|
|
+ $scope.$apply();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-
|
|
|
|
|
$scope.$evalAsync();
|
|
$scope.$evalAsync();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -1073,7 +1071,7 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
$scope.result.eligibilite[key] = value;
|
|
$scope.result.eligibilite[key] = value;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- console.log('postForm', $scope.result.eligibilite);
|
|
|
|
|
|
|
+ //console.log('postForm', $scope.result.eligibilite);
|
|
|
|
|
|
|
|
$scope.$evalAsync();
|
|
$scope.$evalAsync();
|
|
|
|
|
|
|
@@ -1111,9 +1109,11 @@ app.controller('mainController', function($scope, $detection, $http, $mdSidenav,
|
|
|
values += "'" + mysql_real_escape_string(value) + "', ";
|
|
values += "'" + mysql_real_escape_string(value) + "', ";
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- var query = "INSERT INTO `eligibilite`.`demandes` (" + keys.substring(0, keys.length -2) + ") VALUES (" + values.substring(0, values.length -2) + ");";
|
|
|
|
|
|
|
+ var dateTime = (new Date ((new Date((new Date(new Date())).toISOString() )).getTime() - ((new Date()).getTimezoneOffset()*60000))).toISOString().slice(0, 19).replace('T', ' ');
|
|
|
|
|
+
|
|
|
|
|
+ var query = "INSERT INTO `eligibilite`.`demandes` (`date`," + keys.substring(0, keys.length -2) + ") VALUES (" + dateTime + ", " + values.substring(0, values.length -2) + ");";
|
|
|
|
|
|
|
|
- console.log('query', query);
|
|
|
|
|
|
|
+ //console.log('query', query);
|
|
|
|
|
|
|
|
$.ajax({
|
|
$.ajax({
|
|
|
method : "POST",
|
|
method : "POST",
|