feat: temp barcode templates
This commit is contained in:
@@ -34,7 +34,13 @@ export const useProductsTableColumns = () => {
|
||||
|
||||
</List>
|
||||
)
|
||||
}
|
||||
},
|
||||
enableSorting: false,
|
||||
},
|
||||
{
|
||||
accessorKey: "barcodeTemplate.name",
|
||||
header: "Шаблон штрихкода",
|
||||
enableSorting: false,
|
||||
}
|
||||
], []);
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import {Button, Flex, rem, TagsInput, TextInput} from "@mantine/core";
|
||||
import {useForm} from "@mantine/form";
|
||||
import {BaseProduct, CreateProductRequest} from "../../types.ts";
|
||||
import {ProductSchema} from "../../../../client";
|
||||
import BarcodeTemplateSelect from "../../../../components/Selects/BarcodeTemplateSelect/BarcodeTemplateSelect.tsx";
|
||||
|
||||
type CreateProps = {
|
||||
clientId: number;
|
||||
@@ -26,7 +27,8 @@ const CreateProductModal = ({
|
||||
const initialValues = isEditProps ? {
|
||||
name: innerProps.product.name,
|
||||
article: innerProps.product.article,
|
||||
barcodes: innerProps.product.barcodes
|
||||
barcodes: innerProps.product.barcodes,
|
||||
barcodeTemplate: innerProps.product.barcodeTemplate
|
||||
} : {
|
||||
name: '',
|
||||
article: '',
|
||||
@@ -69,6 +71,11 @@ const CreateProductModal = ({
|
||||
label={"Штрихкоды"}
|
||||
{...form.getInputProps('barcodes')}
|
||||
/>
|
||||
<BarcodeTemplateSelect
|
||||
placeholder={"Выберите шаблон штрихкода"}
|
||||
label={"Шаблон штрихкода"}
|
||||
{...form.getInputProps('barcodeTemplate')}
|
||||
/>
|
||||
<Flex justify={"flex-end"} mt={rem(5)} gap={rem(10)}>
|
||||
<Button onClick={() => onCancelClick()} variant={"subtle"}>Отменить</Button>
|
||||
{isEditProps ?
|
||||
|
||||
Reference in New Issue
Block a user