Skip to content

Commit

Permalink
Merge pull request maestrano#85 from alexnoox/master
Browse files Browse the repository at this point in the history
[MNOE-170] Redirect after adding an app
  • Loading branch information
alexnoox authored Oct 20, 2016
2 parents 5c54ec1 + b33c2e7 commit 30d629c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ angular.module 'mnoEnterpriseAngular'
)

vm.addApplication = ->
MnoeOrganizations.purchaseApp(vm.app, MnoeOrganizations.selectedId)
MnoeOrganizations.purchaseApp(vm.app, MnoeOrganizations.selectedId).then(-> $state.go('home.impac'))

# Check that the testimonial is not empty
vm.isTestimonialShown = (testimonial) ->
Expand Down
3 changes: 2 additions & 1 deletion src/app/views/marketplace/modals/choose-orga-modal.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ angular.module 'mnoEnterpriseAngular'
$scope.current_organization = {
id: MnoeOrganizations.selectedId
}

# Get the list of all the user organizations
MnoeCurrentUser.get().then(
(response) -> # Hash of organizations id -> {organization obj}
Expand Down Expand Up @@ -39,7 +40,7 @@ angular.module 'mnoEnterpriseAngular'

# Add a new app instance to the current user organization
$scope.addApplication = ->
MnoeOrganizations.purchaseApp($scope.app, $scope.current_organization.id)
MnoeOrganizations.purchaseApp($scope.app, $scope.current_organization.id).then(-> $state.go('home.impac'))

# Close the current modal
$scope.closeChooseOrgaModal = ->
Expand Down

0 comments on commit 30d629c

Please sign in to comment.