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