From f9f8dc6c5ca11f99adff2a9156c8c7bf424bf5ce Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Fri, 22 Mar 2024 11:36:27 +0530 Subject: [PATCH] Improved: code to add support for checking oms connection when using runNow feature --- src/views/BrokeringRoute.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/views/BrokeringRoute.vue b/src/views/BrokeringRoute.vue index a70f049..b689fb4 100644 --- a/src/views/BrokeringRoute.vue +++ b/src/views/BrokeringRoute.vue @@ -331,6 +331,15 @@ function timeTillJob(time: any) { } async function runNow() { + // If this is the first time then we are fetching the omsConnection status, as if the value of isOmsConnectionExist value is a boolean it means we have previously fetched the connection status + if(typeof isOmsConnectionExist.value !== "boolean") { + await checkOmsConnectionStatus() + } + + if(!isOmsConnectionExist.value) { + return; + } + const scheduleAlert = await alertController .create({ header: translate("Run now"),