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) {
label.boardId = $scope.id;
LabelService.create(label);
BoardService.getCurrent().labels.push(label);
LabelService.create(label).then(function (data) {
$scope.newStack.title = "";
BoardService.getCurrent().labels.push(data);
$scope.status.createLabel = false;
$scope.newLabel = {};
});
};
$scope.labelUpdate = function (label) {
label.edit = false;