Frontend: Fix codacy errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-10-03 23:51:44 +02:00
committed by Julius Härtl
parent 28d6f4196e
commit 8cb95c4105
2 changed files with 3 additions and 2 deletions

View File

@@ -146,7 +146,7 @@ app.controller('CardController', function ($scope, $rootScope, $routeParams, $lo
$scope.showAssignUser = function() { $scope.showAssignUser = function() {
$scope.status.showAssignUser = true; $scope.status.showAssignUser = true;
$timeout(function() { $timeout(function() {
$("#assignUserSelect").find('a').click(); $('#assignUserSelect').find('a').click();
}); });
}; };

View File

@@ -98,8 +98,9 @@ app.factory('CardService', function(ApiService, $http, $q){
CardService.prototype.assignUser = function (card, user) { CardService.prototype.assignUser = function (card, user) {
var deferred = $q.defer(); var deferred = $q.defer();
var self = this; var self = this;
if (self.getCurrent().assignedUsers === null) if (self.getCurrent().assignedUsers === null) {
self.getCurrent().assignedUsers = []; self.getCurrent().assignedUsers = [];
}
$http.post(this.baseUrl + '/' + card.id + '/assign', {'userId': user}).then(function (response) { $http.post(this.baseUrl + '/' + card.id + '/assign', {'userId': user}).then(function (response) {
self.getCurrent().assignedUsers.push(response.data); self.getCurrent().assignedUsers.push(response.data);
deferred.resolve(response.data); deferred.resolve(response.data);