summaryrefslogtreecommitdiff
path: root/src/services.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services.js')
-rw-r--r--src/services.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/services.js b/src/services.js
index b9c2ecf..bebf07f 100644
--- a/src/services.js
+++ b/src/services.js
@@ -1,5 +1,17 @@
import { ServiceParams } from './containers/Service/ServiceContext';
+
+const waybillStatusNames = {
+ waiting: 'Ожидание',
+ executed: 'Проведена',
+ cancelled: 'Отменена',
+};
+
+const operationNames = {
+ in: 'Приход',
+ out: 'Расход',
+};
+
const services: ServiceParams[] = [
{
route: 'products',
@@ -36,10 +48,10 @@ const services: ServiceParams[] = [
name: 'Накладные',
nameSingular: 'Накладная',
tableFields: [
- { key: 'operation', label: 'Операция' },
+ { key: 'operation', label: 'Операция', transform: op => operationNames[op] },
{ key: 'product.name', label: 'Товар' },
{ key: 'contractor.name', label: 'Поставщик' },
- { key: 'status', label: 'Статус' },
+ { key: 'status', label: 'Статус', transform: status => waybillStatusNames[status] },
{ key: 'quantity', label: 'Количество' },
],
default: {