From 96bde9eb407eeef6de6886098726bd079e2f1ae4 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 10 Dec 2024 18:42:59 -0500 Subject: [PATCH] toString on the referralDate issue toString on the referralDate issue. the toString javascript function is adding timezone causing issues after 7pm --- src/store/index.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 6a67a9bc7..97fac2d0b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -693,10 +693,6 @@ export const mutations = { !sessionInformation.order.payment.isInsurance && !sessionInformation.order.serviceLocation.provider?.providerNumber ) { - console.log( - "------------- updateStateWithOrderInformation reset isInsurance -----------------" - ); - console.log(new Date() + " sessionInformation: " + JSON.stringify(sessionInformation)); state.order.payment.isInsurance = null; } else { state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance; @@ -2104,6 +2100,18 @@ export const actions = { ) { const order = context.state.order; + var dt = new Date(referralDate); + var month = "" + (dt.getMonth() + 1); + var day = "" + dt.getDate(); + const year = dt.getFullYear(); + + if (month.length < 2) + month = "0" + month; + if (day.length < 2) + day = "0" + day; + + const loadDate = `${year}-${month}-${day}`; + return globalMethods .callHttpClient({ method: endpoints.LoadSession.method, @@ -2111,7 +2119,7 @@ export const actions = { payload: { savedSessionId: savedSessionId?.toString(), referralNumber: referralNumber?.toString(), - referralDate: referralDate?.toString(), + referralDate: loadDate, parentAccountNumber: parentAccountNumber?.toString(), referralCorrelationId: referralCorrelationId, },