summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-18 21:43:55 +0300
committereug-vs <eug-vs@keemail.me>2021-04-18 21:43:55 +0300
commita8f56532c9df74dd483aa360919422154442c911 (patch)
tree89c4ee43f030ebd0e6c4a8101f129b44e0133671
parent6627ec88b2a02b522511b85eb38d21225098cfad (diff)
downloadcommercel-ui-a8f56532c9df74dd483aa360919422154442c911.tar.gz
feat: add group to Products
-rw-r--r--src/services/products/ProductForm.tsx1
-rw-r--r--src/services/products/index.ts5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/services/products/ProductForm.tsx b/src/services/products/ProductForm.tsx
index 62f0e70..8b6099d 100644
--- a/src/services/products/ProductForm.tsx
+++ b/src/services/products/ProductForm.tsx
@@ -7,6 +7,7 @@ const ProductForm: React.FC = () => {
return (
<Form id="form">
<Input name="name" label="Название" />
+ <Input name="group" label="Категория" />
<Input name="price" type="number" label="Цена" />
</Form>
);
diff --git a/src/services/products/index.ts b/src/services/products/index.ts
index 2e9a714..73e6bbe 100644
--- a/src/services/products/index.ts
+++ b/src/services/products/index.ts
@@ -7,10 +7,13 @@ const service: ServiceParams<Product> = {
name: 'Товары',
nameSingular: 'Товар',
tableFields: [
+ { key: 'group', label: 'Категория' },
{ key: 'name', label: 'Название' },
- { key: 'price', label: 'Цена' },
{ key: 'quantity', label: 'На складе' },
],
+ filters: [
+ { key: 'group', label: 'Категория' },
+ ],
searchBy: ['name'],
default: {
name: '',