Skip to content

Commit

Permalink
Merge branch 'release/3.812.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
vc-ci committed Apr 9, 2024
2 parents 7ab6da7 + 0cb51ff commit 5f355a7
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 23 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.811.0</VersionPrefix>
<VersionPrefix>3.812.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 @@ -137,7 +137,7 @@ protected virtual IList<IFilter> GetPermanentFilters(CustomerOrderSearchCriteria

if (criteria.StartDate.HasValue && criteria.EndDate.HasValue)
{
result.Add(FilterHelper.CreateDateRangeFilter("createddate", criteria.StartDate, null, true, true));
result.Add(FilterHelper.CreateDateRangeFilter("createddate", criteria.StartDate, criteria.EndDate, true, true));
}
else if (criteria.StartDate.HasValue)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
"labels": {
"new-filter": "Neuen Filter hinzufügen",
"unnamed-filter": "Unbenannter Filter",
"today-filter": "Heute",
"last-day-filter": "Gestern",
"last-week-filter": "Letzte Woche",
"last-month-filter": "Letzter Monat",
"last-year-filter": "Letztes Jahr",
"number": "Bestellnummer",
"customer": "Kunde",
"confirmed": "Bestätigt",
Expand All @@ -68,8 +73,8 @@
"name": "Name des Filters",
"name_": "Wie werden Sie diesen Filter?",
"criteria": "Filterkriterien",
"from": "Erstellt von",
"to": "Bis erstellt"
"from": "Erstellt am oder nach",
"to": "Erstellt vor"
},
"placeholders": {
"all": "Nicht angegeben"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
"labels": {
"new-filter": "Add new filter",
"unnamed-filter": "Unnamed filter",
"last-day-filter": "Last 24 hours",
"today-filter": "Today",
"last-day-filter": "Yesterday",
"last-week-filter": "Last week",
"last-month-filter": "Last month",
"last-year-filter": "Last year",
Expand All @@ -74,8 +75,8 @@
"name": "Filter name",
"name_": "Please give this filter a name",
"criteria": "Filter criteria",
"from": "Created at",
"to": "Valid until"
"from": "Created after",
"to": "Created before"
},
"placeholders": {
"all": "Not specified"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"labels": {
"new-filter": "Добавить новый фильтр",
"unnamed-filter": "Фильтр по умолчанию",
"today-filter": "Сегодня",
"last-day-filter": "Вчера",
"last-week-filter": "Прошлая неделч",
"last-month-filter": "Прошлый месяц",
"last-year-filter": "Прошлый год",
"number": "Номер заказа",
"customer": "Покупатель",
"confirmed": "Подтвержден",
Expand All @@ -69,8 +74,8 @@
"name": "Название фильтра",
"name_": "Как Вы назовете этот фильтр?",
"criteria": "Критерии фильтра",
"from": "Действует с",
"to": "Действует до"
"from": "Создано с",
"to": "Создано до"
},
"placeholders": {
"all": "Не определено"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,36 +246,64 @@ function ($rootScope, $scope, $localStorage, customerOrders, bladeUtils, dialogS

function buildPredefinedFilters() {
var currentDate = new Date();
var day = 24 * 60 * 60 * 1000;
var days7 = 7 * day;
var days30 = 30 * day;
var days365 = 365 * day;
var currentDateUtcString = currentDate.toISOString();
currentDate.setHours(0, 0, 0, 0);

const lastDayStartDate = new Date(currentDate);
lastDayStartDate.setDate(currentDate.getDate() - 1);

const lastWeekStartDate = new Date(currentDate);
lastWeekStartDate.setDate(currentDate.getDate() - currentDate.getDay() - 6);

const lastWeekEndDate = new Date(currentDate);
lastWeekEndDate.setDate(currentDate.getDate() - currentDate.getDay() + 1);

const lastMonthStartDate = new Date(currentDate);
lastMonthStartDate.setMonth(currentDate.getMonth() - 1);
lastMonthStartDate.setDate(1);

const lastMonthEndDate = new Date(currentDate);
lastMonthEndDate.setDate(1);

const lastYearStartDate = new Date(currentDate);
lastYearStartDate.setFullYear(currentDate.getFullYear() - 1);
lastYearStartDate.setMonth(0);
lastYearStartDate.setDate(1);

const lastYearEndDate = new Date(currentDate);
lastYearEndDate.setFullYear(currentDate.getFullYear());
lastYearEndDate.setMonth(0);
lastYearEndDate.setDate(1);


return [
{
name: 'orders.blades.customerOrder-list.labels.today-filter',
id: 'today',
startDate: currentDate.toISOString()
},
{
name: 'orders.blades.customerOrder-list.labels.last-day-filter',
id: 'last-day',
startDate: new Date(currentDate.getTime() - day).toISOString(),
endDate: currentDateUtcString
startDate: lastDayStartDate.toISOString(),
endDate: currentDate.toISOString()
},
{
name: 'orders.blades.customerOrder-list.labels.last-week-filter',
id: 'last-week',
startDate: new Date(currentDate.getTime() - days7).toISOString(),
endDate: currentDateUtcString
startDate: lastWeekStartDate.toISOString(),
endDate: lastWeekEndDate.toISOString()
},
{
name: 'orders.blades.customerOrder-list.labels.last-month-filter',
id: 'last-month',
startDate: new Date(currentDate.getTime() - days30).toISOString(),
endDate: currentDateUtcString
startDate: lastMonthStartDate.toISOString(),
endDate: lastMonthEndDate.toISOString()
},
{
name: 'orders.blades.customerOrder-list.labels.last-year-filter',
id: 'last-year',
startDate: new Date(currentDate.getTime() - days365).toISOString(),
endDate: currentDateUtcString
startDate: lastYearStartDate.toISOString(),
endDate: lastYearEndDate.toISOString()
}
];
}
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.811.0</version>
<version>3.812.0</version>
<version-tag />
<platformVersion>3.800.0</platformVersion>
<dependencies>
Expand Down

0 comments on commit 5f355a7

Please sign in to comment.