adata-ui 2.1.31 → 2.1.33
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/components/features/payment/process/PaymentProcess.vue +9 -2
- package/components/features/pk-mobile-services/APkMobileServices.vue +12 -3
- package/composables/useHeaderNavigationLinks.ts +18 -9
- package/composables/usePayment.ts +26 -22
- package/lang/en.ts +1 -1
- package/lang/kk.ts +4 -4
- package/package.json +1 -1
- package/public/error-illustrations/400.webp +0 -0
|
@@ -54,6 +54,8 @@ function onBack(type: 'method' | 'kaspi') {
|
|
|
54
54
|
const userInfo = useState('user-info', () => ({}))
|
|
55
55
|
|
|
56
56
|
function pushReplenishmentEventToDataLayer() {
|
|
57
|
+
window.dataLayer = window.dataLayer || []
|
|
58
|
+
|
|
57
59
|
window.dataLayer?.push({
|
|
58
60
|
event: 'replenishment',
|
|
59
61
|
user_id: `${userInfo.value.id}`,
|
|
@@ -89,8 +91,13 @@ async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
else if (bank === 'other') {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
try {
|
|
95
|
+
await payByCard(sum)
|
|
96
|
+
pushReplenishmentEventToDataLayer()
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error(error)
|
|
100
|
+
}
|
|
94
101
|
}
|
|
95
102
|
}
|
|
96
103
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { PAGES } from '#adata-ui/shared/constans/pages'
|
|
3
3
|
import { usePkServicesLinks } from '#adata-ui/composables/useHeaderNavigationLinks'
|
|
4
4
|
import { useUrls } from '#adata-ui/composables/useUrls'
|
|
5
|
+
import { NuxtLinkLocale } from '#components'
|
|
5
6
|
|
|
6
7
|
const services = usePkServicesLinks()
|
|
7
8
|
const route = useRoute()
|
|
@@ -9,6 +10,8 @@ const localePath = useLocalePath()
|
|
|
9
10
|
const { landing } = useUrls()
|
|
10
11
|
const { locale } = useI18n()
|
|
11
12
|
|
|
13
|
+
const pageUrl = useRequestURL()
|
|
14
|
+
|
|
12
15
|
const blockStyles = [
|
|
13
16
|
'first-border-gradient',
|
|
14
17
|
'second-border-gradient',
|
|
@@ -31,14 +34,20 @@ const linkByIndex = [
|
|
|
31
34
|
PAGES.pk.sanctions,
|
|
32
35
|
buildLocalizedUrl(locale, landing, '/all-services'),
|
|
33
36
|
]
|
|
37
|
+
|
|
38
|
+
const normalize = (path: string) => {
|
|
39
|
+
const cleaned = path.replace(/\/+$/, '')
|
|
40
|
+
return cleaned === '' ? '/' : cleaned
|
|
41
|
+
}
|
|
34
42
|
</script>
|
|
35
43
|
|
|
36
44
|
<template>
|
|
37
45
|
<div class="grid grid-cols-3">
|
|
38
|
-
<
|
|
46
|
+
<component
|
|
39
47
|
v-for="(service, index) in services"
|
|
40
48
|
:key="index"
|
|
41
|
-
:
|
|
49
|
+
:is="normalize(service.short) === normalize(route.path) && pageUrl.hostname.startsWith('pk') ? 'div' : NuxtLinkLocale"
|
|
50
|
+
:to="normalize(service.short) === normalize(route.path) ? '' : service.to"
|
|
42
51
|
:class="['flex flex-col items-center gap-2 p-2', blockStyles[index]]"
|
|
43
52
|
>
|
|
44
53
|
<div
|
|
@@ -56,7 +65,7 @@ const linkByIndex = [
|
|
|
56
65
|
<p class="text-xs text-center">
|
|
57
66
|
{{ service.title }}
|
|
58
67
|
</p>
|
|
59
|
-
</
|
|
68
|
+
</component>
|
|
60
69
|
</div>
|
|
61
70
|
</template>
|
|
62
71
|
|
|
@@ -407,47 +407,56 @@ export const usePkServicesLinks = () => {
|
|
|
407
407
|
{
|
|
408
408
|
title: t('header.products.counterparties.items.counterparty.title'),
|
|
409
409
|
icon: IconSearch,
|
|
410
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.main)
|
|
410
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.main),
|
|
411
|
+
short: PAGES.pk.main,
|
|
411
412
|
},
|
|
412
413
|
{
|
|
413
414
|
title: t('header.products.counterparties.items.wholesale.title'),
|
|
414
415
|
icon: AIconUsersThree,
|
|
415
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.employees)
|
|
416
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.employees),
|
|
417
|
+
short: PAGES.pk.employees,
|
|
416
418
|
},
|
|
417
419
|
{
|
|
418
420
|
title: t('header.products.counterparties.items.networks.title'),
|
|
419
421
|
icon: IconLink,
|
|
420
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.connections)
|
|
422
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.connections),
|
|
423
|
+
short: PAGES.pk.connections,
|
|
421
424
|
},
|
|
422
425
|
{
|
|
423
426
|
title: t('header.products.counterparties.items.offshore.title'),
|
|
424
427
|
icon: IconDollar,
|
|
425
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.offshore)
|
|
428
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.offshore),
|
|
429
|
+
short: PAGES.pk.offshore,
|
|
426
430
|
},
|
|
427
431
|
{
|
|
428
432
|
title: t('header.products.counterparties.items.foreign.title'),
|
|
429
433
|
icon: IconGlobe,
|
|
430
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.foreign)
|
|
434
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.foreign),
|
|
435
|
+
short: PAGES.pk.foreign,
|
|
431
436
|
},
|
|
432
437
|
{
|
|
433
438
|
title: t('header.products.counterparties.items.unloading.title'),
|
|
434
439
|
icon: AIconArrowSquareDown,
|
|
435
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.unload)
|
|
440
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.unload),
|
|
441
|
+
short: PAGES.pk.unload,
|
|
436
442
|
},
|
|
437
443
|
{
|
|
438
444
|
title: t('header.products.counterparties.items.compare.title'),
|
|
439
445
|
icon: IconScales,
|
|
440
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.compare)
|
|
446
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.compare),
|
|
447
|
+
short: PAGES.pk.compare,
|
|
441
448
|
},
|
|
442
449
|
{
|
|
443
450
|
title: t('header.products.counterparties.items.sanction.title'),
|
|
444
451
|
icon: IconBlock,
|
|
445
|
-
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.sanctions)
|
|
452
|
+
to: buildLocalizedUrl(locale.value, urls.pk, PAGES.pk.sanctions),
|
|
453
|
+
short: PAGES.pk.sanctions,
|
|
446
454
|
},
|
|
447
455
|
{
|
|
448
456
|
title: t('all_services'),
|
|
449
457
|
icon: AIconExpandWindow,
|
|
450
|
-
to: buildLocalizedUrl(locale.value, urls.landing, PAGES.allServices)
|
|
458
|
+
to: buildLocalizedUrl(locale.value, urls.landing, PAGES.allServices),
|
|
459
|
+
short: PAGES.allServices,
|
|
451
460
|
},
|
|
452
461
|
]
|
|
453
462
|
}
|
|
@@ -32,30 +32,34 @@ export function usePayment() {
|
|
|
32
32
|
const { amount, id, user_id } = data
|
|
33
33
|
const widget = new tiptop.Widget()
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
await new Promise((resolve, reject) => {
|
|
36
|
+
widget.pay(
|
|
37
|
+
'charge',
|
|
38
|
+
{
|
|
39
|
+
publicId,
|
|
40
|
+
description: t('payment.bank.description'),
|
|
41
|
+
amount: Number.parseInt(amount),
|
|
42
|
+
currency: 'KZT',
|
|
43
|
+
invoiceId: id.toString(),
|
|
44
|
+
accountId: user_id.toString(),
|
|
45
|
+
skin: 'modern',
|
|
46
|
+
data: {
|
|
47
|
+
myProp: 'myProp value',
|
|
48
|
+
rate,
|
|
49
|
+
},
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
{
|
|
52
|
+
onSuccess() {
|
|
53
|
+
$toast.success(t('payment.bank.paySuccess'))
|
|
54
|
+
resolve()
|
|
55
|
+
},
|
|
56
|
+
onFail() {
|
|
57
|
+
$toast.error(t('payment.bank.payError'))
|
|
58
|
+
reject(new Error(t('payment.bank.payError')))
|
|
59
|
+
},
|
|
53
60
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
)
|
|
61
|
+
)
|
|
62
|
+
})
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
catch (error) {
|
package/lang/en.ts
CHANGED
package/lang/kk.ts
CHANGED
|
@@ -241,7 +241,7 @@ const KkLocale: RuLocale = {
|
|
|
241
241
|
st: 'Комплаенс тәуекелдерін автоматты тексеру: бизнесіңізді нақты уақыт режимінде қорғау.',
|
|
242
242
|
},
|
|
243
243
|
assistant: {
|
|
244
|
-
t: '
|
|
244
|
+
t: 'AI ассистент',
|
|
245
245
|
st: '',
|
|
246
246
|
},
|
|
247
247
|
assignments: {
|
|
@@ -249,7 +249,7 @@ const KkLocale: RuLocale = {
|
|
|
249
249
|
st: '',
|
|
250
250
|
},
|
|
251
251
|
hotline: {
|
|
252
|
-
t: '
|
|
252
|
+
t: 'Жедел желі',
|
|
253
253
|
st: '',
|
|
254
254
|
},
|
|
255
255
|
sanctions: {
|
|
@@ -257,11 +257,11 @@ const KkLocale: RuLocale = {
|
|
|
257
257
|
st: '',
|
|
258
258
|
},
|
|
259
259
|
suppliers: {
|
|
260
|
-
t: '
|
|
260
|
+
t: 'Досье',
|
|
261
261
|
st: '',
|
|
262
262
|
},
|
|
263
263
|
sb: {
|
|
264
|
-
t: 'Қауіпсіздік
|
|
264
|
+
t: 'Қауіпсіздік қызметінің тексеруі',
|
|
265
265
|
st: '',
|
|
266
266
|
},
|
|
267
267
|
},
|
package/package.json
CHANGED
|
Binary file
|