IO-1531 CC Contract add to production.

This commit is contained in:
Patrick Fic
2021-11-17 20:18:21 -08:00
parent 69690f0184
commit 5540872f62
3 changed files with 48 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import { Button, Col, PageHeader, Row } from "antd";
import { Button, Col, PageHeader, Row, Space, Form, Switch } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import ContractCarsContainer from "../../components/contract-cars/contract-cars.container";
@@ -13,14 +14,25 @@ export default function ContractCreatePageComponent({
const { t } = useTranslation();
const CreateButton = (
<Button
disabled={!selectedJobState[0] || !selectedCarState[0]}
type="primary"
onClick={() => form.submit()}
loading={loading}
>
{t("general.actions.create")}
</Button>
<Space size="large">
{selectedJobState[0] && selectedCarState[0] && (
<Form.Item
label={t("jobs.actions.addtoproduction")}
name="addtoproduction"
valuePropName="checked"
>
<Switch />
</Form.Item>
)}
<Button
disabled={!selectedJobState[0] || !selectedCarState[0]}
type="primary"
onClick={() => form.submit()}
loading={loading}
>
{t("general.actions.create")}
</Button>
</Space>
);
return (