diff --git a/client/src/App.tsx b/client/src/App.tsx
index 18cd939..e76bca3 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -106,6 +106,7 @@ function App() {
name: "vendor",
list: "/vendor",
create: "/vendor/create",
+ clone: "/vendor/clone/:id",
edit: "/vendor/edit/:id",
show: "/vendor/show/:id",
meta: {
@@ -173,7 +174,14 @@ function App() {
} />
- } />
+ }
+ />
+ }
+ />
} />
} />
diff --git a/client/src/pages/vendors/create.tsx b/client/src/pages/vendors/create.tsx
index 1121f60..7073c2f 100644
--- a/client/src/pages/vendors/create.tsx
+++ b/client/src/pages/vendors/create.tsx
@@ -4,11 +4,21 @@ import { Create, useForm } from "@refinedev/antd";
import { Form, Input } from "antd";
import TextArea from "antd/es/input/TextArea";
-export const VendorCreate: React.FC = () => {
- const { formProps, saveButtonProps } = useForm();
+interface CreateOrCloneProps {
+ mode: "create" | "clone";
+}
+
+export const VendorCreate: React.FC<
+ IResourceComponentsProps & CreateOrCloneProps
+> = (props) => {
+ const { formProps, saveButtonProps, formLoading } = useForm();
return (
-
+
= () => {
dataIndex="actions"
render={(_, record: BaseRecord) => (
-
-
+
+
+
)}
/>