From 37facdfecd992c9e87b51fe9fe20f77368f90f42 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 20 Nov 2025 11:46:54 -0500 Subject: [PATCH] CASH-1925 CASH-1925 add new endpoints for work order submit --- src/constants/endpoints.js | 8 ++++++++ src/store/index.js | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 17a8f9a08..c1771b3f5 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -124,6 +124,14 @@ const endpoints = { url: "/order/api/v1/order/save-session/fmg", method: "POST", }, + SubmitOrder: { + url: "/order/api/v1/order/submit-order", + method: "POST", + }, + SubmitOrderForPia: { + url: "/order/api/v1/order/submit-order-for-pia", + method: "POST", + }, LoadSession: { url: "/order/api/v1/order/load-session", method: "POST", diff --git a/src/store/index.js b/src/store/index.js index 6bccc5969..ca1d76f6f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2363,9 +2363,17 @@ export const actions = { //affiliate cookie save only when submitAfterSave const affiliateCookies = submitAfterSave ? applicationUser.affiliateCookies : null; + let endPoint = endpoints.SaveSession.url; + if (createUnscheduledStatusWorkOrderForPIA) { + endPoint = endpoints.SubmitOrderForPia.url; + } + if (submitAfterSave) { + endPoint = endpoints.SubmitOrder.url; + } + return globalMethods.callHttpClient({ method: endpoints.SaveSession.method, - endpoint: endpoints.SaveSession.url, + endpoint: endPoint, payload: { submitAfterSave: submitAfterSave, userAgent: navigator.userAgent,