IO-233 WIP CDK.
This commit is contained in:
@@ -32361,6 +32361,90 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_by_last_name</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_by_repair_status</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_by_ro</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_by_target_date</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>purchases_by_cost_center_detail</name>
|
<name>purchases_by_cost_center_detail</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -5,10 +5,6 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { TOGGLE_CONVERSATION_ARCHIVE } from "../../graphql/conversations.queries";
|
import { TOGGLE_CONVERSATION_ARCHIVE } from "../../graphql/conversations.queries";
|
||||||
|
|
||||||
export default function ChatArchiveButton({ conversation }) {
|
export default function ChatArchiveButton({ conversation }) {
|
||||||
console.log(
|
|
||||||
"🚀 ~ file: chat-archive-button.component.jsx ~ line 6 ~ conversation",
|
|
||||||
conversation
|
|
||||||
);
|
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [updateConversation] = useMutation(TOGGLE_CONVERSATION_ARCHIVE);
|
const [updateConversation] = useMutation(TOGGLE_CONVERSATION_ARCHIVE);
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export function CdkContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
|
|
||||||
<Timeline pending={socket.connected && "Processing..."} reverse={true}>
|
<Timeline pending={socket.connected && "Processing..."} reverse={true}>
|
||||||
{logs.map((log, idx) => (
|
{logs.map((log, idx) => (
|
||||||
<Timeline.Item key={idx}>
|
<Timeline.Item key={idx} color={LogLevelHierarchy(log.level)}>
|
||||||
<Space wrap align="start" style={{}}>
|
<Space wrap align="start" style={{}}>
|
||||||
<Tag color={LogLevelHierarchy(log.level)}>{log.level}</Tag>
|
<Tag color={LogLevelHierarchy(log.level)}>{log.level}</Tag>
|
||||||
<span>{moment(log.timestamp).format("MM/DD/YYYY HH:MM:ss")}</span>
|
<span>{moment(log.timestamp).format("MM/DD/YYYY HH:MM:ss")}</span>
|
||||||
|
|||||||
@@ -1933,6 +1933,10 @@
|
|||||||
"parts_backorder": "Backordered Parts",
|
"parts_backorder": "Backordered Parts",
|
||||||
"payments_by_date": "Payments by Date",
|
"payments_by_date": "Payments by Date",
|
||||||
"payments_by_date_type": "Payments by Date and Type",
|
"payments_by_date_type": "Payments by Date and Type",
|
||||||
|
"production_by_last_name": "Production by Last Name",
|
||||||
|
"production_by_repair_status": "Production by Status",
|
||||||
|
"production_by_ro": "Production by RO",
|
||||||
|
"production_by_target_date": "Production by Target Date",
|
||||||
"purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)",
|
"purchases_by_cost_center_detail": "Purchases by Cost Center (Detail)",
|
||||||
"purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)",
|
"purchases_by_cost_center_summary": "Purchases by Cost Center (Summary)",
|
||||||
"purchases_by_date_range_detail": "Purchases by Date - Detail",
|
"purchases_by_date_range_detail": "Purchases by Date - Detail",
|
||||||
|
|||||||
@@ -1933,6 +1933,10 @@
|
|||||||
"parts_backorder": "",
|
"parts_backorder": "",
|
||||||
"payments_by_date": "",
|
"payments_by_date": "",
|
||||||
"payments_by_date_type": "",
|
"payments_by_date_type": "",
|
||||||
|
"production_by_last_name": "",
|
||||||
|
"production_by_repair_status": "",
|
||||||
|
"production_by_ro": "",
|
||||||
|
"production_by_target_date": "",
|
||||||
"purchases_by_cost_center_detail": "",
|
"purchases_by_cost_center_detail": "",
|
||||||
"purchases_by_cost_center_summary": "",
|
"purchases_by_cost_center_summary": "",
|
||||||
"purchases_by_date_range_detail": "",
|
"purchases_by_date_range_detail": "",
|
||||||
|
|||||||
@@ -1933,6 +1933,10 @@
|
|||||||
"parts_backorder": "",
|
"parts_backorder": "",
|
||||||
"payments_by_date": "",
|
"payments_by_date": "",
|
||||||
"payments_by_date_type": "",
|
"payments_by_date_type": "",
|
||||||
|
"production_by_last_name": "",
|
||||||
|
"production_by_repair_status": "",
|
||||||
|
"production_by_ro": "",
|
||||||
|
"production_by_target_date": "",
|
||||||
"purchases_by_cost_center_detail": "",
|
"purchases_by_cost_center_detail": "",
|
||||||
"purchases_by_cost_center_summary": "",
|
"purchases_by_cost_center_summary": "",
|
||||||
"purchases_by_date_range_detail": "",
|
"purchases_by_date_range_detail": "",
|
||||||
|
|||||||
@@ -1061,6 +1061,56 @@ export const TemplateList = (type, context) => {
|
|||||||
field: i18n.t("jobs.fields.date_open"),
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
production_by_last_name: {
|
||||||
|
title: i18n.t("reportcenter.templates.production_by_last_name"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t("reportcenter.templates.production_by_last_name"),
|
||||||
|
key: "production_by_last_name",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
production_by_repair_status: {
|
||||||
|
title: i18n.t("reportcenter.templates.production_by_repair_status"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.production_by_repair_status"
|
||||||
|
),
|
||||||
|
key: "production_by_repair_status",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
production_by_target_date: {
|
||||||
|
title: i18n.t("reportcenter.templates.production_by_target_date"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t("reportcenter.templates.production_by_target_date"),
|
||||||
|
key: "production_by_target_date",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
production_by_ro: {
|
||||||
|
title: i18n.t("reportcenter.templates.production_by_ro"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t("reportcenter.templates.production_by_ro"),
|
||||||
|
key: "production_by_ro",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(!type || type === "courtesycarcontract"
|
...(!type || type === "courtesycarcontract"
|
||||||
|
|||||||
12
server.js
12
server.js
@@ -151,7 +151,17 @@ app.get("/", async function (req, res) {
|
|||||||
const http = require("http");
|
const http = require("http");
|
||||||
const server = http.createServer(app);
|
const server = http.createServer(app);
|
||||||
const { Server } = require("socket.io");
|
const { Server } = require("socket.io");
|
||||||
const io = new Server(server, { path: "/ws" });
|
const io = new Server(server, {
|
||||||
|
path: "/ws",
|
||||||
|
cors: {
|
||||||
|
origin: [
|
||||||
|
"https://test.imex.online",
|
||||||
|
"http://localhost:3000",
|
||||||
|
"https://imex.online",
|
||||||
|
],
|
||||||
|
methods: ["GET", "POST"],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
server.listen(port, (error) => {
|
server.listen(port, (error) => {
|
||||||
if (error) throw error;
|
if (error) throw error;
|
||||||
|
|||||||
@@ -7,16 +7,30 @@ require("dotenv").config({
|
|||||||
});
|
});
|
||||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
const GraphQLClient = require("graphql-request").GraphQLClient;
|
||||||
const queries = require("../graphql-client/queries");
|
const queries = require("../graphql-client/queries");
|
||||||
|
|
||||||
const CdkBase = require("./cdk");
|
const CdkBase = require("./cdk");
|
||||||
|
|
||||||
|
const IMEX_CDK_USER = process.env.IMEX_CDK_USER,
|
||||||
|
IMEX_CDK_PASSWORD = process.env.IMEX_CDK_PASSWORD;
|
||||||
|
|
||||||
exports.default = async function (socket, jobid) {
|
exports.default = async function (socket, jobid) {
|
||||||
CdkBase.createLogEvent(
|
CdkBase.createLogEvent(
|
||||||
socket,
|
socket,
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
`Received Job export request for id ${jobid}`
|
`Received Job export request for id ${jobid}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const JobData = await QueryJobData(socket, jobid);
|
const JobData = await QueryJobData(socket, jobid);
|
||||||
|
|
||||||
|
const DealerId = JobData.bodyshop.dealerid;
|
||||||
|
|
||||||
|
CdkBase.createLogEvent(
|
||||||
|
socket,
|
||||||
|
"TRACE",
|
||||||
|
`Dealer ID detected: ${JSON.stringify(DealerId)}`
|
||||||
|
);
|
||||||
|
|
||||||
|
await DetermineDMSVid(socket, JobData);
|
||||||
|
// Begin Calculate VID from DMS {1}
|
||||||
};
|
};
|
||||||
|
|
||||||
async function QueryJobData(socket, jobid) {
|
async function QueryJobData(socket, jobid) {
|
||||||
@@ -32,3 +46,7 @@ async function QueryJobData(socket, jobid) {
|
|||||||
);
|
);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function DetermineDMSVid(socket, JobData) {
|
||||||
|
CdkBase.createLogEvent(socket, "TRACE", "{1} Begin Determine DMS VehicleID");
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user