From f46ef6bd8e1ddae3c37b6a57135fee335923d2f4 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 28 Jun 2024 13:06:00 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20query=20string?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/MainLayout.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue index 99d6962fd..88e7fd992 100644 --- a/src/views/MainLayout.vue +++ b/src/views/MainLayout.vue @@ -477,14 +477,17 @@ watch( const handleButtonClick = () => { const currentPath = route.name; - // const popupPath = - // config.manualConfig[currentPath as keyof typeof config.manualConfig]; - const popupPath = config.generatePopupPath(currentPath); - if (popupPath) { - // console.log(currentPath); - window.open(popupPath); + const queryParams = { role: "officer" }; // Replace with your query parameters + const queryString = new URLSearchParams(queryParams).toString(); + + // Assuming config.generatePopupPath() returns a base URL + const popupBasePath = config.generatePopupPath(currentPath); + + if (popupBasePath) { + const popupPath = `${popupBasePath}?${queryString}`; + window.open(popupPath, "_blank"); // Opens in a new tab/window } else { - console.log("no manual in this page ", currentPath); + console.log("No manual available for this page:", currentPath); } };