othr
This commit is contained in:
26
src/modals/CreateProductModal/CreateProductModal.tsx
Normal file
26
src/modals/CreateProductModal/CreateProductModal.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import {ContextModalProps} from "@mantine/modals";
|
||||
import {Button, Text} from "@mantine/core";
|
||||
import {useForm} from "@mantine/form";
|
||||
|
||||
|
||||
const CreateProductModal = ({
|
||||
context,
|
||||
id,
|
||||
innerProps,
|
||||
}: ContextModalProps<{ clientId: number }>) => {
|
||||
const form = useForm({
|
||||
initialValues: {
|
||||
name: '',
|
||||
article: '',
|
||||
barcode: ''
|
||||
}
|
||||
})
|
||||
return (
|
||||
<>
|
||||
<Button fullWidth mt="md" onClick={() => context.closeModal(id)}>
|
||||
Close modal
|
||||
</Button>
|
||||
</>
|
||||
)
|
||||
};
|
||||
export default CreateProductModal;
|
||||
@@ -1,9 +1,11 @@
|
||||
import EnterDeadlineModal from "./EnterDeadlineModal/EnterDeadlineModal.tsx";
|
||||
import CreateServiceCategoryModal from "../pages/ServicesPage/modals/CreateServiceCategoryModal.tsx";
|
||||
import CreateServiceModal from "../pages/ServicesPage/modals/CreateServiceModal.tsx";
|
||||
import createProductModal from "./CreateProductModal/CreateProductModal.tsx";
|
||||
|
||||
export const modals = {
|
||||
enterDeadline: EnterDeadlineModal,
|
||||
createServiceCategory: CreateServiceCategoryModal,
|
||||
createService: CreateServiceModal
|
||||
createService: CreateServiceModal,
|
||||
createProduct: createProductModal
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user