From 5be2d7bd39ce568921414c397478bfcff4c2ac17 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 23 Jun 2021 10:57:57 -0700 Subject: [PATCH 1/6] IO-233 WIP CDK. --- bodyshop_translations.babel | 84 +++++++++++++++++++ .../chat-archive-button.component.jsx | 4 - client/src/pages/cdk/cdk.container.jsx | 2 +- client/src/translations/en_us/common.json | 4 + client/src/translations/es/common.json | 4 + client/src/translations/fr/common.json | 4 + client/src/utils/TemplateConstants.js | 50 +++++++++++ server.js | 12 ++- server/cdk/cdk-job-export.js | 20 ++++- 9 files changed, 177 insertions(+), 7 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 1d18bd152..73f7047a6 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -32361,6 +32361,90 @@ + + production_by_last_name + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + production_by_repair_status + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + production_by_ro + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + production_by_target_date + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + purchases_by_cost_center_detail false diff --git a/client/src/components/chat-archive-button/chat-archive-button.component.jsx b/client/src/components/chat-archive-button/chat-archive-button.component.jsx index dcda38860..fdcff6b90 100644 --- a/client/src/components/chat-archive-button/chat-archive-button.component.jsx +++ b/client/src/components/chat-archive-button/chat-archive-button.component.jsx @@ -5,10 +5,6 @@ import { useTranslation } from "react-i18next"; import { TOGGLE_CONVERSATION_ARCHIVE } from "../../graphql/conversations.queries"; export default function ChatArchiveButton({ conversation }) { - console.log( - "🚀 ~ file: chat-archive-button.component.jsx ~ line 6 ~ conversation", - conversation - ); const [loading, setLoading] = useState(false); const { t } = useTranslation(); const [updateConversation] = useMutation(TOGGLE_CONVERSATION_ARCHIVE); diff --git a/client/src/pages/cdk/cdk.container.jsx b/client/src/pages/cdk/cdk.container.jsx index 67b240e66..79d5277d0 100644 --- a/client/src/pages/cdk/cdk.container.jsx +++ b/client/src/pages/cdk/cdk.container.jsx @@ -96,7 +96,7 @@ export function CdkContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { {logs.map((log, idx) => ( - + {log.level} {moment(log.timestamp).format("MM/DD/YYYY HH:MM:ss")} diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 87b2c0a25..d0cd83a08 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1933,6 +1933,10 @@ "parts_backorder": "Backordered Parts", "payments_by_date": "Payments by Date", "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_summary": "Purchases by Cost Center (Summary)", "purchases_by_date_range_detail": "Purchases by Date - Detail", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 90d2d814e..223b5772f 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1933,6 +1933,10 @@ "parts_backorder": "", "payments_by_date": "", "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_summary": "", "purchases_by_date_range_detail": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 1a39dcd12..08efbf140 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1933,6 +1933,10 @@ "parts_backorder": "", "payments_by_date": "", "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_summary": "", "purchases_by_date_range_detail": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index 567c484e7..c14a8fbba 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -1061,6 +1061,56 @@ export const TemplateList = (type, context) => { 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" diff --git a/server.js b/server.js index a26bc207a..b17fc8b61 100644 --- a/server.js +++ b/server.js @@ -151,7 +151,17 @@ app.get("/", async function (req, res) { const http = require("http"); const server = http.createServer(app); 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) => { if (error) throw error; diff --git a/server/cdk/cdk-job-export.js b/server/cdk/cdk-job-export.js index ecaf4d288..cb20ea6dd 100644 --- a/server/cdk/cdk-job-export.js +++ b/server/cdk/cdk-job-export.js @@ -7,16 +7,30 @@ require("dotenv").config({ }); const GraphQLClient = require("graphql-request").GraphQLClient; const queries = require("../graphql-client/queries"); - 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) { CdkBase.createLogEvent( socket, "DEBUG", `Received Job export request for id ${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) { @@ -32,3 +46,7 @@ async function QueryJobData(socket, jobid) { ); return result; } + +async function DetermineDMSVid(socket, JobData) { + CdkBase.createLogEvent(socket, "TRACE", "{1} Begin Determine DMS VehicleID"); +} From 35273c64bdb3699364dc14bb562569d2d7233679 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Wed, 23 Jun 2021 12:19:51 -0700 Subject: [PATCH 2/6] IO-233 Add soap request structure --- package.json | 1 + server/cdk/cdk-job-export.js | 69 +++++-- server/cdk/cdk-wsdl.js | 4 + server/cdk/cdk.js | 11 +- server/cdk/getVehIds.xml | 18 ++ server/graphql-client/queries.js | 7 + yarn.lock | 300 ++++++++++++++++++++++++++++++- 7 files changed, 383 insertions(+), 27 deletions(-) create mode 100644 server/cdk/cdk-wsdl.js create mode 100644 server/cdk/getVehIds.xml diff --git a/package.json b/package.json index 7026cc986..3ef5a1d82 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "node-mailjet": "^3.3.1", "nodemailer": "^6.6.0", "phone": "^2.4.20", + "soap": "^0.39.0", "socket.io": "^4.1.2", "stripe": "^8.148.0", "twilio": "^3.62.0", diff --git a/server/cdk/cdk-job-export.js b/server/cdk/cdk-job-export.js index cb20ea6dd..646208da4 100644 --- a/server/cdk/cdk-job-export.js +++ b/server/cdk/cdk-job-export.js @@ -6,31 +6,45 @@ require("dotenv").config({ ), }); const GraphQLClient = require("graphql-request").GraphQLClient; +const soap = require("soap"); const queries = require("../graphql-client/queries"); const CdkBase = require("./cdk"); +const CdkWsdl = require("./cdk-wsdl").default; const IMEX_CDK_USER = process.env.IMEX_CDK_USER, IMEX_CDK_PASSWORD = process.env.IMEX_CDK_PASSWORD; exports.default = async function (socket, jobid) { - CdkBase.createLogEvent( - socket, - "DEBUG", - `Received Job export request for id ${jobid}` - ); + socket.logEvents = []; + try { + CdkBase.createLogEvent( + socket, + "DEBUG", + `Received Job export request for id ${jobid}` + ); - const JobData = await QueryJobData(socket, jobid); + const JobData = await QueryJobData(socket, jobid); + console.log(JSON.stringify(JobData, null, 2)); + const DealerId = JobData.bodyshop.cdk_dealerid; - const DealerId = JobData.bodyshop.dealerid; + CdkBase.createLogEvent( + socket, + "TRACE", + `Dealer ID detected: ${JSON.stringify(DealerId)}` + ); - CdkBase.createLogEvent( - socket, - "TRACE", - `Dealer ID detected: ${JSON.stringify(DealerId)}` - ); - - await DetermineDMSVid(socket, JobData); - // Begin Calculate VID from DMS {1} + // Begin Calculate VID from DMS {1} + await DetermineDMSVid(socket, JobData); + } catch (error) { + CdkBase.createLogEvent( + socket, + "ERROR", + `Error encountered in JobExport. ${error}` + ); + } finally { + //Ensure we always insert logEvents + //GQL to insert logevents. + } }; async function QueryJobData(socket, jobid) { @@ -42,11 +56,32 @@ async function QueryJobData(socket, jobid) { CdkBase.createLogEvent( socket, "TRACE", - `Job data query result ${JSON.stringify(result)}` + `Job data query result ${JSON.stringify(result, null, 2)}` ); - return result; + return result.jobs_by_pk; } async function DetermineDMSVid(socket, JobData) { CdkBase.createLogEvent(socket, "TRACE", "{1} Begin Determine DMS VehicleID"); + + try { + //Create SOAP Request for + const soapClient = await soap.createClientAsync(CdkWsdl.VehicleSearch); + const result = await soapClient.searchIDsByVINAsync( + { + arg0: { password: IMEX_CDK_PASSWORD, username: IMEX_CDK_USER }, + arg1: { id: JobData.bodyshop.cdk_dealerid }, + arg2: { VIN: JobData.v_vin }, + }, + + {} + ); + console.log(result); + } catch (error) { + CdkBase.createLogEvent( + socket, + "ERROR", + `Error in DetermineDMSVid - ${JSON.stringify(error, null, 2)}` + ); + } } diff --git a/server/cdk/cdk-wsdl.js b/server/cdk/cdk-wsdl.js new file mode 100644 index 000000000..acf66a0b5 --- /dev/null +++ b/server/cdk/cdk-wsdl.js @@ -0,0 +1,4 @@ +exports.default = { + VehicleSearch: + "https://uat-3pa.dmotorworks.com/pip-vehicle/services/VehicleSearch?wsdl", +}; diff --git a/server/cdk/cdk.js b/server/cdk/cdk.js index 6846609eb..8f23cd98a 100644 --- a/server/cdk/cdk.js +++ b/server/cdk/cdk.js @@ -10,6 +10,7 @@ require("dotenv").config({ const { io } = require("../../server"); const { admin } = require("../firebase/firebase-handler"); const CdkJobExport = require("./cdk-job-export").default; +const { isArray } = require("lodash"); io.use(function (socket, next) { try { @@ -34,7 +35,7 @@ io.use(function (socket, next) { }); io.on("connection", (socket) => { - socket.log_level = "DEBUG"; + socket.log_level = "TRACE"; createLogEvent(socket, "DEBUG", `Connected and Authenticated.`); socket.on("set-log-level", (level) => { @@ -63,6 +64,14 @@ function createLogEvent(socket, level, message) { level, message, }); + + if (socket.logEvents && isArray(socket.logEvents)) { + socket.logEvents.push({ + timestamp: new Date(), + level, + message, + }); + } } } diff --git a/server/cdk/getVehIds.xml b/server/cdk/getVehIds.xml new file mode 100644 index 000000000..61fdfbcdc --- /dev/null +++ b/server/cdk/getVehIds.xml @@ -0,0 +1,18 @@ + + + + + + password + username + + + 3PADEALERID + + + 5GALRCED7AJ169491 + + + + \ No newline at end of file diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 7d14d6325..ef0501f62 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -161,6 +161,13 @@ query QUERY_JOBS_FOR_CDK_EXPORT($id: uuid!) { rate_matd class ca_bc_pvrt + plate_no + plate_st + v_vin + v_model_yr + v_model_desc + v_make_desc + v_color ca_customer_gst bodyshop { id diff --git a/yarn.lock b/yarn.lock index e4e1b080c..53ba85566 100644 --- a/yarn.lock +++ b/yarn.lock @@ -463,7 +463,7 @@ agent-base@6, agent-base@^6.0.0: dependencies: debug "4" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -529,6 +529,18 @@ asap@^2.0.0: resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + ast-types@0.x.x: version "0.14.2" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd" @@ -590,6 +602,16 @@ aws-sdk@^2.906.0: uuid "3.3.2" xml2js "0.4.19" +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + axios@^0.21.1: version "0.21.1" resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" @@ -622,6 +644,13 @@ batch@^0.6.1: resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16" integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + bignumber.js@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1" @@ -713,6 +742,11 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -834,7 +868,7 @@ colorspace@1.1.x: color "3.0.x" text-hex "1.0.x" -combined-stream@^1.0.6, combined-stream@^1.0.8: +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== @@ -952,7 +986,7 @@ core-js@3.6.5: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== -core-util-is@~1.0.0: +core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= @@ -1022,6 +1056,13 @@ cssom@^0.4.4: resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + data-uri-to-buffer@1: version "1.2.0" resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" @@ -1213,6 +1254,14 @@ duplexify@^4.0.0, duplexify@^4.1.1: readable-stream "^3.1.1" stream-shift "^1.0.0" +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz#ae0f0fa2d85045ef14a817daa3ce9acd0489e5bf" @@ -1534,6 +1583,16 @@ extract-files@^9.0.0: resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + fast-deep-equal@^3.1.1: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -1657,6 +1716,11 @@ follow-redirects@^1.10.0: resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267" integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA== +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + form-data@^2.0.0, form-data@^2.3.1: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -1675,6 +1739,15 @@ form-data@^3.0.0: combined-stream "^1.0.8" mime-types "^2.1.12" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + formidable@^1.2.0, formidable@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.2.2.tgz#bf69aea2972982675f00865342b982986f6b8dd9" @@ -1797,6 +1870,13 @@ get-uri@^2.0.0: ftp "~0.3.10" readable-stream "2" +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + glob-parent@^5.0.0: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -1919,6 +1999,19 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2014,6 +2107,28 @@ http-proxy-agent@^4.0.0, http-proxy-agent@^4.0.1: agent-base "6" debug "4" +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +httpntlm@^1.5.2: + version "1.7.7" + resolved "https://registry.yarnpkg.com/httpntlm/-/httpntlm-1.7.7.tgz#51b914f18e5de2868d4bfe50aeecdb1db23218a1" + integrity sha512-Pv2Rvrz8H0qv1Dne5mAdZ9JegG1uc6Vu5lwLflIY6s8RKHdZQbW39L4dYswSgqMDT0pkJILUTKjeyU0VPNRZjA== + dependencies: + httpreq ">=0.4.22" + underscore "~1.12.1" + +httpreq@>=0.4.22: + version "0.5.1" + resolved "https://registry.yarnpkg.com/httpreq/-/httpreq-0.5.1.tgz#33702c38270d2e68bb146056daea5d35b87f3a19" + integrity sha512-be2QtLktIyLEekfJ+MDSlPGO6nGTccJMrpBSwpLdOS71gO9yidWmOAhTA/ndbP5TMVldhvYcm4k6Ybbft7ejjQ== + https-proxy-agent@5, https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -2190,7 +2305,7 @@ is-string@^1.0.5: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== -is-typedarray@^1.0.0: +is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= @@ -2217,6 +2332,11 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + jake@^10.6.1: version "10.8.2" resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.2.tgz#ebc9de8558160a66d82d0eadc6a2e58fbc500a7b" @@ -2260,6 +2380,11 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + json-bigint@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-bigint/-/json-bigint-0.2.3.tgz#118d7f6ff1d38659f19f94cf73e64a75a3f988a8" @@ -2289,11 +2414,21 @@ json-schema-traverse@^1.0.0: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -2317,6 +2452,16 @@ jsonwebtoken@^8.3.0, jsonwebtoken@^8.5.1: ms "^2.1.1" semver "^5.6.0" +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -2616,6 +2761,11 @@ mime-db@1.47.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== +mime-db@1.48.0: + version "1.48.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.48.0.tgz#e35b31045dd7eada3aaad537ed88a33afbef2d1d" + integrity sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ== + mime-types@^2.0.8, mime-types@^2.1.12, mime-types@~2.1.24: version "2.1.30" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" @@ -2623,6 +2773,13 @@ mime-types@^2.0.8, mime-types@^2.1.12, mime-types@~2.1.24: dependencies: mime-db "1.47.0" +mime-types@~2.1.19: + version "2.1.31" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.31.tgz#a00d76b74317c61f9c2db2218b8e9f8e9c5c9e6b" + integrity sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg== + dependencies: + mime-db "1.48.0" + mime@1.6.0, mime@^1.4.1: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -2745,6 +2902,11 @@ nth-check@~1.0.1: dependencies: boolbase "~1.0.0" +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + object-assign@^4: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -2918,6 +3080,11 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + phone@^2.4.20: version "2.4.21" resolved "https://registry.yarnpkg.com/phone/-/phone-2.4.21.tgz#67364ceb9d5d01f56cd881f272b346209501a74f" @@ -3092,6 +3259,11 @@ qs@^6.5.0, qs@^6.5.1, qs@^6.6.0, qs@^6.9.4: dependencies: side-channel "^1.0.4" +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + query-string@^6.12.1: version "6.14.1" resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" @@ -3198,6 +3370,32 @@ remote-content@^2.0.0: superagent "^6.1.0" superagent-proxy "^2.1.0" +request@>=2.9.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -3279,12 +3477,12 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== -safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@~5.2.0: +safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -3294,7 +3492,7 @@ sax@1.2.1: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" integrity sha1-e45lYZCyKOgaZq6nSEgNgozS03o= -sax@>=0.6.0: +sax@>=0.6, sax@>=0.6.0: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -3417,6 +3615,21 @@ snakeize@^0.1.0: resolved "https://registry.yarnpkg.com/snakeize/-/snakeize-0.1.0.tgz#10c088d8b58eb076b3229bb5a04e232ce126422d" integrity sha1-EMCI2LWOsHazIpu1oE4jLOEmQi0= +soap@^0.39.0: + version "0.39.0" + resolved "https://registry.yarnpkg.com/soap/-/soap-0.39.0.tgz#66f1eebbd93cef39b40623c01eeb434c8898a720" + integrity sha512-H1pbwOzc2Q+T2u2OZ/VOGoXKPjjlEELJru6glc1Vi9nZtfxGYRW6teU0W/vavSZ1j404VGCA8TNzWqAm8QI7Xg== + dependencies: + debug "^4.1.1" + get-stream "^6.0.0" + httpntlm "^1.5.2" + lodash "^4.17.19" + request ">=2.9.0" + sax ">=0.6" + strip-bom "^3.0.0" + uuid "^8.3.0" + xml-crypto "^2.1.0" + socket.io-adapter@~2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-2.3.1.tgz#a442720cb09a4823cfb81287dda1f9b52d4ccdb2" @@ -3553,6 +3766,21 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -3620,6 +3848,11 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" @@ -3771,7 +4004,7 @@ toidentifier@1.0.0: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== -tough-cookie@^2.0.0: +tough-cookie@^2.0.0, tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== @@ -3804,6 +4037,18 @@ tsscmp@1.0.6: resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb" integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA== +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + twilio@^3.62.0: version "3.62.0" resolved "https://registry.yarnpkg.com/twilio/-/twilio-3.62.0.tgz#5c51e260c07b6df2838bac35df36c08fca602f90" @@ -3877,6 +4122,11 @@ uid-safe@2.1.5: dependencies: random-bytes "~1.0.0" +underscore@~1.12.1: + version "1.12.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" + integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== + unique-string@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-2.0.0.tgz#39c6451f81afb2749de2b233e3f7c5e8843bd89d" @@ -3932,7 +4182,12 @@ uuid@3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== -uuid@^8.0.0: +uuid@^3.3.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +uuid@^8.0.0, uuid@^8.3.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -3955,6 +4210,15 @@ vary@^1, vary@~1.1.2: resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + weak-map@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/weak-map/-/weak-map-1.0.5.tgz#79691584d98607f5070bd3b70a40e6bb22e401eb" @@ -4043,6 +4307,14 @@ xdg-basedir@^4.0.0: resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-4.0.0.tgz#4bc8d9984403696225ef83a1573cbbcb4e79db13" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== +xml-crypto@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xml-crypto/-/xml-crypto-2.1.2.tgz#501506d42e466f6cd908c5a03182217231b4e4b8" + integrity sha512-DBhZXtBjENtLwJmeJhLUBwUm9YWNjCRvAx6ESP4VJyM9PDuKqZu2Fp5Y5HKqcdJT7vV7eI25Z4UBMezji6QloQ== + dependencies: + xmldom "^0.6.0" + xpath "0.0.32" + xml2js@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" @@ -4072,6 +4344,16 @@ xmlbuilder@~9.0.1: resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= +xmldom@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.6.0.tgz#43a96ecb8beece991cef382c08397d82d4d0c46f" + integrity sha512-iAcin401y58LckRZ0TkI4k0VSM1Qg0KGSc3i8rU+xrxe19A/BN1zHyVSJY7uoutVlaTSzYyk/v5AmkewAP7jtg== + +xpath@0.0.32: + version "0.0.32" + resolved "https://registry.yarnpkg.com/xpath/-/xpath-0.0.32.tgz#1b73d3351af736e17ec078d6da4b8175405c48af" + integrity sha512-rxMJhSIoiO8vXcWvSifKqhvV96GjiD5wYb8/QHdoRyQvraTpp4IEv944nhGausZZ3u7dhQXteZuZbaqfpB7uYw== + xregexp@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-2.0.0.tgz#52a63e56ca0b84a7f3a5f3d61872f126ad7a5943" From a7e972b3ce3228c6c46bbc729e1720341f6e5228 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 23 Jun 2021 13:22:03 -0700 Subject: [PATCH 3/6] IO-1213 Recalc after line delete. --- .../job-detail-lines/job-lines.component.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 8ebc5d284..8ac3bdd02 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -16,6 +16,7 @@ import { Table, Tag, } from "antd"; +import axios from "axios"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -291,8 +292,8 @@ export function JobLinesComponent({ From d634fcd4cf1148c0db7a8b011ff80ad27b741962 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 23 Jun 2021 13:31:25 -0700 Subject: [PATCH 4/6] IO-1218 CLM_NO Ui fix on payments enter. --- .../job-search-select/job-search-select.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/job-search-select/job-search-select.component.jsx b/client/src/components/job-search-select/job-search-select.component.jsx index 04ab0b27d..42c0be5db 100644 --- a/client/src/components/job-search-select/job-search-select.component.jsx +++ b/client/src/components/job-search-select/job-search-select.component.jsx @@ -80,7 +80,7 @@ const JobSearchSelect = ( {theOptions ? theOptions.map((o) => ( + + nofeatureaccess + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + noshop false diff --git a/client/src/components/feature-wrapper/feature-wrapper.component.jsx b/client/src/components/feature-wrapper/feature-wrapper.component.jsx new file mode 100644 index 000000000..af609ac1f --- /dev/null +++ b/client/src/components/feature-wrapper/feature-wrapper.component.jsx @@ -0,0 +1,50 @@ +import moment from "moment"; +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 AlertComponent from "../alert/alert.component"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, +}); + +function FeatureWrapper({ + bodyshop, + featureName, + noauth, + children, + ...restProps +}) { + const { t } = useTranslation(); + + if (HasFeatureAccess({ featureName, bodyshop })) return children; + + return ( + noauth || ( + + ) + ); +} + +export function HasFeatureAccess({ featureName, bodyshop }) { + return ( + bodyshop.features.allAccess || + moment(bodyshop.features[featureName]).isAfter(moment()) + ); +} + +export default connect(mapStateToProps, null)(FeatureWrapper); + +/* +dashboard +production-board +scoreboard +csi +tech-console +mobile-imaging +*/ diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.csi.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.csi.component.jsx index 9cecb5d22..c205e3088 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.csi.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.csi.component.jsx @@ -19,6 +19,7 @@ import { import { selectBodyshop } from "../../redux/user/user.selectors"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import { TemplateList } from "../../utils/TemplateConstants"; +import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser' @@ -179,6 +180,8 @@ export function JobsDetailHeaderCsi({ } }; + if (!HasFeatureAccess({ featureName: "csi", bodyshop })) return <>; + return ( ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), @@ -28,9 +29,11 @@ export function ExportsLogPageContainer({ setBreadcrumbs, setSelectedHeader }) { }, [setBreadcrumbs, t, setSelectedHeader]); return ( - - - + + + + + ); } export default connect(null, mapDispatchToProps)(ExportsLogPageContainer); diff --git a/client/src/pages/production-board/production-board.container.jsx b/client/src/pages/production-board/production-board.container.jsx index c99a9f26a..20fc35d51 100644 --- a/client/src/pages/production-board/production-board.container.jsx +++ b/client/src/pages/production-board/production-board.container.jsx @@ -9,6 +9,7 @@ import { } from "../../redux/application/application.actions"; import { selectBodyshop } from "../../redux/user/user.selectors"; import ProductionBoardComponent from "./production-board.component"; +import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -38,9 +39,11 @@ export function ProductionBoardContainer({ }, [t, setBreadcrumbs, setSelectedHeader]); return ( - - - + + + + + ); } export default connect( diff --git a/client/src/pages/scoreboard/scoreboard.page.container.jsx b/client/src/pages/scoreboard/scoreboard.page.container.jsx index 3f17416aa..2ded23396 100644 --- a/client/src/pages/scoreboard/scoreboard.page.container.jsx +++ b/client/src/pages/scoreboard/scoreboard.page.container.jsx @@ -12,6 +12,7 @@ import { useSubscription } from "@apollo/client"; import { SUBSCRIPTION_SCOREBOARD } from "../../graphql/scoreboard.queries"; import moment from "moment"; import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; +import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -44,9 +45,11 @@ export function ScoreboardContainer({ setBreadcrumbs, setSelectedHeader }) { }, [t, setBreadcrumbs, setSelectedHeader]); return ( - - - + + + + + ); } export default connect( diff --git a/client/src/pages/tech/tech.page.component.jsx b/client/src/pages/tech/tech.page.component.jsx index 95c5c8138..ef00da57e 100644 --- a/client/src/pages/tech/tech.page.component.jsx +++ b/client/src/pages/tech/tech.page.component.jsx @@ -10,6 +10,7 @@ import LoadingSpinner from "../../components/loading-spinner/loading-spinner.com import TechHeader from "../../components/tech-header/tech-header.component"; import TechSider from "../../components/tech-sider/tech-sider.component"; import { selectTechnician } from "../../redux/tech/tech.selectors"; +import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component"; import "./tech.page.styles.scss"; const TimeTicketModalContainer = lazy(() => import("../../components/time-ticket-modal/time-ticket-modal.container") @@ -51,52 +52,55 @@ export function TechPage({ technician, match }) { }, [t]); return ( - + {technician ? null : } - + - }> - - - - - - - - - - + } + > + + + + + + + + + + + + diff --git a/client/src/pages/tech/tech.page.container.jsx b/client/src/pages/tech/tech.page.container.jsx index de48e041d..5fb547cd4 100644 --- a/client/src/pages/tech/tech.page.container.jsx +++ b/client/src/pages/tech/tech.page.container.jsx @@ -7,12 +7,18 @@ import { setBodyshop } from "../../redux/user/user.actions"; import TechPage from "./tech.page.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import { useTranslation } from "react-i18next"; +import { selectBodyshop } from "../../redux/user/user.selectors"; +import { createStructuredSelector } from "reselect"; + +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop, +}); const mapDispatchToProps = (dispatch) => ({ setBodyshop: (bs) => dispatch(setBodyshop(bs)), }); -export function TechPageContainer({ setBodyshop, match }) { +export function TechPageContainer({ bodyshop, setBodyshop, match }) { const { loading, error, data } = useQuery(QUERY_BODYSHOP, { fetchPolicy: "network-only", }); @@ -21,10 +27,10 @@ export function TechPageContainer({ setBodyshop, match }) { if (data) setBodyshop(data.bodyshops[0]); }, [data, setBodyshop]); - if (loading) + if (loading || !bodyshop) return ; if (error) return ; return ; } -export default connect(null, mapDispatchToProps)(TechPageContainer); +export default connect(mapStateToProps, mapDispatchToProps)(TechPageContainer); diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index d0cd83a08..2c4ad3f22 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -899,6 +899,7 @@ "newversionmessage": "Click refresh below to update to the latest available version of ImEX Online. Please make sure all other tabs and windows are closed.", "newversiontitle": "New version of ImEX Online Available", "noacctfilepath": "There is no accounting file path set. You will not be able to export any items.", + "nofeatureaccess": "You do not have access to this feature of ImEX Online. Please contact support to request a license for this feature.", "noshop": "You do not have access to any shops. Please reach out to your shop manager or technical support. ", "notfoundsub": "Please make sure that you have access to the data or that the link is correct.", "notfoundtitle": "We couldn't find what you're looking for...", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 223b5772f..d2004c724 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -899,6 +899,7 @@ "newversionmessage": "", "newversiontitle": "", "noacctfilepath": "", + "nofeatureaccess": "", "noshop": "", "notfoundsub": "", "notfoundtitle": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 08efbf140..16733c621 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -899,6 +899,7 @@ "newversionmessage": "", "newversiontitle": "", "noacctfilepath": "", + "nofeatureaccess": "", "noshop": "", "notfoundsub": "", "notfoundtitle": "", diff --git a/hasura/migrations/1624480412524_track_all_relationships/down.yaml b/hasura/migrations/1624480412524_track_all_relationships/down.yaml new file mode 100644 index 000000000..af1251f44 --- /dev/null +++ b/hasura/migrations/1624480412524_track_all_relationships/down.yaml @@ -0,0 +1,12 @@ +- args: + relationship: partsOrdersByOrderedby + table: + name: users + schema: public + type: drop_relationship +- args: + relationship: userByOrderedby + table: + name: parts_orders + schema: public + type: drop_relationship diff --git a/hasura/migrations/1624480412524_track_all_relationships/up.yaml b/hasura/migrations/1624480412524_track_all_relationships/up.yaml new file mode 100644 index 000000000..b03f180ad --- /dev/null +++ b/hasura/migrations/1624480412524_track_all_relationships/up.yaml @@ -0,0 +1,20 @@ +- args: + name: partsOrdersByOrderedby + table: + name: users + schema: public + using: + foreign_key_constraint_on: + column: orderedby + table: + name: parts_orders + schema: public + type: create_array_relationship +- args: + name: userByOrderedby + table: + name: parts_orders + schema: public + using: + foreign_key_constraint_on: orderedby + type: create_object_relationship diff --git a/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/down.yaml b/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/down.yaml new file mode 100644 index 000000000..d53fc1675 --- /dev/null +++ b/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/down.yaml @@ -0,0 +1,5 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."bodyshops" DROP COLUMN "features"; + type: run_sql diff --git a/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/up.yaml b/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/up.yaml new file mode 100644 index 000000000..68869f6a8 --- /dev/null +++ b/hasura/migrations/1624480467391_alter_table_public_bodyshops_add_column_features/up.yaml @@ -0,0 +1,6 @@ +- args: + cascade: false + read_only: false + sql: ALTER TABLE "public"."bodyshops" ADD COLUMN "features" jsonb NULL DEFAULT + jsonb_build_object(); + type: run_sql diff --git a/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/down.yaml b/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/down.yaml new file mode 100644 index 000000000..330d7d1af --- /dev/null +++ b/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/down.yaml @@ -0,0 +1,86 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - accountingconfig + - address1 + - address2 + - appt_alt_transport + - appt_colors + - appt_length + - bill_tax_rates + - cdk_dealerid + - city + - country + - created_at + - default_adjustment_rate + - deliverchecklist + - email + - enforce_class + - enforce_referral + - federal_tax_id + - id + - imexshopid + - inhousevendorid + - insurance_vendor_id + - intakechecklist + - jc_hourly_rates + - jobsizelimit + - logo_img_path + - md_categories + - md_ccc_rates + - md_classes + - md_hour_split + - md_ins_cos + - md_jobline_presets + - md_labor_rates + - md_messaging_presets + - md_notes_presets + - md_order_statuses + - md_parts_locations + - md_payment_types + - md_rbac + - md_referral_sources + - md_responsibility_centers + - md_ro_statuses + - messagingservicesid + - phone + - prodtargethrs + - production_config + - region_config + - schedule_end_time + - schedule_start_time + - scoreboard_target + - shopname + - shoprates + - speedprint + - ssbuckets + - state + - state_tax_id + - stripe_acct_id + - sub_status + - target_touchtime + - template_header + - textid + - updated_at + - use_fippa + - website + - workingdays + - zip_post + computed_fields: [] + filter: + associations: + user: + authid: + _eq: X-Hasura-User-Id + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/up.yaml b/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/up.yaml new file mode 100644 index 000000000..24984ef56 --- /dev/null +++ b/hasura/migrations/1624480496210_update_permission_user_public_table_bodyshops/up.yaml @@ -0,0 +1,87 @@ +- args: + role: user + table: + name: bodyshops + schema: public + type: drop_select_permission +- args: + permission: + allow_aggregations: false + columns: + - accountingconfig + - address1 + - address2 + - appt_alt_transport + - appt_colors + - appt_length + - bill_tax_rates + - cdk_dealerid + - city + - country + - created_at + - default_adjustment_rate + - deliverchecklist + - email + - enforce_class + - enforce_referral + - features + - federal_tax_id + - id + - imexshopid + - inhousevendorid + - insurance_vendor_id + - intakechecklist + - jc_hourly_rates + - jobsizelimit + - logo_img_path + - md_categories + - md_ccc_rates + - md_classes + - md_hour_split + - md_ins_cos + - md_jobline_presets + - md_labor_rates + - md_messaging_presets + - md_notes_presets + - md_order_statuses + - md_parts_locations + - md_payment_types + - md_rbac + - md_referral_sources + - md_responsibility_centers + - md_ro_statuses + - messagingservicesid + - phone + - prodtargethrs + - production_config + - region_config + - schedule_end_time + - schedule_start_time + - scoreboard_target + - shopname + - shoprates + - speedprint + - ssbuckets + - state + - state_tax_id + - stripe_acct_id + - sub_status + - target_touchtime + - template_header + - textid + - updated_at + - use_fippa + - website + - workingdays + - zip_post + computed_fields: [] + filter: + associations: + user: + authid: + _eq: X-Hasura-User-Id + role: user + table: + name: bodyshops + schema: public + type: create_select_permission diff --git a/hasura/migrations/metadata.yaml b/hasura/migrations/metadata.yaml index 3a4f43614..3481eec42 100644 --- a/hasura/migrations/metadata.yaml +++ b/hasura/migrations/metadata.yaml @@ -766,6 +766,7 @@ tables: - email - enforce_class - enforce_referral + - features - federal_tax_id - id - imexshopid @@ -3596,6 +3597,9 @@ tables: - name: user using: foreign_key_constraint_on: user_email + - name: userByOrderedby + using: + foreign_key_constraint_on: orderedby - name: vendor using: foreign_key_constraint_on: vendorid @@ -4172,6 +4176,13 @@ tables: table: schema: public name: parts_orders + - name: partsOrdersByOrderedby + using: + foreign_key_constraint_on: + column: orderedby + table: + schema: public + name: parts_orders insert_permissions: - role: user permission: From 2172cc2d0408e2da756c6643f87de0132a726dab Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 25 Jun 2021 07:42:49 -0700 Subject: [PATCH 6/6] IO-233 WS Updates and templat eadditions --- bodyshop_translations.babel | 21 +++ .../production-list-print.component.jsx | 42 +++++ .../production-list-table.component.jsx | 18 ++- .../contract-detail.page.component.jsx | 17 ++ .../dms.container.jsx} | 29 ++-- .../pages/manage/manage.page.component.jsx | 4 +- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + client/src/utils/TemplateConstants.js | 150 ++++++++++-------- server.js | 2 +- server/cdk/cdk-job-export.js | 2 +- .../{cdk/cdk.js => web-sockets/web-socket.js} | 4 +- 13 files changed, 203 insertions(+), 89 deletions(-) create mode 100644 client/src/components/production-list-table/production-list-print.component.jsx rename client/src/pages/{cdk/cdk.container.jsx => dms/dms.container.jsx} (84%) rename server/{cdk/cdk.js => web-sockets/web-socket.js} (95%) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 7ca06523b..a63cff464 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -29001,6 +29001,27 @@ + + courtesy_car_impound + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + courtesy_car_terms false diff --git a/client/src/components/production-list-table/production-list-print.component.jsx b/client/src/components/production-list-table/production-list-print.component.jsx new file mode 100644 index 000000000..bd26d2313 --- /dev/null +++ b/client/src/components/production-list-table/production-list-print.component.jsx @@ -0,0 +1,42 @@ +import { Button, Dropdown, Menu } from "antd"; +import React, { useState } from "react"; +import { TemplateList } from "../../utils/TemplateConstants"; +import { useTranslation } from "react-i18next"; +import { GenerateDocument } from "../../utils/RenderTemplate"; + +const ProdTemplates = TemplateList("production"); + +export default function ProductionListPrint() { + const { t } = useTranslation(); + const [loading, setLoading] = useState(false); + return ( + + {Object.keys(ProdTemplates).map((key) => ( + { + setLoading(true); + await GenerateDocument( + { + name: ProdTemplates[key].key, + // variables: { id: contract.id }, + }, + {}, + "p" + ); + setLoading(false); + }} + > + {ProdTemplates[key].title} + + ))} + + } + > + + + ); +} diff --git a/client/src/components/production-list-table/production-list-table.component.jsx b/client/src/components/production-list-table/production-list-table.component.jsx index 5ea082771..59507c593 100644 --- a/client/src/components/production-list-table/production-list-table.component.jsx +++ b/client/src/components/production-list-table/production-list-table.component.jsx @@ -13,6 +13,7 @@ import ProductionListColumnsAdd from "../production-list-columns/production-list import ProductionListColumns from "../production-list-columns/production-list-columns.data"; import ProductionListDetail from "../production-list-detail/production-list-detail.component"; import ProductionListSaveConfigButton from "../production-list-save-config-button/production-list-save-config-button.component"; +import ProductionListPrint from "./production-list-print.component"; import ProductionListTableViewSelect from "./production-list-table-view-select.component"; import ResizeableTitle from "./production-list-table.resizeable.component"; @@ -88,14 +89,16 @@ export function ProductionListTable({ setColumns(columns.filter((i) => i.key !== key)); }; - const handleResize = (index) => (e, { size }) => { - const nextColumns = [...columns]; - nextColumns[index] = { - ...nextColumns[index], - width: size.width, + const handleResize = + (index) => + (e, { size }) => { + const nextColumns = [...columns]; + nextColumns[index] = { + ...nextColumns[index], + width: size.width, + }; + setColumns(nextColumns); }; - setColumns(nextColumns); - }; const headerItem = (col) => ( + } /> diff --git a/client/src/pages/contract-detail/contract-detail.page.component.jsx b/client/src/pages/contract-detail/contract-detail.page.component.jsx index 6cf5ff1f2..3cf317236 100644 --- a/client/src/pages/contract-detail/contract-detail.page.component.jsx +++ b/client/src/pages/contract-detail/contract-detail.page.component.jsx @@ -110,6 +110,23 @@ export function ContractDetailPage({ "printcenter.courtesycarcontract.courtesy_car_terms" )} + + GenerateDocument( + { + name: TemplateList("courtesycarcontract") + .courtesy_car_impound.key, + variables: { id: contract.id }, + }, + {}, + "p" + ) + } + > + {t( + "printcenter.courtesycarcontract.courtesy_car_impound" + )} + } > diff --git a/client/src/pages/cdk/cdk.container.jsx b/client/src/pages/dms/dms.container.jsx similarity index 84% rename from client/src/pages/cdk/cdk.container.jsx rename to client/src/pages/dms/dms.container.jsx index 79d5277d0..342035ec5 100644 --- a/client/src/pages/cdk/cdk.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -21,7 +21,7 @@ const mapDispatchToProps = (dispatch) => ({ setSelectedHeader: (key) => dispatch(setSelectedHeader(key)), }); -export default connect(mapStateToProps, mapDispatchToProps)(CdkContainer); +export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer); export const socket = SocketIO( process.env.NODE_ENV === "production" @@ -29,7 +29,6 @@ export const socket = SocketIO( : window.location.origin, { path: "/ws", - // transports: ["websocket"], auth: async (callback) => { const token = auth.currentUser && (await auth.currentUser.getIdToken()); callback({ token }); @@ -37,16 +36,17 @@ export const socket = SocketIO( } ); -export function CdkContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { +export function DmsContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { const { t } = useTranslation(); const [logs, setLogs] = useState([]); + useEffect(() => { - document.title = t("titles.cdk"); - setSelectedHeader("cdk"); + document.title = t("titles.dms"); + setSelectedHeader("dms"); setBreadcrumbs([ { - link: "/manage/cdk", - label: t("titles.bc.cdk"), + link: "/manage/dms", + label: t("titles.bc.dms"), }, ]); }, [t, setBreadcrumbs, setSelectedHeader]); @@ -63,7 +63,6 @@ export function CdkContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { }); socket.connect(); - socket.emit("set-log-level", "TRACE"); return () => { @@ -74,11 +73,16 @@ export function CdkContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { if (!bodyshop.cdk_dealerid) return ; + const dmsType = determineDmsType(bodyshop); + return (