adata-ui 2.0.61 → 2.0.63

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.
@@ -1,10 +1,20 @@
1
1
  <script setup lang="ts">
2
2
  const { t } = useI18n()
3
3
  const { confirmSuccessfulModal } = useIdModals()
4
+ const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
5
+ const { myLayer } = useAppConfig()
6
+ const mode = myLayer.mode
4
7
 
5
8
  function onClose() {
6
9
  confirmSuccessfulModal.value = false
7
- window.location.reload()
10
+
11
+ const path = window.location.pathname;
12
+
13
+ if (regex.test(path)) {
14
+ navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
15
+ } else {
16
+ window.location.reload()
17
+ }
8
18
  }
9
19
  </script>
10
20
 
@@ -7,6 +7,7 @@ const { $toast } = useNuxtApp()
7
7
  const { myLayer, commonAuth } = useAppConfig()
8
8
  const { t, locale } = useI18n()
9
9
 
10
+ const mode = myLayer.mode
10
11
  const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
11
12
 
12
13
  const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal, intermediateState } = useIdModals()
@@ -133,7 +134,7 @@ async function submit() {
133
134
  const path = window.location.pathname;
134
135
 
135
136
  if (regex.test(path)) {
136
- navigateTo(`/company/${path.split("/")[4]}`)
137
+ navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
137
138
  } else {
138
139
  window.location.reload()
139
140
  }
@@ -5,10 +5,13 @@ import IdOtpInput from '#adata-ui/components/modals/id/IdOtpInput.vue'
5
5
  const { $toast } = useNuxtApp()
6
6
  const { t, locale } = useI18n()
7
7
  const { commonAuth } = useAppConfig()
8
+ const { myLayer } = useAppConfig()
9
+ const mode = myLayer.mode
8
10
 
9
11
  const { twoFactorModal, intermediateState } = useIdModals()
10
12
 
11
13
  const authApiURL = commonAuth.authApiURL
14
+ const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
12
15
 
13
16
  const otp = ref(['', '', '', '', '', ''])
14
17
  const otpFormatted = computed(() => {
@@ -62,7 +65,14 @@ async function onConfirm() {
62
65
  }
63
66
  $toast.success(t('login.successfully'))
64
67
  twoFactorModal.value = false
65
- window.location.reload()
68
+
69
+ const path = window.location.pathname;
70
+
71
+ if (regex.test(path)) {
72
+ navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
73
+ } else {
74
+ window.location.reload()
75
+ }
66
76
  }
67
77
  isLoading.value = false
68
78
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "adata-ui",
3
3
  "type": "module",
4
- "version": "2.0.61",
4
+ "version": "2.0.63",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",