adata-ui 2.0.61 → 2.0.62

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,18 @@
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$/;
4
5
 
5
6
  function onClose() {
6
7
  confirmSuccessfulModal.value = false
7
- window.location.reload()
8
+
9
+ const path = window.location.pathname;
10
+
11
+ if (regex.test(path)) {
12
+ navigateTo(`/company/${path.split("/")[4]}`)
13
+ } else {
14
+ window.location.reload()
15
+ }
8
16
  }
9
17
  </script>
10
18
 
@@ -9,6 +9,7 @@ const { commonAuth } = useAppConfig()
9
9
  const { twoFactorModal, intermediateState } = useIdModals()
10
10
 
11
11
  const authApiURL = commonAuth.authApiURL
12
+ const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
12
13
 
13
14
  const otp = ref(['', '', '', '', '', ''])
14
15
  const otpFormatted = computed(() => {
@@ -62,7 +63,14 @@ async function onConfirm() {
62
63
  }
63
64
  $toast.success(t('login.successfully'))
64
65
  twoFactorModal.value = false
65
- window.location.reload()
66
+
67
+ const path = window.location.pathname;
68
+
69
+ if (regex.test(path)) {
70
+ navigateTo(`/company/${path.split("/")[4]}`)
71
+ } else {
72
+ window.location.reload()
73
+ }
66
74
  }
67
75
  isLoading.value = false
68
76
  }
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.62",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",