This commit is contained in:
2024-05-09 01:32:05 +03:00
parent 90802acc56
commit 8ff16e687f
14 changed files with 171 additions and 38 deletions

View File

@@ -3,6 +3,7 @@ import {Fieldset, TextInput} from "@mantine/core";
import {useForm} from "@mantine/form";
import {ClientSchema} from "../../../../client";
import BaseFormModal, {CreateEditFormProps} from "../BaseFormModal/BaseFormModal.tsx";
import BarcodeTemplateSelect from "../../../../components/Selects/BarcodeTemplateSelect/BarcodeTemplateSelect.tsx";
type Props = CreateEditFormProps<ClientSchema>;
@@ -22,7 +23,8 @@ const ClientFormModal = ({
phoneNumber: innerProps.element.details?.phoneNumber,
email: innerProps.element.details?.email,
inn: innerProps.element.details?.inn
}
},
barcodeTemplate: innerProps.element.barcodeTemplate
} : {
id: -1,
name: '',
@@ -89,6 +91,13 @@ const ClientFormModal = ({
{...form.getInputProps('details.inn')}
/>
</Fieldset>
<Fieldset legend={'Настройки'}>
<BarcodeTemplateSelect
label={'Шаблон штрихкодов'}
placeholder={'Выберите шаблон штрихкодов'}
{...form.getInputProps('barcodeTemplate')}
/>
</Fieldset>
</>
</BaseFormModal.Body>