feat: factory article for product

This commit is contained in:
2025-01-19 19:44:41 +04:00
parent 0948a1da4a
commit c5bf21efda
7 changed files with 25 additions and 3 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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,
},
],
[]

View File

@@ -70,6 +70,11 @@ const CreateProductModal = ({
label={"Артикул"}
{...form.getInputProps("article")}
/>
<TextInput
placeholder={"Введите складской артикул"}
label={"Складской артикул"}
{...form.getInputProps("factoryArticle")}
/>
<TagsInput
placeholder={
!form.values.barcodes.length