Merge pull request #3461 from FinnStutzenstein/followRecommendationAutoCopy
Update state field when following a recommendation
This commit is contained in:
commit
e259e10202
@ -1372,6 +1372,11 @@ angular.module('OpenSlidesApp.motions.site', [
|
|||||||
dialog.scope = $scope;
|
dialog.scope = $scope;
|
||||||
ngDialog.open(dialog);
|
ngDialog.open(dialog);
|
||||||
};
|
};
|
||||||
|
// follow recommendation
|
||||||
|
$scope.followRecommendation = function () {
|
||||||
|
$scope.updateState($scope.motion.recommendation.id);
|
||||||
|
$scope.saveAdditionalStateField($scope.recommendationExtension);
|
||||||
|
};
|
||||||
// update state
|
// update state
|
||||||
$scope.updateState = function (state_id) {
|
$scope.updateState = function (state_id) {
|
||||||
$http.put('/rest/motions/motion/' + motion.id + '/set_state/', {'state': state_id});
|
$http.put('/rest/motions/motion/' + motion.id + '/set_state/', {'state': state_id});
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
ng-if="motion.recommendation &&
|
ng-if="motion.recommendation &&
|
||||||
motion.isAllowed('change_state') &&
|
motion.isAllowed('change_state') &&
|
||||||
motion.state.next_states_id.indexOf(motion.recommendation.id) !== -1"
|
motion.state.next_states_id.indexOf(motion.recommendation.id) !== -1"
|
||||||
ng-click="updateState(motion.recommendation.id)"
|
ng-click="followRecommendation()"
|
||||||
class="btn btn-default btn-sm">
|
class="btn btn-default btn-sm">
|
||||||
<i class="fa fa-magic"></i>
|
<i class="fa fa-magic"></i>
|
||||||
<translate>Follow recommendation</translate>
|
<translate>Follow recommendation</translate>
|
||||||
|
Loading…
Reference in New Issue
Block a user