diff --git a/.github/workflows/module-ci.yml b/.github/workflows/module-ci.yml index 0e2434ee..c798dd14 100644 --- a/.github/workflows/module-ci.yml +++ b/.github/workflows/module-ci.yml @@ -1,5 +1,5 @@ -# v3.800.3 -# https://virtocommerce.atlassian.net/browse/VCST-570 +# v3.800.4 +# https://virtocommerce.atlassian.net/browse/VCST-488 name: Module CI on: @@ -241,7 +241,7 @@ jobs: if: ${{ ((github.ref == 'refs/heads/dev') && (github.event_name == 'push') && (needs.ci.outputs.run-e2e == 'true')) || (github.event_name == 'workflow_dispatch')}} needs: 'ci' - uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/e2e.yml@v3.800.4 with: katalonRepo: 'VirtoCommerce/vc-quality-gate-katalon' katalonRepoBranch: 'dev' @@ -261,7 +261,7 @@ jobs: (github.ref == 'refs/heads/dev')) && github.event_name == 'push' }} needs: ci - uses: VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.800.4 with: releaseSource: module moduleId: ${{ needs.ci.outputs.moduleId }} diff --git a/.github/workflows/module-release-hotfix.yml b/.github/workflows/module-release-hotfix.yml index 0e84ad49..b8ac0707 100644 --- a/.github/workflows/module-release-hotfix.yml +++ b/.github/workflows/module-release-hotfix.yml @@ -1,5 +1,5 @@ -# v3.800.3 -# https://virtocommerce.atlassian.net/browse/VCST-570 +# v3.800.4 +# https://virtocommerce.atlassian.net/browse/VCST-488 name: Release hotfix on: @@ -13,12 +13,12 @@ on: jobs: test: - uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.4 secrets: sonarToken: ${{ secrets.SONAR_TOKEN }} build: - uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.4 with: uploadPackage: 'true' uploadDocker: 'false' @@ -46,7 +46,7 @@ jobs: publish-github-release: needs: [build, test, get-metadata] - uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.4 with: fullKey: ${{ needs.build.outputs.packageFullKey }} changeLog: '${{ needs.get-metadata.outputs.changeLog }}' diff --git a/.github/workflows/publish-nugets.yml b/.github/workflows/publish-nugets.yml index 4599fe33..76dffa45 100644 --- a/.github/workflows/publish-nugets.yml +++ b/.github/workflows/publish-nugets.yml @@ -1,5 +1,5 @@ -# v3.800.3 -# https://virtocommerce.atlassian.net/browse/VCST-570 +# v3.800.4 +# https://virtocommerce.atlassian.net/browse/VCST-488 name: Publish nuget on: @@ -13,12 +13,12 @@ on: jobs: test: - uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.800.4 secrets: sonarToken: ${{ secrets.SONAR_TOKEN }} build: - uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.800.4 with: uploadPackage: 'true' uploadDocker: 'false' @@ -29,7 +29,7 @@ jobs: publish-nuget: needs: [build, test] - uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.800.4 with: fullKey: ${{ needs.build.outputs.packageFullKey }} forceGithub: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9a1503a9..036f4c50 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ -# v3.800.3 -# https://virtocommerce.atlassian.net/browse/VCST-570 +# v3.800.4 +# https://virtocommerce.atlassian.net/browse/VCST-488 name: Release on: @@ -7,6 +7,6 @@ on: jobs: release: - uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.800.2 + uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.800.4 secrets: envPAT: ${{ secrets.REPO_TOKEN }} \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index d7980b9f..f1134b83 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.806.0 + 3.807.0 $(VersionSuffix)-$(BuildNumber) 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 @@
-
+
diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/filter-detail.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/filter-detail.js index 38ded7c0..6aa90318 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/filter-detail.js +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/filter-detail.js @@ -1,6 +1,7 @@ angular.module('virtoCommerce.orderModule') - .controller('virtoCommerce.orderModule.filterDetailController', ['$scope', '$localStorage', 'virtoCommerce.customerModule.members', '$translate', 'platformWebApp.metaFormsService', 'platformWebApp.accounts', - function ($scope, $localStorage, members, $translate, metaFormsService, securityAccounts) { + .controller('virtoCommerce.orderModule.filterDetailController', ['$scope', '$localStorage', 'virtoCommerce.customerModule.members', + '$translate', 'platformWebApp.metaFormsService', + function ($scope, $localStorage, members, $translate, metaFormsService) { var blade = $scope.blade; blade.metaFields = blade.metaFields ? blade.metaFields : metaFormsService.getMetaFields('orderFilterDetail'); @@ -37,9 +38,10 @@ angular.module('virtoCommerce.orderModule') $scope.saveChanges = function () { if (blade.currentEntity.customerId) { - // Search for accounts by memberId (because customerID in order is an account) - securityAccounts.search({ MemberIds: [blade.currentEntity.customerId] }, function (data) { - blade.currentEntity.customerIds = _.pluck(data.users, 'id'); + members.get({ id: blade.currentEntity.customerId }, function (member) { + blade.currentEntity.customerIds = member.securityAccounts.map(function (account) { + return account.id; + }); $scope.applyCriteria(); }); } diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/resources/securityAccounts.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/resources/securityAccounts.js deleted file mode 100644 index 997ee88e..00000000 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/resources/securityAccounts.js +++ /dev/null @@ -1,4 +0,0 @@ -angular.module('virtoCommerce.orderModule') -.factory('virtoCommerce.orderModule.securityAccounts', ['$resource', function($resource) { - return $resource('api/platform/security/users/id/:id', { id: '@Id' }, {}); -}]); \ No newline at end of file diff --git a/src/VirtoCommerce.OrdersModule.Web/module.manifest b/src/VirtoCommerce.OrdersModule.Web/module.manifest index 5624d51d..80adebf7 100644 --- a/src/VirtoCommerce.OrdersModule.Web/module.manifest +++ b/src/VirtoCommerce.OrdersModule.Web/module.manifest @@ -1,14 +1,14 @@ VirtoCommerce.Orders - 3.806.0 + 3.807.0 3.800.0 - +