CSR-1392
referral.locktoken is not persisted in the db so we need to return it to the calling application so it can be sent back in on the final wo submit
This commit is contained in:
parent
b3fc0c7315
commit
ba7224a0ec
3 changed files with 14 additions and 1 deletions
|
|
@ -54,6 +54,7 @@ const storeMutations = {
|
|||
UPDATE_PIA_TYPE: "updatePiaType",
|
||||
WORK_ORDER_NUMBER: "updateWorkOrderNumber",
|
||||
Customer_Portal_Login_Token: "updateCustomerPortalLoginToken",
|
||||
LOCK_TOKEN: "updateLockToken",
|
||||
|
||||
// EVENT BUS MUTATIONS
|
||||
ADD_EVENT_TO_BUS: "addEventToBus",
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ async function saveSessionHelper(
|
|||
eon: savedSessionInfo.data.eon,
|
||||
workOrderNumber: savedSessionInfo.data.workOrderNumber,
|
||||
customerPortalLoginToken: savedSessionInfo.data.customerPortalLoginToken,
|
||||
lockToken: savedSessionInfo.data.lockToken,
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ const getDefaultState = () => {
|
|||
eon: null,
|
||||
workOrderNumber: null,
|
||||
customerPortalLoginToken: null,
|
||||
lockToken: null,
|
||||
},
|
||||
applicationUser: {
|
||||
eventBus: [],
|
||||
|
|
@ -249,6 +250,9 @@ export const mutations = {
|
|||
updateCustomerPortalLoginToken(state, customerPortalLoginToken) {
|
||||
state.order.customerPortalLoginToken = customerPortalLoginToken;
|
||||
},
|
||||
updateLockToken(state, lockToken) {
|
||||
state.order.lockToken = lockToken;
|
||||
},
|
||||
updateCCToken(state, ccToken) {
|
||||
state.order.payment.ccToken.subscriptionId = ccToken.subscriptionId;
|
||||
state.order.payment.ccToken.expMonth = ccToken.expMonth;
|
||||
|
|
@ -1022,6 +1026,7 @@ export const actions = {
|
|||
crmCustomerId,
|
||||
workOrderNumber,
|
||||
customerPortalLoginToken,
|
||||
lockToken,
|
||||
}
|
||||
) {
|
||||
context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
|
||||
|
|
@ -1033,7 +1038,12 @@ export const actions = {
|
|||
context.commit(storeMutations.UPDATE_SAVED_SESSION_ID, savedSessionId);
|
||||
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
||||
context.commit(storeMutations.WORK_ORDER_NUMBER, workOrderNumber);
|
||||
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
|
||||
context.commit(storeMutations.LOCK_TOKEN, lockToken);
|
||||
|
||||
// if we already have the token, do not update it. pia does 2 work order submits and the value is not persisted after the first submit
|
||||
if (state.order.customerPortalLoginToken != null && state.order.customerPortalLoginToken != "00000000-0000-0000-0000-000000000000") {
|
||||
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
|
||||
}
|
||||
},
|
||||
|
||||
logPageView(
|
||||
|
|
@ -1707,6 +1717,7 @@ export const actions = {
|
|||
referralSequenceNumber: order.referralSequenceNumber,
|
||||
eon: order.eon,
|
||||
createDeleteStatusWorkOrderForPia: createDeleteStatusWorkOrderForPia,
|
||||
lockToken: order.lockToken,
|
||||
},
|
||||
},
|
||||
logApiCall: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue