adata-ui 3.1.65 → 3.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "3.1.65",
8
+ "version": "3.1.66",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -1,8 +1,9 @@
1
1
  <script setup>
2
2
  import ContactMenu from "./ContactMenu.vue";
3
3
  import ProductMenu from "./ProductMenu.vue";
4
- import { ref, shallowRef, useI18n, onBeforeUnmount, watch, useAppConfig } from "#imports";
5
- const { t } = useI18n();
4
+ import { ref, shallowRef, useI18n, onBeforeUnmount, watch, useAppConfig, useRequestURL } from "#imports";
5
+ import { navigateToLocalizedPage } from "#adata-ui/utils/localizedNavigation";
6
+ const { t, locale } = useI18n();
6
7
  const appConfig = useAppConfig();
7
8
  const mode = appConfig.adataUI.mode;
8
9
  const navs = [
@@ -46,9 +47,18 @@ const currentMenuToShow = (index) => {
46
47
  };
47
48
  const toggleMenu = (index) => {
48
49
  if (index === 2) {
49
- window.open(`https://${mode}.kz/tariffs`, "_blank");
50
+ const pageUrl = useRequestURL();
51
+ let code = "";
52
+ if (pageUrl.hostname.includes("pk")) code = "?code=pk";
53
+ if (pageUrl.hostname.includes("avto")) code = "?code=auto";
54
+ if (pageUrl.hostname.includes("tnved")) code = "?code=ved";
55
+ if (pageUrl.hostname.includes("analytics-new")) code = "?code=analytics";
56
+ if (pageUrl.hostname.includes("ac")) code = "?code=compliance";
57
+ if (pageUrl.hostname.includes("zakupki")) code = "?code=procurement";
58
+ if (pageUrl.hostname.includes("edo")) code = "?code=edo";
59
+ navigateToLocalizedPage({ locale, projectUrl: `https://${mode}.kz`, path: "/tariffs" + code, target: "_blank" });
50
60
  } else if (index === 3) {
51
- window.open(`https://${mode}.kz/api-description`, "_blank");
61
+ navigateToLocalizedPage({ locale, projectUrl: `https://${mode}.kz`, path: "/api-description", target: "_blank" });
52
62
  } else {
53
63
  currentMenu.value = currentMenuToShow(index);
54
64
  const prev = currentIndex.value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "3.1.65",
3
+ "version": "3.1.66",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",