From 54b8fedb5b6e4bda3480ba605371685b57c820b4 Mon Sep 17 00:00:00 2001 From: Jeremy-Z Date: Tue, 23 Jun 2026 13:54:56 -0400 Subject: [PATCH 1/3] Added savedsessionid to the load session call. This is a required field for this call. --- src/store/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/store/index.js b/src/store/index.js index 978dc68a..4688ec74 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1618,11 +1618,12 @@ export const useMainStore = defineStore({ }); }, async loadSession(duplicate) { - const { order } = this; + const { applicationUser, order } = this; const response = await globalMethods.callHttpClient({ method: endpoints.LoadSession.method, endpoint: endpoints.LoadSession.url, payload: { + savedSessionId: applicationUser.savedSessionId, referralNumber: duplicate.referralNumber, referralDate: duplicate.referralDate, parentAccountNumber: order.parentAccountNumber, From 071a3a7b4f9e5fbf890f3577802c7ed302d5c9c0 Mon Sep 17 00:00:00 2001 From: Jeremy-Z Date: Tue, 23 Jun 2026 13:56:33 -0400 Subject: [PATCH 2/3] Added some comments. --- src/store/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 4688ec74..805a974b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1617,8 +1617,10 @@ export const useMainStore = defineStore({ } }); }, - async loadSession(duplicate) { - const { applicationUser, order } = this; + async loadSession(duplicate) { + const { applicationUser, order } = this; + // NOTE: We are re-using the current user's saved session id (this is required on the load-session call). + // This should be ok, but should probably validate. const response = await globalMethods.callHttpClient({ method: endpoints.LoadSession.method, endpoint: endpoints.LoadSession.url, From 1a227d9d714970636d8580b6867d5ac0dc7d1d62 Mon Sep 17 00:00:00 2001 From: Jeremy-Z Date: Tue, 23 Jun 2026 15:24:44 -0400 Subject: [PATCH 3/3] Fixed load session unit test. --- src/store/store.spec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 8cf40ee3..0fc1ddd0 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -2236,12 +2236,14 @@ describe('Store', () => { describe('loadSession method', () => { let mockDuplicate; let mockResponse; + let savedSessionId = getRandomGuid(); beforeEach(() => { mockDuplicate = { referralNumber: getRandomString(10, 10), referralDate: new Date().toISOString(), - correlationId: getRandomGuid() + correlationId: getRandomGuid(), + savedSessionId: savedSessionId }; mockResponse = { @@ -2291,6 +2293,7 @@ describe('Store', () => { it('should call callHttpClient with correct parameters', async () => { // Arrange globalMethods.callHttpClient = jest.fn().mockReturnValue(Promise.resolve(mockResponse)); + store.applicationUser.savedSessionId = savedSessionId; // Act await store.loadSession(mockDuplicate); @@ -2300,6 +2303,7 @@ describe('Store', () => { method: endpoints.LoadSession.method, endpoint: endpoints.LoadSession.url, payload: { + savedSessionId: mockDuplicate.savedSessionId, referralNumber: mockDuplicate.referralNumber, referralDate: mockDuplicate.referralDate, parentAccountNumber: store.order.parentAccountNumber,