courtesycars-create
false
diff --git a/client/package.json b/client/package.json
index 291097304..817621cd2 100644
--- a/client/package.json
+++ b/client/package.json
@@ -8,6 +8,7 @@
"@ckeditor/ckeditor5-react": "^2.1.0",
"@nivo/pie": "^0.61.1",
"@tanem/react-nprogress": "^3.0.19",
+ "aamva": "^1.2.0",
"antd": "^4.0.4",
"apollo-boost": "^0.4.4",
"apollo-link-context": "^1.0.19",
diff --git a/client/src/components/contract-form/contract-form.component.jsx b/client/src/components/contract-form/contract-form.component.jsx
new file mode 100644
index 000000000..7f8fdb73f
--- /dev/null
+++ b/client/src/components/contract-form/contract-form.component.jsx
@@ -0,0 +1,287 @@
+import React, { useState } from "react";
+import { useTranslation } from "react-i18next";
+import { Form, Input, DatePicker, InputNumber, Button } from "antd";
+import aamva from "aamva";
+
+export default function ContractFormComponent() {
+ const [state, setState] = useState("");
+ const { t } = useTranslation();
+ return (
+
+ setState(e.target.value)} />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/client/src/pages/contract-create/contract-create.page.component.jsx b/client/src/pages/contract-create/contract-create.page.component.jsx
new file mode 100644
index 000000000..750ac7793
--- /dev/null
+++ b/client/src/pages/contract-create/contract-create.page.component.jsx
@@ -0,0 +1,10 @@
+import React from "react";
+import ContractFormComponent from "../../components/contract-form/contract-form.component";
+
+export default function ContractCreatePageComponent() {
+ return (
+
+
+
+ );
+}
diff --git a/client/src/pages/contract-create/contract-create.page.container.jsx b/client/src/pages/contract-create/contract-create.page.container.jsx
new file mode 100644
index 000000000..2947e7f59
--- /dev/null
+++ b/client/src/pages/contract-create/contract-create.page.container.jsx
@@ -0,0 +1,38 @@
+import React, { useEffect } from "react";
+
+import ContractCreatePageComponent from "./contract-create.page.component";
+import { connect } from "react-redux";
+import { createStructuredSelector } from "reselect";
+import { selectBodyshop } from "../../redux/user/user.selectors";
+import { Form, notification } from "antd";
+import { useTranslation } from "react-i18next";
+
+const mapStateToProps = createStructuredSelector({
+ bodyshop: selectBodyshop
+});
+
+export function ContractCreatePageContainer({ bodyshop }) {
+ const [form] = Form.useForm();
+ const { t } = useTranslation();
+
+ const handleFinish = values => {
+ // insertCourtesyCar({
+ // variables: { courtesycar: { ...values, bodyshopid: bodyshop.id } }
+ // })
+ // .then(response => {
+ notification["success"]({ message: t("courtesycars.successes.saved") });
+ // })
+ // .catch(error => console.log("error", error));
+ };
+
+ useEffect(() => {
+ document.title = t("titles.contracts-create");
+ }, [t]);
+
+ return (
+
+ );
+}
+export default connect(mapStateToProps, null)(ContractCreatePageContainer);
diff --git a/client/src/pages/courtesy-car-create/courtesy-car-create.page.component.jsx b/client/src/pages/courtesy-car-create/courtesy-car-create.page.component.jsx
index a9c15e7d3..4f5b8b75a 100644
--- a/client/src/pages/courtesy-car-create/courtesy-car-create.page.component.jsx
+++ b/client/src/pages/courtesy-car-create/courtesy-car-create.page.component.jsx
@@ -1,6 +1,6 @@
import React from "react";
-import CourtesyCarCreateFormComponent from "../../components/courtesy-car-form/courtesy-car-form.component"
+import CourtesyCarFormComponent from "../../components/courtesy-car-form/courtesy-car-form.component"
export default function CourtesyCarCreateComponent() {
- return ;
+ return ;
}
diff --git a/client/src/pages/manage/manage.page.component.jsx b/client/src/pages/manage/manage.page.component.jsx
index 842e03150..0175ea813 100644
--- a/client/src/pages/manage/manage.page.component.jsx
+++ b/client/src/pages/manage/manage.page.component.jsx
@@ -55,6 +55,9 @@ const CourtesyCarDetailContainer = lazy(() =>
const CourtesyCarsPage = lazy(() =>
import("../courtesy-cars/courtesy-cars.page.container")
);
+const ContractCreatePage = lazy(() =>
+ import("../contract-create/contract-create.page.container")
+);
const { Header, Content, Footer } = Layout;
@@ -117,7 +120,7 @@ export default function Manage({ match }) {
new cc contract
}
+ component={ContractCreatePage}
/>