IO-233 CDK Updates.
This commit is contained in:
@@ -48,7 +48,7 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
<Modal
|
<Modal
|
||||||
width={"90%"}
|
width={"90%"}
|
||||||
visible={visible}
|
visible={visible}
|
||||||
@@ -100,6 +100,6 @@ export function DmsCdkVehicles({ bodyshop, form, socket, job }) {
|
|||||||
>
|
>
|
||||||
{t("jobs.actions.dms.findmakemodelcode")}
|
{t("jobs.actions.dms.findmakemodelcode")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,12 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import {
|
||||||
|
selectBodyshop,
|
||||||
|
selectCurrentUser,
|
||||||
|
} from "../../redux/user/user.selectors";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
currentUser: selectCurrentUser,
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
@@ -14,9 +17,12 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
});
|
});
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
|
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakesRefetch);
|
||||||
|
|
||||||
export function DmsCdkMakesRefetch({ bodyshop, form, socket }) {
|
export function DmsCdkMakesRefetch({ currentUser, bodyshop, form, socket }) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
if (!currentUser.email.includes("@imex.")) return null;
|
||||||
|
|
||||||
const handleRefetch = async () => {
|
const handleRefetch = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
await axios.post("/cdk/getvehicles", {
|
await axios.post("/cdk/getvehicles", {
|
||||||
|
|||||||
@@ -122,33 +122,36 @@ export function DmsPostForm({ bodyshop, socket, job }) {
|
|||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
|
|
||||||
{bodyshop.cdk_dealerid && (
|
{bodyshop.cdk_dealerid && (
|
||||||
<LayoutFormRow style={{ justifyContent: "center" }} grow>
|
<div>
|
||||||
<Form.Item
|
<LayoutFormRow style={{ justifyContent: "center" }} grow>
|
||||||
name="dms_make"
|
<Form.Item
|
||||||
label={t("jobs.fields.dms.dms_make")}
|
name="dms_make"
|
||||||
rules={[
|
label={t("jobs.fields.dms.dms_make")}
|
||||||
{
|
rules={[
|
||||||
required: true,
|
{
|
||||||
},
|
required: true,
|
||||||
]}
|
},
|
||||||
>
|
]}
|
||||||
<Input disabled />
|
>
|
||||||
</Form.Item>
|
<Input disabled />
|
||||||
<Form.Item
|
</Form.Item>
|
||||||
name="dms_model"
|
<Form.Item
|
||||||
label={t("jobs.fields.dms.dms_model")}
|
name="dms_model"
|
||||||
rules={[
|
label={t("jobs.fields.dms.dms_model")}
|
||||||
{
|
rules={[
|
||||||
required: true,
|
{
|
||||||
},
|
required: true,
|
||||||
]}
|
},
|
||||||
>
|
]}
|
||||||
<Input disabled />
|
>
|
||||||
</Form.Item>
|
<Input disabled />
|
||||||
|
</Form.Item>
|
||||||
<DmsCdkMakes form={form} socket={socket} job={job} />
|
</LayoutFormRow>
|
||||||
<DmsCdkMakesRefetch />
|
<Space>
|
||||||
</LayoutFormRow>
|
<DmsCdkMakes form={form} socket={socket} job={job} />
|
||||||
|
<DmsCdkMakesRefetch />
|
||||||
|
</Space>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="story"
|
name="story"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
import { DeleteFilled, WarningFilled } from "@ant-design/icons";
|
||||||
|
import { useTreatments, useClient } from "@splitsoftware/splitio-react";
|
||||||
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
import { Divider, Form, Input, InputNumber, Radio, Space, Tag } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -8,7 +9,22 @@ import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.c
|
|||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||||
|
|
||||||
export default function PartsOrderModalComponent({
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
const mapStateToProps = createStructuredSelector({
|
||||||
|
bodyshop: selectBodyshop,
|
||||||
|
});
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
|
});
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(PartsOrderModalComponent);
|
||||||
|
|
||||||
|
export function PartsOrderModalComponent({
|
||||||
|
bodyshop,
|
||||||
vendorList,
|
vendorList,
|
||||||
sendTypeState,
|
sendTypeState,
|
||||||
isReturn,
|
isReturn,
|
||||||
@@ -16,7 +32,11 @@ export default function PartsOrderModalComponent({
|
|||||||
job,
|
job,
|
||||||
}) {
|
}) {
|
||||||
const [sendType, setSendType] = sendTypeState;
|
const [sendType, setSendType] = sendTypeState;
|
||||||
|
const { OEConnection } = useTreatments(
|
||||||
|
["OEConnection"],
|
||||||
|
{},
|
||||||
|
bodyshop.imexshopid
|
||||||
|
);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -164,7 +184,9 @@ export default function PartsOrderModalComponent({
|
|||||||
<Radio value={"none"}>{t("general.labels.none")}</Radio>
|
<Radio value={"none"}>{t("general.labels.none")}</Radio>
|
||||||
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
|
||||||
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
|
||||||
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
|
{OEConnection.treatment === "on" && (
|
||||||
|
<Radio value={"oec"}>{t("parts_orders.labels.oec")}</Radio>
|
||||||
|
)}
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={10}>
|
<Col md={24} lg={10}>
|
||||||
<DmsAllocationsSummary
|
<DmsAllocationsSummary
|
||||||
title={`${data && data.jobs_by_pk && data.jobs_by_pk.ro_number} | ${
|
title={`${data && data.jobs_by_pk && data.jobs_by_pk.ro_number} | ${
|
||||||
data.jobs_by_pk.ownr_fn || ""
|
data.jobs_by_pk.ownr_fn || ""
|
||||||
@@ -143,7 +143,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
jobId={jobId}
|
jobId={jobId}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={14}>
|
<Col md={24} lg={14}>
|
||||||
<DmsPostForm
|
<DmsPostForm
|
||||||
socket={socket}
|
socket={socket}
|
||||||
jobId={jobId}
|
jobId={jobId}
|
||||||
|
|||||||
Reference in New Issue
Block a user