adata-ui 2.1.0 → 2.1.2
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/.editorconfig +12 -12
- package/.nuxtrc +1 -1
- package/.playground/app.config.ts +5 -5
- package/README.md +75 -75
- package/app.config.ts +4 -3
- package/app.vue +1 -0
- package/assets/styles/index.scss +104 -0
- package/assets/styles/modules/_base.scss +5 -0
- package/assets/styles/modules/_typography.scss +152 -0
- package/components/elements/README.md +1 -1
- package/components/elements/accordion/AAccordion.vue +13 -12
- package/components/elements/curve-block/ACurveBlock.vue +94 -19
- package/components/elements/feature-description/AFeatureDescription.vue +4 -4
- package/components/elements/illustrations/noAccess.vue +11 -2
- package/components/elements/photos-animation/APhotosAnimation.vue +3 -1
- package/components/elements/select/ASelect.vue +65 -9
- package/components/features/lang-switcher/lang-switcher.vue +8 -1
- package/components/features/payment/banner/BasicPlusLimitBanner.vue +104 -0
- package/components/features/payment/banner/PaymentBanner.vue +108 -0
- package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +158 -0
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +112 -0
- package/components/features/payment/process/PaymentMethodSidePanel.vue +121 -0
- package/components/features/payment/process/PaymentProcess.vue +138 -0
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +130 -0
- package/components/features/pk-mobile-services/APkMobileServices.vue +21 -2
- package/components/forms/README.md +1 -1
- package/components/forms/checkbox/ACheckbox.vue +0 -2
- package/components/forms/radio-button/ARadioButton.vue +21 -13
- package/components/forms/request-demo/ARequestDemo.vue +21 -7
- package/components/modals/AConfirmationEmail.vue +40 -0
- package/components/modals/AnotherDeviceModal.vue +3 -2
- package/components/modals/ConnectingTariffModal.vue +0 -1
- package/components/modals/ContentNavigationModal.vue +148 -75
- package/components/modals/Insufficient-funds-modal.vue +5 -2
- package/components/modals/LimitReachedModal.vue +4 -3
- package/components/modals/ReportBugModal.vue +3 -3
- package/components/modals/Resend.vue +82 -0
- package/components/modals/SubmitApplicationModal.vue +4 -0
- package/components/modals/id/AuthModal.vue +78 -0
- package/components/modals/id/IdAutoLogoutModal.vue +45 -0
- package/components/modals/id/IdBanner.vue +58 -0
- package/components/modals/id/IdConfirmAccountOtpModal.vue +186 -0
- package/components/modals/id/IdConfirmSuccessfulModal.vue +41 -0
- package/components/modals/id/IdLoginModal.vue +316 -0
- package/components/modals/id/IdModals.vue +114 -0
- package/components/modals/id/IdNewPasswordModal.vue +129 -0
- package/components/modals/id/IdOtpInput.vue +155 -0
- package/components/modals/id/IdPasswordSuccessfulModal.vue +25 -0
- package/components/modals/id/IdRecoveryModal.vue +117 -0
- package/components/modals/id/IdRegistrationModal.vue +215 -0
- package/components/modals/id/IdResetPasswordOtpModal.vue +158 -0
- package/components/modals/id/IdTwoFactorModal.vue +130 -0
- package/components/navigation/README.md +1 -1
- package/components/navigation/bottom-navigation/ABottomNavigation.vue +34 -29
- package/components/navigation/footer/AFooter.vue +210 -57
- package/components/navigation/footer/ui/{new-footer-accordion.vue → a-footer-accordion.vue} +2 -4
- package/components/navigation/header/AHeader.vue +59 -51
- package/components/navigation/header/AlmatyContacts.vue +16 -14
- package/components/navigation/header/AstanaContacts.vue +13 -11
- package/components/navigation/header/CardGallery.vue +5 -4
- package/components/navigation/header/HeaderLink.vue +16 -8
- package/components/navigation/header/NavList.vue +21 -5
- package/components/navigation/header/ProductMenu.vue +8 -78
- package/components/navigation/header/ProfileMenu.vue +10 -5
- package/components/navigation/header/TopHeader.vue +2 -2
- package/components/navigation/mobile-navigation/AMobileNavigation.vue +3 -3
- package/components/navigation/pill-tabs/APillTabs.vue +18 -4
- package/components/navigation/pill-tabs/types.ts +1 -0
- package/components/navigation/side-navigation/ASideNavigation.vue +23 -21
- package/components/overlays/README.md +1 -1
- package/components/overlays/side-panel/ASidePanel.vue +439 -0
- package/components/overlays/tooltip/ATooltip.vue +149 -154
- package/components/utils/removeTrailingSlash.ts +7 -0
- package/composables/useBuyTariffs.ts +91 -0
- package/composables/useHeaderNavigationLinks.ts +174 -297
- package/composables/useIdModals.ts +36 -0
- package/composables/usePayment.ts +74 -0
- package/composables/useUrls.ts +21 -0
- package/eslint.config.mjs +45 -0
- package/icons/adata-logo.vue +1 -1
- package/icons/ai-assistant.vue +13 -0
- package/icons/akimat.vue +20 -0
- package/icons/arrow/arrow-bottom-left-on-square.vue +1 -1
- package/icons/arrow/arrow-circle-reset.vue +1 -1
- package/icons/arrow/arrow-corner.vue +1 -1
- package/icons/arrow/arrow-graph-down.vue +1 -1
- package/icons/arrow/arrow-graph-up.vue +1 -1
- package/icons/arrow/arrow-square-down.vue +1 -1
- package/icons/arrow/arrow-top-right-on-square.vue +1 -1
- package/icons/arrow-currency-gray.vue +1 -1
- package/icons/arrow-currency-green.vue +1 -1
- package/icons/arrow-currency-red.vue +1 -1
- package/icons/avatar.vue +1 -1
- package/icons/bank.vue +5 -0
- package/icons/block.vue +1 -1
- package/icons/bookmark/bookmark-filled.vue +1 -1
- package/icons/bookmark/bookmark.vue +1 -1
- package/icons/browsers/browser-duck.vue +1 -1
- package/icons/browsers/browser-google.vue +7 -1
- package/icons/browsers/browser-yandex.vue +1 -1
- package/icons/building-vector.vue +1 -1
- package/icons/calculator.vue +1 -1
- package/icons/calendar.vue +1 -1
- package/icons/car.vue +1 -1
- package/icons/chart-bar.vue +5 -0
- package/icons/chart-pie.vue +16 -0
- package/icons/check/check-circle.vue +1 -1
- package/icons/check/check.vue +1 -1
- package/icons/check/checkmark-circle.vue +1 -1
- package/icons/check-sb.vue +7 -0
- package/icons/checkbox/checkbox-active.vue +1 -1
- package/icons/checkbox/checkbox-empty.vue +1 -1
- package/icons/checkbox/checkbox-intermediate.vue +1 -1
- package/icons/chevron/chevron-down.vue +1 -1
- package/icons/chevron/chevron-left.vue +1 -1
- package/icons/chevron/chevron-right.vue +1 -1
- package/icons/chevron/chevron-up.vue +1 -1
- package/icons/chevron/double-chevron-right.vue +1 -1
- package/icons/clipboard-text.vue +1 -1
- package/icons/clock.vue +1 -1
- package/icons/company/company-bazis.vue +3 -3
- package/icons/company/company-bereke.vue +13 -13
- package/icons/company/company-bigroup.vue +5 -5
- package/icons/company/company-erg.vue +6 -6
- package/icons/company/company-forte.vue +11 -11
- package/icons/company/company-halyk.vue +4 -4
- package/icons/company/company-jusan.vue +20 -3
- package/icons/company/company-kaspi.vue +3 -3
- package/icons/company/company-mycar.vue +2 -2
- package/icons/company/company-samruk.vue +9 -9
- package/icons/company-egov-small.vue +1 -1
- package/icons/company.vue +1 -1
- package/icons/copy.vue +1 -1
- package/icons/currency/currency-dollar.vue +1 -1
- package/icons/currency/currency-down.vue +1 -1
- package/icons/currency/currency-eur.vue +1 -1
- package/icons/currency/currency-rub.vue +1 -1
- package/icons/currency/currency-tenge.vue +9 -0
- package/icons/currency/currency-usd.vue +1 -1
- package/icons/currency/currency-yuan.vue +1 -1
- package/icons/delete.vue +1 -1
- package/icons/document.vue +1 -1
- package/icons/download.vue +1 -1
- package/icons/edit.vue +1 -1
- package/icons/education.vue +1 -1
- package/icons/egov-small.vue +1 -1
- package/icons/excel-icon.vue +14 -0
- package/icons/expand-window.vue +1 -1
- package/icons/eye-closed.vue +1 -1
- package/icons/eye-open.vue +1 -1
- package/icons/eye-opened.vue +1 -1
- package/icons/file/file.vue +1 -1
- package/icons/filter.vue +1 -1
- package/icons/flag.vue +1 -1
- package/icons/gift.vue +1 -1
- package/icons/globe.vue +1 -1
- package/icons/google.vue +41 -0
- package/icons/hand/hand-thumb-up-filled.vue +1 -1
- package/icons/hand/hand-thumb-up.vue +1 -1
- package/icons/hand-with-phone/hand-with-phone-dark.vue +1 -1
- package/icons/hand-with-phone/hand-with-phone-light.vue +1 -1
- package/icons/handshake.vue +1 -1
- package/icons/hcheck.vue +1 -1
- package/icons/hdocument.vue +1 -1
- package/icons/history.vue +1 -1
- package/icons/horizontal-more.vue +1 -1
- package/icons/hot-line.vue +6 -0
- package/icons/hummer.vue +1 -1
- package/icons/info/info-circle.vue +1 -1
- package/icons/invoice.vue +1 -1
- package/icons/kaspi-qr.vue +13 -0
- package/icons/link-chain.vue +1 -1
- package/icons/link.vue +1 -1
- package/icons/linkedin.vue +24 -24
- package/icons/loader-circle.vue +1 -1
- package/icons/location.vue +1 -1
- package/icons/lock.vue +1 -1
- package/icons/logo.vue +1 -1
- package/icons/logout.vue +1 -1
- package/icons/magnify/magnifying-glass-minus.vue +1 -1
- package/icons/magnify/magnifying-glass-plus.vue +1 -1
- package/icons/magnify/magnifying-glass.vue +1 -1
- package/icons/mail.vue +1 -1
- package/icons/mailru.vue +34 -0
- package/icons/main-filter.vue +1 -1
- package/icons/map/map-pin-filled.vue +1 -1
- package/icons/map/map-pin-rect.vue +1 -1
- package/icons/map/map-pin.vue +1 -1
- package/icons/map-marker-start.vue +1 -1
- package/icons/medal.vue +1 -1
- package/icons/menu-filled.vue +1 -1
- package/icons/menu.vue +1 -1
- package/icons/message/message.vue +1 -1
- package/icons/minus/minus-circle.vue +1 -1
- package/icons/money.vue +1 -1
- package/icons/monitoring.vue +1 -1
- package/icons/moon.vue +1 -1
- package/icons/more.vue +1 -1
- package/icons/notification.vue +1 -1
- package/icons/paperclip.vue +1 -1
- package/icons/payment/payment-card.vue +1 -1
- package/icons/payment/payment-kaspi.vue +1 -1
- package/icons/person-vector.vue +1 -1
- package/icons/person-with-briefcase.vue +1 -1
- package/icons/phone-filled.vue +1 -1
- package/icons/phone.vue +1 -1
- package/icons/plus/plus-circle.vue +1 -1
- package/icons/plus/plus.vue +1 -1
- package/icons/profile.vue +1 -1
- package/icons/radio/radio-check.vue +1 -1
- package/icons/radio/radio-empty.vue +1 -1
- package/icons/receipt.vue +1 -1
- package/icons/sanctions.vue +8 -0
- package/icons/scales/scale.vue +1 -1
- package/icons/scales/scales.vue +1 -1
- package/icons/scales/standing-scales.vue +1 -1
- package/icons/search.vue +1 -1
- package/icons/share/share-alt.vue +1 -1
- package/icons/share/share.vue +1 -1
- package/icons/socials/face-book.vue +1 -1
- package/icons/socials/instagram.vue +1 -1
- package/icons/socials/telegram.vue +1 -1
- package/icons/socials/tik-tok.vue +1 -1
- package/icons/socials/youtube.vue +1 -1
- package/icons/sort/sort-asc.vue +1 -1
- package/icons/sort/sort-desc.vue +1 -1
- package/icons/splitting-arrows.vue +1 -1
- package/icons/star/star-filled.vue +1 -1
- package/icons/star/star-half-filled.vue +1 -1
- package/icons/star/star.vue +1 -1
- package/icons/sun.vue +14 -14
- package/icons/sviazi.vue +1 -1
- package/icons/tag.vue +1 -1
- package/icons/tasks.vue +10 -0
- package/icons/tender-search.vue +1 -1
- package/icons/toasts/check-circle-toast.vue +1 -1
- package/icons/toasts/warning-triangle-toast.vue +1 -1
- package/icons/trash.vue +1 -1
- package/icons/triangle.vue +1 -1
- package/icons/truck.vue +1 -1
- package/icons/user.vue +1 -1
- package/icons/users-focus.vue +1 -1
- package/icons/users.vue +1 -1
- package/icons/warning/warning-circle.vue +1 -1
- package/icons/warning/warning-triangle-filled.vue +1 -1
- package/icons/warning/warning-triangle.vue +1 -1
- package/icons/whatsapp.vue +1 -1
- package/icons/work-bag.vue +1 -1
- package/icons/work-case.vue +9 -0
- package/icons/work-search.vue +1 -1
- package/icons/work.vue +1 -1
- package/icons/x-mark.vue +1 -1
- package/icons/yandex.vue +28 -0
- package/illustrations/address-location.vue +1 -1
- package/illustrations/ball-with-chain.vue +1 -1
- package/illustrations/bill.vue +1 -1
- package/illustrations/buildings.vue +1 -1
- package/illustrations/calendar.vue +1 -1
- package/illustrations/chains.vue +1 -1
- package/illustrations/coin-percent.vue +1 -1
- package/illustrations/coins-stack.vue +1 -1
- package/illustrations/delete-dark.vue +1 -1
- package/illustrations/delete.vue +1 -1
- package/illustrations/doc-with-stamp.vue +1 -1
- package/illustrations/document.vue +1 -1
- package/illustrations/door.vue +1 -1
- package/illustrations/empty-box.vue +1 -1
- package/illustrations/empty-wallet.vue +1 -1
- package/illustrations/graph-in-coin.vue +1 -1
- package/illustrations/hammer.vue +1 -1
- package/illustrations/hand-cash.vue +1 -1
- package/illustrations/info.vue +1 -1
- package/illustrations/mail.vue +1 -1
- package/illustrations/ok.vue +1 -1
- package/illustrations/people-group.vue +1 -1
- package/illustrations/person-with-phone.vue +1 -1
- package/illustrations/person.vue +1 -1
- package/illustrations/phone-check.vue +1 -1
- package/illustrations/phone-payment-method.vue +1 -1
- package/illustrations/stop-hand.vue +1 -1
- package/illustrations/stop-sign.vue +1 -1
- package/illustrations/suit.vue +1 -1
- package/illustrations/suitcase.vue +1 -1
- package/illustrations/terminal-dark.vue +1 -1
- package/illustrations/terminal.vue +1 -1
- package/illustrations/trash-can.vue +1 -1
- package/illustrations/turn-on-tariff.vue +1 -1
- package/illustrations/two-persons.vue +1 -1
- package/lang/en.ts +475 -270
- package/lang/kk.ts +476 -271
- package/lang/ru.ts +315 -107
- package/layouts/default.vue +13 -13
- package/nuxt.config.ts +42 -14
- package/package.json +69 -53
- package/public/kaspi/logo.svg +4 -0
- package/shared/constans/pages.ts +17 -2
- package/tailwind.config.ts +163 -0
- package/vitest.config.ts +14 -0
- package/.eslintrc.cjs +0 -4
- package/.playground/app.vue +0 -9
- package/.playground/pages/index.vue +0 -13
- package/.prettierignore +0 -24
- package/.prettierrc +0 -10
- package/assets/styles/index.css +0 -226
- package/components/modals/AuthModal.vue +0 -50
- package/components/navigation/footer/NewFooter.vue +0 -276
- package/components/navigation/footer/ui/footer-acccordion.vue +0 -119
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
|
+
|
|
4
|
+
const props = defineProps<{
|
|
5
|
+
requestId: number
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits<{
|
|
9
|
+
(e: 'back', type: 'kaspi'): void
|
|
10
|
+
(e: 'updateUserRate'): void
|
|
11
|
+
}>()
|
|
12
|
+
|
|
13
|
+
const isOpen = defineModel({ default: false })
|
|
14
|
+
|
|
15
|
+
const { commonAuth } = useAppConfig()
|
|
16
|
+
const { t, locale } = useI18n()
|
|
17
|
+
const localePath = useLocalePath()
|
|
18
|
+
const accessToken = useCookie('accessToken')
|
|
19
|
+
|
|
20
|
+
const userApiURL = commonAuth.userApiURL
|
|
21
|
+
|
|
22
|
+
const paymentSuccess = ref(false)
|
|
23
|
+
let intervalId: NodeJS.Timeout | null = null
|
|
24
|
+
|
|
25
|
+
async function checkPayment() {
|
|
26
|
+
try {
|
|
27
|
+
const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/invoice-status`, {
|
|
28
|
+
method: 'GET',
|
|
29
|
+
credentials: 'include',
|
|
30
|
+
headers: {
|
|
31
|
+
Authorization: `Bearer ${accessToken.value}`,
|
|
32
|
+
lang: locale.value,
|
|
33
|
+
},
|
|
34
|
+
params: {
|
|
35
|
+
request_id: props.requestId,
|
|
36
|
+
initial: 0,
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
if (data.status === 'completed') {
|
|
41
|
+
paymentSuccess.value = true
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
console.error(e)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function goKaspi() {
|
|
50
|
+
window.open(localePath(`https://kaspi.kz/pay/adata?service_id=5964&9507=${props.requestId}`), '_blank')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function onBack() {
|
|
54
|
+
emit('back', 'kaspi')
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
watch(isOpen, async (value) => {
|
|
58
|
+
if (!value) {
|
|
59
|
+
if (intervalId) {
|
|
60
|
+
clearInterval(intervalId)
|
|
61
|
+
}
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
intervalId = setInterval(() => {
|
|
66
|
+
if (paymentSuccess.value && intervalId) {
|
|
67
|
+
clearInterval(intervalId)
|
|
68
|
+
emit('updateUserRate')
|
|
69
|
+
return
|
|
70
|
+
}
|
|
71
|
+
checkPayment()
|
|
72
|
+
}, 1000)
|
|
73
|
+
})
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<a-side-panel
|
|
78
|
+
v-model="isOpen"
|
|
79
|
+
width="484px"
|
|
80
|
+
>
|
|
81
|
+
<div class="flex flex-col gap-5">
|
|
82
|
+
<p class="text-center text-2xl font-bold whitespace-pre-wrap">
|
|
83
|
+
{{ t('payment.redirect.title') }}
|
|
84
|
+
</p>
|
|
85
|
+
<a-button block @click="goKaspi">
|
|
86
|
+
{{ t('payment.redirect.goKaspi') }}
|
|
87
|
+
</a-button>
|
|
88
|
+
<div class="flex flex-col gap-2">
|
|
89
|
+
<p class="text-center text-sm">
|
|
90
|
+
{{ t('payment.redirect.paymentId') }}
|
|
91
|
+
</p>
|
|
92
|
+
<p class="text-center text-xl font-semibold">
|
|
93
|
+
{{ requestId }}
|
|
94
|
+
</p>
|
|
95
|
+
</div>
|
|
96
|
+
<p class="text-center text-sm">
|
|
97
|
+
{{ t('payment.redirect.description') }}
|
|
98
|
+
</p>
|
|
99
|
+
<a-button
|
|
100
|
+
view="outline"
|
|
101
|
+
block
|
|
102
|
+
@click="onBack"
|
|
103
|
+
>
|
|
104
|
+
{{ t('payment.redirect.changeMethod') }}
|
|
105
|
+
</a-button>
|
|
106
|
+
</div>
|
|
107
|
+
</a-side-panel>
|
|
108
|
+
</template>
|
|
109
|
+
|
|
110
|
+
<style scoped>
|
|
111
|
+
|
|
112
|
+
</style>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { AIconPaymentCard, AIconPaymentKaspi } from '#components'
|
|
3
|
+
|
|
4
|
+
type IBank = 'kaspi' | 'other'
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
sum: number
|
|
8
|
+
}>()
|
|
9
|
+
|
|
10
|
+
const emit = defineEmits<{
|
|
11
|
+
(e: 'nextBank', bank: IBank, sum: number): void
|
|
12
|
+
(e: 'back', type: 'method'): void
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const isOpen = defineModel({ default: false })
|
|
16
|
+
|
|
17
|
+
const { t } = useI18n()
|
|
18
|
+
|
|
19
|
+
const checkbox = ref<IBank>('kaspi')
|
|
20
|
+
const cards = [
|
|
21
|
+
{
|
|
22
|
+
id: 'kaspi',
|
|
23
|
+
name: 'payment.method.kaspi',
|
|
24
|
+
sum: 10000,
|
|
25
|
+
img: AIconPaymentKaspi,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'other',
|
|
29
|
+
name: 'payment.method.other',
|
|
30
|
+
sum: 10000,
|
|
31
|
+
img: AIconPaymentCard,
|
|
32
|
+
},
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
function confirm() {
|
|
36
|
+
emit('nextBank', checkbox.value, props.sum)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function cancel() {
|
|
40
|
+
isOpen.value = false
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function onBack() {
|
|
44
|
+
emit('back', 'method')
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<a-side-panel
|
|
50
|
+
v-model="isOpen"
|
|
51
|
+
width="484px"
|
|
52
|
+
>
|
|
53
|
+
<template #header>
|
|
54
|
+
<div class="flex items-center gap-2">
|
|
55
|
+
<button @click="onBack">
|
|
56
|
+
<a-icon-chevron-left class="size-6" />
|
|
57
|
+
</button>
|
|
58
|
+
<p class="text-xl font-semibold">
|
|
59
|
+
{{ t('payment.method.title') }}
|
|
60
|
+
</p>
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<div class="flex flex-col gap-6">
|
|
65
|
+
<div class="flex flex-col items-center gap-4">
|
|
66
|
+
<a-ill-phone-check class="size-[120px]" />
|
|
67
|
+
<p class="text-center text-sm font-semibold">
|
|
68
|
+
{{ t('payment.method.description') }}
|
|
69
|
+
</p>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="font-semibold">
|
|
73
|
+
{{ t('payment.method.note') }}
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<div class="flex flex-col gap-2">
|
|
77
|
+
<a-radio-button
|
|
78
|
+
v-for="(item) in cards"
|
|
79
|
+
:key="item.id"
|
|
80
|
+
v-model="checkbox"
|
|
81
|
+
:name="`${item.name}`"
|
|
82
|
+
side="right"
|
|
83
|
+
size="lg"
|
|
84
|
+
:value="item.id"
|
|
85
|
+
class="flex items-center justify-between gap-2 rounded-md bg-gray-50 p-[10px_16px] dark:bg-[#393D40]"
|
|
86
|
+
>
|
|
87
|
+
<div class="flex w-full items-center gap-2">
|
|
88
|
+
<component :is="item.img" />
|
|
89
|
+
<div class="flex w-full items-center justify-between">
|
|
90
|
+
{{ t(item.name) }}
|
|
91
|
+
<p class="body-600">
|
|
92
|
+
{{ Math.round(sum).toLocaleString('RU-ru') }} ₸
|
|
93
|
+
</p>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
</a-radio-button>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<div class="flex flex-col gap-2 ">
|
|
100
|
+
<a-button
|
|
101
|
+
:disabled="!checkbox"
|
|
102
|
+
block
|
|
103
|
+
@click="confirm"
|
|
104
|
+
>
|
|
105
|
+
{{ t('actions.topUp') }}
|
|
106
|
+
</a-button>
|
|
107
|
+
<a-button
|
|
108
|
+
view="outline"
|
|
109
|
+
block
|
|
110
|
+
@click="cancel"
|
|
111
|
+
>
|
|
112
|
+
{{ t('actions.close') }}
|
|
113
|
+
</a-button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</a-side-panel>
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<style scoped>
|
|
120
|
+
|
|
121
|
+
</style>
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import PaymentTopUpSidePanel from '#adata-ui/components/features/payment/process/PaymentTopUpSidePanel.vue'
|
|
3
|
+
import PaymentMethodSidePanel from '#adata-ui/components/features/payment/process/PaymentMethodSidePanel.vue'
|
|
4
|
+
import PaymentKaspiQrSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiQrSidePanel.vue'
|
|
5
|
+
import PaymentKaspiRedirectSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue'
|
|
6
|
+
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
7
|
+
|
|
8
|
+
const { $toast } = useNuxtApp()
|
|
9
|
+
const { locale } = useI18n()
|
|
10
|
+
const { commonAuth } = useAppConfig()
|
|
11
|
+
const accessToken = useCookie('accessToken')
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
rateId,
|
|
15
|
+
topUpSidePanel,
|
|
16
|
+
methodSidePanel,
|
|
17
|
+
kaspiQRSidePanel,
|
|
18
|
+
kaspiRedirectSidePanel,
|
|
19
|
+
payByCard
|
|
20
|
+
} = usePayment()
|
|
21
|
+
|
|
22
|
+
const userApiURL = commonAuth.userApiURL
|
|
23
|
+
|
|
24
|
+
const paymentSum = ref(0)
|
|
25
|
+
const requestUrl = ref('')
|
|
26
|
+
const requestId = ref<number | null>(null)
|
|
27
|
+
|
|
28
|
+
function actionPayment(num: number) {
|
|
29
|
+
paymentSum.value = num
|
|
30
|
+
topUpSidePanel.value = false
|
|
31
|
+
methodSidePanel.value = true
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function toggleKaspiSidePanel(state: boolean) {
|
|
35
|
+
if (window.innerWidth >= 1024) {
|
|
36
|
+
kaspiQRSidePanel.value = state
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
kaspiRedirectSidePanel.value = state
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function onBack(type: 'method' | 'kaspi') {
|
|
44
|
+
if (type === 'method') {
|
|
45
|
+
topUpSidePanel.value = true
|
|
46
|
+
methodSidePanel.value = false
|
|
47
|
+
}
|
|
48
|
+
else if (type === 'kaspi') {
|
|
49
|
+
toggleKaspiSidePanel(false)
|
|
50
|
+
methodSidePanel.value = true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async function directionsBanks(bank: 'kaspi' | 'other', sum: number) {
|
|
55
|
+
methodSidePanel.value = false
|
|
56
|
+
if (bank === 'kaspi') {
|
|
57
|
+
try {
|
|
58
|
+
const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/request`, {
|
|
59
|
+
method: 'POST',
|
|
60
|
+
credentials: 'include',
|
|
61
|
+
headers: {
|
|
62
|
+
Authorization: `Bearer ${accessToken.value}`,
|
|
63
|
+
lang: locale.value,
|
|
64
|
+
},
|
|
65
|
+
params: {
|
|
66
|
+
amount: sum,
|
|
67
|
+
initial: 1,
|
|
68
|
+
rate_id: rateId.value ?? undefined,
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
requestId.value = data.request_id
|
|
72
|
+
requestUrl.value = `https://kaspi.kz/pay/adata?service_id=5964&9507=${data.request_id}`
|
|
73
|
+
toggleKaspiSidePanel(true)
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
console.error(error)
|
|
77
|
+
$toast.error(error.data.message)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
else if (bank === 'other') {
|
|
81
|
+
await payByCard(sum)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function updateUserRate() {
|
|
86
|
+
try {
|
|
87
|
+
// await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
|
|
88
|
+
// method: 'PUT',
|
|
89
|
+
// credentials: 'include',
|
|
90
|
+
// headers: {
|
|
91
|
+
// Authorization: `Bearer ${accessToken.value}`,
|
|
92
|
+
// lang: locale.value,
|
|
93
|
+
// },
|
|
94
|
+
// body: {
|
|
95
|
+
// rate_code: 'basic_plus',
|
|
96
|
+
// },
|
|
97
|
+
// })
|
|
98
|
+
window.location.reload()
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
$toast.error(error.data.message)
|
|
102
|
+
toggleKaspiSidePanel(false)
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<template>
|
|
108
|
+
<payment-top-up-side-panel
|
|
109
|
+
v-model="topUpSidePanel"
|
|
110
|
+
@next="actionPayment"
|
|
111
|
+
/>
|
|
112
|
+
|
|
113
|
+
<payment-method-side-panel
|
|
114
|
+
v-model="methodSidePanel"
|
|
115
|
+
@back="onBack"
|
|
116
|
+
:sum="paymentSum"
|
|
117
|
+
@next-bank="directionsBanks"
|
|
118
|
+
/>
|
|
119
|
+
|
|
120
|
+
<payment-kaspi-qr-side-panel
|
|
121
|
+
v-model="kaspiQRSidePanel"
|
|
122
|
+
@back="onBack"
|
|
123
|
+
:request-url="requestUrl"
|
|
124
|
+
:request-id="requestId as number"
|
|
125
|
+
@update-user-rate="updateUserRate"
|
|
126
|
+
/>
|
|
127
|
+
|
|
128
|
+
<payment-kaspi-redirect-side-panel
|
|
129
|
+
v-model="kaspiRedirectSidePanel"
|
|
130
|
+
@back="onBack"
|
|
131
|
+
:request-id="requestId as number"
|
|
132
|
+
@update-user-rate="updateUserRate"
|
|
133
|
+
/>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<style scoped>
|
|
137
|
+
|
|
138
|
+
</style>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ASidePanel from "#adata-ui/components/overlays/side-panel/ASidePanel.vue";
|
|
3
|
+
|
|
4
|
+
const emit = defineEmits<{
|
|
5
|
+
(e: 'next', sum: number): void
|
|
6
|
+
}>()
|
|
7
|
+
|
|
8
|
+
const isOpen = defineModel({ default: false })
|
|
9
|
+
|
|
10
|
+
const { t } = useI18n()
|
|
11
|
+
|
|
12
|
+
const money = ref(0)
|
|
13
|
+
const errorAlert = ref(false)
|
|
14
|
+
|
|
15
|
+
const sumArr = ref([
|
|
16
|
+
{
|
|
17
|
+
id: 1,
|
|
18
|
+
value: 2000,
|
|
19
|
+
label: '2 000 ₸',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: 2,
|
|
23
|
+
value: 5000,
|
|
24
|
+
label: '5 000 ₸',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 3,
|
|
28
|
+
value: 10000,
|
|
29
|
+
label: '10 000 ₸',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: 4,
|
|
33
|
+
value: 20000,
|
|
34
|
+
label: '20 000 ₸',
|
|
35
|
+
},
|
|
36
|
+
])
|
|
37
|
+
|
|
38
|
+
const filterMoney = computed(() => {
|
|
39
|
+
return money.value >= 1
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
function onSelectAmount(value: number) {
|
|
43
|
+
money.value = value
|
|
44
|
+
errorAlert.value = false
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function onClose() {
|
|
48
|
+
isOpen.value = false
|
|
49
|
+
errorAlert.value = false
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function handlePayment() {
|
|
53
|
+
if (money.value <= 1000000) {
|
|
54
|
+
emit('next', money.value)
|
|
55
|
+
errorAlert.value = false
|
|
56
|
+
} else {
|
|
57
|
+
errorAlert.value = true
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<template>
|
|
63
|
+
<a-side-panel v-model="isOpen" width="484px">
|
|
64
|
+
<template #header>
|
|
65
|
+
<div class="text-xl font-semibold">
|
|
66
|
+
{{ t('payment.topUp.title') }}
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<div class="flex flex-col gap-6">
|
|
71
|
+
<div class="flex flex-col items-center gap-4 ">
|
|
72
|
+
<a-ill-bill class="size-[120px]" />
|
|
73
|
+
<p class="text-center text-sm font-semibold">
|
|
74
|
+
{{ t('payment.topUp.info') }}
|
|
75
|
+
</p>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div class="flex flex-col gap-4">
|
|
79
|
+
<a-input-standard
|
|
80
|
+
v-model="money"
|
|
81
|
+
:label="`${t('payment.topUp.enterAmount')}`"
|
|
82
|
+
type="number"
|
|
83
|
+
pattern="[0-9]*"
|
|
84
|
+
clearable
|
|
85
|
+
/>
|
|
86
|
+
<a-alert
|
|
87
|
+
v-if="errorAlert"
|
|
88
|
+
color="red"
|
|
89
|
+
>
|
|
90
|
+
{{ t('modals.replenish_modal.error') }}
|
|
91
|
+
</a-alert>
|
|
92
|
+
<div class="flex gap-4">
|
|
93
|
+
<a-chips
|
|
94
|
+
v-for="item in sumArr"
|
|
95
|
+
:key="item.id"
|
|
96
|
+
view="standard"
|
|
97
|
+
size="lg"
|
|
98
|
+
:class="[
|
|
99
|
+
money === item.value
|
|
100
|
+
? 'bg-blue-700 text-white hover:bg-blue-700 dark:border-blue-500 dark:bg-transparent dark:text-blue-500 dark:hover:bg-transparent'
|
|
101
|
+
: '',
|
|
102
|
+
]"
|
|
103
|
+
@click.stop="onSelectAmount(item.value)"
|
|
104
|
+
>
|
|
105
|
+
<span>{{ item.label }}</span>
|
|
106
|
+
</a-chips>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<div class="flex flex-col gap-2">
|
|
111
|
+
<a-button
|
|
112
|
+
:disabled="!filterMoney"
|
|
113
|
+
@click="handlePayment"
|
|
114
|
+
>
|
|
115
|
+
{{ t('actions.topUp') }}
|
|
116
|
+
</a-button>
|
|
117
|
+
<a-button
|
|
118
|
+
view="outline"
|
|
119
|
+
@click="onClose"
|
|
120
|
+
>
|
|
121
|
+
{{ t('actions.back') }}
|
|
122
|
+
</a-button>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</a-side-panel>
|
|
126
|
+
</template>
|
|
127
|
+
|
|
128
|
+
<style scoped>
|
|
129
|
+
|
|
130
|
+
</style>
|
|
@@ -1,8 +1,13 @@
|
|
|
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()
|
|
7
|
+
const route = useRoute()
|
|
8
|
+
const localePath = useLocalePath()
|
|
9
|
+
const { landing } = useUrls()
|
|
10
|
+
const { locale } = useI18n()
|
|
6
11
|
|
|
7
12
|
const blockStyles = [
|
|
8
13
|
'first-border-gradient',
|
|
@@ -15,6 +20,17 @@ const blockStyles = [
|
|
|
15
20
|
'eighth-border-gradient',
|
|
16
21
|
'ninth-border-gradient',
|
|
17
22
|
]
|
|
23
|
+
const linkByIndex = [
|
|
24
|
+
PAGES.pk.main,
|
|
25
|
+
PAGES.pk.employees,
|
|
26
|
+
PAGES.pk.connections,
|
|
27
|
+
PAGES.pk.offshore,
|
|
28
|
+
PAGES.pk.foreign,
|
|
29
|
+
PAGES.pk.unload,
|
|
30
|
+
PAGES.pk.compare,
|
|
31
|
+
PAGES.pk.sanctions,
|
|
32
|
+
buildLocalizedUrl(locale, landing, '/all-services'),
|
|
33
|
+
]
|
|
18
34
|
</script>
|
|
19
35
|
|
|
20
36
|
<template>
|
|
@@ -27,7 +43,10 @@ const blockStyles = [
|
|
|
27
43
|
>
|
|
28
44
|
<div
|
|
29
45
|
class="size-10 p-2 rounded-lg"
|
|
30
|
-
:class="
|
|
46
|
+
:class="[
|
|
47
|
+
'bg-deepblue-900/5 dark:bg-gray-200/5',
|
|
48
|
+
{'!bg-blue-700 text-white dark:!bg-blue-500 ': route.path.replace(/\/+$/, '') === localePath(linkByIndex[index]).replace(/\/+$/, '')}
|
|
49
|
+
]"
|
|
31
50
|
>
|
|
32
51
|
<component
|
|
33
52
|
:is="service.icon"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
# inputs
|
|
1
|
+
# inputs
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
:name="name"
|
|
8
8
|
type="radio"
|
|
9
9
|
class="hidden"
|
|
10
|
+
ref="input"
|
|
10
11
|
:checked="model === value"
|
|
11
12
|
:disabled="disabled"
|
|
12
13
|
@change="update"
|
|
@@ -16,9 +17,11 @@
|
|
|
16
17
|
class="flex items-center text-deepblue-900 dark:text-gray-200 cursor-pointer w-full whitespace-nowrap"
|
|
17
18
|
:class="[textSizeOptions[size]]"
|
|
18
19
|
>
|
|
19
|
-
<span v-if="side==='left'" class="select-none w-full"><slot
|
|
20
|
-
<component :is="currentComponent" class="text-deepblue-900 dark:text-gray-200 w-full"
|
|
21
|
-
|
|
20
|
+
<span v-if="side==='left'" class="select-none w-full"><slot/></span>
|
|
21
|
+
<component :is="currentComponent" class="text-deepblue-900 dark:text-gray-200 w-full"
|
|
22
|
+
:class="[sizeOptions[size]]"
|
|
23
|
+
/>
|
|
24
|
+
<span v-if="side==='right'" class="select-none w-full"><slot/></span>
|
|
22
25
|
</label>
|
|
23
26
|
</div>
|
|
24
27
|
</template>
|
|
@@ -34,10 +37,11 @@ interface Props {
|
|
|
34
37
|
size?: 'lg' | 'sm',
|
|
35
38
|
name?: string
|
|
36
39
|
disabled?: boolean
|
|
37
|
-
side?:'right' | 'left'
|
|
40
|
+
side?: 'right' | 'left'
|
|
38
41
|
value: string | number | boolean | null | undefined
|
|
39
42
|
permanent?: boolean
|
|
40
43
|
}
|
|
44
|
+
|
|
41
45
|
const props = withDefaults(defineProps<Props>(), {
|
|
42
46
|
size: 'sm',
|
|
43
47
|
name: 'check',
|
|
@@ -49,23 +53,20 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
49
53
|
|
|
50
54
|
const emit = defineEmits(['radioChanged'])
|
|
51
55
|
const model = defineModel<string | number | boolean | null | undefined>()
|
|
56
|
+
const input = ref()
|
|
52
57
|
|
|
53
58
|
const currentComponent = computed(() => {
|
|
54
|
-
if (model.value ===props.value
|
|
55
|
-
return
|
|
59
|
+
if (model.value === props.value) {
|
|
60
|
+
return RadioCheck
|
|
56
61
|
} else {
|
|
57
62
|
return RadioEmpty
|
|
58
63
|
}
|
|
59
64
|
})
|
|
60
65
|
|
|
61
66
|
function update() {
|
|
62
|
-
if(props.disabled) return
|
|
67
|
+
if (props.disabled) return
|
|
68
|
+
model.value = props.value
|
|
63
69
|
|
|
64
|
-
if(props.value == model.value && !props.permanent) {
|
|
65
|
-
model.value = undefined
|
|
66
|
-
}else{
|
|
67
|
-
model.value = props.value
|
|
68
|
-
}
|
|
69
70
|
emit("radioChanged", model.value)
|
|
70
71
|
|
|
71
72
|
}
|
|
@@ -79,7 +80,14 @@ const textSizeOptions = {
|
|
|
79
80
|
sm: 'text-xs gap-2'
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
watch(model, async (e) => {
|
|
84
|
+
await nextTick()
|
|
85
|
+
if (props.value == e && !props.permanent) {
|
|
86
|
+
input.value.addEventListener('click', () => {
|
|
87
|
+
model.value = undefined
|
|
88
|
+
})
|
|
89
|
+
}
|
|
90
|
+
}, {immediate: true, deep: true})
|
|
83
91
|
</script>
|
|
84
92
|
|
|
85
93
|
<style scoped>
|