Skip to content

Commit

Permalink
VCST-156: send current criteria to order list parent refresh function (
Browse files Browse the repository at this point in the history
…#396)

Co-authored-by: AlexTzykin <[email protected]>
  • Loading branch information
ksavosteev and AlexTzykin authored Jan 17, 2024
1 parent fbc9d4b commit 02998a7
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ function ($rootScope, $scope, $localStorage, customerOrders, bladeUtils, dialogS
});

blade.refresh = function () {
var criteria = {
responseGroup: "WithPrices",
keyword: filter.keyword,
sort: uiGridHelper.getSortExpression($scope),
skip: ($scope.pageSettings.currentPage - 1) * $scope.pageSettings.itemsPerPageCount,
take: $scope.pageSettings.itemsPerPageCount
};

if (angular.isFunction(blade.refreshCallback)) {
blade.isLoading = true;

var result = blade.refreshCallback(blade);
var result = blade.refreshCallback(blade, criteria);

if (angular.isDefined(result.$promise)) {
result.$promise.then(function (data) {
Expand All @@ -55,13 +63,6 @@ function ($rootScope, $scope, $localStorage, customerOrders, bladeUtils, dialogS
blade.isLoading = false;
} else {
blade.isLoading = true;
var criteria = {
responseGroup: "WithPrices",
keyword: filter.keyword,
sort: uiGridHelper.getSortExpression($scope),
skip: ($scope.pageSettings.currentPage - 1) * $scope.pageSettings.itemsPerPageCount,
take: $scope.pageSettings.itemsPerPageCount
};

if (blade.searchCriteria) {
angular.extend(criteria, blade.searchCriteria);
Expand Down

0 comments on commit 02998a7

Please sign in to comment.