Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PT-14655: Organization Name is empty #393

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.CartModule.Core" Version="3.404.0" />
<PackageReference Include="VirtoCommerce.CartModule.Core" Version="3.409.0" />
<PackageReference Include="VirtoCommerce.CoreModule.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.CustomerModule.Core" Version="3.400.0" />
<PackageReference Include="VirtoCommerce.NotificationsModule.Core" Version="3.400.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"from": "Von",
"channel": "Kanal",
"customer": "Kunde",
"organization": "Organisation",
"invoice": "Erhalten Sie die Rechnung als PDF",
"withPrototypes": "Mit vorlagen"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"from": "Created at",
"channel": "Channel",
"customer": "Customer",
"organization": "Organization",
"invoice": "Get invoice PDF",
"withPrototypes": "With templates"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"from": "Из",
"channel": "Канал",
"customer": "Покупатель",
"organization": "Организация",
"invoice": "Получить счет в PDF",
"withPrototypes": "Показать шаблоны"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,29 @@ angular.module('virtoCommerce.orderModule')
}

blade.openCustomerDetails = function () {
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);
}
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);
}
});
});
});
}
};

blade.openOrganizationDetails = function () {
if (blade.customerOrder.organizationId) {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@
</div>
</script>

<script type="text/ng-template" id="organizationSelector.html">
<div class="form-input">
<label class="form-label" style="height:27px;">
<a href="" ng-click="blade.openOrganizationDetails()">{{ blade.currentEntity.organizationName }}</a>
</label>
</div>
</script>

<script type="text/ng-template" id="discountAmount.html">
<div class="form-input __currency">
<span class="currency">{{blade.currentEntity.currency}}</span>
Expand Down
49 changes: 27 additions & 22 deletions src/VirtoCommerce.OrdersModule.Web/Scripts/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,31 +113,12 @@ angular.module(moduleName, [
template: 'Modules/$(VirtoCommerce.Orders)/Scripts/blades/customerOrder-detail.tpl.html',
knownChildrenOperations: ['Shipment', 'PaymentIn'],
metaFields: [
{
name: 'isApproved',
title: "orders.blades.customerOrder-detail.labels.approved",
valueType: "Boolean",
isVisibleFn: function (blade) {
return !blade.isNew;
}
},
{
name: 'employeeId',
title: "orders.blades.customerOrder-detail.labels.employee",
templateUrl: 'order-employeeSelector.html'
},
{
name: 'number',
isRequired: true,
title: "orders.blades.customerOrder-detail.labels.order-number",
valueType: "ShortText"
},
{
name: 'createdDate',
isReadOnly: true,
title: "orders.blades.customerOrder-detail.labels.from",
valueType: "DateTime"
},
{
name: 'status',
templateUrl: 'statusSelector.html'
Expand All @@ -148,14 +129,38 @@ angular.module(moduleName, [
templateUrl: 'customerSelector.html'
},
{
name: 'discountAmount',
title: "orders.blades.customerOrder-items.labels.discount",
templateUrl: 'discountAmount.html'
name: 'organizationName',
title: "orders.blades.customerOrder-detail.labels.organization",
templateUrl: 'organizationSelector.html'
},
{
name: 'storeId',
title: "orders.blades.customerOrder-detail.labels.store",
templateUrl: 'storeSelector.html'
},
{
name: 'createdDate',
isReadOnly: true,
title: "orders.blades.customerOrder-detail.labels.from",
valueType: "DateTime"
},
{
name: 'employeeId',
title: "orders.blades.customerOrder-detail.labels.employee",
templateUrl: 'order-employeeSelector.html'
},
{
name: 'discountAmount',
title: "orders.blades.customerOrder-items.labels.discount",
templateUrl: 'discountAmount.html'
},
{
name: 'isApproved',
title: "orders.blades.customerOrder-detail.labels.approved",
valueType: "Boolean",
isVisibleFn: function (blade) {
return !blade.isNew;
}
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/VirtoCommerce.OrdersModule.Web/module.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<platformVersion>3.447.0</platformVersion>
<dependencies>
<dependency id="VirtoCommerce.Cart" version="3.404.0" />
<dependency id="VirtoCommerce.Cart" version="3.409.0" />
<dependency id="VirtoCommerce.Catalog" version="3.401.0" />
<dependency id="VirtoCommerce.Core" version="3.400.0" />
<dependency id="VirtoCommerce.Customer" version="3.400.0" />
Expand Down
Loading