remove duplicate method canAdd

This commit is contained in:
esther
2019-12-18 19:38:13 +01:00
committed by Kenn Jacobsen
parent 5d05c2ad4b
commit d050bc6500

View File

@@ -53,10 +53,6 @@
});
}
$scope.canAdd = function () {
return !$scope.model.docTypes || !$scope.model.value || $scope.model.value.length < $scope.model.docTypes.length;
}
$scope.remove = function (index) {
$scope.model.value.splice(index, 1);
}
@@ -112,6 +108,7 @@
});
});
}
$scope.canAdd = function () {
return !$scope.model.value || _.some($scope.model.elemTypes, function (elType) {
return !_.find($scope.model.value, function (c) {
@@ -120,7 +117,6 @@
});
}
$scope.openElemTypeModal = function ($event, config) {
//we have to add the alias to the objects (they are stored as ncAlias)