SHOW:
|
|
- or go back to the newest paste.
| 1 | $scope.moveObj = new apiSvc.move($scope.activeMove); | |
| 2 | - | $scope.moveObj.$save() |
| 2 | + | $scope.moveObj.$save() |
| 3 | - | .then( |
| 3 | + | .then( |
| 4 | - | // success |
| 4 | + | // success |
| 5 | - | function(response) {
|
| 5 | + | function(response) {
|
| 6 | - | $scope.msgObj = {"title": "Move", "detail": "Ticket accepted and processed", "severity": "success", "module":"move"};
|
| 6 | + | $scope.msgObj = {"title": "Move", "detail": "Ticket accepted and processed", "severity": "success", "module":"move"};
|
| 7 | - | $rootScope.$broadcast('notificationEvent',$scope.msgObj);
|
| 7 | + | $rootScope.$broadcast('notificationEvent',$scope.msgObj);
|
| 8 | - | $scope.destroy(); |
| 8 | + | $scope.destroy(); |
| 9 | - | }, |
| 9 | + | }, |
| 10 | - | // failure |
| 10 | + | // failure |
| 11 | - | function(response) {
|
| 11 | + | function(response) {
|
| 12 | - | $scope.msgObj = {"title": "Move", "detail": "Ticket rejected", "severity": "danger", "module":"move"};
|
| 12 | + | $scope.msgObj = {"title": "Move", "detail": "Ticket rejected", "severity": "danger", "module":"move"};
|
| 13 | - | $rootScope.$broadcast('notificationEvent',$scope.msgObj);
|
| 13 | + | $rootScope.$broadcast('notificationEvent',$scope.msgObj);
|
| 14 | - | $scope.activeMove.errors = response.data; |
| 14 | + | $scope.activeMove.errors = response.data; |
| 15 | - | $scope.persist(); |
| 15 | + | $scope.persist(); |
| 16 | - | } |
| 16 | + | } |
| 17 | - | ); |
| 17 | + | ); |