|
|
@ -40,6 +40,7 @@ module.exports = function($scope, |
|
|
|
UsersHelper, |
|
|
|
UsersHelper, |
|
|
|
ConfigurationService, |
|
|
|
ConfigurationService, |
|
|
|
WorkPackageService, |
|
|
|
WorkPackageService, |
|
|
|
|
|
|
|
ProjectService, |
|
|
|
CommonRelationsHandler, |
|
|
|
CommonRelationsHandler, |
|
|
|
ChildrenRelationsHandler, |
|
|
|
ChildrenRelationsHandler, |
|
|
|
ParentRelationsHandler, |
|
|
|
ParentRelationsHandler, |
|
|
@ -65,10 +66,20 @@ module.exports = function($scope, |
|
|
|
$scope.maxDescriptionLength = 800; |
|
|
|
$scope.maxDescriptionLength = 800; |
|
|
|
$scope.projectIdentifier = $scope.workPackage.embedded.project.props.identifier; |
|
|
|
$scope.projectIdentifier = $scope.workPackage.embedded.project.props.identifier; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fetchProjectTypes() { |
|
|
|
|
|
|
|
ProjectService.getProject($scope.projectIdentifier) |
|
|
|
|
|
|
|
.then(function(project) { |
|
|
|
|
|
|
|
$scope.availableTypes = project.embedded.types; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fetchProjectTypes(); |
|
|
|
|
|
|
|
|
|
|
|
function refreshWorkPackage(callback) { |
|
|
|
function refreshWorkPackage(callback) { |
|
|
|
WorkPackageService.getWorkPackage($scope.workPackage.props.id) |
|
|
|
WorkPackageService.getWorkPackage($scope.workPackage.props.id) |
|
|
|
.then(function(workPackage) { |
|
|
|
.then(function(workPackage) { |
|
|
|
setWorkPackageScopeProperties(workPackage); |
|
|
|
setWorkPackageScopeProperties(workPackage); |
|
|
|
|
|
|
|
fetchProjectTypes(); |
|
|
|
$scope.$broadcast('workPackageRefreshed'); |
|
|
|
$scope.$broadcast('workPackageRefreshed'); |
|
|
|
if (callback) { |
|
|
|
if (callback) { |
|
|
|
callback(workPackage); |
|
|
|
callback(workPackage); |
|
|
|