Skip to content

Commit

Permalink
Merge branch 'release/3.410.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Aug 31, 2023
2 parents 8496eeb + 5206fdd commit 4b9f9f4
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 43 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.409.0</VersionPrefix>
<VersionPrefix>3.410.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 @@ -62,6 +62,7 @@ public Task BuildSchemaAsync(IndexDocument schema)
schema.AddFilterableDecimal("DiscountTotal");

schema.AddFilterableBoolean("IsCancelled");
schema.AddFilterableBoolean("IsPrototype");

return schema.AddDynamicProperties(_dynamicPropertySearchService, typeof(CustomerOrder).FullName);
}
Expand Down Expand Up @@ -123,6 +124,7 @@ protected virtual async Task<IndexDocument> CreateDocument(CustomerOrder order)
document.AddFilterableDecimal("DiscountTotal", order.DiscountTotal);

document.AddFilterableBoolean("IsCancelled", order.IsCancelled);
document.AddFilterableBoolean("IsPrototype", order.IsPrototype);

foreach (var address in order.Addresses ?? Enumerable.Empty<Address>())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ public async Task<ActionResult<CustomerOrder>> GetById(string id, [SwaggerOption
var searchCriteria = AbstractTypeFactory<CustomerOrderSearchCriteria>.TryCreateInstance();
searchCriteria.Ids = new[] { id };
searchCriteria.ResponseGroup = respGroup;
searchCriteria.WithPrototypes = true;
var authorizationResult = await _authorizationService.AuthorizeAsync(User, searchCriteria, new OrderAuthorizationRequirement(ModuleConstants.Security.Permissions.Read));
if (!authorizationResult.Succeeded)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"from": "Von",
"channel": "Kanal",
"customer": "Kunde",
"invoice": "Erhalten Sie die Rechnung als PDF"
"invoice": "Erhalten Sie die Rechnung als PDF",
"withPrototypes": "Mit vorlagen"
},
"placeholders": {
"employee": "Wählen Sie den Zuständiger aus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"from": "Created at",
"channel": "Channel",
"customer": "Customer",
"invoice": "Get invoice PDF"
"invoice": "Get invoice PDF",
"withPrototypes": "With templates"
},
"placeholders": {
"employee": "Select assignee",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"from": "Из",
"channel": "Канал",
"customer": "Покупатель",
"invoice": "Получить счет в PDF"
"invoice": "Получить счет в PDF",
"withPrototypes": "Показать шаблоны"
},
"placeholders": {
"employee": "Выбрать исполнителя",
Expand Down
8 changes: 4 additions & 4 deletions src/VirtoCommerce.OrdersModule.Web/Module.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,17 @@ public void Uninstall()
{
}

public async Task ExportAsync(Stream outStream, ExportImportOptions options, Action<ExportImportProgressInfo> progressCallback,
public Task ExportAsync(Stream outStream, ExportImportOptions options, Action<ExportImportProgressInfo> progressCallback,
ICancellationToken cancellationToken)
{
await _appBuilder.ApplicationServices.GetRequiredService<OrderExportImport>().DoExportAsync(outStream,
return _appBuilder.ApplicationServices.GetRequiredService<OrderExportImport>().DoExportAsync(outStream,
progressCallback, cancellationToken);
}

public async Task ImportAsync(Stream inputStream, ExportImportOptions options, Action<ExportImportProgressInfo> progressCallback,
public Task ImportAsync(Stream inputStream, ExportImportOptions options, Action<ExportImportProgressInfo> progressCallback,
ICancellationToken cancellationToken)
{
await _appBuilder.ApplicationServices.GetRequiredService<OrderExportImport>().DoImportAsync(inputStream,
return _appBuilder.ApplicationServices.GetRequiredService<OrderExportImport>().DoImportAsync(inputStream,
progressCallback, cancellationToken);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,53 +1,64 @@
<div class="blade-content">
<div class="blade-inner">
<div class="inner-block clearfix">
<form class="form" name="formScope">
<legend>{{ 'orders.blades.filter-detail.labels.criteria' | translate }}</legend>
<div class="blade-inner">
<div class="inner-block clearfix">
<form class="form" name="formScope">
<legend>{{ 'orders.blades.filter-detail.labels.criteria' | translate }}</legend>

<div class="form-group" ng-init="setForm(formScope)">
<label class="form-label">{{ 'orders.blades.filter-detail.labels.name' | translate }}</label>
<div class="form-input">
<input ng-model="blade.currentEntity.name" required placeholder="{{ 'orders.blades.filter-detail.labels.name_' | translate }}" />
</div>
</div>

<va-metaform registered-inputs="blade.metaFields" blade="blade"></va-metaform>
</form>
<div class="form-group" ng-init="setForm(formScope)">
<label class="form-label">{{ 'orders.blades.filter-detail.labels.name' | translate }}</label>
<div class="form-input">
<input ng-model="blade.currentEntity.name" required placeholder="{{ 'orders.blades.filter-detail.labels.name_' | translate }}" />
</div>
</div>

<va-metaform registered-inputs="blade.metaFields" blade="blade"></va-metaform>
</form>
</div>
</div>
</div>

<script type="text/ng-template" id="statusesSelector.html">
<div class="form-input">
<ui-select multiple ng-model="blade.currentEntity.statuses">
<ui-select-match placeholder="{{ 'orders.blades.filter-detail.placeholders.all' | translate }}">{{$item.value}}</ui-select-match>
<ui-select-choices repeat="x.key as x in blade.statuses | filter: {'value': $select.search}">
<span ng-bind-html="x.value | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
<div class="form-input">
<ui-select multiple ng-model="blade.currentEntity.statuses">
<ui-select-match placeholder="{{ 'orders.blades.filter-detail.placeholders.all' | translate }}">{{$item.value}}</ui-select-match>
<ui-select-choices repeat="x.key as x in blade.statuses | filter: {'value': $select.search}">
<span ng-bind-html="x.value | highlight: $select.search"></span>
</ui-select-choices>
</ui-select>
</div>
</script>

<script type="text/ng-template" id="storeSelector.html">
<div class="form-input">
<va-store-selector multiple ng-model="blade.currentEntity.storeIds" placeholder="'orders.blades.filter-detail.placeholders.all'"></va-store-selector>
</div>
<div class="form-input">
<va-store-selector multiple ng-model="blade.currentEntity.storeIds" placeholder="'orders.blades.filter-detail.placeholders.all'"></va-store-selector>
</div>
</script>

<script type="text/ng-template" id="customerSelector.html">
<div class="form-input">
<ui-scroll-drop-down data="blade.fetchCustomers(criteria)"
ng-model="blade.currentEntity.customerId"
placeholder="'orders.blades.filter-detail.placeholders.all'">
</ui-scroll-drop-down>
</div>
<div class="form-input">
<ui-scroll-drop-down data="blade.fetchCustomers(criteria)"
ng-model="blade.currentEntity.customerId"
placeholder="'orders.blades.filter-detail.placeholders.all'">
</ui-scroll-drop-down>
</div>
</script>

<script type="text/ng-template" id="filter-employeeSelector.html">
<div class="form-input">
<ui-scroll-drop-down data="blade.fetchEmployees(criteria)"
ng-model="blade.currentEntity.employeeId"
placeholder="'orders.blades.filter-detail.placeholders.all'">
</ui-scroll-drop-down>
</div>
</script>

<script type="text/ng-template" id="filter-withPrototypes.html">
<div class="form-group">
<div class="form-input">
<ui-scroll-drop-down data="blade.fetchEmployees(criteria)"
ng-model="blade.currentEntity.employeeId"
placeholder="'orders.blades.filter-detail.placeholders.all'">
</ui-scroll-drop-down>
<label class="form-label __switch">
<input type="checkbox" ng-model="blade.currentEntity.withPrototypes">
<span class="switch"></span>
</label>
</div>
</div>
</script>
5 changes: 5 additions & 0 deletions src/VirtoCommerce.OrdersModule.Web/Scripts/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,11 @@ angular.module(moduleName, [
name: 'employeeId',
title: "orders.blades.shipment-detail.labels.employee",
templateUrl: 'filter-employeeSelector.html'
},
{
name: 'withPrototypes',
title: "orders.blades.customerOrder-detail.labels.withPrototypes",
templateUrl: 'filter-withPrototypes.html'
}
]);

Expand Down
2 changes: 1 addition & 1 deletion src/VirtoCommerce.OrdersModule.Web/module.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<module>
<id>VirtoCommerce.Orders</id>
<version>3.409.0</version>
<version>3.410.0</version>
<version-tag />
<platformVersion>3.406.0</platformVersion>
<dependencies>
Expand Down

0 comments on commit 4b9f9f4

Please sign in to comment.