Skip to content

Commit

Permalink
Merge branch 'dev' into fix/PT-14487
Browse files Browse the repository at this point in the history
  • Loading branch information
basilkot authored Dec 19, 2023
2 parents 6ba289d + 3a95af9 commit 13d871a
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 33 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<!-- These properties will be shared for all projects -->
<PropertyGroup>
<VersionPrefix>3.424.0</VersionPrefix>
<VersionPrefix>3.425.0</VersionPrefix>
<VersionSuffix></VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
</PropertyGroup>
Expand Down
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,26 @@ 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) {
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
4 changes: 2 additions & 2 deletions src/VirtoCommerce.OrdersModule.Web/module.manifest
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<id>VirtoCommerce.Orders</id>
<version>3.424.0</version>
<version>3.425.0</version>
<version-tag />

<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

0 comments on commit 13d871a

Please sign in to comment.