Skip to content

Commit

Permalink
Merge branch 'release/3.212.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Feb 13, 2023
2 parents b1195e7 + 8d1ad66 commit 5c26780
Show file tree
Hide file tree
Showing 7 changed files with 70 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.211.0</VersionPrefix>
<VersionPrefix>3.212.0</VersionPrefix>
<VersionSuffix>
</VersionSuffix>
<VersionSuffix Condition=" '$(VersionSuffix)' != '' AND '$(BuildNumber)' != '' ">$(VersionSuffix)-$(BuildNumber)</VersionSuffix>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ public async Task<IList<IndexDocument>> GetDocumentsAsync(IList<string> document
{
var document = new IndexDocument(productInventories.Key);
foreach (var inventory in productInventories)
{
{
if (inventory.IsAvailableOn(now))
{
document.Add(new IndexDocumentField("available_in", inventory.FulfillmentCenterId.ToLowerInvariant()) { IsRetrievable = true, IsFilterable = true, IsCollection = true });
document.Add(new IndexDocumentField("fulfillmentCenter_name", inventory.FulfillmentCenterName.ToLowerInvariant()) { IsRetrievable = true, IsFilterable = true, IsCollection = true });
document.Add(new IndexDocumentField("inStock_quantity", inventory.InStockQuantity) { IsRetrievable = true, IsFilterable = true, IsCollection = true });
}
else
{
document.Add(new IndexDocumentField("inStock_quantity", 0L) { IsRetrievable = true, IsFilterable = true, IsCollection = true });
}
result.Add(document);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using VirtoCommerce.InventoryModule.Core.Model.Search;
using VirtoCommerce.InventoryModule.Core.Services;
using VirtoCommerce.InventoryModule.Data.Caching;
using VirtoCommerce.InventoryModule.Data.Model;
using VirtoCommerce.InventoryModule.Data.Repositories;
using VirtoCommerce.Platform.Core.Caching;
using VirtoCommerce.Platform.Core.Common;
using Microsoft.Extensions.Caching.Memory;
using VirtoCommerce.Platform.Data.Infrastructure;
using Microsoft.EntityFrameworkCore;
using VirtoCommerce.InventoryModule.Data.Caching;

namespace VirtoCommerce.InventoryModule.Data.Services
{
Expand Down Expand Up @@ -45,10 +45,10 @@ public virtual Task<InventoryInfoSearchResult> SearchInventoriesAsync(InventoryS
result.TotalCount = await query.CountAsync();
if (criteria.Take > 0)
{
var ids = await query.AsNoTracking().OrderBySortInfos(sortInfos).ThenBy(x => x.Id)
var idQuery = query.AsNoTracking().OrderBySortInfos(sortInfos).ThenBy(x => x.Id)
.Select(x => x.Id)
.Skip(criteria.Skip).Take(criteria.Take)
.ToArrayAsync();
.Skip(criteria.Skip).Take(criteria.Take);
var ids = await idQuery.ToArrayAsync();

result.Results = (await _inventoryService.GetByIdsAsync(ids)).OrderBy(x => Array.IndexOf(ids, x.Id)).ToList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
"title": "Location",
"placeholder": "Please enter latitude and longitude",
"description": "Please use the following format: lat,long, e.g. 41.40338,2.17403, with no space after the comma separator."
},
"outerId": {
"title": "Outer ID",
"placeholder": "Please enter ID in an outer system",
"description": "Unique ID for connecting the fulfillment center with an outer system."
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
"title": "Местоположение",
"placeholder": "Введите широту и долготу",
"description": "Используйте следующий формат: широта,долгота, например 41.40338,2.17403, без пробела после запятой."
},
"outerId": {
"title": "ID во внешней системе",
"placeholder": "Введите ID во внешней системе",
"description": "Уникальный идентификатор для соотнесения центра доставки со внешней системой."
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,69 @@
<span class="table-descr">{{ 'inventory.blades.fulfillment-center-detail.description.name' | translate }}</span>
</div>
</div>
<div class="form-group">
<label class="form-label">{{ 'inventory.blades.fulfillment-center-detail.labels.description' | translate }}</label>
<div class="form-input" style="margin: 0">
<input id="fileUploader" type="file" multiple style="display: none;" uploader="fileUploader" nv-file-select />
<textarea class="form-control"
vc-uk-htmleditor placeholder="{{ 'inventory.blades.fulfillment-center-detail.placeholders.description' | translate }}"
ng-model="blade.currentEntity.description"
file-uploader="fileUploader"
id="descriptionEditor"></textarea>
<span class="table-descr">{{ 'inventory.blades.fulfillment-center-detail.description.description' | translate }}</span>

<div column-count="6" class="blade-gray-box">
<div class="columns clearfix">
<div class="column">
<div class="form-group">
<label class="form-label">{{ 'inventory.properties.geoPoint.title' | translate }}</label>
<div class="form-input">
<input ng-model="blade.currentEntity.geoLocation"
name="geoLocation"
ng-pattern="/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/"
placeholder="{{ 'inventory.properties.geoPoint.placeholder' | translate }}"
type="text">
<span class="table-descr">{{ 'catalog.properties.geoPoint.description' | translate }}</span>
</div>
</div>
</div>
<div class="column">
<div class="form-group">
<label class="form-label">{{ 'inventory.properties.outerId.title' | translate }}</label>
<div class="form-input">
<input ng-model="blade.currentEntity.outerId"
name="outerId"
placeholder="{{ 'inventory.properties.outerId.placeholder' | translate }}"
type="text">
<span class="table-descr">{{ 'inventory.properties.outerId.description' | translate }}</span>
</div>
</div>
</div>
</div>
</div>

<div class="form-group">
<va-widget-container group="fulfillmentCenterDetail" blade="blade" gridster-opts="{columns: 3}"></va-widget-container>
</div>

<div class="form-group">
<label class="form-label">{{ 'inventory.blades.fulfillment-center-detail.labels.short-description' | translate }}</label>
<div class="form-input" style="margin: 0">
<input id="fileUploader" type="file" multiple style="display: none;" uploader="fileUploader" nv-file-select />
<textarea class="form-control"
vc-uk-htmleditor placeholder="{{ 'inventory.blades.fulfillment-center-detail.placeholders.description' | translate }}"
style="height: 150px"
placeholder="{{ 'inventory.blades.fulfillment-center-detail.placeholders.description' | translate }}"
ng-model="blade.currentEntity.shortDescription"
file-uploader="fileUploader"
id="shortDescriptionEditor"></textarea>
<span class="table-descr">{{ 'inventory.blades.fulfillment-center-detail.description.short-description' | translate }}</span>
</div>
</div>

<div class="form-group">
<label class="form-label">{{ 'inventory.properties.geoPoint.title' | translate }}</label>
<div class="form-input">
<input ng-model="blade.currentEntity.geoLocation"
name="geoLocation"
ng-pattern="/^(\-?\d+(\.\d+)?),\s*(\-?\d+(\.\d+)?)$/"
placeholder="{{ 'inventory.properties.geoPoint.placeholder' | translate }}"
type="text">
<span class="table-descr">{{ 'catalog.properties.geoPoint.description' | translate }}</span>
<label class="form-label">{{ 'inventory.blades.fulfillment-center-detail.labels.description' | translate }}</label>
<div class="form-input" style="margin: 0">
<input id="fileUploader" type="file" multiple style="display: none;" uploader="fileUploader" nv-file-select />
<textarea class="form-control"
vc-uk-htmleditor placeholder="{{ 'inventory.blades.fulfillment-center-detail.placeholders.description' | translate }}"
ng-model="blade.currentEntity.description"
file-uploader="fileUploader"
id="descriptionEditor"></textarea>
<span class="table-descr">{{ 'inventory.blades.fulfillment-center-detail.description.description' | translate }}</span>
</div>
</div>

<va-metaform blade="blade" registered-inputs="blade.metaFields"></va-metaform>
</form>
<va-widget-container group="fulfillmentCenterDetail" blade="blade" gridster-opts="{columns: 3}"></va-widget-container>

</div>
</div>
</div>
6 changes: 3 additions & 3 deletions src/VirtoCommerce.InventoryModule.Web/module.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<id>VirtoCommerce.Inventory</id>
<version>3.211.0</version>
<version>3.212.0</version>
<version-tag />
<platformVersion>3.218.0</platformVersion>
<title>Inventory module</title>
Expand All @@ -28,4 +28,4 @@
<group>commerce</group>
</groups>
<useFullTypeNameInSwagger>false</useFullTypeNameInSwagger>
</module>
</module>

0 comments on commit 5c26780

Please sign in to comment.