Commit 55ec878b authored by manuel.delunsch's avatar manuel.delunsch

Ajout id université sur page import CSV

parent 82d9dfee
Pipeline #34329 passed with stage
in 1 minute and 14 seconds
......@@ -10,10 +10,11 @@
<li class="pull-right">
<button ng-click="AdminImportsCtrl.addFile()">{{::_labels.importCSVBtn}}</button>
</li>
</ul>
</div>
<p>{{AdminImportsCtrl.currentCampus.name}}</p>
<div ng-show="AdminImportsCtrl.screen=='users'">
<div>
......
......@@ -2,7 +2,7 @@
/* Controllers */
root.controller('AdminImportsCtrl', ['$scope', '$http', '$universityFactory', '$usersGroupFactory', '$dropListFactory', '$languageFactory', function ($scope, $http, $universityFactory, $usersGroupFactory, $dropListFactory, $languageFactory) {
root.controller('AdminImportsCtrl', ['$scope', '$http', '$stateParams' , '$universityFactory', '$usersGroupFactory', '$dropListFactory', '$languageFactory', function ($scope, $http, $stateParams, $universityFactory, $usersGroupFactory, $dropListFactory, $languageFactory) {
var AdminImportsCtrl = this;
AdminImportsCtrl.screen = "users"
......@@ -16,7 +16,23 @@ root.controller('AdminImportsCtrl', ['$scope', '$http', '$universityFactory', '$
$universityFactory.getMainUniversityByUser(session.user, function (univ) {
AdminImportsCtrl.currentCampus = univ;
console.error(AdminImportsCtrl.currentCampus);
$universityFactory.get_university(univ.id, function (univDetails) {
console.error(univDetails);
});
//refresh();
})
}
$scope.activate = function (campus) {
$universityFactory.set_userMainCampus(campus.id).success(function (data, status, headers, config) {
$scope.ready = true;
if (data.status == "success") {
$scope.init();
}
})
}
......@@ -34,6 +50,7 @@ root.controller('AdminImportsCtrl', ['$scope', '$http', '$universityFactory', '$
$scope._browseMedia("*", function (element) {
AdminImportsCtrl.importPeople.file = element;
$universityFactory.get_university_parsedUsers(AdminImportsCtrl.currentCampus.id, element.id, function (data) {
console.error(data);
if (data.status == "success") {
AdminImportsCtrl.importPeople.data = []
//$window.open(data.details, '_blank');
......@@ -185,11 +202,13 @@ root.controller('AdminImportsCtrl', ['$scope', '$http', '$universityFactory', '$
}
});
}
AdminImportsCtrl.addFile = addFile;
AdminImportsCtrl.checkErrors = checkErrors;
AdminImportsCtrl.importUsers = importUsers;
_init();
}])
}]);
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