diff --git a/client/src/components/dms-post-form/dms-post-form.component.jsx b/client/src/components/dms-post-form/dms-post-form.component.jsx index c9043d050..e40b90286 100644 --- a/client/src/components/dms-post-form/dms-post-form.component.jsx +++ b/client/src/components/dms-post-form/dms-post-form.component.jsx @@ -11,6 +11,7 @@ import { Select, Space, Statistic, + Switch, Typography, } from "antd"; import Dinero from "dinero.js"; @@ -183,6 +184,12 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { + + + )} diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index 9fcfd491e..75c26287b 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -13,7 +13,7 @@ import queryString from "query-string"; import React, { useEffect, useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; -import { useHistory, useLocation, Link } from "react-router-dom"; +import { Link, useHistory, useLocation } from "react-router-dom"; import { createStructuredSelector } from "reselect"; import SocketIO from "socket.io-client"; import AlertComponent from "../../components/alert/alert.component"; @@ -22,6 +22,7 @@ import DmsCustomerSelector from "../../components/dms-customer-selector/dms-cust import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component"; import DmsPostForm from "../../components/dms-post-form/dms-post-form.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; +import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component"; import { auth } from "../../firebase/firebase.utils"; import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries"; import { @@ -29,7 +30,6 @@ import { setSelectedHeader, } from "../../redux/application/application.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; -import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -45,7 +45,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer); export const socket = SocketIO( process.env.NODE_ENV === "production" ? process.env.REACT_APP_AXIOS_BASE_API_URL - : window.location.origin, + : window.location.origin, //"http://localhost:4000" for dev testing, { path: "/ws", withCredentials: true, diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index b857ca7c8..9a1f09d9c 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1451,6 +1451,7 @@ "dms_make": "DMS Make", "dms_model": "DMS Model", "dms_wip_acctnumber": "Cost WIP DMS Acct #", + "dms_unsold": "New, Unsold Vehicle", "id": "DMS ID", "inservicedate": "In Service Date", "journal": "Journal #", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index ff3efbd30..52857b75f 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1451,6 +1451,7 @@ "dms_make": "", "dms_model": "", "dms_wip_acctnumber": "", + "dms_unsold": "", "id": "", "inservicedate": "", "journal": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index c8fc9ee4a..9105279ef 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1451,6 +1451,7 @@ "dms_make": "", "dms_model": "", "dms_wip_acctnumber": "", + "dms_unsold": "", "id": "", "inservicedate": "", "journal": "", diff --git a/server/cdk/cdk-job-export.js b/server/cdk/cdk-job-export.js index c20a899a1..117fc5bdc 100644 --- a/server/cdk/cdk-job-export.js +++ b/server/cdk/cdk-job-export.js @@ -717,7 +717,9 @@ async function InsertDmsVehicle(socket) { dealer: { dealerNumber: socket.JobData.bodyshop.cdk_dealerid, ...(socket.txEnvelope.inservicedate && { - inServiceDate: moment(socket.txEnvelope.inservicedate) + inServiceDate: socket.txEnvelope.dms_unsold === true + ? "" + : moment(socket.txEnvelope.inservicedate) //.tz(socket.JobData.bodyshop.timezone) .startOf("day") .toISOString(), @@ -726,7 +728,9 @@ async function InsertDmsVehicle(socket) { }, manufacturer: {}, vehicle: { - deliveryDate: moment() + deliveryDate: socket.txEnvelope.dms_unsold === true + ? "" + : moment() // .tz(socket.JobData.bodyshop.timezone) .format("YYYYMMDD"), licensePlateNo: