diff --git a/client/src/pages/dms/dms.container.jsx b/client/src/pages/dms/dms.container.jsx index a4ef277d0..fe0335658 100644 --- a/client/src/pages/dms/dms.container.jsx +++ b/client/src/pages/dms/dms.container.jsx @@ -41,8 +41,7 @@ export default connect(mapStateToProps, mapDispatchToProps)(DmsContainer); export const socket = SocketIO( import.meta.env.PROD ? import.meta.env.VITE_APP_AXIOS_BASE_API_URL - : window.location.origin, - // "http://localhost:4000", // for dev testing, + : "http://localhost:4000", // for dev testing, { path: "/ws", withCredentials: true, diff --git a/server/cdk/cdk-calculate-allocations.js b/server/cdk/cdk-calculate-allocations.js index a1564ab69..1ec580fd4 100644 --- a/server/cdk/cdk-calculate-allocations.js +++ b/server/cdk/cdk-calculate-allocations.js @@ -26,7 +26,11 @@ exports.default = async function (socket, jobid) { const {bodyshop} = job; const taxAllocations = - InstanceManager({imex: { + InstanceManager({ + executeFunction:true, + deubg:true, + args: [], + imex: () => ({ local: { center: bodyshop.md_responsibility_centers.taxes.local.name, sale: Dinero(job.job_totals.totals.local_tax), @@ -48,7 +52,7 @@ exports.default = async function (socket, jobid) { profitCenter: bodyshop.md_responsibility_centers.taxes.federal, costCenter: bodyshop.md_responsibility_centers.taxes.federal, }, - }, rome:{ + }), rome: () => ({ tax_ty1: { center: bodyshop.md_responsibility_centers.taxes[`tax_ty1`].name, sale: Dinero(job.job_totals.totals.us_sales_tax_breakdown[`ty1Tax`]), @@ -84,7 +88,7 @@ exports.default = async function (socket, jobid) { profitCenter: bodyshop.md_responsibility_centers.taxes[`tax_ty5`], costCenter: bodyshop.md_responsibility_centers.taxes[`tax_ty5`], }, - } }) + }) }) //Determine if there are MAPA and MASH lines already on the estimate. @@ -439,6 +443,7 @@ if(InstanceManager({rome:true})){ }), ]; } catch (error) { + console.log(error) CdkBase.createLogEvent( socket, "ERROR", diff --git a/server/utils/instanceMgr.js b/server/utils/instanceMgr.js index 9b25bb665..e60f9e718 100644 --- a/server/utils/instanceMgr.js +++ b/server/utils/instanceMgr.js @@ -8,7 +8,7 @@ * @property { string | object | function } imex Return this prop if Rome. */ -function InstanceManager({ instance, debug, executeFunction, rome, promanager, imex }) { +function InstanceManager({ args, instance, debug, executeFunction, rome, promanager, imex }) { let propToReturn = null; switch (instance || process.env.INSTANCE) {