Commit ec5adaec authored by EXT Hélène David's avatar EXT Hélène David
Browse files

show all events on portfolios and projets calendars

parent 92ee4244
......@@ -110,8 +110,8 @@ root.controller('DashboardCalendarCtrl', ['$scope', "$http",'$languageFactory','
calendarCtr.getProjectEvents = function () {
var session = $scope._getSession();
var beginDate = $scope.currentDate.year + "-" + month + "-" + "01";
var endDate = $scope.currentDate.year + "-" + month + "-" + "31";
//var beginDate = $scope.currentDate.year + "-" + month + "-" + "01";
//var endDate = $scope.currentDate.year + "-" + month + "-" + "31";
var month = $scope.currentDate.month.toString();
if(month.length === 1) month = "0" + month;
var beginDate = $scope.currentDate.year + "-" + month + "-" + "01";
......@@ -121,10 +121,11 @@ root.controller('DashboardCalendarCtrl', ['$scope', "$http",'$languageFactory','
return $eventsFactory.get_project_events(session,parameters).success(function(data, status, headers, config) {
var events = [];
window.calendar_languages = {'fr-FR' :$languageFactory._labels.calendarLanguage }
if(data.status == "success"){
calendarCtr.formatEvents(data.details);
console.log(data);
}
});
......
......@@ -57,12 +57,13 @@ function $eventsFactory($rootScope, $http,$serverFactory,$rightFactory) {
}
/**
* [get_project_events description]
* @param {[type]} session [description]
* @param {[type]} parameters [userId, projectId]
* @return {[type]} [description]
* [get_project_events get project events]
* @param {[object]} session [user session]
* @param {[object]} parameters [string beginDate, string endDate, projectId, bool onlyInvited (optional), array includes (optional)]
* @return {[array of object]} [{"eventDate","name","id","projectId","type","projectFullName","projectName","late"}]
*/
returns.get_project_events=function(session, parameters){
parameters.user = $rightFactory.session.userId
return $serverFactory.runCommand("get_event", parameters);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment