ปรับ route

This commit is contained in:
setthawutttty 2024-11-14 15:41:18 +07:00
parent 3399f14823
commit 3e6b9a9995
2 changed files with 19 additions and 14 deletions

View file

@ -303,9 +303,9 @@ function handleButtonClick() {
const currentPath = route.name;
const queryParams = { role: "admin" }; // Replace with your query parameters
const queryString = new URLSearchParams(queryParams).toString();
const findRole = role.value.includes('SUPER_ADMIN')
// Assuming config.generatePopupPath() returns a base URL
const popupBasePath = config.generatePopupPath(currentPath);
const popupBasePath = config.generatePopupPath(findRole);
if (popupBasePath) {
const popupPath = `${popupBasePath}?${queryString}`;