adata-ui 2.1.41-beta.18 → 2.1.41-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/components/elements/a-select-row/ASelectRowV2.vue +3 -3
- package/components/elements/banner/ABanner.vue +4 -4
- package/components/elements/tree-select-modal/ATreeSelectModal.vue +1 -1
- package/components/features/payment/process/PaymentProcess.vue +4 -0
- package/components/features/payment/process/PaymentTopUpSidePanel.vue +16 -1
- package/components/modals/id/IdResetPasswordOtpModal.vue +1 -4
- package/composables/useHeaderNavigationLinks.ts +1 -1
- package/composables/usePayment.ts +3 -0
- package/icons/building-org.vue +15 -0
- package/icons/chart-pie-piece.vue +6 -0
- package/icons/factory.vue +7 -0
- package/icons/heart-pulse.vue +6 -0
- package/icons/store.vue +7 -0
- package/icons/trees.vue +8 -0
- package/icons/trophy.vue +10 -0
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@ defineExpose({ onClear })
|
|
|
73
73
|
</script>
|
|
74
74
|
|
|
75
75
|
<template>
|
|
76
|
-
<div class="select-row-v2 relative w-full text-body-md">
|
|
76
|
+
<div class="select-row-v2 relative w-full min-w-0 text-body-md">
|
|
77
77
|
<button
|
|
78
78
|
type="button"
|
|
79
79
|
:disabled="disabled"
|
|
@@ -97,12 +97,12 @@ defineExpose({ onClear })
|
|
|
97
97
|
{{ label }}<span v-if="required" class="text-danger"> *</span>
|
|
98
98
|
</span>
|
|
99
99
|
|
|
100
|
-
<span ref="chipsRow" class="relative flex w-
|
|
100
|
+
<span ref="chipsRow" class="relative flex w-0 min-w-0 flex-1 items-center gap-1.5 overflow-hidden text-start leading-none">
|
|
101
101
|
<template v-if="hasValue">
|
|
102
102
|
<span
|
|
103
103
|
v-for="item in visibleItems"
|
|
104
104
|
:key="item.id"
|
|
105
|
-
class="select-row-v2__chip inline-flex min-w-0 items-center gap-1 rounded-sm bg-brand-subtle px-2 py-0.5 text-body-sm text-brand"
|
|
105
|
+
class="select-row-v2__chip inline-flex min-w-0 max-w-full items-center gap-1 rounded-sm bg-brand-subtle px-2 py-0.5 text-body-sm text-brand"
|
|
106
106
|
@click.stop="deletable ? deleteItem(item) : (isOpen = true)"
|
|
107
107
|
>
|
|
108
108
|
<span class="truncate">{{ item.name }}</span>
|
|
@@ -39,10 +39,10 @@ onBeforeMount(() => {
|
|
|
39
39
|
v-show="isDark"
|
|
40
40
|
:href="bannerData?.redirect_url"
|
|
41
41
|
target="_blank"
|
|
42
|
-
:class="location === 'horizontal' ? '' : 'mt-4
|
|
42
|
+
:class="location === 'horizontal' ? '' : 'mt-4 hidden w-0 min-w-full lg:flex'"
|
|
43
43
|
>
|
|
44
44
|
<img
|
|
45
|
-
|
|
45
|
+
class="w-full"
|
|
46
46
|
:src="bannerData.dark_src"
|
|
47
47
|
alt="banner"
|
|
48
48
|
/>
|
|
@@ -51,10 +51,10 @@ onBeforeMount(() => {
|
|
|
51
51
|
v-show="!isDark"
|
|
52
52
|
:href="bannerData?.redirect_url"
|
|
53
53
|
target="_blank"
|
|
54
|
-
:class="location === 'horizontal' ? '' : 'mt-4
|
|
54
|
+
:class="location === 'horizontal' ? '' : 'mt-4 hidden w-0 min-w-full lg:flex'"
|
|
55
55
|
>
|
|
56
56
|
<img
|
|
57
|
-
|
|
57
|
+
class="w-full"
|
|
58
58
|
:src="bannerData.src"
|
|
59
59
|
alt="banner"
|
|
60
60
|
/>
|
|
@@ -13,6 +13,7 @@ const accessToken = useCookie('accessToken')
|
|
|
13
13
|
const {
|
|
14
14
|
rateId,
|
|
15
15
|
topUpSidePanel,
|
|
16
|
+
topUpPresetAmount,
|
|
16
17
|
methodSidePanel,
|
|
17
18
|
kaspiQRSidePanel,
|
|
18
19
|
kaspiRedirectSidePanel,
|
|
@@ -42,6 +43,9 @@ function toggleKaspiSidePanel(state: boolean) {
|
|
|
42
43
|
|
|
43
44
|
function onBack(type: 'method' | 'kaspi') {
|
|
44
45
|
if (type === 'method') {
|
|
46
|
+
// Панель пополнения обнуляет поле при закрытии, поэтому введённую сумму
|
|
47
|
+
// возвращаем ей тем же способом, что и быстрые суммы снаружи.
|
|
48
|
+
topUpPresetAmount.value = paymentSum.value
|
|
45
49
|
topUpSidePanel.value = true
|
|
46
50
|
methodSidePanel.value = false
|
|
47
51
|
}
|
|
@@ -6,6 +6,7 @@ const emit = defineEmits<{
|
|
|
6
6
|
const isOpen = defineModel({ default: false })
|
|
7
7
|
|
|
8
8
|
const { t } = useI18n()
|
|
9
|
+
const { topUpPresetAmount } = usePayment()
|
|
9
10
|
|
|
10
11
|
const money = ref<number | string>(0)
|
|
11
12
|
const errorAlert = ref(false)
|
|
@@ -17,6 +18,19 @@ const sumArr = [
|
|
|
17
18
|
{ id: 4, value: 20000, label: '20 000 ₸', dataTestId: 'topup-balance-amount-20000-button' },
|
|
18
19
|
]
|
|
19
20
|
|
|
21
|
+
// Панель монтируется один раз и не размонтируется, поэтому поле суммы задаём
|
|
22
|
+
// сами — но только при открытии, а не при закрытии: иначе сброс виден сквозь
|
|
23
|
+
// анимацию ухода панели. Предвыбранная сумма приходит снаружи (быстрые суммы)
|
|
24
|
+
// и с шага выбора способа оплаты, так что «Назад» не теряет введённое значение,
|
|
25
|
+
// а обычное открытие всегда стартует с нуля.
|
|
26
|
+
watch(isOpen, (open) => {
|
|
27
|
+
if (!open) return
|
|
28
|
+
|
|
29
|
+
money.value = topUpPresetAmount.value ?? 0
|
|
30
|
+
errorAlert.value = false
|
|
31
|
+
topUpPresetAmount.value = undefined
|
|
32
|
+
})
|
|
33
|
+
|
|
20
34
|
const amount = computed(() => Number(money.value) || 0)
|
|
21
35
|
const filterMoney = computed(() => amount.value >= 1)
|
|
22
36
|
|
|
@@ -26,8 +40,9 @@ function onSelectAmount(value: number) {
|
|
|
26
40
|
}
|
|
27
41
|
|
|
28
42
|
function onClose() {
|
|
43
|
+
// Ошибку не гасим здесь — она, как и сумма, сбрасывается при открытии,
|
|
44
|
+
// иначе смена состояния видна сквозь анимацию закрытия.
|
|
29
45
|
isOpen.value = false
|
|
30
|
-
errorAlert.value = false
|
|
31
46
|
}
|
|
32
47
|
|
|
33
48
|
function handlePayment() {
|
|
@@ -15,7 +15,6 @@ const otp = ref(['', '', '', '', '', ''])
|
|
|
15
15
|
const otpFormatted = computed(() => {
|
|
16
16
|
return otp.value.join('')
|
|
17
17
|
})
|
|
18
|
-
const showError = ref(false)
|
|
19
18
|
const isLoading = ref(false)
|
|
20
19
|
|
|
21
20
|
async function onConfirm() {
|
|
@@ -41,7 +40,7 @@ async function onConfirm() {
|
|
|
41
40
|
newPasswordModal.value = true
|
|
42
41
|
}
|
|
43
42
|
catch (error) {
|
|
44
|
-
|
|
43
|
+
$toast.error(apiErrorMessage(error, t('error.validation')))
|
|
45
44
|
}
|
|
46
45
|
finally {
|
|
47
46
|
isLoading.value = false
|
|
@@ -50,7 +49,6 @@ async function onConfirm() {
|
|
|
50
49
|
|
|
51
50
|
function resetOtp() {
|
|
52
51
|
otp.value = ['', '', '', '', '', '']
|
|
53
|
-
showError.value = false
|
|
54
52
|
}
|
|
55
53
|
|
|
56
54
|
function onClose() {
|
|
@@ -131,7 +129,6 @@ onMounted(() => {
|
|
|
131
129
|
|
|
132
130
|
<id-otp-input
|
|
133
131
|
v-model="otp"
|
|
134
|
-
v-model:error="showError"
|
|
135
132
|
@on-completed="onConfirm"
|
|
136
133
|
/>
|
|
137
134
|
|
|
@@ -480,7 +480,7 @@ export function usePkServicesLinks() {
|
|
|
480
480
|
{
|
|
481
481
|
title: t('header.products.counterparties.items.counterparty.title'),
|
|
482
482
|
icon: IconSearch,
|
|
483
|
-
to: buildLocalizedUrl(locale.value, urls.pk,
|
|
483
|
+
to: buildLocalizedUrl(locale.value, urls.pk, ''),
|
|
484
484
|
short: PAGES.pk.main,
|
|
485
485
|
},
|
|
486
486
|
{
|
|
@@ -6,6 +6,8 @@ export function usePayment() {
|
|
|
6
6
|
const kaspiQRSidePanel = useState('kaspi-qr-side-panel', () => false)
|
|
7
7
|
const kaspiRedirectSidePanel = useState('kaspi-redirect-side-panel', () => false)
|
|
8
8
|
const rateId = useState<string>('use-rate-id')
|
|
9
|
+
/** Сумма, предвыбранная вызывающей стороной: панель пополнения подставит её при открытии. */
|
|
10
|
+
const topUpPresetAmount = useState<number | undefined>('top-up-preset-amount', () => undefined)
|
|
9
11
|
|
|
10
12
|
async function payByCard(sum: number, rate?: any) {
|
|
11
13
|
const { $toast, $i18n } = useNuxtApp()
|
|
@@ -70,6 +72,7 @@ export function usePayment() {
|
|
|
70
72
|
return {
|
|
71
73
|
rateId,
|
|
72
74
|
topUpSidePanel,
|
|
75
|
+
topUpPresetAmount,
|
|
73
76
|
methodSidePanel,
|
|
74
77
|
kaspiQRSidePanel,
|
|
75
78
|
kaspiRedirectSidePanel,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-building">
|
|
3
|
+
<path d="M12 10h.01"/>
|
|
4
|
+
<path d="M12 14h.01"/>
|
|
5
|
+
<path d="M12 6h.01"/>
|
|
6
|
+
<path d="M16 10h.01"/>
|
|
7
|
+
<path d="M16 14h.01"/>
|
|
8
|
+
<path d="M16 6h.01"/>
|
|
9
|
+
<path d="M8 10h.01"/>
|
|
10
|
+
<path d="M8 14h.01"/>
|
|
11
|
+
<path d="M8 6h.01"/>
|
|
12
|
+
<path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/>
|
|
13
|
+
<rect x="4" y="2" width="16" height="20" rx="2"/>
|
|
14
|
+
</svg>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chart-pie">
|
|
3
|
+
<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z"/>
|
|
4
|
+
<path d="M21.21 15.89A10 10 0 1 1 8 2.83"/>
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-factory"><path d="M12 16h.01"/>
|
|
3
|
+
<path d="M16 16h.01"/>
|
|
4
|
+
<path d="M3 19a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8.5a.5.5 0 0 0-.769-.422l-4.462 2.844A.5.5 0 0 1 15 10.5v-2a.5.5 0 0 0-.769-.422L9.77 10.922A.5.5 0 0 1 9 10.5V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2z"/>
|
|
5
|
+
<path d="M8 16h.01"/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heart-pulse">
|
|
3
|
+
<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5"/>
|
|
4
|
+
<path d="M3.22 13H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27"/>
|
|
5
|
+
</svg>
|
|
6
|
+
</template>
|
package/icons/store.vue
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-store">
|
|
3
|
+
<path d="M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5"/>
|
|
4
|
+
<path d="M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244"/>
|
|
5
|
+
<path d="M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05"/>
|
|
6
|
+
</svg>
|
|
7
|
+
</template>
|
package/icons/trees.vue
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trees">
|
|
3
|
+
<path d="M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z"/>
|
|
4
|
+
<path d="M7 16v6"/>
|
|
5
|
+
<path d="M13 19v3"/>
|
|
6
|
+
<path d="M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5"/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
package/icons/trophy.vue
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trophy">
|
|
3
|
+
<path d="M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2"/>
|
|
4
|
+
<path d="M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2"/>
|
|
5
|
+
<path d="M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3"/>
|
|
6
|
+
<path d="M4 22h16"/>
|
|
7
|
+
<path d="M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z"/>
|
|
8
|
+
<path d="M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3"/>
|
|
9
|
+
</svg>
|
|
10
|
+
</template>
|