Commit b9ae5cbd authored by Anthony Geourjon's avatar Anthony Geourjon
Browse files

Merge branch 'EDCAMPUS-1-Limiter-l-imbrication-des-portefeuilles-et-projets' into 'master'

Filtration portefeuille/projet pour l'héritage de projet

See merge request !9
parents 90ebd4f9 265a84c6
......@@ -52,7 +52,7 @@
<section>
<h4>{{::_labels.selectProjectToInherit}}</h4>
<select style="width:100%" ng-model="newProject.parentId">
<option ng-repeat="project in _getMainMenu()" value="{{project.id}}">
<option ng-repeat="project in _getMainMenuPortfolio()" value="{{project.id}}">
{{project.fullName | uppercase}}
</option>
</select>
......
......@@ -900,6 +900,15 @@ controller('CommonCtrl', ['$scope','$serverFactory','$routeParams','$rootScope',
return projects;
}
$scope._getMainMenuPortfolio = function (){
var projects = $scope._getMainMenu();
var portfolios = []; for (let i = 0; i < projects.length ; i++) {
if(projects[i].parent.length==0){
portfolios.push(projects[i]);
}
} return portfolios;
}
$scope._pushMainMenu = function(val){
if(val && val.id) {
val.id = parseInt(val.id);
......
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