IO-233 Beging get vehicle makes
This commit is contained in:
@@ -3578,6 +3578,27 @@
|
||||
<folder_node>
|
||||
<name>dms</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>default_journal</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>dms_acctnumber</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
import React, { useState } from "react";
|
||||
import { Modal, Button, Table } from "antd";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
//currentUser: selectCurrentUser
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsCdkMakes);
|
||||
|
||||
export function DmsCdkMakes({ bodyshop, form, socket }) {
|
||||
const [makesList, setMakesList] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [visible, setVisible] = useState(false);
|
||||
return (
|
||||
<div>
|
||||
<Modal visible={visible} onCancel={() => setVisible(false)}>
|
||||
{JSON.stringify(makesList, null, 2)}
|
||||
<Table loading={loading} data={makesList} />
|
||||
</Modal>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setVisible(true);
|
||||
setLoading(true);
|
||||
socket.emit(
|
||||
"cdk-get-makes",
|
||||
(bodyshop.cdk_dealerid,
|
||||
(makes) => {
|
||||
setMakesList(makes);
|
||||
setLoading(false);
|
||||
})
|
||||
);
|
||||
}}
|
||||
>
|
||||
Get Makes
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
150
client/src/components/dms-post-form/dms-post-form.component.jsx
Normal file
150
client/src/components/dms-post-form/dms-post-form.component.jsx
Normal file
@@ -0,0 +1,150 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { Button, Form, Input } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component";
|
||||
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DmsPostForm);
|
||||
|
||||
export function DmsPostForm({ bodyshop, socket, jobId }) {
|
||||
const [form] = Form.useForm();
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<Form form={form} layout="vertical">
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
name="journal"
|
||||
label={t("jobs.fields.dms.journal")}
|
||||
initialValue={
|
||||
bodyshop.cdk_configuration &&
|
||||
bodyshop.cdk_configuration.default_journal
|
||||
}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="dms_make"
|
||||
label={t("jobs.fields.dms.dms_make")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name="dms_make"
|
||||
label={t("jobs.fields.dms.dms_make")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<DmsCdkMakes form={form} socket={socket} />
|
||||
</LayoutFormRow>
|
||||
|
||||
<Form.List name={["payers"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
<div>
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item key={field.key}>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.dms.payer.name")}
|
||||
key={`${index}name`}
|
||||
name={[field.name, "name"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t("jobs.fields.dms.payer.account")}
|
||||
key={`${index}account`}
|
||||
name={[field.name, "account"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
label={t("jobs.fields.dms.payer.amount")}
|
||||
key={`${index}amount`}
|
||||
name={[field.name, "amount"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<CurrencyInput />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.dms.payer.controlnumber")}
|
||||
key={`${index}controlnumber`}
|
||||
name={[field.name, "controlnumber"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
</LayoutFormRow>
|
||||
</Form.Item>
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
{t("general.actions.add")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</Form.List>
|
||||
</Form>
|
||||
);
|
||||
}
|
||||
@@ -69,9 +69,27 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<DataLabel label={t("bodyshop.labels.dms.cdk_dealerid")}>
|
||||
{form.getFieldValue("cdk_dealerid")}
|
||||
</DataLabel>
|
||||
{bodyshop.cdk_dealerid && (
|
||||
<>
|
||||
<DataLabel label={t("bodyshop.labels.dms.cdk_dealerid")}>
|
||||
{form.getFieldValue("cdk_dealerid")}
|
||||
</DataLabel>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.dms.default_journal")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
//message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
name={["cdk_configuration", "default_journal"]}
|
||||
>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
</>
|
||||
)}
|
||||
<LayoutFormRow header={t("bodyshop.labels.responsibilitycenters.costs")}>
|
||||
<Form.List name={["md_responsibility_centers", "costs"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useQuery } from "@apollo/client";
|
||||
//import { useQuery } from "@apollo/client";
|
||||
import { Button, Col, Result, Row, Select, Space } from "antd";
|
||||
import queryString from "query-string";
|
||||
import React, { useEffect, useState } from "react";
|
||||
@@ -7,13 +7,14 @@ import { connect } from "react-redux";
|
||||
import { useLocation } from "react-router-dom";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import SocketIO from "socket.io-client";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
//import AlertComponent from "../../components/alert/alert.component";
|
||||
import DmsAllocationsSummary from "../../components/dms-allocations-summary/dms-allocations-summary.component";
|
||||
import DmsCustomerSelector from "../../components/dms-customer-selector/dms-customer-selector.component";
|
||||
import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import DmsPostForm from "../../components/dms-post-form/dms-post-form.component";
|
||||
//import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import { auth } from "../../firebase/firebase.utils";
|
||||
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
||||
//import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
|
||||
import {
|
||||
setBreadcrumbs,
|
||||
setSelectedHeader,
|
||||
@@ -51,10 +52,10 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
const search = queryString.parse(useLocation().search);
|
||||
const { jobId } = search;
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_JOB_EXPORT_DMS, {
|
||||
variables: { id: jobId },
|
||||
skip: true, //!jobId,
|
||||
});
|
||||
// const { loading, error } = useQuery(QUERY_JOB_EXPORT_DMS, {
|
||||
// variables: { id: jobId },
|
||||
// skip: true, //!jobId,
|
||||
// });
|
||||
|
||||
useEffect(() => {
|
||||
document.title = t("titles.dms");
|
||||
@@ -105,8 +106,8 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
|
||||
const dmsType = determineDmsType(bodyshop);
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
// if (loading) return <LoadingSpinner />;
|
||||
// if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -140,6 +141,7 @@ export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
||||
<Row gutter={32}>
|
||||
<Col span={18}>
|
||||
<DmsAllocationsSummary socket={socket} jobId={jobId} />
|
||||
<DmsPostForm socket={socket} jobId={jobId} />
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div style={{ maxHeight: "500px", overflowY: "auto" }}>
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
"templates": "Delivery Templates"
|
||||
},
|
||||
"dms": {
|
||||
"default_journal": "Default Journal",
|
||||
"dms_acctnumber": "DMS Account #",
|
||||
"dms_wip_acctnumber": "DMS W.I.P. Account #",
|
||||
"mappingname": "DMS Mapping Name"
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
"templates": ""
|
||||
},
|
||||
"dms": {
|
||||
"default_journal": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"mappingname": ""
|
||||
|
||||
@@ -232,6 +232,7 @@
|
||||
"templates": ""
|
||||
},
|
||||
"dms": {
|
||||
"default_journal": "",
|
||||
"dms_acctnumber": "",
|
||||
"dms_wip_acctnumber": "",
|
||||
"mappingname": ""
|
||||
|
||||
@@ -6,11 +6,10 @@ require("dotenv").config({
|
||||
),
|
||||
});
|
||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
||||
const soap = require("soap");
|
||||
|
||||
const queries = require("../graphql-client/queries");
|
||||
const CdkBase = require("../web-sockets/web-socket");
|
||||
const CdkWsdl = require("./cdk-wsdl").default;
|
||||
const logger = require("../utils/logger");
|
||||
|
||||
const Dinero = require("dinero.js");
|
||||
const _ = require("lodash");
|
||||
|
||||
|
||||
80
server/cdk/cdk-get-makes.js
Normal file
80
server/cdk/cdk-get-makes.js
Normal file
@@ -0,0 +1,80 @@
|
||||
const path = require("path");
|
||||
require("dotenv").config({
|
||||
path: path.resolve(
|
||||
process.cwd(),
|
||||
`.env.${process.env.NODE_ENV || "development"}`
|
||||
),
|
||||
});
|
||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
||||
const soap = require("soap");
|
||||
const queries = require("../graphql-client/queries");
|
||||
const CdkBase = require("../web-sockets/web-socket");
|
||||
const CdkWsdl = require("./cdk-wsdl").default;
|
||||
const logger = require("../utils/logger");
|
||||
const Dinero = require("dinero.js");
|
||||
const _ = require("lodash");
|
||||
const {
|
||||
CDK_CREDENTIALS,
|
||||
CheckCdkResponseForError,
|
||||
checkIndividualResult,
|
||||
} = require("./cdk-wsdl");
|
||||
|
||||
exports.default = async function (socket, cdk_dealerid) {
|
||||
try {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"DEBUG",
|
||||
`Getting makes and models list from CDK.`
|
||||
);
|
||||
const t = await GetCdkMakes(socket, cdk_dealerid);
|
||||
console.log(t);
|
||||
return [];
|
||||
} catch (error) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error encountered in CdkGetMakes. ${error}`
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
async function GetCdkMakes(socket, cdk_dealerid) {
|
||||
CdkBase.createLogEvent(socket, "TRACE", `{1} Begin GetCDkMakes WSDL Call`);
|
||||
|
||||
try {
|
||||
const soapClientVehicleSearch = await soap.createClientAsync(
|
||||
CdkWsdl.VehicleSearch
|
||||
);
|
||||
const soapResponseVehicleSearch =
|
||||
await soapClientVehicleSearch.getVehIdsAsync(
|
||||
{
|
||||
arg0: CDK_CREDENTIALS,
|
||||
arg1: { id: cdk_dealerid },
|
||||
},
|
||||
|
||||
{}
|
||||
);
|
||||
CheckCdkResponseForError(socket, soapResponseVehicleSearch);
|
||||
const [
|
||||
result, //rawResponse, soapheader, rawRequest
|
||||
] = soapResponseVehicleSearch;
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"TRACE",
|
||||
`soapResponseVehicleSearch.searchIDsByVINAsync Result ${JSON.stringify(
|
||||
result,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
const DmsVehicle = result && result.return && result.return[0];
|
||||
return DmsVehicle;
|
||||
} catch (error) {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error in CalculateDmsVid - ${JSON.stringify(error, null, 2)}`
|
||||
);
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
@@ -11,13 +11,11 @@ const queries = require("../graphql-client/queries");
|
||||
const CdkBase = require("../web-sockets/web-socket");
|
||||
const CdkWsdl = require("./cdk-wsdl").default;
|
||||
const logger = require("../utils/logger");
|
||||
|
||||
const IMEX_CDK_USER = process.env.IMEX_CDK_USER,
|
||||
IMEX_CDK_PASSWORD = process.env.IMEX_CDK_PASSWORD;
|
||||
const CDK_CREDENTIALS = {
|
||||
password: IMEX_CDK_PASSWORD,
|
||||
username: IMEX_CDK_USER,
|
||||
};
|
||||
const {
|
||||
CDK_CREDENTIALS,
|
||||
CheckCdkResponseForError,
|
||||
checkIndividualResult,
|
||||
} = require("./cdk-wsdl");
|
||||
|
||||
exports.default = async function (socket, jobid) {
|
||||
socket.logEvents = [];
|
||||
@@ -458,55 +456,3 @@ async function CalculateDmsVid(socket, JobData) {
|
||||
throw new Error(error);
|
||||
}
|
||||
}
|
||||
|
||||
function CheckCdkResponseForError(socket, soapResponse) {
|
||||
if (!soapResponse[0]) {
|
||||
//The response was null, this might be ok, it might not.
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"WARNING",
|
||||
`Warning detected in CDK Response - it appears to be null. Stack: ${
|
||||
new Error().stack
|
||||
}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const ResultToCheck = soapResponse[0].return;
|
||||
|
||||
if (Array.isArray(ResultToCheck)) {
|
||||
ResultToCheck.forEach((result) => checkIndividualResult(socket, result));
|
||||
} else {
|
||||
checkIndividualResult(socket, ResultToCheck);
|
||||
}
|
||||
}
|
||||
|
||||
function checkIndividualResult(socket, ResultToCheck) {
|
||||
if (
|
||||
ResultToCheck.errorLevel === 0 ||
|
||||
ResultToCheck.errorLevel === "0" ||
|
||||
ResultToCheck.code === "success" ||
|
||||
(!ResultToCheck.code && !ResultToCheck.errorLevel)
|
||||
)
|
||||
//TODO: Verify that this is the best way to detect errors.
|
||||
return;
|
||||
else {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error detected in CDK Response - ${JSON.stringify(
|
||||
ResultToCheck,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
|
||||
throw new Error(
|
||||
`Error found while validating CDK response for ${JSON.stringify(
|
||||
ResultToCheck,
|
||||
null,
|
||||
2
|
||||
)}:`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,18 +5,83 @@ require("dotenv").config({
|
||||
`.env.${process.env.NODE_ENV || "development"}`
|
||||
),
|
||||
});
|
||||
const CdkBase = require("../web-sockets/web-socket");
|
||||
|
||||
const IMEX_CDK_USER = process.env.IMEX_CDK_USER,
|
||||
IMEX_CDK_PASSWORD = process.env.IMEX_CDK_PASSWORD;
|
||||
const CDK_CREDENTIALS = {
|
||||
password: IMEX_CDK_PASSWORD,
|
||||
username: IMEX_CDK_USER,
|
||||
};
|
||||
|
||||
exports.CDK_CREDENTIALS = CDK_CREDENTIALS;
|
||||
// const cdkDomain =
|
||||
// process.env.NODE_ENV === "production"
|
||||
// ? "https://3pa.dmotorworks.com"
|
||||
// : "https://uat-3pa.dmotorworks.com";
|
||||
|
||||
function CheckCdkResponseForError(socket, soapResponse) {
|
||||
if (!soapResponse[0]) {
|
||||
//The response was null, this might be ok, it might not.
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"WARNING",
|
||||
`Warning detected in CDK Response - it appears to be null. Stack: ${
|
||||
new Error().stack
|
||||
}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const ResultToCheck = soapResponse[0].return;
|
||||
|
||||
if (Array.isArray(ResultToCheck)) {
|
||||
ResultToCheck.forEach((result) => checkIndividualResult(socket, result));
|
||||
} else {
|
||||
checkIndividualResult(socket, ResultToCheck);
|
||||
}
|
||||
}
|
||||
exports.CheckCdkResponseForError = CheckCdkResponseForError;
|
||||
|
||||
function checkIndividualResult(socket, ResultToCheck) {
|
||||
if (
|
||||
ResultToCheck.errorLevel === 0 ||
|
||||
ResultToCheck.errorLevel === "0" ||
|
||||
ResultToCheck.code === "success" ||
|
||||
(!ResultToCheck.code && !ResultToCheck.errorLevel)
|
||||
)
|
||||
//TODO: Verify that this is the best way to detect errors.
|
||||
return;
|
||||
else {
|
||||
CdkBase.createLogEvent(
|
||||
socket,
|
||||
"ERROR",
|
||||
`Error detected in CDK Response - ${JSON.stringify(
|
||||
ResultToCheck,
|
||||
null,
|
||||
2
|
||||
)}`
|
||||
);
|
||||
|
||||
throw new Error(
|
||||
`Error found while validating CDK response for ${JSON.stringify(
|
||||
ResultToCheck,
|
||||
null,
|
||||
2
|
||||
)}:`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
exports.checkIndividualResult = checkIndividualResult;
|
||||
|
||||
const cdkDomain = "https://uat-3pa.dmotorworks.com";
|
||||
exports.default = {
|
||||
// VehicleSearch: `${cdkDomain}/pip-vehicle/services/VehicleSearch?wsdl`,
|
||||
VehicleInsertUpdate: `${cdkDomain}/pip-vehicle/services/VehicleInsertUpdate?wsdl`,
|
||||
CustomerInsertUpdate: `${cdkDomain}/pip-customer/services/CustomerInsertUpdate?wsdl`,
|
||||
CustomerSearch: `${cdkDomain}/pip-customer/services/CustomerSearch?wsdl`,
|
||||
VehicleSearch: `${cdkDomain}/pip-vehicle/services/VehicleSearch?wsdl`,
|
||||
};
|
||||
|
||||
// The following login credentials will be used for all PIPs and all environments (User Acceptance Testing and Production).
|
||||
|
||||
@@ -9,6 +9,7 @@ require("dotenv").config({
|
||||
const { io } = require("../../server");
|
||||
const { admin } = require("../firebase/firebase-handler");
|
||||
const CdkJobExport = require("../cdk/cdk-job-export").default;
|
||||
const CdkGetMakes = require("../cdk/cdk-get-makes").default;
|
||||
const CdkCalculateAllocations =
|
||||
require("../cdk/cdk-calculate-allocations").default;
|
||||
const { isArray } = require("lodash");
|
||||
@@ -62,6 +63,11 @@ io.on("connection", (socket) => {
|
||||
//CdkJobExport(socket, jobid);
|
||||
});
|
||||
|
||||
socket.on("cdk-get-makes", async (cdk_dealerid, callback) => {
|
||||
const makes = await CdkGetMakes(socket, cdk_dealerid);
|
||||
callback(makes);
|
||||
});
|
||||
|
||||
socket.on("cdk-calculate-allocations", async (jobid, callback) => {
|
||||
const allocations = await CdkCalculateAllocations(socket, jobid);
|
||||
createLogEvent(socket, "DEBUG", `Allocations calculated.`);
|
||||
|
||||
Reference in New Issue
Block a user