toString on the referralDate issue

toString on the referralDate issue.  the toString javascript function is adding timezone causing issues after 7pm
This commit is contained in:
CarlNation 2024-12-10 18:42:59 -05:00
parent 2691eade4c
commit 96bde9eb40

View file

@ -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,
},