feat: article is not required now
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type BaseProduct = {
|
||||
name: string;
|
||||
article: string;
|
||||
article?: string | null;
|
||||
barcodes: string[];
|
||||
}
|
||||
export type CreateProductRequest = BaseProduct & { clientId: number }
|
||||
Reference in New Issue
Block a user