summaryrefslogtreecommitdiff
path: root/src/services/products/index.ts
blob: 73e6bbe8777633e2938cdde1fd4f68cf20396174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Form from './ProductForm';
import { ServiceParams } from '../../lib/ServiceContext';
import { Product } from '../types';

const service: ServiceParams<Product> = {
  route: 'products',
  name: 'Товары',
  nameSingular: 'Товар',
  tableFields: [
    { key: 'group', label: 'Категория' },
    { key: 'name', label: 'Название' },
    { key: 'quantity', label: 'На складе' },
  ],
  filters: [
    { key: 'group', label: 'Категория' },
  ],
  searchBy: ['name'],
  default: {
    name: '',
    price: 0,
    quantity: 0,
  },
  Form,
};

export default service;