From 6a9b47c789a04bd79bf04dd3a58716bb53702151 Mon Sep 17 00:00:00 2001 From: MAhsenArif Date: Thu, 12 Jul 2018 09:55:05 +0500 Subject: [PATCH] [MNOE-1258] Order: Fixed order not fetching correct subscription data for cart subscriptions --- .../mnoe-subscriptions-list/mnoe-subscriptions-list.html | 2 +- src/app/index.route.coffee | 2 +- src/app/views/orders/order.controller.coffee | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/components/mnoe-subscriptions-list/mnoe-subscriptions-list.html b/src/app/components/mnoe-subscriptions-list/mnoe-subscriptions-list.html index 75b37a38..e629a0fc 100644 --- a/src/app/components/mnoe-subscriptions-list/mnoe-subscriptions-list.html +++ b/src/app/components/mnoe-subscriptions-list/mnoe-subscriptions-list.html @@ -21,7 +21,7 @@ {{subscription.start_date | amDateFormat:'L'}} {{subscription.organization.name}} - {{subscription.product.name}} + {{subscription.product.name}} {{subscription.product_pricing.name}} mnoe_admin_panel.dashboard.subscriptions.not_available diff --git a/src/app/index.route.coffee b/src/app/index.route.coffee index 5a9be8c4..6f0a8fe0 100644 --- a/src/app/index.route.coffee +++ b/src/app/index.route.coffee @@ -336,7 +336,7 @@ .state 'dashboard.order', data: pageTitle:'Order' - url: '^/orders/:subscriptionId?:orgId?orderId' + url: '^/orders/:subscriptionId?:orgId&orderId&cart' views: '@dashboard': templateUrl: 'app/views/orders/order.html' controller: 'OrderController' diff --git a/src/app/views/orders/order.controller.coffee b/src/app/views/orders/order.controller.coffee index 20f14779..6e0fde70 100644 --- a/src/app/views/orders/order.controller.coffee +++ b/src/app/views/orders/order.controller.coffee @@ -5,6 +5,7 @@ vm.subscriptionId = $stateParams.subscriptionId vm.orgId = $stateParams.orgId vm.orderId = $stateParams.orderId + vm.cart = $stateParams.cart vm.order = {} vm.subscription = {} vm.rootName = $filter('translate')('mnoe_admin_panel.dashboard.order.root_name') @@ -34,7 +35,7 @@ fetchSubscriptionEvent() # Get the subscription - MnoeProvisioning.fetchSubscription(vm.subscriptionId, vm.orgId).then( + MnoeProvisioning.fetchSubscription(vm.subscriptionId, vm.orgId, vm.cart).then( (response) -> vm.subscription = response.data.plain() vm.getInfo()