summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-17 14:55:08 +0300
committereug-vs <eug-vs@keemail.me>2021-04-17 14:55:08 +0300
commite371759af6c218f18edc7a7dca8ba7b55cc367fb (patch)
tree1561efd44de6f015ef54edd66884e65463160aa8 /src/services
parent1bf07892f2cd8007f48469c42fa9fcc84d5ef435 (diff)
downloadcommercel-ui-e371759af6c218f18edc7a7dca8ba7b55cc367fb.tar.gz
feat: initialize filters based on query string
Diffstat (limited to 'src/services')
-rw-r--r--src/services/transfers/index.ts5
-rw-r--r--src/services/waybills/index.ts6
2 files changed, 9 insertions, 2 deletions
diff --git a/src/services/transfers/index.ts b/src/services/transfers/index.ts
index 3feb6e2..de75d53 100644
--- a/src/services/transfers/index.ts
+++ b/src/services/transfers/index.ts
@@ -15,7 +15,10 @@ const service: ServiceParams<Transfer> = {
{ key: 'operation', label: 'Операция', transform: transformOperation },
{ key: 'amount', label: 'Сумма' },
],
- filters: ['operation', 'contractor.name'],
+ filters: [
+ { key: 'operation', label: 'Операция', transform: transformOperation },
+ { key: 'contractor._id', label: 'Контрагент', as: 'contractor.name' },
+ ],
actions: [
{
name: 'Загрузить выписку',
diff --git a/src/services/waybills/index.ts b/src/services/waybills/index.ts
index ae1c8d3..08f43fc 100644
--- a/src/services/waybills/index.ts
+++ b/src/services/waybills/index.ts
@@ -14,7 +14,11 @@ const service: ServiceParams<Waybill> = {
{ key: 'total', label: 'Сумма' },
{ key: 'contractor.name', label: 'Контрагент' },
],
- filters: ['status', 'operation', 'contractor.name'],
+ filters: [
+ { key: 'status', label: 'Статус', transform: transformStatus },
+ { key: 'operation', label: 'Операция', transform: transformOperation },
+ { key: 'contractor._id', label: 'Контрагент', as: 'contractor.name' },
+ ],
default: {
operation: 'in',
records: [],