diff --git a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
index 21832245..630c2513 100644
--- a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
+++ b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js
index 32fe3995..69832456 100644
--- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js
+++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js
@@ -1,6 +1,8 @@
angular.module('virtoCommerce.orderModule')
- .controller('virtoCommerce.orderModule.customerOrderDetailController', ['$scope', '$window', 'platformWebApp.bladeNavigationService', 'platformWebApp.dialogService', 'virtoCommerce.customerModule.members', 'virtoCommerce.customerModule.memberTypesResolverService', 'virtoCommerce.orderModule.securityAccounts', 'platformWebApp.authService',
- function ($scope, $window, bladeNavigationService, dialogService, members, memberTypesResolverService, securityAccounts, authService) {
+ .controller('virtoCommerce.orderModule.customerOrderDetailController', ['$scope', '$window', 'platformWebApp.bladeNavigationService',
+ 'platformWebApp.dialogService', 'virtoCommerce.customerModule.members', 'virtoCommerce.customerModule.memberTypesResolverService',
+ 'platformWebApp.authService',
+ function ($scope, $window, bladeNavigationService, dialogService, members, memberTypesResolverService, authService) {
var blade = $scope.blade;
blade.currentEntityId = blade.customerOrder.id;
@@ -42,20 +44,17 @@ angular.module('virtoCommerce.orderModule')
blade.openCustomerDetails = function () {
if (blade.customerOrder.customerId) {
- securityAccounts.get({ id: blade.customerOrder.customerId }, function (account) {
- var contactId = (account && account.memberId) ? account.memberId : blade.customerOrder.customerId;
- members.get({ id: contactId }, function (member) {
- if (member && member.id) {
- showCustomerDetailBlade(member);
- }
- });
+ members.getByUserId({ userId: blade.customerOrder.customerId }, function (member) {
+ if (member && member.id) {
+ showCustomerDetailBlade(member);
+ }
});
}
};
blade.openOrganizationDetails = function () {
if (blade.customerOrder.organizationId) {
- members.get({ id: organizationId }, function (member) {
+ members.get({ id: blade.customerOrder.organizationId }, function (member) {
if (member && member.id) {
showCustomerDetailBlade(member);
}
diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html
index ab677358..be0a87b2 100644
--- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html
+++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html
@@ -5,7 +5,7 @@
-