adata-ui 2.0.60 → 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
 
@@ -7,6 +7,8 @@ const { $toast } = useNuxtApp()
7
7
  const { myLayer, commonAuth } = useAppConfig()
8
8
  const { t, locale } = useI18n()
9
9
 
10
+ const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
11
+
10
12
  const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal, intermediateState } = useIdModals()
11
13
 
12
14
  const authApiURL = commonAuth.authApiURL
@@ -126,8 +128,15 @@ async function submit() {
126
128
  }).value = access_token
127
129
  }
128
130
  $toast.success(t('reuse.successfully'))
131
+
129
132
  loginModal.value = false
130
- window.location.reload()
133
+ const path = window.location.pathname;
134
+
135
+ if (regex.test(path)) {
136
+ navigateTo(`/company/${path.split("/")[4]}`)
137
+ } else {
138
+ window.location.reload()
139
+ }
131
140
  }
132
141
  else {
133
142
  confirmAccountOtpModal.value = true
@@ -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.60",
4
+ "version": "2.0.62",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",