From 10f4261eebba392616bbeb5b41ff3fbc947a08fc Mon Sep 17 00:00:00 2001 From: Ihor Brazhnichenko Date: Wed, 9 Nov 2022 13:23:33 +0200 Subject: [PATCH] #23 Add pagination for operations --- app/sections/credit_offers/credit_offer.html | 2 ++ app/sections/dashboard/dashboard.html | 5 +++- .../operations/operations-table.directive.js | 25 ++++++++++++++----- app/sections/operations/operations.html | 5 +++- app/sections/operations/operations.service.js | 2 +- app/sections/pools/pool.html | 2 ++ 6 files changed, 32 insertions(+), 9 deletions(-) diff --git a/app/sections/credit_offers/credit_offer.html b/app/sections/credit_offers/credit_offer.html index 5635d7b..2ce881f 100644 --- a/app/sections/credit_offers/credit_offer.html +++ b/app/sections/credit_offers/credit_offer.html @@ -40,6 +40,8 @@ group-by-credit-offer-id="credit_offer_id" filter-by-asset-id-enabled="false" show-filters="showFilters" + default-date-from="now-1y" + filters-date-from="now-1y" /> diff --git a/app/sections/dashboard/dashboard.html b/app/sections/dashboard/dashboard.html index 0ee287a..c03d7fc 100644 --- a/app/sections/dashboard/dashboard.html +++ b/app/sections/dashboard/dashboard.html @@ -143,7 +143,10 @@ - + diff --git a/app/sections/operations/operations-table.directive.js b/app/sections/operations/operations-table.directive.js index ba0f2d6..f38cc66 100644 --- a/app/sections/operations/operations-table.directive.js +++ b/app/sections/operations/operations-table.directive.js @@ -31,12 +31,13 @@ This show/hide filtering fields for the user to filter all operations by account _ _ _ _ _ _ _ _ | Date From | - - - - - - - - -Use this field to optimize ES search by date limits +Use this fields to optimize ES search by date limits // By default: now-1M (Example) - + this is a date-from which applies when no filters + this is a date-from which applies when any filter defined by the user _ _ _ _ _ _ _ _ _ | Show filters | @@ -63,7 +64,8 @@ Use this field show / hide user filters groupByAccountId: '=', groupByCreditOfferId: '=', groupByPoolId: '=', - dateFrom: "@", + defaultDateFrom: "@", + filtersDateFrom: "@", filterByAccountIdEnabled: '=', filterByAssetIdEnabled: '=', filterByOperationTypeEnabled: '=', @@ -74,6 +76,10 @@ Use this field show / hide user filters function operationsTableController($scope, $filter, Notify, OperationsService, utilities) { + function filtersDefined() { + return $scope.filters.operationType !== '-1' || $scope.filters.accountIdOrName || $scope.filters.assetIdOrName; + } + // list of values for filter by operation type