Skip to content
Snippets Groups Projects
Commit 9263e616 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Task #8887: check for updates and check for undefined vars

parent 8791be70
No related branches found
No related tags found
No related merge requests found
......@@ -171,8 +171,11 @@ ganttProjectControllerMod.controller('GanttProjectController', ['$scope', 'dataS
};
$scope.$watch('dataService.tasks', updateGanttData, true);
$scope.$watch('dataService.filteredTasks', updateGanttData, true);
$scope.$watch('dataService.tasktypes', updateGanttData, true);
$scope.$watch('dataService.resources', updateGanttData);
$scope.$watch('dataService.resourceClaims', updateGanttData, true);
$scope.$watch('dataService.resourceGroups', updateGanttData);
$scope.$watch('dataService.resourceGroupMemberships', updateGanttData);
$scope.$watch('dataService.filteredTaskDict', updateGanttData);
$scope.$watch('dataService.momProjectsDict', updateGanttData, true);
}
]);
......@@ -94,6 +94,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
var createGanttRowTree = function(groupId, parentRow) {
var resourceGroup = resourceGroupsDict[groupId];
if(resourceGroup) {
var groupRowId = 'group_' + groupId;
if(parentRow) {
groupRowId += '_parent' + parentRow.id;
......@@ -120,6 +121,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
var childGroupId = resourceGroupMemberships.groups[groupId].child_ids[i];
createGanttRowTree(childGroupId, ganttRow);
}
}
};
//build tree of resourceGroups
......@@ -153,6 +155,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
//since each resourceGroup itself can have multiple parents
var parentGanttRows = resourceGroup2GanttRows[parentGroupId];
if(parentGanttRows) {
for(var parentGanttRow of parentGanttRows) {
var resourceGanttRowId = 'resource_' + resource.id + '_' + parentGanttRow.id;
var ganttRow = {
......@@ -174,6 +177,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
}
}
}
}
//there are also resources which are not part of a group
//add these as well.
......@@ -240,6 +244,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
for(var resourceId of resourceIds) {
var claims = resource2Claims[resourceId];
if(claims) {
for(var claim of claims) {
var taskId = claim.task_id;
if(taskId in aggregatedClaims) {
......@@ -255,6 +260,7 @@ ganttResourceControllerMod.controller('GanttResourceController', ['$scope', 'dat
}
}
}
}
var childGroupIds = resourceGroupMemberships.groups[groupId].child_ids;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment