feat: article is not required now

This commit is contained in:
2024-05-21 13:49:22 +03:00
parent dea4ae6625
commit a21807c5a6
4 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
import type { BarcodeTemplateSchema } from './BarcodeTemplateSchema';
export type ProductCreateRequest = {
name: string;
article: string;
article?: (string | null);
clientId: number;
barcodes: Array<string>;
barcodeTemplate?: (BarcodeTemplateSchema | null);

View File

@@ -5,7 +5,7 @@
import type { BarcodeTemplateSchema } from './BarcodeTemplateSchema';
export type ProductSchema = {
name: string;
article: string;
article?: (string | null);
clientId: number;
barcodes: Array<string>;
barcodeTemplate?: (BarcodeTemplateSchema | null);

View File

@@ -33,7 +33,7 @@ const CreateProductModal = ({
initialValues: initialValues,
validate: {
name: (name) => name.trim() !== '' ? null : "Необходимо ввести название товара",
article: (article) => article.trim() !== '' ? null : "Необходимо ввести артикул",
// article: (article) => article.trim() !== '' ? null : "Необходимо ввести артикул",
}
})
const onCancelClick = () => {

View File

@@ -1,6 +1,6 @@
export type BaseProduct = {
name: string;
article: string;
article?: string | null;
barcodes: string[];
}
export type CreateProductRequest = BaseProduct & { clientId: number }