From 4f6db827e7faa275e29c68a5bbfa7b356f72a5be Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 6 Oct 2025 17:50:19 -0700 Subject: [PATCH 1/9] IO-3395 Postback Payment Date Signed-off-by: Allan Carr --- server/graphql-client/queries.js | 3 +++ server/intellipay/lib/handleCommentBasedPayment.js | 2 +- server/intellipay/lib/handleInvoiceBasedPayment.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 9a3bb1d6e..e5a79fd25 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -2859,6 +2859,7 @@ exports.GET_BODYSHOP_BY_ID = ` intellipay_config state notification_followers + timezone } } `; @@ -2950,6 +2951,7 @@ query GET_JOBID_BY_MERCHANTID_RONUMBER($merchantID: String!, $roNumber: String!) id intellipay_config email + timezone } } }`; @@ -2959,6 +2961,7 @@ query GET_BODYSHOP_BY_MERCHANTID($merchantID: String!) { bodyshops(where: {intellipay_merchant_id: {_eq: $merchantID}}) { id email + timezone } }`; diff --git a/server/intellipay/lib/handleCommentBasedPayment.js b/server/intellipay/lib/handleCommentBasedPayment.js index 535e92ab8..af862c7a1 100644 --- a/server/intellipay/lib/handleCommentBasedPayment.js +++ b/server/intellipay/lib/handleCommentBasedPayment.js @@ -48,7 +48,7 @@ const handleCommentBasedPayment = async (values, decodedComment, logger, logMeta payer: "Customer", type: getPaymentType(ipMapping, values.cardtype), jobid: p.jobid, - date: moment(Date.now()), + date: moment(Date.now()).tz(bodyshop.bodyshops_by_pk.timezone || "UTC"), payment_responses: { data: { amount: values.total, diff --git a/server/intellipay/lib/handleInvoiceBasedPayment.js b/server/intellipay/lib/handleInvoiceBasedPayment.js index d5fc97b9c..aca480d5f 100644 --- a/server/intellipay/lib/handleInvoiceBasedPayment.js +++ b/server/intellipay/lib/handleInvoiceBasedPayment.js @@ -97,7 +97,7 @@ const handleInvoiceBasedPayment = async (values, logger, logMeta, res) => { payer: "Customer", type: getPaymentType(ipMapping, values.cardtype), jobid: job.id, - date: moment(Date.now()) + date: moment(Date.now()).tz(bodyshop.timezone || "UTC") } }); From bdd5056c9a1efb1540f814599504c484a23291d0 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 6 Oct 2025 21:35:31 -0700 Subject: [PATCH 2/9] IO-3395 Postback Payment Date Signed-off-by: Allan Carr --- server/intellipay/lib/handleCommentBasedPayment.js | 4 +++- server/intellipay/lib/handleInvoiceBasedPayment.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/intellipay/lib/handleCommentBasedPayment.js b/server/intellipay/lib/handleCommentBasedPayment.js index af862c7a1..b6f503d33 100644 --- a/server/intellipay/lib/handleCommentBasedPayment.js +++ b/server/intellipay/lib/handleCommentBasedPayment.js @@ -48,7 +48,9 @@ const handleCommentBasedPayment = async (values, decodedComment, logger, logMeta payer: "Customer", type: getPaymentType(ipMapping, values.cardtype), jobid: p.jobid, - date: moment(Date.now()).tz(bodyshop.bodyshops_by_pk.timezone || "UTC"), + date: moment() + .tz(bodyshop.bodyshops_by_pk.timezone || "UTC") + .format("YYYY-MM-DD"), payment_responses: { data: { amount: values.total, diff --git a/server/intellipay/lib/handleInvoiceBasedPayment.js b/server/intellipay/lib/handleInvoiceBasedPayment.js index aca480d5f..2279a9da5 100644 --- a/server/intellipay/lib/handleInvoiceBasedPayment.js +++ b/server/intellipay/lib/handleInvoiceBasedPayment.js @@ -97,7 +97,9 @@ const handleInvoiceBasedPayment = async (values, logger, logMeta, res) => { payer: "Customer", type: getPaymentType(ipMapping, values.cardtype), jobid: job.id, - date: moment(Date.now()).tz(bodyshop.timezone || "UTC") + date: moment() + .tz(bodyshop.timezone || "UTC") + .format("YYYY-MM-DD") } }); From f19b9cb8e1740e7ee004bb531175f0f38ff5d95f Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 7 Oct 2025 10:59:10 -0700 Subject: [PATCH 3/9] IO-3395 Postback Payment Date Signed-off-by: Allan Carr --- server/intellipay/lib/handleCommentBasedPayment.js | 2 +- server/intellipay/lib/handleInvoiceBasedPayment.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/intellipay/lib/handleCommentBasedPayment.js b/server/intellipay/lib/handleCommentBasedPayment.js index b6f503d33..fd2ff3ef8 100644 --- a/server/intellipay/lib/handleCommentBasedPayment.js +++ b/server/intellipay/lib/handleCommentBasedPayment.js @@ -49,7 +49,7 @@ const handleCommentBasedPayment = async (values, decodedComment, logger, logMeta type: getPaymentType(ipMapping, values.cardtype), jobid: p.jobid, date: moment() - .tz(bodyshop.bodyshops_by_pk.timezone || "UTC") + .tz(bodyshop?.bodyshops_by_pk?.timezone ?? "UTC") .format("YYYY-MM-DD"), payment_responses: { data: { diff --git a/server/intellipay/lib/handleInvoiceBasedPayment.js b/server/intellipay/lib/handleInvoiceBasedPayment.js index 2279a9da5..34a1a5e8d 100644 --- a/server/intellipay/lib/handleInvoiceBasedPayment.js +++ b/server/intellipay/lib/handleInvoiceBasedPayment.js @@ -98,7 +98,7 @@ const handleInvoiceBasedPayment = async (values, logger, logMeta, res) => { type: getPaymentType(ipMapping, values.cardtype), jobid: job.id, date: moment() - .tz(bodyshop.timezone || "UTC") + .tz(bodyshop?.timezone ?? "UTC") .format("YYYY-MM-DD") } }); From 4dc72986d0ce43f611f5bee71b87a3f27b27c628 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 7 Oct 2025 11:07:12 -0700 Subject: [PATCH 4/9] IO-3373 Remove Cache Eviction Signed-off-by: Allan Carr --- .../dashboard-grid/dashboard-grid.component.jsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 8a214051e..72f029c2e 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -1,5 +1,5 @@ import Icon, { SyncOutlined } from "@ant-design/icons"; -import { useMutation, useQuery, useApolloClient } from "@apollo/client"; +import { useMutation, useQuery } from "@apollo/client"; import { Button, Dropdown, Space } from "antd"; import { PageHeader } from "@ant-design/pro-layout"; import { useMemo, useState, useEffect } from "react"; @@ -33,7 +33,6 @@ const mapDispatchToProps = () => ({ export function DashboardGridComponent({ currentUser }) { const { t } = useTranslation(); - const client = useApolloClient(); const notification = useNotification(); // Constants for layout defaults @@ -114,11 +113,6 @@ export function DashboardGridComponent({ currentUser }) { return false; } - // Note: Removed Apollo cache update to prevent triggering unwanted Redux actions - // Instead, evict the dashboard bodyshop query from cache to ensure fresh data on next fetch - client.cache.evict({ fieldName: "dashboard_bodyshops" }); - client.cache.gc(); - return true; } catch (err) { console.error(`Dashboard ${errorContext} failed`, err); From 0ccfe6f3aa334d7f26c89783d370fb5638c9d2a6 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 7 Oct 2025 13:02:44 -0700 Subject: [PATCH 5/9] IO-3368 CARFAX Adjustments for OP_CODE Signed-off-by: Allan Carr --- server/data/carfax-rps.js | 1 + server/data/carfax.js | 1 + server/graphql-client/queries.js | 1 + 3 files changed, 3 insertions(+) diff --git a/server/data/carfax-rps.js b/server/data/carfax-rps.js index d6065df57..de267d7ac 100644 --- a/server/data/carfax-rps.js +++ b/server/data/carfax-rps.js @@ -277,6 +277,7 @@ const GenerateDetailLines = (line) => { line_desc: line.line_desc ? line.line_desc.replace(NON_ASCII_REGEX, "") : null, oem_partno: line.oem_partno ? line.oem_partno.replace(NON_ASCII_REGEX, "") : null, alt_partno: line.alt_partno ? line.alt_partno.replace(NON_ASCII_REGEX, "") : null, + op_code: line.lbr_op || null, op_code_desc: generateOpCodeDescription(line.lbr_op), lbr_ty: generateLaborType(line.mod_lbr_ty), lbr_hrs: line.mod_lb_hrs || 0, diff --git a/server/data/carfax.js b/server/data/carfax.js index f2ff0bac2..aaa7d0dde 100644 --- a/server/data/carfax.js +++ b/server/data/carfax.js @@ -336,6 +336,7 @@ const GenerateDetailLines = (line) => { line_desc: line.line_desc ? line.line_desc.replace(NON_ASCII_REGEX, "") : null, oem_partno: line.oem_partno ? line.oem_partno.replace(NON_ASCII_REGEX, "") : null, alt_partno: line.alt_partno ? line.alt_partno.replace(NON_ASCII_REGEX, "") : null, + op_code: line.lbr_op || null, op_code_desc: line.op_code_desc ? line.op_code_desc.replace(NON_ASCII_REGEX, "") : null, lbr_ty: generateLaborType(line.mod_lbr_ty), lbr_hrs: line.mod_lb_hrs || 0, diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 3e29387bb..83dc62b2b 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -909,6 +909,7 @@ exports.CARFAX_QUERY = `query CARFAX_EXPORT($start: timestamptz, $bodyshopid: uu part_type part_qty } + lbr_op loss_date loss_desc ro_number From 36dfed80fb45bbe55596e4501f7e1db9fa99bb01 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 8 Oct 2025 19:31:46 -0700 Subject: [PATCH 6/9] IO-3386 CARFAX RPS adjustment Signed-off-by: Allan Carr --- server/graphql-client/queries.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/graphql-client/queries.js b/server/graphql-client/queries.js index 83dc62b2b..c20f2e9e6 100644 --- a/server/graphql-client/queries.js +++ b/server/graphql-client/queries.js @@ -904,12 +904,12 @@ exports.CARFAX_QUERY = `query CARFAX_EXPORT($start: timestamptz, $bodyshopid: uu line_desc mod_lb_hrs mod_lbr_ty + lbr_op oem_partno op_code_desc part_type part_qty } - lbr_op loss_date loss_desc ro_number From 7004ed988099ee8711c9171dd19d5a862f84dcff Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 9 Oct 2025 09:13:03 -0700 Subject: [PATCH 7/9] IO-3373 Dashboard Component Refresh Cyclic object fix Signed-off-by: Allan Carr --- .../src/components/dashboard-grid/dashboard-grid.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/dashboard-grid/dashboard-grid.component.jsx b/client/src/components/dashboard-grid/dashboard-grid.component.jsx index 72f029c2e..85b79f166 100644 --- a/client/src/components/dashboard-grid/dashboard-grid.component.jsx +++ b/client/src/components/dashboard-grid/dashboard-grid.component.jsx @@ -196,7 +196,7 @@ export function DashboardGridComponent({ currentUser }) { - From 41afedd02ce65308f917417dc90f018de4cb1f91 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 10 Oct 2025 15:58:32 -0400 Subject: [PATCH 8/9] Change Delemiters in BullMQ, was using an invalid : --- server/notifications/queues/appQueue.js | 2 +- server/notifications/queues/emailQueue.js | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/server/notifications/queues/appQueue.js b/server/notifications/queues/appQueue.js index 1f198698c..f16fe3a64 100644 --- a/server/notifications/queues/appQueue.js +++ b/server/notifications/queues/appQueue.js @@ -288,7 +288,7 @@ const dispatchAppsToQueue = async ({ appsToDispatch }) => { await appQueue.add( "add-notification", { jobId, bodyShopId, key, variables, recipients, body, jobRoNumber }, - { jobId: `${jobId}:${Date.now()}` } + { jobId: `${jobId}-${Date.now()}` } ); devDebugLogger(`Added notification to queue for jobId ${jobId} with ${recipients.length} recipients`); } diff --git a/server/notifications/queues/emailQueue.js b/server/notifications/queues/emailQueue.js index 7d965cb69..f4f968478 100644 --- a/server/notifications/queues/emailQueue.js +++ b/server/notifications/queues/emailQueue.js @@ -249,10 +249,15 @@ const dispatchEmailsToQueue = async ({ emailsToDispatch, logger }) => { continue; } - await emailAddQueue.add( - "add-email-notification", - { jobId, jobRoNumber, bodyShopName, bodyShopTimezone, body, recipients }, - { jobId: `${jobId}:${Date.now()}` } + await emailConsolidateQueue.add( + "consolidate-emails", + { jobId, jobRoNumber, bodyShopName, bodyShopTimezone }, + { + jobId: `consolidate-${jobId}`, + delay: EMAIL_CONSOLIDATION_DELAY, + attempts: 3, + backoff: LOCK_EXPIRATION + } ); devDebugLogger(`Added email notification to queue for jobId ${jobId} with ${recipients.length} recipients`); } From 8e6c809fc646cde0afd09697142cf60680e2f5ea Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 10 Oct 2025 16:02:56 -0400 Subject: [PATCH 9/9] Update --- server/notifications/queues/appQueue.js | 2 +- server/notifications/queues/emailQueue.js | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/server/notifications/queues/appQueue.js b/server/notifications/queues/appQueue.js index f16fe3a64..b376b2cf6 100644 --- a/server/notifications/queues/appQueue.js +++ b/server/notifications/queues/appQueue.js @@ -92,7 +92,7 @@ const loadAppQueue = async ({ pubClient, logger, redisHelpers, ioRedis }) => { "consolidate-notifications", { jobId, recipients }, { - jobId: `consolidate:${jobId}`, + jobId: `consolidate-${jobId}`, delay: APP_CONSOLIDATION_DELAY, attempts: 3, backoff: LOCK_EXPIRATION diff --git a/server/notifications/queues/emailQueue.js b/server/notifications/queues/emailQueue.js index f4f968478..a5ad8a530 100644 --- a/server/notifications/queues/emailQueue.js +++ b/server/notifications/queues/emailQueue.js @@ -86,7 +86,7 @@ const loadEmailQueue = async ({ pubClient, logger }) => { "consolidate-emails", { jobId, jobRoNumber, bodyShopName, bodyShopTimezone }, { - jobId: `consolidate:${jobId}`, + jobId: `consolidate-${jobId}`, delay: EMAIL_CONSOLIDATION_DELAY, attempts: 3, backoff: LOCK_EXPIRATION @@ -249,15 +249,10 @@ const dispatchEmailsToQueue = async ({ emailsToDispatch, logger }) => { continue; } - await emailConsolidateQueue.add( - "consolidate-emails", - { jobId, jobRoNumber, bodyShopName, bodyShopTimezone }, - { - jobId: `consolidate-${jobId}`, - delay: EMAIL_CONSOLIDATION_DELAY, - attempts: 3, - backoff: LOCK_EXPIRATION - } + await emailAddQueue.add( + "add-email-notification", + { jobId, jobRoNumber, bodyShopName, bodyShopTimezone, body, recipients }, + { jobId: `${jobId}-${Date.now()}` } ); devDebugLogger(`Added email notification to queue for jobId ${jobId} with ${recipients.length} recipients`); }