adata-ui 2.1.40-beta.18 → 2.1.40-beta.19
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/.playground/app.vue +102 -0
- package/assets/styles/index.scss +67 -5
- package/components/elements/a-select-row/ASelectRowV2.vue +214 -0
- package/components/elements/a-select-row/index.vue +3 -5
- package/components/elements/accordion/AAccordion.vue +5 -3
- package/components/elements/accordion/AAccordionGroup/AAccordionGroup.vue +3 -3
- package/components/elements/alert/AAlert.vue +34 -47
- package/components/elements/bg-block/ABgBlock.vue +1 -1
- package/components/elements/button/AButton.vue +3 -3
- package/components/elements/button/AButtonV2.vue +133 -0
- package/components/elements/button-login/index.vue +6 -10
- package/components/elements/chip-wrapper/AChipWrapper.vue +1 -1
- package/components/elements/chips/AChips.vue +2 -2
- package/components/elements/companies/AOurClients.vue +3 -1
- package/components/elements/curve-block-v2/ACurveBlockV2.vue +85 -0
- package/components/elements/digit-badge/ADigitBadge.vue +24 -22
- package/components/elements/feature-description/AFeatureDescription.vue +1 -1
- package/components/elements/leave-note/ALeaveNote.vue +39 -18
- package/components/elements/pagination/APagination.vue +7 -7
- package/components/elements/segmented/ASegmentedV2.vue +151 -0
- package/components/elements/select/ASelect.vue +4 -4
- package/components/elements/select/ASelectMobile.vue +2 -2
- package/components/elements/select/ASelectV2.vue +588 -0
- package/components/elements/select/ui/select-button.vue +1 -1
- package/components/elements/show-more/AShowMoreV2.vue +26 -0
- package/components/elements/slider/ASlider.vue +174 -0
- package/components/elements/slider/ASliderItem.vue +31 -0
- package/components/elements/slider/types.ts +21 -0
- package/components/elements/star-rating/AStarRating.vue +12 -4
- package/components/elements/status-badge/AStatusBadge.vue +91 -44
- package/components/elements/step-slider/AStepSliderColCard.vue +232 -0
- package/components/elements/step-slider/AStepSliderColNumber.vue +178 -0
- package/components/elements/table/ATable.vue +1 -1
- package/components/elements/table/table.config.ts +2 -2
- package/components/elements/tree-select/ATreeSelect.vue +97 -113
- package/components/elements/tree-select/TreeService.ts +142 -207
- package/components/elements/tree-select/components/ATreeSelectNode.vue +104 -0
- package/components/elements/tree-select/types.ts +40 -11
- package/components/elements/tree-select/utils.ts +30 -0
- package/components/elements/tree-select-modal/ATreeSelectModal.vue +217 -0
- package/components/features/color-mode/AColorMode.client.vue +74 -32
- package/components/features/dropdown/ADropdownV2.vue +140 -0
- package/components/features/lang-switcher/lang-switcher.vue +125 -40
- package/components/features/payment/banner/BasicPlusLimitBanner.vue +3 -3
- package/components/features/payment/banner/PaymentBanner.vue +3 -3
- package/components/features/payment/banner/UpSellBanner.vue +3 -3
- package/components/features/payment/process/PaymentKaspiQrSidePanel.vue +45 -27
- package/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue +34 -23
- package/components/features/payment/process/PaymentMethodSidePanel.vue +66 -49
- package/components/features/payment/process/PaymentProcess.vue +6 -6
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +49 -63
- package/components/features/pk-mobile-services/APkMobileServices.vue +6 -28
- package/components/features//321/201hange-version/AChangeVersion.vue +2 -2
- package/components/forms/checkbox/ACheckbox.vue +1 -1
- package/components/forms/checkbox/ACheckboxV2.vue +229 -0
- package/components/forms/feedback-form/FeedbackForm.vue +8 -8
- package/components/forms/feedback-form/FeedbackFormV2.vue +182 -0
- package/components/forms/input/AInputV2.vue +542 -0
- package/components/forms/input/date/AInputDate.vue +2 -2
- package/components/forms/input/password/AInputPassword.vue +8 -2
- package/components/forms/input/standard/AInputStandard.vue +3 -3
- package/components/forms/input/textarea/ATextarea.vue +2 -2
- package/components/forms/input/textarea/ATextareaV2.vue +248 -0
- package/components/forms/toggle/AToggle.vue +2 -3
- package/components/forms/toggle/AToggleV2.vue +71 -0
- package/components/modals/AnotherDeviceModal.vue +22 -18
- package/components/modals/ApplicationAcceptedModal.vue +12 -15
- package/components/modals/ConnectingTariffModal.vue +13 -20
- package/components/modals/ContactsMobileModel.vue +1 -1
- package/components/modals/ContentNavigationModal.vue +77 -333
- package/components/modals/Insufficient-funds-modal.vue +18 -33
- package/components/modals/LimitReachedModal.vue +17 -14
- package/components/modals/NoAccessModal.vue +9 -11
- package/components/modals/PaymentMethodModal.vue +1 -1
- package/components/modals/ReportBugConfirmModal.vue +12 -10
- package/components/modals/ReportBugModal.vue +46 -38
- package/components/modals/Resend.vue +9 -10
- package/components/modals/SubmitApplicationModal.vue +27 -24
- package/components/modals/id/IdBanner.vue +3 -3
- package/components/modals/id/IdConfirmAccountOtpModal.vue +4 -9
- package/components/modals/id/IdLoginModal.vue +3 -8
- package/components/modals/id/IdModals.vue +23 -10
- package/components/modals/id/IdRecoveryModal.vue +1 -1
- package/components/modals/id/IdTwoFactorModal.vue +3 -8
- package/components/navigation/bottom-navigation/ABottomNavigation.vue +1 -1
- package/components/navigation/breadcrumbs/ABreadcrumbs.vue +106 -45
- package/components/navigation/breadcrumbs/types.ts +3 -0
- package/components/navigation/footer/AFooter.vue +39 -40
- package/components/navigation/footer/ui/a-footer-accordion.vue +9 -9
- package/components/navigation/header/AHeader.vue +68 -51
- package/components/navigation/header/AlmatyContacts.vue +78 -78
- package/components/navigation/header/CardGallery.vue +9 -7
- package/components/navigation/header/ContactMenu.vue +26 -92
- package/components/navigation/header/HeaderLink.vue +181 -213
- package/components/navigation/header/HeaderUsage.vue +139 -0
- package/components/navigation/header/ListItem.vue +2 -2
- package/components/navigation/header/NavCard.vue +1 -1
- package/components/navigation/header/NavList.vue +33 -92
- package/components/navigation/header/NotificationsMenu.vue +2 -3
- package/components/navigation/header/ProductMenu.vue +81 -127
- package/components/navigation/header/ProfileMenu.vue +122 -151
- package/components/navigation/header/SystemNotification.vue +108 -0
- package/components/navigation/mobile-navigation/AMobileNavigation.vue +23 -15
- package/components/navigation/pill-tabs/APillTabs.vue +2 -2
- package/components/navigation/pill-tabs/APillTabsV2.vue +226 -0
- package/components/overlays/drawer/ADrawerV2.vue +335 -0
- package/components/overlays/modal/AModal.vue +4 -4
- package/components/overlays/modal/AModalV2.vue +397 -0
- package/components/overlays/side-panel/ASidePanel.vue +10 -7
- package/components/overlays/sideover/ASlideover.vue +6 -6
- package/components/overlays/tooltip/ATooltip.vue +1 -1
- package/components/overlays/tooltip/ATooltipV2.vue +223 -0
- package/components/overlays/tooltip/types.ts +26 -0
- package/components/overlays/tooltip/useTooltipTrigger.ts +101 -0
- package/components/transitions/ATransitionHeight.vue +1 -1
- package/composables/useAccessTokenCookie.ts +25 -0
- package/composables/useActiveNavigation.ts +84 -0
- package/composables/useChipOverflow.ts +92 -0
- package/composables/useHeaderNavigationLinks.ts +140 -98
- package/icons/archive.vue +16 -0
- package/icons/arrow/arrow-left-right.vue +8 -0
- package/icons/arrow/arrow-right.vue +14 -0
- package/icons/arrow/arrows-in.vue +11 -0
- package/icons/arrow/arrows-out.vue +11 -0
- package/icons/arrow/arrows-resize-in.vue +38 -0
- package/icons/arrow/arrows-resize-out.vue +17 -0
- package/icons/bill.vue +3 -0
- package/icons/bot.vue +52 -0
- package/icons/briefcase.vue +14 -0
- package/icons/building.vue +9 -0
- package/icons/car-side.vue +16 -0
- package/icons/cart.vue +15 -0
- package/icons/chart-no-axes-column.vue +3 -0
- package/icons/clock-time.vue +24 -0
- package/icons/cloud/cloud-upload.vue +3 -0
- package/icons/code.vue +9 -0
- package/icons/compare-outlined.vue +8 -0
- package/icons/dots-horizontal.vue +31 -0
- package/icons/download-line.vue +13 -0
- package/icons/download-rounded.vue +15 -0
- package/icons/egov.vue +41 -0
- package/icons/elicense.vue +38 -0
- package/icons/favourite-bookmark-outline.vue +17 -0
- package/icons/file/file-check-corner.vue +3 -0
- package/icons/file/file-spreadsheet.vue +3 -0
- package/icons/file-pen.vue +31 -0
- package/icons/file-stack.vue +31 -0
- package/icons/file-types/excel.vue +131 -0
- package/icons/file-types/html.vue +13 -0
- package/icons/file-types/jpeg.vue +16 -0
- package/icons/file-types/pdf.vue +11 -0
- package/icons/file-types/png.vue +11 -0
- package/icons/file-types/rar.vue +11 -0
- package/icons/file-types/word.vue +50 -0
- package/icons/file-types/zip.vue +11 -0
- package/icons/gauge.vue +17 -0
- package/icons/git-compare.vue +38 -0
- package/icons/git-fork.vue +3 -0
- package/icons/graduation-cap.vue +31 -0
- package/icons/graph-loading.vue +34 -0
- package/icons/headset.vue +6 -0
- package/icons/help-question-circle.vue +26 -0
- package/icons/in-row-type.vue +46 -0
- package/icons/in-table-type.vue +29 -0
- package/icons/landmark.vue +3 -0
- package/icons/layers.vue +3 -0
- package/icons/letter/letter-a.vue +6 -0
- package/icons/letter/letter-b.vue +6 -0
- package/icons/letter/letter-c.vue +6 -0
- package/icons/letter/letter-d.vue +6 -0
- package/icons/letter/letter-e.vue +6 -0
- package/icons/link-url.vue +3 -0
- package/icons/list-tree.vue +3 -0
- package/icons/mail-question-mark.vue +8 -0
- package/icons/message/message-square.vue +3 -0
- package/icons/message-dotted.vue +30 -0
- package/icons/network.vue +3 -0
- package/icons/newspaper.vue +3 -0
- package/icons/notification-error.vue +17 -0
- package/icons/person.vue +22 -0
- package/icons/phone-call.vue +6 -0
- package/icons/phone-reversed.vue +3 -0
- package/icons/route.vue +7 -0
- package/icons/scan-search.vue +3 -0
- package/icons/settings.vue +26 -0
- package/icons/shield-alert.vue +31 -0
- package/icons/shield-verified.vue +14 -0
- package/icons/socials/facebook-color.vue +16 -0
- package/icons/socials/globe-color.vue +16 -0
- package/icons/socials/instagram-color.vue +46 -0
- package/icons/socials/linkedin-color.vue +14 -0
- package/icons/socials/telegram-color.vue +16 -0
- package/icons/socials/tiktok-color.vue +14 -0
- package/icons/socials/vk-color.vue +16 -0
- package/icons/socials/youtube-color.vue +16 -0
- package/icons/sparkles.vue +3 -0
- package/icons/sun.vue +13 -3
- package/icons/users-round.vue +3 -0
- package/icons/view-eye-open.vue +13 -0
- package/icons/workflow.vue +3 -0
- package/icons/zap.vue +3 -0
- package/lang/en.ts +49 -5
- package/lang/kk.ts +50 -6
- package/lang/ru.ts +51 -7
- package/package.json +1 -1
- package/plugins/toast.client.ts +38 -55
- package/shared/constans/pages.ts +8 -2
- package/tailwind.config.ts +147 -116
- package/utils/twMerge.ts +34 -0
- package/components/elements/tree-select/components/tree-select-nodes.vue +0 -91
- package/components/navigation/header/TopHeader.vue +0 -196
|
@@ -51,15 +51,15 @@ function onUpdate() {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<template>
|
|
54
|
-
<div class="gradient flex justify-between rounded-
|
|
54
|
+
<div class="gradient flex justify-between rounded-md p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
55
55
|
<div>
|
|
56
|
-
<p class="mb-2
|
|
56
|
+
<p class="mb-2 text-h5">
|
|
57
57
|
{{ t('modals.id.banners.basicPlusLimit.title') }}
|
|
58
58
|
</p>
|
|
59
59
|
<i18n-t
|
|
60
60
|
keypath="modals.id.banners.basicPlusLimit.subtitle"
|
|
61
61
|
tag="p"
|
|
62
|
-
class="text-
|
|
62
|
+
class="text-body-md text-gray-600 dark:text-gray-200"
|
|
63
63
|
>
|
|
64
64
|
<template #topUp>
|
|
65
65
|
<button
|
|
@@ -56,15 +56,15 @@ function onBuy() {
|
|
|
56
56
|
</script>
|
|
57
57
|
|
|
58
58
|
<template>
|
|
59
|
-
<div class="gradient flex justify-between rounded-
|
|
59
|
+
<div class="gradient flex justify-between rounded-md p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
60
60
|
<div>
|
|
61
|
-
<p class="mb-2
|
|
61
|
+
<p class="mb-2 text-h5">
|
|
62
62
|
{{ t('payment.banner.title') }}
|
|
63
63
|
</p>
|
|
64
64
|
<i18n-t
|
|
65
65
|
keypath="payment.banner.subtitle"
|
|
66
66
|
tag="p"
|
|
67
|
-
class="text-
|
|
67
|
+
class="text-body-md text-gray-600 dark:text-gray-200"
|
|
68
68
|
>
|
|
69
69
|
<template #tariffs>
|
|
70
70
|
<nuxt-link
|
|
@@ -72,16 +72,16 @@ function onBuy() {
|
|
|
72
72
|
</script>
|
|
73
73
|
|
|
74
74
|
<template>
|
|
75
|
-
<div class="relative gradient flex justify-between rounded-
|
|
75
|
+
<div class="relative gradient flex justify-between rounded-md p-4 ring-1 ring-inset ring-blue-700/80 dark:bg-gray-800">
|
|
76
76
|
<div class="flex flex-col gap-3">
|
|
77
|
-
<p class="
|
|
77
|
+
<p class="text-h5">
|
|
78
78
|
{{ t(`payment.upsell.${code}.title`) }}
|
|
79
79
|
</p>
|
|
80
80
|
|
|
81
81
|
<i18n-t
|
|
82
82
|
:keypath="`payment.upsell.${code}.description`"
|
|
83
83
|
tag="p"
|
|
84
|
-
class="text-
|
|
84
|
+
class="text-body-md whitespace-pre-line"
|
|
85
85
|
>
|
|
86
86
|
<template #highlight>
|
|
87
87
|
<span class="font-semibold">{{ t(`payment.upsell.${code}.highlight`) }}</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { toCanvas } from 'qrcode'
|
|
3
2
|
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
|
+
import { toCanvas } from 'qrcode'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
requestUrl: string
|
|
@@ -9,7 +9,7 @@ const props = defineProps<{
|
|
|
9
9
|
|
|
10
10
|
const emit = defineEmits<{
|
|
11
11
|
(e: 'back', type: 'kaspi'): void
|
|
12
|
-
(e:
|
|
12
|
+
(e: 'updateUserRate'): void
|
|
13
13
|
}>()
|
|
14
14
|
|
|
15
15
|
const isOpen = defineModel({ default: false })
|
|
@@ -74,11 +74,10 @@ watch(isOpen, async (value) => {
|
|
|
74
74
|
margin: 0,
|
|
75
75
|
color: {
|
|
76
76
|
dark: colorMode.value === 'dark' ? '#FFFFFF' : '#000000', // квадраты
|
|
77
|
-
light: colorMode.value === 'dark' ? '#000000' : '#FFFFFF' // фон
|
|
78
|
-
}
|
|
77
|
+
light: colorMode.value === 'dark' ? '#000000' : '#FFFFFF', // фон
|
|
78
|
+
},
|
|
79
79
|
},
|
|
80
80
|
(error) => {
|
|
81
|
-
|
|
82
81
|
if (error) {
|
|
83
82
|
console.error(error)
|
|
84
83
|
return
|
|
@@ -99,7 +98,8 @@ watch(isOpen, async (value) => {
|
|
|
99
98
|
|
|
100
99
|
ctx.drawImage(logo, x, y, size, size)
|
|
101
100
|
}
|
|
102
|
-
}
|
|
101
|
+
},
|
|
102
|
+
)
|
|
103
103
|
|
|
104
104
|
intervalId = setInterval(() => {
|
|
105
105
|
if (paymentSuccess.value && intervalId) {
|
|
@@ -110,7 +110,6 @@ watch(isOpen, async (value) => {
|
|
|
110
110
|
checkPayment()
|
|
111
111
|
}, 1000)
|
|
112
112
|
})
|
|
113
|
-
|
|
114
113
|
</script>
|
|
115
114
|
|
|
116
115
|
<template>
|
|
@@ -120,42 +119,61 @@ watch(isOpen, async (value) => {
|
|
|
120
119
|
>
|
|
121
120
|
<template #header>
|
|
122
121
|
<div class="flex items-center gap-2">
|
|
123
|
-
<button
|
|
122
|
+
<button
|
|
123
|
+
type="button"
|
|
124
|
+
class="rounded-md p-1 transition-colors hover:bg-gray-100 dark:hover:bg-white/[0.06]"
|
|
125
|
+
data-test-id="kaspi-qr-back-button"
|
|
126
|
+
@click="onBack"
|
|
127
|
+
>
|
|
124
128
|
<a-icon-chevron-left class="size-6" />
|
|
125
129
|
</button>
|
|
126
|
-
<p class="text-xl font-semibold">
|
|
130
|
+
<p class="text-xl font-semibold text-deepblue-900 dark:text-gray-100" data-test-id="kaspi-qr-title">
|
|
127
131
|
{{ t('payment.kaspi.title') }}
|
|
128
132
|
</p>
|
|
129
133
|
</div>
|
|
130
134
|
</template>
|
|
131
135
|
|
|
132
136
|
<div class="flex flex-col gap-6">
|
|
133
|
-
<
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
<div class="flex gap-3
|
|
139
|
-
<a-icon-kaspi-qr class="size-
|
|
140
|
-
<span class="font-bold text-
|
|
141
|
-
|
|
137
|
+
<p class="text-center text-sm font-medium text-gray-600 dark:text-gray-300">
|
|
138
|
+
{{ t('payment.kaspi.description') }}
|
|
139
|
+
</p>
|
|
140
|
+
|
|
141
|
+
<div class="flex flex-col items-center gap-5 rounded-xl border border-gray-200 bg-white p-6 dark:border-gray-700 dark:bg-gray-900" data-test-id="kaspi-qr-payment-block">
|
|
142
|
+
<div class="flex items-center gap-3">
|
|
143
|
+
<a-icon-kaspi-qr class="size-14" />
|
|
144
|
+
<span class="text-[40px] font-bold leading-none text-deepblue-900 dark:text-white">
|
|
145
|
+
{{ t('payment.kaspi.qr') }}
|
|
142
146
|
</span>
|
|
143
147
|
</div>
|
|
144
148
|
|
|
145
|
-
<p class="
|
|
149
|
+
<p class="text-center text-xl font-bold text-deepblue-900 dark:text-white">
|
|
150
|
+
{{ t('payment.kaspi.scan') }}
|
|
151
|
+
</p>
|
|
146
152
|
|
|
147
|
-
<canvas
|
|
153
|
+
<canvas
|
|
154
|
+
id="kaspiQr"
|
|
155
|
+
class="rounded-md"
|
|
156
|
+
/>
|
|
148
157
|
|
|
149
|
-
<p class="
|
|
158
|
+
<p class="text-center text-base text-gray-600 dark:text-gray-300">
|
|
159
|
+
{{ t('payment.kaspi.adata') }}
|
|
160
|
+
</p>
|
|
150
161
|
</div>
|
|
162
|
+
</div>
|
|
151
163
|
|
|
152
|
-
|
|
164
|
+
<template #footer>
|
|
165
|
+
<a-button-v2
|
|
166
|
+
view="outline"
|
|
167
|
+
color="gray"
|
|
168
|
+
size="lg"
|
|
169
|
+
data-test-id="kaspi-qr-change-payment-method-button"
|
|
170
|
+
block
|
|
171
|
+
@click="onBack"
|
|
172
|
+
>
|
|
153
173
|
{{ t('payment.kaspi.changeMethod') }}
|
|
154
|
-
</a-button>
|
|
155
|
-
</
|
|
174
|
+
</a-button-v2>
|
|
175
|
+
</template>
|
|
156
176
|
</a-side-panel>
|
|
157
177
|
</template>
|
|
158
178
|
|
|
159
|
-
<style scoped>
|
|
160
|
-
|
|
161
|
-
</style>
|
|
179
|
+
<style scoped></style>
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
3
3
|
|
|
4
4
|
const props = defineProps<{
|
|
5
|
-
|
|
5
|
+
requestId: number
|
|
6
6
|
}>()
|
|
7
7
|
|
|
8
8
|
const emit = defineEmits<{
|
|
9
9
|
(e: 'back', type: 'kaspi'): void
|
|
10
|
-
(e:
|
|
10
|
+
(e: 'updateUserRate'): void
|
|
11
11
|
}>()
|
|
12
12
|
|
|
13
13
|
const isOpen = defineModel({ default: false })
|
|
@@ -78,35 +78,46 @@ watch(isOpen, async (value) => {
|
|
|
78
78
|
v-model="isOpen"
|
|
79
79
|
width="484px"
|
|
80
80
|
>
|
|
81
|
-
<div class="flex flex-col gap-
|
|
82
|
-
<p class="text-center text-
|
|
81
|
+
<div class="flex flex-col gap-6">
|
|
82
|
+
<p class="whitespace-pre-wrap text-center text-xl font-bold text-deepblue-900 dark:text-gray-100">
|
|
83
83
|
{{ t('payment.redirect.title') }}
|
|
84
84
|
</p>
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<div class="flex flex-col gap-2">
|
|
89
|
-
<p class="text-center text-sm">
|
|
85
|
+
|
|
86
|
+
<div class="flex flex-col items-center gap-1 rounded-xl bg-gray-50 p-5 text-center dark:bg-white/[0.03]">
|
|
87
|
+
<span class="text-xs text-gray-500 dark:text-gray-400">
|
|
90
88
|
{{ t('payment.redirect.paymentId') }}
|
|
91
|
-
</
|
|
92
|
-
<
|
|
89
|
+
</span>
|
|
90
|
+
<span class="text-2xl font-bold text-deepblue-900 dark:text-gray-100">
|
|
93
91
|
{{ requestId }}
|
|
94
|
-
</
|
|
92
|
+
</span>
|
|
95
93
|
</div>
|
|
96
|
-
|
|
94
|
+
|
|
95
|
+
<p class="text-center text-sm text-gray-600 dark:text-gray-300">
|
|
97
96
|
{{ t('payment.redirect.description') }}
|
|
98
97
|
</p>
|
|
99
|
-
<a-button
|
|
100
|
-
view="outline"
|
|
101
|
-
block
|
|
102
|
-
@click="onBack"
|
|
103
|
-
>
|
|
104
|
-
{{ t('payment.redirect.changeMethod') }}
|
|
105
|
-
</a-button>
|
|
106
98
|
</div>
|
|
99
|
+
|
|
100
|
+
<template #footer>
|
|
101
|
+
<div class="flex flex-col gap-2">
|
|
102
|
+
<a-button-v2
|
|
103
|
+
size="lg"
|
|
104
|
+
block
|
|
105
|
+
@click="goKaspi"
|
|
106
|
+
>
|
|
107
|
+
{{ t('payment.redirect.goKaspi') }}
|
|
108
|
+
</a-button-v2>
|
|
109
|
+
<a-button-v2
|
|
110
|
+
view="outline"
|
|
111
|
+
color="gray"
|
|
112
|
+
size="lg"
|
|
113
|
+
block
|
|
114
|
+
@click="onBack"
|
|
115
|
+
>
|
|
116
|
+
{{ t('payment.redirect.changeMethod') }}
|
|
117
|
+
</a-button-v2>
|
|
118
|
+
</div>
|
|
119
|
+
</template>
|
|
107
120
|
</a-side-panel>
|
|
108
121
|
</template>
|
|
109
122
|
|
|
110
|
-
<style scoped>
|
|
111
|
-
|
|
112
|
-
</style>
|
|
123
|
+
<style scoped></style>
|
|
@@ -16,24 +16,16 @@ const isOpen = defineModel({ default: false })
|
|
|
16
16
|
|
|
17
17
|
const { t } = useI18n()
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const selected = ref<IBank>('kaspi')
|
|
20
20
|
const cards = [
|
|
21
|
-
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 'other',
|
|
29
|
-
name: 'payment.method.other',
|
|
30
|
-
sum: 10000,
|
|
31
|
-
img: AIconPaymentCard,
|
|
32
|
-
},
|
|
33
|
-
]
|
|
21
|
+
{ id: 'kaspi', name: 'payment.method.kaspi', img: AIconPaymentKaspi, dataTestId: 'payment-method-kaspi-button' },
|
|
22
|
+
{ id: 'other', name: 'payment.method.other', img: AIconPaymentCard, dataTestId: 'payment-method-other-bank-button' },
|
|
23
|
+
] as const
|
|
24
|
+
|
|
25
|
+
const formattedSum = computed(() => Math.round(props.sum).toLocaleString('ru-RU'))
|
|
34
26
|
|
|
35
27
|
function confirm() {
|
|
36
|
-
emit('nextBank',
|
|
28
|
+
emit('nextBank', selected.value, props.sum)
|
|
37
29
|
}
|
|
38
30
|
|
|
39
31
|
function cancel() {
|
|
@@ -49,73 +41,98 @@ function onBack() {
|
|
|
49
41
|
<a-side-panel
|
|
50
42
|
v-model="isOpen"
|
|
51
43
|
width="484px"
|
|
44
|
+
data-test-id="payment-method-modal"
|
|
52
45
|
>
|
|
53
46
|
<template #header>
|
|
54
47
|
<div class="flex items-center gap-2">
|
|
55
|
-
<button
|
|
48
|
+
<button
|
|
49
|
+
type="button"
|
|
50
|
+
class="rounded-md p-1 transition-colors hover:bg-gray-100 dark:hover:bg-white/[0.06]"
|
|
51
|
+
data-test-id="payment-method-back-button"
|
|
52
|
+
@click="onBack"
|
|
53
|
+
>
|
|
56
54
|
<a-icon-chevron-left class="size-6" />
|
|
57
55
|
</button>
|
|
58
|
-
<p class="text-xl font-semibold">
|
|
56
|
+
<p class="text-xl font-semibold text-deepblue-900 dark:text-gray-100">
|
|
59
57
|
{{ t('payment.method.title') }}
|
|
60
58
|
</p>
|
|
61
59
|
</div>
|
|
62
60
|
</template>
|
|
63
61
|
|
|
64
62
|
<div class="flex flex-col gap-6">
|
|
65
|
-
<div class="flex flex-col items-center gap-4">
|
|
63
|
+
<div class="flex flex-col items-center gap-4 rounded-xl bg-gray-50 p-6 text-center dark:bg-white/[0.03]">
|
|
66
64
|
<a-ill-phone-check class="size-[120px]" />
|
|
67
|
-
<p class="text-
|
|
65
|
+
<p class="text-sm font-medium text-gray-600 dark:text-gray-300">
|
|
68
66
|
{{ t('payment.method.description') }}
|
|
69
67
|
</p>
|
|
70
68
|
</div>
|
|
71
69
|
|
|
72
|
-
<div class="font-semibold">
|
|
73
|
-
{{ t('payment.method.note') }}
|
|
74
|
-
</div>
|
|
75
|
-
|
|
76
70
|
<div class="flex flex-col gap-2">
|
|
77
|
-
<
|
|
78
|
-
|
|
71
|
+
<p class="text-sm font-semibold text-deepblue-900 dark:text-gray-100">
|
|
72
|
+
{{ t('payment.method.note') }}
|
|
73
|
+
</p>
|
|
74
|
+
|
|
75
|
+
<button
|
|
76
|
+
v-for="item in cards"
|
|
79
77
|
:key="item.id"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
type="button"
|
|
79
|
+
class="flex items-center gap-3 rounded-xl border p-4 text-left transition-colors"
|
|
80
|
+
:data-test-id="item.dataTestId"
|
|
81
|
+
:class="selected === item.id
|
|
82
|
+
? 'border-blue-500 bg-blue-50/60 dark:border-blue-400 dark:bg-blue-950/30'
|
|
83
|
+
: 'border-gray-200 bg-white hover:border-gray-300 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:hover:bg-gray-800'"
|
|
84
|
+
@click="selected = item.id"
|
|
86
85
|
>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
<component
|
|
87
|
+
:is="item.img"
|
|
88
|
+
class="h-7 w-auto shrink-0"
|
|
89
|
+
/>
|
|
90
|
+
<div class="flex min-w-0 flex-1 items-center justify-between gap-2">
|
|
91
|
+
<span class="text-sm font-semibold text-deepblue-900 dark:text-gray-100">
|
|
90
92
|
{{ t(item.name) }}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
</
|
|
93
|
+
</span>
|
|
94
|
+
<span class="text-sm font-semibold text-gray-600 dark:text-gray-300">
|
|
95
|
+
{{ formattedSum }} ₸
|
|
96
|
+
</span>
|
|
95
97
|
</div>
|
|
96
|
-
|
|
98
|
+
<span
|
|
99
|
+
class="flex size-5 shrink-0 items-center justify-center rounded-full border-2 transition-colors"
|
|
100
|
+
:class="selected === item.id
|
|
101
|
+
? 'border-blue-600 dark:border-blue-400'
|
|
102
|
+
: 'border-gray-300 dark:border-gray-600'"
|
|
103
|
+
>
|
|
104
|
+
<span
|
|
105
|
+
v-if="selected === item.id"
|
|
106
|
+
class="size-2.5 rounded-full bg-blue-600 dark:bg-blue-400"
|
|
107
|
+
/>
|
|
108
|
+
</span>
|
|
109
|
+
</button>
|
|
97
110
|
</div>
|
|
111
|
+
</div>
|
|
98
112
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
113
|
+
<template #footer>
|
|
114
|
+
<div class="flex flex-col gap-2">
|
|
115
|
+
<a-button-v2
|
|
116
|
+
size="lg"
|
|
117
|
+
data-test-id="payment-method-submit-button"
|
|
102
118
|
block
|
|
103
119
|
@click="confirm"
|
|
104
120
|
>
|
|
105
121
|
{{ t('actions.topUp') }}
|
|
106
|
-
</a-button>
|
|
107
|
-
<a-button
|
|
122
|
+
</a-button-v2>
|
|
123
|
+
<a-button-v2
|
|
108
124
|
view="outline"
|
|
125
|
+
color="gray"
|
|
126
|
+
size="lg"
|
|
127
|
+
data-test-id="payment-method-close-button"
|
|
109
128
|
block
|
|
110
129
|
@click="cancel"
|
|
111
130
|
>
|
|
112
131
|
{{ t('actions.close') }}
|
|
113
|
-
</a-button>
|
|
132
|
+
</a-button-v2>
|
|
114
133
|
</div>
|
|
115
|
-
</
|
|
134
|
+
</template>
|
|
116
135
|
</a-side-panel>
|
|
117
136
|
</template>
|
|
118
137
|
|
|
119
|
-
<style scoped>
|
|
120
|
-
|
|
121
|
-
</style>
|
|
138
|
+
<style scoped></style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
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
2
|
import PaymentKaspiQrSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiQrSidePanel.vue'
|
|
5
3
|
import PaymentKaspiRedirectSidePanel from '#adata-ui/components/features/payment/process/PaymentKaspiRedirectSidePanel.vue'
|
|
4
|
+
import PaymentMethodSidePanel from '#adata-ui/components/features/payment/process/PaymentMethodSidePanel.vue'
|
|
5
|
+
import PaymentTopUpSidePanel from '#adata-ui/components/features/payment/process/PaymentTopUpSidePanel.vue'
|
|
6
6
|
import { removeTrailingSlash } from '#adata-ui/components/utils/removeTrailingSlash'
|
|
7
7
|
|
|
8
8
|
const { $toast } = useNuxtApp()
|
|
@@ -16,7 +16,7 @@ const {
|
|
|
16
16
|
methodSidePanel,
|
|
17
17
|
kaspiQRSidePanel,
|
|
18
18
|
kaspiRedirectSidePanel,
|
|
19
|
-
payByCard
|
|
19
|
+
payByCard,
|
|
20
20
|
} = usePayment()
|
|
21
21
|
|
|
22
22
|
const userApiURL = commonAuth.userApiURL
|
|
@@ -132,23 +132,23 @@ async function updateUserRate() {
|
|
|
132
132
|
|
|
133
133
|
<payment-method-side-panel
|
|
134
134
|
v-model="methodSidePanel"
|
|
135
|
-
@back="onBack"
|
|
136
135
|
:sum="paymentSum"
|
|
136
|
+
@back="onBack"
|
|
137
137
|
@next-bank="directionsBanks"
|
|
138
138
|
/>
|
|
139
139
|
|
|
140
140
|
<payment-kaspi-qr-side-panel
|
|
141
141
|
v-model="kaspiQRSidePanel"
|
|
142
|
-
@back="onBack"
|
|
143
142
|
:request-url="requestUrl"
|
|
144
143
|
:request-id="requestId as number"
|
|
144
|
+
@back="onBack"
|
|
145
145
|
@update-user-rate="updateUserRate"
|
|
146
146
|
/>
|
|
147
147
|
|
|
148
148
|
<payment-kaspi-redirect-side-panel
|
|
149
149
|
v-model="kaspiRedirectSidePanel"
|
|
150
|
-
@back="onBack"
|
|
151
150
|
:request-id="requestId as number"
|
|
151
|
+
@back="onBack"
|
|
152
152
|
@update-user-rate="updateUserRate"
|
|
153
153
|
/>
|
|
154
154
|
</template>
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ASidePanel from "#adata-ui/components/overlays/side-panel/ASidePanel.vue";
|
|
3
|
-
|
|
4
2
|
const emit = defineEmits<{
|
|
5
3
|
(e: 'next', sum: number): void
|
|
6
4
|
}>()
|
|
@@ -9,35 +7,18 @@ const isOpen = defineModel({ default: false })
|
|
|
9
7
|
|
|
10
8
|
const { t } = useI18n()
|
|
11
9
|
|
|
12
|
-
const money = ref(0)
|
|
10
|
+
const money = ref<number | string>(0)
|
|
13
11
|
const errorAlert = ref(false)
|
|
14
12
|
|
|
15
|
-
const sumArr =
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
])
|
|
13
|
+
const sumArr = [
|
|
14
|
+
{ id: 1, value: 2000, label: '2 000 ₸', dataTestId: 'topup-balance-amount-2000-button' },
|
|
15
|
+
{ id: 2, value: 5000, label: '5 000 ₸', dataTestId: 'topup-balance-amount-5000-button' },
|
|
16
|
+
{ id: 3, value: 10000, label: '10 000 ₸', dataTestId: 'topup-balance-amount-10000-button' },
|
|
17
|
+
{ id: 4, value: 20000, label: '20 000 ₸', dataTestId: 'topup-balance-amount-20000-button' },
|
|
18
|
+
]
|
|
37
19
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
})
|
|
20
|
+
const amount = computed(() => Number(money.value) || 0)
|
|
21
|
+
const filterMoney = computed(() => amount.value >= 1)
|
|
41
22
|
|
|
42
23
|
function onSelectAmount(value: number) {
|
|
43
24
|
money.value = value
|
|
@@ -50,10 +31,11 @@ function onClose() {
|
|
|
50
31
|
}
|
|
51
32
|
|
|
52
33
|
function handlePayment() {
|
|
53
|
-
if (
|
|
54
|
-
emit('next',
|
|
34
|
+
if (amount.value <= 1000000) {
|
|
35
|
+
emit('next', amount.value)
|
|
55
36
|
errorAlert.value = false
|
|
56
|
-
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
57
39
|
errorAlert.value = true
|
|
58
40
|
}
|
|
59
41
|
}
|
|
@@ -63,71 +45,75 @@ function handlePayment() {
|
|
|
63
45
|
<a-side-panel
|
|
64
46
|
v-model="isOpen"
|
|
65
47
|
width="484px"
|
|
48
|
+
data-test-id="topup-balance-modal"
|
|
66
49
|
>
|
|
67
50
|
<template #header>
|
|
68
|
-
<div class="text-xl font-semibold">
|
|
51
|
+
<div class="text-xl font-semibold text-deepblue-900 dark:text-gray-100">
|
|
69
52
|
{{ t('payment.topUp.title') }}
|
|
70
53
|
</div>
|
|
71
54
|
</template>
|
|
72
55
|
|
|
73
56
|
<div class="flex flex-col gap-6">
|
|
74
|
-
<div class="flex flex-col items-center gap-4 ">
|
|
57
|
+
<div class="flex flex-col items-center gap-4 rounded-xl bg-gray-50 p-6 text-center dark:bg-white/[0.03]">
|
|
75
58
|
<a-ill-bill class="size-[120px]" />
|
|
76
|
-
<p class="text-
|
|
59
|
+
<p class="text-sm font-medium text-gray-600 dark:text-gray-300">
|
|
77
60
|
{{ t('payment.topUp.info') }}
|
|
78
61
|
</p>
|
|
79
62
|
</div>
|
|
80
63
|
|
|
81
|
-
<div class="flex flex-col gap-
|
|
82
|
-
<a-input-
|
|
64
|
+
<div class="flex flex-col gap-3">
|
|
65
|
+
<a-input-v2
|
|
83
66
|
v-model="money"
|
|
84
|
-
:label="
|
|
67
|
+
:label="t('payment.topUp.enterAmount')"
|
|
85
68
|
type="number"
|
|
86
|
-
|
|
69
|
+
size="md"
|
|
87
70
|
clearable
|
|
71
|
+
data-test-id="topup-topup-balance-amount-input"
|
|
72
|
+
:error="errorAlert ? t('modals.replenish_modal.error') : undefined"
|
|
88
73
|
/>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
>
|
|
93
|
-
{{ t('modals.replenish_modal.error') }}
|
|
94
|
-
</a-alert>
|
|
95
|
-
<div class="flex gap-4">
|
|
96
|
-
<a-chips
|
|
74
|
+
|
|
75
|
+
<div class="grid grid-cols-2 gap-2 sm:grid-cols-4">
|
|
76
|
+
<button
|
|
97
77
|
v-for="item in sumArr"
|
|
98
78
|
:key="item.id"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
]"
|
|
79
|
+
type="button"
|
|
80
|
+
class="rounded-lg border px-3 py-2.5 text-sm font-semibold transition-colors"
|
|
81
|
+
:data-test-id="item.dataTestId"
|
|
82
|
+
:class="amount === item.value
|
|
83
|
+
? 'border-blue-500 bg-blue-50 text-blue-700 dark:border-blue-400 dark:bg-blue-950/40 dark:text-blue-300'
|
|
84
|
+
: 'border-gray-200 bg-white text-deepblue-900 hover:border-gray-300 hover:bg-gray-50 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:hover:bg-gray-800'"
|
|
106
85
|
@click.stop="onSelectAmount(item.value)"
|
|
107
86
|
>
|
|
108
|
-
|
|
109
|
-
</
|
|
87
|
+
{{ item.label }}
|
|
88
|
+
</button>
|
|
110
89
|
</div>
|
|
111
90
|
</div>
|
|
91
|
+
</div>
|
|
112
92
|
|
|
93
|
+
<template #footer>
|
|
113
94
|
<div class="flex flex-col gap-2">
|
|
114
|
-
<a-button
|
|
95
|
+
<a-button-v2
|
|
96
|
+
size="lg"
|
|
97
|
+
data-test-id="topup-balance-submit-button"
|
|
98
|
+
block
|
|
115
99
|
:disabled="!filterMoney"
|
|
116
100
|
@click="handlePayment"
|
|
117
101
|
>
|
|
118
102
|
{{ t('actions.topUp') }}
|
|
119
|
-
</a-button>
|
|
120
|
-
<a-button
|
|
103
|
+
</a-button-v2>
|
|
104
|
+
<a-button-v2
|
|
121
105
|
view="outline"
|
|
106
|
+
color="gray"
|
|
107
|
+
size="lg"
|
|
108
|
+
data-test-id="topup-balance-back-button"
|
|
109
|
+
block
|
|
122
110
|
@click="onClose"
|
|
123
111
|
>
|
|
124
112
|
{{ t('actions.back') }}
|
|
125
|
-
</a-button>
|
|
113
|
+
</a-button-v2>
|
|
126
114
|
</div>
|
|
127
|
-
</
|
|
115
|
+
</template>
|
|
128
116
|
</a-side-panel>
|
|
129
117
|
</template>
|
|
130
118
|
|
|
131
|
-
<style scoped>
|
|
132
|
-
|
|
133
|
-
</style>
|
|
119
|
+
<style scoped></style>
|