From 31b4f4e561fe8db3ff1ea927e959d648d9c0f1f0 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 13 Jun 2023 16:23:23 -0700 Subject: [PATCH 1/3] IO-2336 Job Search Query and Autocomplete Query Update queries to include ownr_co_nm --- client/src/graphql/jobs.queries.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 9619d5173..9a226c831 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -1219,10 +1219,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 @@ -1250,6 +1250,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql` } ) { id + ownr_co_nm ownr_fn ownr_ln ro_number @@ -1266,6 +1267,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 @@ -1284,6 +1286,7 @@ export const SEARCH_FOR_JOBS = gql` search_jobs(args: { search: $search }, limit: 25) { id ro_number + ownr_co_nm ownr_fn ownr_ln } From 5d2bdc7ee18ae266adcad6c9f04cc8fd53add7cb Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 15 Jun 2023 15:24:24 -0700 Subject: [PATCH 2/3] IO-2338 Selection Color Overrides nth-child color --- client/src/App/App.styles.scss | 4 ++++ 1 file changed, 4 insertions(+) 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; From fee5bee569e8cb40314e4b346c3850eff771aac6 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 20 Jun 2023 10:03:49 -0700 Subject: [PATCH 3/3] IO-2340 CDK New Unsold Vehicle Option Exports with no Delivery Date or In-Service Date --- .../components/dms-post-form/dms-post-form.component.jsx | 7 +++++++ client/src/pages/dms/dms.container.jsx | 6 +++--- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + server/cdk/cdk-job-export.js | 8 ++++++-- 6 files changed, 19 insertions(+), 5 deletions(-) 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: