feat: factory article for product
This commit is contained in:
@@ -7,6 +7,7 @@ import type { ProductImageSchema } from './ProductImageSchema';
|
||||
export type ProductCreateRequest = {
|
||||
name: string;
|
||||
article?: (string | null);
|
||||
factoryArticle?: (string | null);
|
||||
clientId: number;
|
||||
barcodes: Array<string>;
|
||||
barcodeTemplate?: (BarcodeTemplateSchema | null);
|
||||
|
||||
@@ -7,6 +7,7 @@ import type { ProductImageSchema } from './ProductImageSchema';
|
||||
export type ProductSchema = {
|
||||
name: string;
|
||||
article?: (string | null);
|
||||
factoryArticle?: (string | null);
|
||||
clientId: number;
|
||||
barcodes: Array<string>;
|
||||
barcodeTemplate?: (BarcodeTemplateSchema | null);
|
||||
|
||||
@@ -9,7 +9,7 @@ export type UserCreate = {
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
secondName: string;
|
||||
patronymic: string;
|
||||
patronymic?: string;
|
||||
comment: string;
|
||||
passportData?: (string | null);
|
||||
isAdmin: boolean;
|
||||
|
||||
@@ -12,7 +12,7 @@ export type UserSchema = {
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
secondName: string;
|
||||
patronymic: string;
|
||||
patronymic?: string;
|
||||
comment: string;
|
||||
passportData?: (string | null);
|
||||
isAdmin: boolean;
|
||||
|
||||
@@ -9,7 +9,7 @@ export type UserUpdate = {
|
||||
phoneNumber?: (string | null);
|
||||
firstName: string;
|
||||
secondName: string;
|
||||
patronymic: string;
|
||||
patronymic?: string;
|
||||
comment: string;
|
||||
passportData?: (string | null);
|
||||
isAdmin: boolean;
|
||||
|
||||
@@ -11,11 +11,19 @@ export const useProductsTableColumns = () => {
|
||||
accessorKey: "article",
|
||||
header: "Артикул",
|
||||
enableSorting: false,
|
||||
size: 100,
|
||||
},
|
||||
{
|
||||
accessorKey: "factoryArticle",
|
||||
header: "Складской артикул",
|
||||
enableSorting: false,
|
||||
size: 100,
|
||||
},
|
||||
{
|
||||
accessorKey: "name",
|
||||
header: "Название",
|
||||
enableSorting: false,
|
||||
size: 150,
|
||||
},
|
||||
{
|
||||
accessorKey: "barcodes",
|
||||
@@ -39,36 +47,43 @@ export const useProductsTableColumns = () => {
|
||||
);
|
||||
},
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "barcodeTemplate.name",
|
||||
header: "Шаблон штрихкода",
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "brand",
|
||||
header: "Бренд",
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "composition",
|
||||
header: "Состав",
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "color",
|
||||
header: "Цвет",
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "size",
|
||||
header: "Размер",
|
||||
enableSorting: false,
|
||||
size: 50,
|
||||
},
|
||||
{
|
||||
accessorKey: "additionalInfo",
|
||||
header: "Доп. информация",
|
||||
enableSorting: false,
|
||||
size: 120,
|
||||
},
|
||||
],
|
||||
[]
|
||||
|
||||
@@ -70,6 +70,11 @@ const CreateProductModal = ({
|
||||
label={"Артикул"}
|
||||
{...form.getInputProps("article")}
|
||||
/>
|
||||
<TextInput
|
||||
placeholder={"Введите складской артикул"}
|
||||
label={"Складской артикул"}
|
||||
{...form.getInputProps("factoryArticle")}
|
||||
/>
|
||||
<TagsInput
|
||||
placeholder={
|
||||
!form.values.barcodes.length
|
||||
|
||||
Reference in New Issue
Block a user