diff --git a/client/src/App/App.styles.scss b/client/src/App/App.styles.scss index ddf87ac42..50e656895 100644 --- a/client/src/App/App.styles.scss +++ b/client/src/App/App.styles.scss @@ -148,6 +148,10 @@ background: #e7f3ff !important; } +.ant-table-tbody > tr.ant-table-row-selected > td { + background: #e6f7ff !important; +} + .job-line-manual { color: tomato; font-style: italic; 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..e1358e989 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,13 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { + + + )} diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index dd33ed58f..31192e268 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -1250,10 +1250,10 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql` query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) { jobs(where: { status: { _in: $statuses } }) { id + ownr_co_nm ownr_fn ownr_ln ro_number - vehicleid v_make_desc v_model_desc @@ -1281,6 +1281,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql` } ) { id + ownr_co_nm ownr_fn ownr_ln ro_number @@ -1297,6 +1298,7 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql` query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) { jobs_by_pk(id: $id) { id + ownr_co_nm ownr_fn ownr_ln ro_number @@ -1315,6 +1317,7 @@ export const SEARCH_FOR_JOBS = gql` search_jobs(args: { search: $search }, limit: 25) { id ro_number + ownr_co_nm ownr_fn ownr_ln } diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index 9fcfd491e..77c670e60 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, @@ -46,6 +46,7 @@ export const socket = SocketIO( process.env.NODE_ENV === "production" ? process.env.REACT_APP_AXIOS_BASE_API_URL : 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 524cb936d..d84abd81a 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1453,6 +1453,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 38b6ee304..2013134ca 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1453,6 +1453,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 c879a857c..f0287a89b 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1453,6 +1453,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..5fee6b30d 100644 --- a/server/cdk/cdk-job-export.js +++ b/server/cdk/cdk-job-export.js @@ -717,18 +717,24 @@ async function InsertDmsVehicle(socket) { dealer: { dealerNumber: socket.JobData.bodyshop.cdk_dealerid, ...(socket.txEnvelope.inservicedate && { - inServiceDate: moment(socket.txEnvelope.inservicedate) - //.tz(socket.JobData.bodyshop.timezone) - .startOf("day") - .toISOString(), + inServiceDate: + socket.txEnvelope.dms_unsold === true + ? "" + : moment(socket.txEnvelope.inservicedate) + //.tz(socket.JobData.bodyshop.timezone) + .startOf("day") + .toISOString(), }), vehicleId: socket.DMSVid.vehiclesVehId, }, manufacturer: {}, vehicle: { - deliveryDate: moment() - // .tz(socket.JobData.bodyshop.timezone) - .format("YYYYMMDD"), + deliveryDate: + socket.txEnvelope.dms_unsold === true + ? "" + : moment() + // .tz(socket.JobData.bodyshop.timezone) + .format("YYYYMMDD"), licensePlateNo: socket.JobData.plate_no === null ? null @@ -860,19 +866,25 @@ async function UpdateDmsVehicle(socket) { ...socket.DMSVeh.dealer, ...((socket.txEnvelope.inservicedate || socket.DMSVeh.dealer.inServiceDate) && { - inServiceDate: moment( - socket.DMSVeh.dealer.inServiceDate || - socket.txEnvelope.inservicedate - ) - // .tz(socket.JobData.bodyshop.timezone) - .toISOString(), + inServiceDate: + socket.txEnvelope.dms_unsold === true + ? "" + : moment( + socket.DMSVeh.dealer.inServiceDate || + socket.txEnvelope.inservicedate + ) + // .tz(socket.JobData.bodyshop.timezone) + .toISOString(), }), }, vehicle: { ...socket.DMSVeh.vehicle, - deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate) - //.tz(socket.JobData.bodyshop.timezone) - .toISOString(), + deliveryDate: + socket.txEnvelope.dms_unsold === true + ? "" + : moment(socket.DMSVeh.vehicle.deliveryDate) + //.tz(socket.JobData.bodyshop.timezone) + .toISOString(), }, owners: ids, },