From 6de8b5bfc89c36d73bf4736284b17d8213fa6148 Mon Sep 17 00:00:00 2001 From: RidaAhmad Date: Tue, 28 Aug 2018 18:04:54 +0500 Subject: [PATCH] [MNOE-1280] Cleared instances cache to refresh apps & products --- src/app/views/provisioning/confirm.controller.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/views/provisioning/confirm.controller.coffee b/src/app/views/provisioning/confirm.controller.coffee index ace49217..2cf1d94c 100644 --- a/src/app/views/provisioning/confirm.controller.coffee +++ b/src/app/views/provisioning/confirm.controller.coffee @@ -1,5 +1,5 @@ angular.module 'mnoEnterpriseAngular' - .controller('ProvisioningConfirmCtrl', ($scope, $state, $stateParams, $log, MnoeOrganizations, MnoeProvisioning, MnoeAppInstances, MnoeConfig, ProvisioningHelper, schemaForm, toastr) -> + .controller('ProvisioningConfirmCtrl', ($scope, $state, $stateParams, $log, MnoeOrganizations, MnoeProvisioning, MnoeAppInstances, MnoeConfig, ProvisioningHelper, schemaForm, toastr, MnoeProductInstances) -> vm = this @@ -29,6 +29,11 @@ angular.module 'mnoEnterpriseAngular' vm.schema = schema ) + clearInstancesCache = -> + MnoeAppInstances.emptyAppInstances() + MnoeProductInstances.emptyProductInstances() + MnoeProductInstances.clearCache() + vm.editOrder = (reload = true) -> switch $stateParams.editAction.toLowerCase() when 'change', 'provision', null @@ -77,6 +82,7 @@ angular.module 'mnoEnterpriseAngular' MnoeProvisioning.refreshCartSubscriptions() $state.go("home.subscriptions", {subType: 'cart'}) else + clearInstancesCache() # Reload dock apps MnoeAppInstances.getAppInstances().then( (response) ->