Fix assigning newly created labels

fixes #252

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2017-10-08 12:58:02 +02:00
committed by Julius Härtl
parent 794fcb76b8
commit 07da13bdf9

View File

@@ -176,10 +176,12 @@ app.controller('BoardController', function ($rootScope, $scope, $stateParams, St
}; };
$scope.labelCreate = function (label) { $scope.labelCreate = function (label) {
label.boardId = $scope.id; label.boardId = $scope.id;
LabelService.create(label); LabelService.create(label).then(function (data) {
BoardService.getCurrent().labels.push(label); $scope.newStack.title = "";
$scope.status.createLabel = false; BoardService.getCurrent().labels.push(data);
$scope.newLabel = {}; $scope.status.createLabel = false;
$scope.newLabel = {};
});
}; };
$scope.labelUpdate = function (label) { $scope.labelUpdate = function (label) {
label.edit = false; label.edit = false;