adata-ui 2.0.71 → 2.0.72

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,5 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { type LocalizedNavigationParams, navigateToLocalizedPage } from '#adata-ui/utils/localizedNavigation'
3
+ import { useUrls } from '#adata-ui/composables/useUrls'
3
4
 
4
5
  interface Props {
5
6
  illClass?: string
@@ -14,7 +15,7 @@ interface Props {
14
15
  const props = defineProps<Props>()
15
16
 
16
17
  const appConfig = useAppConfig()
17
- const loginUrl = appConfig.myLayer.loginUrl
18
+ const { login } = useUrls()
18
19
  const authMode = appConfig.myLayer.authMode
19
20
  const device = useAdaptive()
20
21
  const { t, locale } = useI18n()
@@ -34,7 +35,7 @@ function goAuth() {
34
35
  const fullPath = encodeURIComponent(window.location.toString())
35
36
  navigateToLocalizedPage({
36
37
  locale,
37
- projectUrl: loginUrl.slice(0, -1),
38
+ projectUrl: login,
38
39
  path: `/?url=${fullPath}`,
39
40
  target: '_self'
40
41
  })
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { buildLocalizedUrl } from '#adata-ui/utils/localizedNavigation'
3
3
  import {removeTrailingSlash} from "#adata-ui/components/utils/removeTrailingSlash";
4
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
5
 
5
6
  const props = defineProps<{
6
7
  balance?: number
@@ -9,13 +10,12 @@ const props = defineProps<{
9
10
  const { $toast } = useNuxtApp()
10
11
 
11
12
  const { t, locale } = useI18n()
12
- const { myLayer } = useAppConfig()
13
13
  const accessToken = useCookie('accessToken')
14
14
 
15
15
  const { topUpSidePanel } = usePayment()
16
16
  const { commonAuth } = useAppConfig()
17
17
 
18
- const landingUrl = myLayer.landingUrl
18
+ const { landing } = useUrls()
19
19
  const userApiURL = commonAuth.userApiURL
20
20
 
21
21
  const isLoading = ref(false)
@@ -69,7 +69,7 @@ function onBuy() {
69
69
  <template #tariffs>
70
70
  <nuxt-link
71
71
  class="font-semibold text-blue-700 dark:text-blue-500"
72
- :to="buildLocalizedUrl(locale, landingUrl, '/tariffs')"
72
+ :to="buildLocalizedUrl(locale, landing, '/tariffs')"
73
73
  >
74
74
  {{ t('payment.banner.tariffs') }}
75
75
  </nuxt-link>
@@ -1,11 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { PAGES } from '#adata-ui/shared/constans/pages'
3
3
  import { usePkServicesLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
4
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
5
 
5
6
  const services = usePkServicesLinks()
6
7
  const route = useRoute()
7
8
  const localePath = useLocalePath()
8
- const config = useAppConfig()
9
+ const { landing } = useUrls()
9
10
  const { locale } = useI18n()
10
11
 
11
12
  const blockStyles = [
@@ -28,7 +29,7 @@ const linkByIndex = [
28
29
  PAGES.pk.unload,
29
30
  PAGES.pk.compare,
30
31
  PAGES.pk.sanctions,
31
- buildLocalizedUrl(locale, config.myLayer.landingUrl, '/all-services'),
32
+ buildLocalizedUrl(locale, landing, '/all-services'),
32
33
  ]
33
34
  </script>
34
35
 
@@ -1,10 +1,11 @@
1
1
  <script setup lang="ts">
2
2
  import { useAnotherDeviceModal } from '#adata-ui/composables/modalsState'
3
+ import { useUrls } from '#adata-ui/composables/useUrls'
3
4
  const { t, locale } = useI18n()
4
5
  const localePath = useLocalePath()
5
6
 
6
7
  const isOpen = useAnotherDeviceModal()
7
- const { myLayer }: any = useAppConfig()
8
+ const { landing } = useUrls()
8
9
 
9
10
  function onClose() {
10
11
  isOpen.value = false
@@ -47,7 +48,7 @@ function onClose() {
47
48
  </a-button>
48
49
  <a-button
49
50
  class="w-full"
50
- :to="buildLocalizedUrl(locale, myLayer.landingUrl)"
51
+ :to="buildLocalizedUrl(locale, landing)"
51
52
  >
52
53
  {{ t('modals.buttons.toMain') }}
53
54
  </a-button>
@@ -29,12 +29,15 @@ import { AIconFiles } from '#components'
29
29
  import MapPinRect from '#adata-ui/icons/map/map-pin-rect.vue'
30
30
  import ChartBar from '#adata-ui/icons/chart-bar.vue'
31
31
  import Bank from '#adata-ui/icons/bank.vue'
32
+ import { useUrls } from '#adata-ui/composables/useUrls'
32
33
  type Emits = {
33
34
  (e: 'pushMain'): void
34
35
  }
35
36
  const isOpen = ref(false)
36
37
  const tab = ref(useCurrentModule().value)
37
38
  const { myLayer }: any = useAppConfig()
39
+ const urls = useUrls()
40
+
38
41
  const { t } = useI18n()
39
42
  const emits = defineEmits<Emits>()
40
43
  const mode = myLayer.mode
@@ -78,44 +81,44 @@ const sideLinks = <any>{
78
81
  {
79
82
  label: 'header.products.edo.label',
80
83
  icon: AIconFiles,
81
- link: 'https://edo.adata.kz' + PAGES.edo.l
84
+ link: urls.edo + PAGES.edo.l
82
85
  }
83
86
  ],
84
87
  pk: [
85
88
  {
86
89
  icon: IconSearch,
87
90
  label: 'header.products.counterparties.items.counterparty.title',
88
- link: myLayer.pkUrl + PAGES.pk.main
91
+ link: urls.pk + PAGES.pk.main
89
92
  },
90
93
  {
91
94
  icon: IconScales,
92
95
  label: 'header.products.counterparties.items.compare.title',
93
- link: myLayer.counterParty ? myLayer.pkUrl + myLayer.counterParty + PAGES.pk.compare : myLayer.pkUrl + PAGES.pk.compare
96
+ link: myLayer.counterParty ? urls.pk + myLayer.counterParty + PAGES.pk.compare : urls.pk + PAGES.pk.compare
94
97
  },
95
98
  {
96
99
  icon: IconLink,
97
100
  label: 'header.products.counterparties.items.networks.title',
98
- link: myLayer.counterParty ? myLayer.pkUrl + myLayer.counterParty + '/search-connections/check' : myLayer.pkUrl + PAGES.pk.connections
101
+ link: myLayer.counterParty ? urls.pk + myLayer.counterParty + '/search-connections/check' : urls.pk + PAGES.pk.connections
99
102
  },
100
103
  {
101
104
  icon: IconUsers,
102
105
  label: 'header.products.counterparties.items.wholesale.title',
103
- link: myLayer.counterParty ? myLayer.pkUrl + myLayer.counterParty + PAGES.pk.employees : myLayer.pkUrl + PAGES.pk.employees
106
+ link: myLayer.counterParty ? urls.pk + myLayer.counterParty + PAGES.pk.employees : urls.pk + PAGES.pk.employees
104
107
  },
105
108
  {
106
109
  icon: IconGlobe,
107
110
  label: 'header.products.counterparties.items.foreign.title',
108
- link: myLayer.pkUrl + PAGES.pk.foreign
111
+ link: urls.pk + PAGES.pk.foreign
109
112
  },
110
113
  {
111
114
  icon: IconBlock,
112
115
  label: 'header.products.counterparties.items.sanction.title',
113
- link: myLayer.counterParty ? myLayer.pkUrl + myLayer.counterParty + PAGES.pk.sanctions : myLayer.pkUrl + PAGES.pk.sanctions
116
+ link: myLayer.counterParty ? urls.pk + myLayer.counterParty + PAGES.pk.sanctions : urls.pk + PAGES.pk.sanctions
114
117
  },
115
118
  {
116
119
  icon: IconDollar,
117
120
  label: 'header.products.counterparties.items.offshore.title',
118
- link: myLayer.counterParty ? myLayer.pkUrl + myLayer.counterParty + PAGES.pk.offshore : myLayer.pkUrl + PAGES.pk.offshore
121
+ link: myLayer.counterParty ? urls.pk + myLayer.counterParty + PAGES.pk.offshore : urls.pk + PAGES.pk.offshore
119
122
  },
120
123
  // {
121
124
  // icon: IconDocument,
@@ -125,46 +128,46 @@ const sideLinks = <any>{
125
128
  {
126
129
  icon: IconArrowCircle,
127
130
  label: 'header.products.counterparties.items.unloading.title',
128
- link: myLayer.pkUrl + PAGES.pk.unload
131
+ link: urls.pk + PAGES.pk.unload
129
132
  }
130
133
  ],
131
134
  work: [
132
135
  {
133
136
  icon: IconWork,
134
137
  label: 'header.products.jobs.items.vacancies.title',
135
- link: myLayer.workUrl + PAGES.work.vacancy
138
+ link: urls.work + PAGES.work.vacancy
136
139
  },
137
140
  {
138
141
  icon: IconDocument,
139
142
  label: 'header.products.jobs.items.resume.title',
140
- link: myLayer.workUrl + PAGES.work.summary
143
+ link: urls.work + PAGES.work.summary
141
144
  },
142
145
  ],
143
146
  tenders: [
144
147
  {
145
148
  icon: ChartBar,
146
149
  label: t('header.products.tenders.items.monitoring.title'),
147
- link: `https://zakupki.${mode}.kz` + PAGES.tender.monitoring,
150
+ link: urls.zakupki + PAGES.tender.monitoring,
148
151
  },
149
152
  {
150
153
  icon: Bank,
151
154
  label: t('header.products.tenders.items.akimat.title'),
152
- link: `https://zakupki.${mode}.kz` + PAGES.tender.akimat,
155
+ link: urls.zakupki + PAGES.tender.akimat,
153
156
  },
154
157
  {
155
158
  icon: IconSearch,
156
159
  label: 'header.products.tenders.items.tenders.title',
157
- link: myLayer.tenderUrl + PAGES.tender.main
160
+ link: urls.tender + PAGES.tender.main
158
161
  },
159
162
  {
160
163
  icon: IconFile,
161
164
  label: 'header.products.tenders.items.contracts.title',
162
- link: myLayer.tenderUrl + PAGES.tender.contracts
165
+ link: urls.tender + PAGES.tender.contracts
163
166
  },
164
167
  {
165
168
  icon: IconCheck,
166
169
  label: 'header.products.tenders.items.procurement.title',
167
- link: myLayer.tenderUrl + PAGES.tender.plans
170
+ link: urls.tender + PAGES.tender.plans
168
171
  }
169
172
  ],
170
173
  analytics: [
@@ -176,34 +179,34 @@ const sideLinks = <any>{
176
179
  {
177
180
  icon: IconCheck,
178
181
  label: 'header.products.analytics.items.procurement.title',
179
- link: myLayer.analyticsNewUrl + PAGES.analytics.main
182
+ link: urls.analyticsNew + PAGES.analytics.main
180
183
  },
181
184
  {
182
185
  icon: IconArrowGraph,
183
186
  label: 'header.products.analytics.items.activity.title',
184
- link: myLayer.analyticsNewUrl + PAGES.analytics.index
187
+ link: urls.analyticsNew + PAGES.analytics.index
185
188
  },
186
189
  {
187
190
  icon: IconCompany,
188
191
  label: 'header.products.analytics.items.subjects.title',
189
- link: myLayer.analyticsNewUrl + PAGES.analytics.business
192
+ link: urls.analyticsNew + PAGES.analytics.business
190
193
  },
191
194
  {
192
195
  icon: IconMedal,
193
196
  label: 'header.products.analytics.items.rate.title',
194
- link: myLayer.analyticsNewUrl + PAGES.analytics.rating
197
+ link: urls.analyticsNew + PAGES.analytics.rating
195
198
  }
196
199
  ],
197
200
  fines: [
198
201
  {
199
202
  icon: IconCheckCircle,
200
203
  label: 'header.products.fines.items.fines.title',
201
- link: myLayer.avtoUrl + PAGES.fines.main
204
+ link: urls.avto + PAGES.fines.main
202
205
  },
203
206
  {
204
207
  icon: IconCar,
205
208
  label: 'header.products.fines.items.auto.title',
206
- link: myLayer.avtoUrl + PAGES.fines.avto
209
+ link: urls.avto + PAGES.fines.avto
207
210
  },
208
211
  // {
209
212
  // icon: IconTruck,
@@ -215,39 +218,39 @@ const sideLinks = <any>{
215
218
  {
216
219
  label: 'header.products.fea.items.i.t',
217
220
  icon: IconSearch,
218
- link: `${myLayer.tnvedUrl}${PAGES.fea.t}`
221
+ link: `${urls.tnved}${PAGES.fea.t}`
219
222
  },
220
223
  {
221
224
  label: 'header.products.fea.items.o.t',
222
225
  icon: Connections,
223
- link: `${myLayer.tnvedUrl}${PAGES.fea.o}`
226
+ link: `${urls.tnved}${PAGES.fea.o}`
224
227
  },
225
228
  {
226
229
  label: 'header.products.fea.items.cp.t',
227
230
  icon: IconFile,
228
- link: `${myLayer.tnvedUrl}${PAGES.fea.cp}`
231
+ link: `${urls.tnved}${PAGES.fea.cp}`
229
232
  },
230
233
  {
231
234
  label: 'header.products.fea.items.ca.t',
232
235
  icon: IconCalc,
233
- link: `${myLayer.tnvedUrl}${PAGES.fea.ca}`
236
+ link: `${urls.tnved}${PAGES.fea.ca}`
234
237
  },
235
238
  {
236
239
  label: 'header.products.fea.items.tr.t',
237
240
  icon: IconGlobe,
238
- link: `${myLayer.tnvedUrl}${PAGES.fea.tr}`
241
+ link: `${urls.tnved}${PAGES.fea.tr}`
239
242
  },
240
243
  {
241
244
  label: 'header.products.fea.items.importerMap.t',
242
245
  icon: MapPinRect,
243
- link: `${myLayer.tnvedUrl}${PAGES.fea.importerMap}`
246
+ link: `${urls.tnved}${PAGES.fea.importerMap}`
244
247
  }
245
248
  ],
246
249
  compliance: [
247
250
  {
248
251
  label: 'header.products.compliance.label',
249
252
  icon: IconProfile,
250
- link: myLayer.complianceUrl + PAGES.compliance.l
253
+ link: urls.compliance + PAGES.compliance.l
251
254
  }
252
255
  ],
253
256
  }
@@ -1,13 +1,14 @@
1
1
  <script setup lang="ts">
2
2
 
3
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
+
3
5
  const { t } = useI18n()
4
6
  const isOpen = useLimitReachedModal()
5
- const appConfig = useAppConfig()
6
- const loginUrl = appConfig.myLayer.landingUrl
7
+ const { login } = useUrls()
7
8
 
8
9
  function goTariffs() {
9
10
  if (window) {
10
- window.location.href = `${loginUrl}/tariffs`
11
+ window.location.href = `${login}/tariffs`
11
12
  }
12
13
  }
13
14
  </script>
@@ -1,5 +1,7 @@
1
1
  <script setup lang="ts">
2
2
 
3
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
+
3
5
  const emit = defineEmits<{
4
6
  (e: 'resend'): void
5
7
  (e: 'close'): void
@@ -8,8 +10,7 @@ const emit = defineEmits<{
8
10
  const timer = ref(60)
9
11
  const isResend = ref(false)
10
12
  const route = useRoute()
11
- const appConfig = useAppConfig()
12
- const landingUrl = appConfig.myLayer.landingUrl
13
+ const { landing } = useUrls()
13
14
 
14
15
  function runTimer() {
15
16
  timer.value = 60
@@ -34,7 +35,7 @@ const goToMain = () => {
34
35
  if (route.query.url) {
35
36
  document.location.replace(route.query.url)
36
37
  } else {
37
- document.location.replace(landingUrl)
38
+ document.location.replace(landing)
38
39
  }
39
40
  emit('close')
40
41
 
@@ -1,11 +1,13 @@
1
1
  <script setup lang="ts">
2
+ import { useUrls } from '#adata-ui/composables/useUrls'
3
+
2
4
  const emit = defineEmits<{
3
5
  (e: 'close'): void
4
6
  }>()
5
7
  const { t } = useI18n()
6
8
  const isOpen = useAuthModal()
7
9
  const { myLayer } = useAppConfig()
8
- const loginUrl = myLayer.loginUrl
10
+ const { login } = useUrls()
9
11
 
10
12
  const { loginModal, registrationModal } = useIdModals()
11
13
 
@@ -16,7 +18,7 @@ function goAuth() {
16
18
  if (fullPath.includes('basic-info')) {
17
19
  fullPath = fullPath.replace('%2Fcounterparty%2Fmain', '').replace('%2Fbasic-info', '')
18
20
  }
19
- window.location.href = `${loginUrl}?url=${fullPath}`
21
+ window.location.href = `${login}?url=${fullPath}`
20
22
  }
21
23
  }
22
24
  else {
@@ -32,7 +34,7 @@ function goRegister() {
32
34
  if (fullPath.includes('basic-info')) {
33
35
  fullPath = fullPath.replace('%2Fcounterparty%2Fmain', '').replace('%2Fbasic-info', '')
34
36
  }
35
- window.location.href = `${loginUrl}register?url=${fullPath}`
37
+ window.location.href = `${login}register?url=${fullPath}`
36
38
  }
37
39
  }
38
40
  else {
@@ -1,9 +1,10 @@
1
1
  <script setup lang="ts">
2
+ import { useUrls } from '#adata-ui/composables/useUrls'
3
+
2
4
  const { t } = useI18n()
3
5
  const { confirmSuccessfulModal } = useIdModals()
4
6
  const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
5
- const { myLayer } = useAppConfig()
6
- const mode = myLayer.mode
7
+ const { pk } = useUrls()
7
8
 
8
9
  function onClose() {
9
10
  confirmSuccessfulModal.value = false
@@ -11,7 +12,7 @@ function onClose() {
11
12
  const path = window.location.pathname;
12
13
 
13
14
  if (regex.test(path)) {
14
- navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
15
+ navigateTo(`${pk}/${path.split("/")[4]}`, { external: true })
15
16
  } else {
16
17
  window.location.reload()
17
18
  }
@@ -2,12 +2,13 @@
2
2
  import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
3
3
  import { navigateToLocalizedPage } from '#adata-ui/utils/localizedNavigation'
4
4
  import * as z from 'zod'
5
+ import { useUrls } from '#adata-ui/composables/useUrls'
5
6
 
6
7
  const { $toast } = useNuxtApp()
7
8
  const { myLayer, commonAuth } = useAppConfig()
8
9
  const { t, locale } = useI18n()
10
+ const { pk, mode } = useUrls()
9
11
 
10
- const mode = myLayer.mode
11
12
  const regex = /^\/counterparty\/main\/company\/\d+\/basic-info$/;
12
13
 
13
14
  const { loginModal, registrationModal, recoveryModal, confirmAccountOtpModal, twoFactorModal, intermediateState } = useIdModals()
@@ -134,7 +135,7 @@ async function submit() {
134
135
  const path = window.location.pathname;
135
136
 
136
137
  if (regex.test(path)) {
137
- navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
138
+ navigateTo(`${pk}/company/${path.split("/")[4]}`, { external: true })
138
139
  } else {
139
140
  window.location.reload()
140
141
  }
@@ -2,13 +2,15 @@
2
2
  import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
3
3
  import { PAGES } from '#adata-ui/shared/constans/pages'
4
4
  import * as z from 'zod'
5
+ import { useUrls } from '#adata-ui/composables/useUrls'
5
6
 
6
7
  const { $toast } = useNuxtApp()
7
8
  const route = useRoute()
8
9
 
9
10
  const localePath = useLocalePath()
10
11
  const { t, locale } = useI18n()
11
- const { myLayer, commonAuth }: any = useAppConfig()
12
+ const { commonAuth }: any = useAppConfig()
13
+ const { landing } = useUrls()
12
14
  const authApiURL = commonAuth.authApiURL
13
15
  const redirectUrl = useCookie('redirect_url')
14
16
  const { loginModal, registrationModal, confirmAccountOtpModal, intermediateState } = useIdModals()
@@ -103,8 +105,8 @@ if (route.query.url) {
103
105
 
104
106
  function getUrl() {
105
107
  return navigateTo(locale.value !== 'ru'
106
- ? myLayer.landingUrl + localePath('/') + PAGES.userAgreement
107
- : myLayer.landingUrl + PAGES.userAgreement, {
108
+ ? landing + localePath('/') + PAGES.userAgreement
109
+ : landing + PAGES.userAgreement, {
108
110
  external: true,
109
111
  open: {
110
112
  target: '_blank',
@@ -1,12 +1,12 @@
1
1
  <script setup lang="ts">
2
2
  import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
3
3
  import IdOtpInput from '#adata-ui/components/modals/id/IdOtpInput.vue'
4
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
5
 
5
6
  const { $toast } = useNuxtApp()
6
7
  const { t, locale } = useI18n()
7
8
  const { commonAuth } = useAppConfig()
8
- const { myLayer } = useAppConfig()
9
- const mode = myLayer.mode
9
+ const { pk } = useUrls()
10
10
 
11
11
  const { twoFactorModal, intermediateState } = useIdModals()
12
12
 
@@ -69,7 +69,7 @@ async function onConfirm() {
69
69
  const path = window.location.pathname;
70
70
 
71
71
  if (regex.test(path)) {
72
- navigateTo(`https://pk.${mode}.kz/company/${path.split("/")[4]}`, { external: true })
72
+ navigateTo(`${pk}/company/${path.split("/")[4]}`, { external: true })
73
73
  } else {
74
74
  window.location.reload()
75
75
  }
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts" generic="T extends NavigationItem">
2
2
  import Avatar from '#adata-ui/icons/avatar.vue'
3
3
  import IconLogout from '#adata-ui/icons/logout.vue'
4
+ import { useUrls } from '#adata-ui/composables/useUrls'
4
5
 
5
6
  const props = withDefaults(defineProps<Props>(), {
6
7
  limitRemaining: 0,
@@ -12,7 +13,7 @@ const props = withDefaults(defineProps<Props>(), {
12
13
  const emit = defineEmits(['update:modelValue', 'logout'])
13
14
  const { t } = useI18n()
14
15
  const { myLayer } = useAppConfig()
15
- const loginUrl = myLayer.loginUrl
16
+ const urls = useUrls()
16
17
 
17
18
  interface Props {
18
19
  grow?: boolean
@@ -38,7 +39,7 @@ function goAuth() {
38
39
  if (fullPath.includes('basic-info')) {
39
40
  fullPath = fullPath.replace('%2Fcounterparty/main', '').replace('%2Fbasic-info', '')
40
41
  }
41
- window.location.href = `${loginUrl}?url=${fullPath}`
42
+ window.location.href = `${urls.login}?url=${fullPath}`
42
43
  }
43
44
  }
44
45
  else {
@@ -10,11 +10,11 @@ import AFooterAccordion from '#adata-ui/components/navigation/footer/ui/a-footer
10
10
  import { buildLocalizedUrl } from '#adata-ui/utils/localizedNavigation'
11
11
  import { PAGES } from '#adata-ui/shared/constans/pages'
12
12
  import { AIconExpandWindow, AIconLocation, AIconMail, AIconPhone } from '#components'
13
+ import { useUrls } from '#adata-ui/composables/useUrls'
13
14
 
14
15
  const year = new Date().getFullYear()
15
16
  const { t, locale } = useI18n()
16
- const { myLayer } = useAppConfig()
17
- const mode = myLayer.mode
17
+ const urls = useUrls()
18
18
 
19
19
  const socialMedia = [
20
20
  {
@@ -52,44 +52,44 @@ const socialMedia = [
52
52
  const mainLinks = computed(() => ({
53
53
  services: {
54
54
  title: t('footer.services'),
55
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.allServices),
55
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.allServices),
56
56
  items: [
57
57
  [
58
58
  {
59
59
  title: t('footer.counterparties.title'),
60
- link: buildLocalizedUrl(locale.value, `https://pk.${mode}.kz`, ''),
60
+ link: buildLocalizedUrl(locale.value, urls.pk, ''),
61
61
  },
62
62
  {
63
63
  title: t('footer.fines.title'),
64
- link: buildLocalizedUrl(locale.value, `https://avto.${mode}.kz`, PAGES.fines.main),
64
+ link: buildLocalizedUrl(locale.value, urls.avto, PAGES.fines.main),
65
65
  },
66
66
  {
67
67
  title: t('footer.work.title'),
68
- link: `https://work.${mode}.kz` + PAGES.work.vacancy,
68
+ link: urls.work + PAGES.work.vacancy,
69
69
  },
70
70
  {
71
71
  title: t('footer.analytics.title'),
72
- link: buildLocalizedUrl(locale.value, `https://analytics-new.${mode}.kz`, PAGES.analytics.main),
72
+ link: buildLocalizedUrl(locale.value, urls.analyticsNew, PAGES.analytics.main),
73
73
  },
74
74
  {
75
75
  title: t('footer.tenders.title'),
76
- link: `https://tender.${mode}.kz` + PAGES.tender.main,
76
+ link: urls.tender + PAGES.tender.main,
77
77
  }
78
78
  ],
79
79
  [
80
80
  {
81
81
  title: t('footer.compliance.title'),
82
- link: `https://ac.${mode}.kz` + PAGES.compliance.l,
82
+ link: urls.compliance + PAGES.compliance.l,
83
83
  isNew: true
84
84
  },
85
85
  {
86
86
  title: t('header.products.edo.label'),
87
- link: `https://edo.${mode}.kz` + PAGES.edo.l,
87
+ link: urls.edo + PAGES.edo.l,
88
88
  isNew: true
89
89
  },
90
90
  {
91
91
  title: t('footer.fea.title'),
92
- link: buildLocalizedUrl(locale.value, `https://tnved.${mode}.kz`, PAGES.fea.main),
92
+ link: buildLocalizedUrl(locale.value, urls.tnved, PAGES.fea.main),
93
93
  isNew: true
94
94
  },
95
95
  ]
@@ -97,28 +97,28 @@ const mainLinks = computed(() => ({
97
97
  },
98
98
  useful: {
99
99
  title: t('footer.useful'),
100
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.usefulMain),
100
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.usefulMain),
101
101
  items: [
102
102
  [
103
103
  {
104
104
  title: t('footer.info.api'),
105
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.apiDescription),
105
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.apiDescription),
106
106
  },
107
107
  {
108
108
  title: t('footer.info.userAgreement'),
109
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.userAgreement),
109
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.userAgreement),
110
110
  },
111
111
  {
112
112
  title: t('footer.info.privacyPolicy'),
113
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.privacy),
113
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.privacy),
114
114
  },
115
115
  {
116
116
  title: t('footer.info.vacancy'),
117
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.vacancy),
117
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.vacancy),
118
118
  },
119
119
  {
120
120
  title: t('footer.info.counterparty'),
121
- link: buildLocalizedUrl(locale.value, `https://pk.${mode}.kz`, PAGES.pk.counterparty),
121
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.pk.counterparty),
122
122
  },
123
123
  ]
124
124
  ]
@@ -127,7 +127,7 @@ const mainLinks = computed(() => ({
127
127
 
128
128
  const contactLinks = computed(() => ({
129
129
  title: t('footer.contacts.title'),
130
- link: buildLocalizedUrl(locale.value, `https://${mode}.kz`, PAGES.contacts),
130
+ link: buildLocalizedUrl(locale.value, urls.landing, PAGES.contacts),
131
131
  items: [
132
132
  {
133
133
  title: t('footer.contacts.address'),
@@ -11,6 +11,7 @@ import Arrow from '#adata-ui/icons/chevron/chevron-down.vue'
11
11
  import Logo from '#adata-ui/icons/logo.vue'
12
12
  import { buildLocalizedUrl, navigateToLocalizedPage } from '#adata-ui/utils/localizedNavigation'
13
13
  import HeaderLink from './HeaderLink.vue'
14
+ import { useUrls } from '#adata-ui/composables/useUrls'
14
15
 
15
16
  defineOptions({ name: 'AHeader' })
16
17
 
@@ -47,6 +48,7 @@ const { locale } = useI18n()
47
48
  useCurrentModule().value = props.module
48
49
  const appConfig = useAppConfig()
49
50
  const { myLayer }: any = useAppConfig()
51
+ const urls = useUrls()
50
52
 
51
53
  const langIsOn = appConfig.myLayer.langIsOn
52
54
  const contacts = ref(useContacts())
@@ -63,7 +65,7 @@ function goAuth() {
63
65
 
64
66
  navigateToLocalizedPage({
65
67
  locale,
66
- projectUrl: myLayer.loginUrl.slice(0, -1),
68
+ projectUrl: urls.login,
67
69
  path: `/?url=${fullPath}`,
68
70
  target: '_self',
69
71
  })
@@ -75,7 +77,7 @@ function goAuth() {
75
77
  }
76
78
 
77
79
  function goToAnotherModule() {
78
- location.href = buildLocalizedUrl(locale.value, myLayer.landingUrl, '')
80
+ location.href = buildLocalizedUrl(locale.value, urls.landing, '')
79
81
  }
80
82
 
81
83
  async function fetchContacts() {