From 3feb5df41732aa8c3dd1bc9e59885290a80eb2e1 Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Thu, 14 Dec 2023 19:26:26 +0200 Subject: [PATCH 1/3] PT-14655: Organization Name is empty fix: Organization Name is empty --- .../VirtoCommerce.OrdersModule.Core.csproj | 2 +- .../Services/CustomerOrderBuilder.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj index 6f64400f..7b642653 100644 --- a/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj +++ b/src/VirtoCommerce.OrdersModule.Core/VirtoCommerce.OrdersModule.Core.csproj @@ -15,7 +15,7 @@ - + diff --git a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs index d4bb269f..d457791f 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs @@ -128,6 +128,7 @@ protected virtual CustomerOrder ToOrderModel(ShoppingCart cart) order.CustomerName = cart.CustomerName; order.DiscountAmount = cart.DiscountAmount; order.OrganizationId = cart.OrganizationId; + order.OrganizationName = cart.OrganizationName; order.StoreId = cart.StoreId; order.TaxPercentRate = cart.TaxPercentRate; order.TaxType = cart.TaxType; From cce09fe5415897fcf9f949ae17d3841cbcf3e2ad Mon Sep 17 00:00:00 2001 From: Oleg Zhuk Date: Thu, 14 Dec 2023 22:17:49 +0200 Subject: [PATCH 2/3] feat: Imptove order blade --- .../de.VirtoCommerce.Orders.json | 1 + .../en.VirtoCommerce.Orders.json | 1 + .../ru.VirtoCommerce.Orders.json | 1 + .../Scripts/blades/customerOrder-detail.js | 11 +++++ .../blades/customerOrder-detail.tpl.html | 8 +++ .../Scripts/order.js | 49 ++++++++++--------- 6 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/VirtoCommerce.OrdersModule.Web/Localizations/de.VirtoCommerce.Orders.json b/src/VirtoCommerce.OrdersModule.Web/Localizations/de.VirtoCommerce.Orders.json index e93993ae..363cd980 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Localizations/de.VirtoCommerce.Orders.json +++ b/src/VirtoCommerce.OrdersModule.Web/Localizations/de.VirtoCommerce.Orders.json @@ -14,6 +14,7 @@ "from": "Von", "channel": "Kanal", "customer": "Kunde", + "organization": "Organisation", "invoice": "Erhalten Sie die Rechnung als PDF", "withPrototypes": "Mit vorlagen" }, diff --git a/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json b/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json index f2488325..ec50a99a 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json +++ b/src/VirtoCommerce.OrdersModule.Web/Localizations/en.VirtoCommerce.Orders.json @@ -14,6 +14,7 @@ "from": "Created at", "channel": "Channel", "customer": "Customer", + "organization": "Organization", "invoice": "Get invoice PDF", "withPrototypes": "With templates" }, diff --git a/src/VirtoCommerce.OrdersModule.Web/Localizations/ru.VirtoCommerce.Orders.json b/src/VirtoCommerce.OrdersModule.Web/Localizations/ru.VirtoCommerce.Orders.json index c8f13cd0..1cc8d7fa 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Localizations/ru.VirtoCommerce.Orders.json +++ b/src/VirtoCommerce.OrdersModule.Web/Localizations/ru.VirtoCommerce.Orders.json @@ -14,6 +14,7 @@ "from": "Из", "channel": "Канал", "customer": "Покупатель", + "organization": "Организация", "invoice": "Получить счет в PDF", "withPrototypes": "Показать шаблоны" }, diff --git a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js index 167b4189..d08184be 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.js @@ -51,6 +51,17 @@ angular.module('virtoCommerce.orderModule') }); }; + blade.openOrganizationDetails = function () { + securityAccounts.get({ id: blade.customerOrder.organizationId }, function (account) { + var organizationId = (account && account.memberId) ? account.memberId : blade.customerOrder.organizationId; + members.get({ id: organizationId }, function (member) { + if (member && member.id) { + showCustomerDetailBlade(member); + } + }); + }); + }; + blade.fetchEmployees = function (criteria) { criteria.memberType = 'Employee'; criteria.deepSearch = true; 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 3bebef62..ab677358 100644 --- a/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html +++ b/src/VirtoCommerce.OrdersModule.Web/Scripts/blades/customerOrder-detail.tpl.html @@ -45,6 +45,14 @@ + +