adata-ui 3.1.79 → 3.1.81
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/dist/module.json +1 -1
- package/dist/runtime/components/button/Button.vue.d.ts +1 -1
- package/dist/runtime/components/forms/need-more-data/NeedMoreData.vue +7 -1
- package/dist/runtime/components/forms/need-more-data/NeedMoreData.vue.d.ts +4 -1
- package/dist/runtime/components/forms/request-demo/RequestDemo.vue +6 -2
- package/dist/runtime/components/forms/request-demo/RequestDemo.vue.d.ts +1 -0
- package/dist/runtime/components/header/HeaderLink.vue +9 -1
- package/dist/runtime/components/modals/ApplicationAcceptedModal.vue +43 -0
- package/dist/runtime/components/modals/ApplicationAcceptedModal.vue.d.ts +9 -0
- package/dist/runtime/components/modals/ConnectingTariffModal.vue +58 -0
- package/dist/runtime/components/modals/ConnectingTariffModal.vue.d.ts +19 -0
- package/dist/runtime/components/modals/InsufficientFundsModal.vue +68 -0
- package/dist/runtime/components/modals/InsufficientFundsModal.vue.d.ts +18 -0
- package/dist/runtime/components/modals/SubmitApplicationModal.vue +108 -0
- package/dist/runtime/components/modals/SubmitApplicationModal.vue.d.ts +14 -0
- package/dist/runtime/composables/projectState.d.ts +2 -2
- package/dist/runtime/composables/useBuyTariffs.d.ts +7 -0
- package/dist/runtime/composables/useBuyTariffs.js +73 -0
- package/dist/runtime/composables/useIdModals.d.ts +11 -21
- package/dist/runtime/composables/usePayment.d.ts +5 -5
- package/dist/runtime/i18n/i18n.config.d.ts +9 -0
- package/dist/runtime/i18n.d.ts +1 -1
- package/dist/runtime/lang/en.js +6 -3
- package/dist/runtime/lang/kk.js +6 -3
- package/dist/runtime/lang/ru.d.ts +3 -0
- package/dist/runtime/lang/ru.js +6 -3
- package/dist/runtime/plugins/toast.d.ts +1 -503
- package/dist/runtime/utils/getMaxZindex.d.ts +2 -0
- package/dist/runtime/utils/getMaxZindex.js +22 -0
- package/dist/runtime/utils/localizedNavigation.d.ts +1 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -21,12 +21,12 @@ declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {},
|
|
|
21
21
|
view: "default" | "outline" | "transparent";
|
|
22
22
|
form: "icon" | "button";
|
|
23
23
|
disabled: boolean;
|
|
24
|
-
to: string;
|
|
25
24
|
variant: "primary" | "success" | "danger" | "gray" | "ghost";
|
|
26
25
|
iconClass: string;
|
|
27
26
|
loading: boolean;
|
|
28
27
|
block: boolean;
|
|
29
28
|
active: boolean;
|
|
29
|
+
to: string;
|
|
30
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
32
32
|
export default _default;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, useI18n, watch } from "#imports";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
userInfo: { type: null, required: true }
|
|
5
|
+
});
|
|
3
6
|
const { t } = useI18n();
|
|
4
7
|
const mail = ref("");
|
|
5
8
|
const phone = ref("");
|
|
@@ -34,7 +37,7 @@ const send = () => {
|
|
|
34
37
|
emit("submit", { phone: phone.value, mail: mail.value, comment: comment.value });
|
|
35
38
|
isSend.value = true;
|
|
36
39
|
phone.value = "";
|
|
37
|
-
mail.value = "";
|
|
40
|
+
mail.value = props.userInfo?.email || "";
|
|
38
41
|
comment.value = "";
|
|
39
42
|
phoneValidation.value = "";
|
|
40
43
|
emailValidation.value = "";
|
|
@@ -52,6 +55,9 @@ watch(comment, (newComment) => {
|
|
|
52
55
|
if (isSend.value) return;
|
|
53
56
|
commentValidation.value = validateComment(newComment);
|
|
54
57
|
});
|
|
58
|
+
onMounted(() => {
|
|
59
|
+
mail.value = props.userInfo?.email || "";
|
|
60
|
+
});
|
|
55
61
|
</script>
|
|
56
62
|
|
|
57
63
|
<template>
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
type
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
userInfo: any;
|
|
3
|
+
};
|
|
4
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
2
5
|
'isLoading'?: boolean;
|
|
3
6
|
};
|
|
4
7
|
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -4,7 +4,8 @@ import { reactive, ref, useI18n } from "#imports";
|
|
|
4
4
|
import useUIValidation from "../../../composables/useUIValidation";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
title: { type: String, required: false },
|
|
7
|
-
description: { type: String, required: false }
|
|
7
|
+
description: { type: String, required: false },
|
|
8
|
+
userInfo: { type: null, required: true }
|
|
8
9
|
});
|
|
9
10
|
const emit = defineEmits(["send"]);
|
|
10
11
|
const { t } = useI18n();
|
|
@@ -30,9 +31,12 @@ function onSend() {
|
|
|
30
31
|
emit("send", form);
|
|
31
32
|
submitted.value = false;
|
|
32
33
|
form.sender_name = "";
|
|
33
|
-
form.email = "";
|
|
34
|
+
form.email = props.userInfo?.email || "";
|
|
34
35
|
form.phone_number = "";
|
|
35
36
|
}
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
form.email = props.userInfo?.email || "";
|
|
39
|
+
});
|
|
36
40
|
</script>
|
|
37
41
|
|
|
38
42
|
<template>
|
|
@@ -22,6 +22,10 @@ const navs = [
|
|
|
22
22
|
{
|
|
23
23
|
label: "header.navs.api",
|
|
24
24
|
to: `https://${mode}.kz/api-description`
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "header.navs.services",
|
|
28
|
+
to: `https://${mode}.kz/counterparty-service`
|
|
25
29
|
}
|
|
26
30
|
];
|
|
27
31
|
const menu = ref(null);
|
|
@@ -43,6 +47,8 @@ const currentMenuToShow = (index) => {
|
|
|
43
47
|
return null;
|
|
44
48
|
case 3:
|
|
45
49
|
return null;
|
|
50
|
+
case 4:
|
|
51
|
+
return null;
|
|
46
52
|
}
|
|
47
53
|
};
|
|
48
54
|
const toggleMenu = (index) => {
|
|
@@ -59,6 +65,8 @@ const toggleMenu = (index) => {
|
|
|
59
65
|
navigateToLocalizedPage({ locale, projectUrl: `https://${mode}.kz`, path: "/tariffs" + code, target: "_blank" });
|
|
60
66
|
} else if (index === 3) {
|
|
61
67
|
navigateToLocalizedPage({ locale, projectUrl: `https://${mode}.kz`, path: "/api-description", target: "_blank" });
|
|
68
|
+
} else if (index === 4) {
|
|
69
|
+
navigateToLocalizedPage({ locale, projectUrl: `https://${mode}.kz`, path: "/counterparty-service", target: "_blank" });
|
|
62
70
|
} else {
|
|
63
71
|
currentMenu.value = currentMenuToShow(index);
|
|
64
72
|
const prev = currentIndex.value;
|
|
@@ -86,7 +94,7 @@ const closeMenu = (forceClose = false) => {
|
|
|
86
94
|
}
|
|
87
95
|
};
|
|
88
96
|
const onMenuMouseEnter = (index) => {
|
|
89
|
-
if (
|
|
97
|
+
if (![2, 3, 4].includes(index)) {
|
|
90
98
|
if (show.value === false) {
|
|
91
99
|
delayTimer.value = setTimeout(() => {
|
|
92
100
|
toggleMenu(index);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from "#i18n";
|
|
3
|
+
import AModal from "#adata-ui/components/Modal.vue";
|
|
4
|
+
import AButton from "#adata-ui/components/button/Button.vue";
|
|
5
|
+
import AIllOk from "#adata-ui/illustrations/ok.vue";
|
|
6
|
+
const { t } = useI18n();
|
|
7
|
+
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
8
|
+
const cancel = () => {
|
|
9
|
+
isOpen.value = false;
|
|
10
|
+
};
|
|
11
|
+
const modalText = {
|
|
12
|
+
title: t("modals.application_accepted_modal.title"),
|
|
13
|
+
info: t("modals.application_accepted_modal.info"),
|
|
14
|
+
close: t("modals.buttons.close")
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<a-modal
|
|
20
|
+
v-model="isOpen"
|
|
21
|
+
name="application-accepted"
|
|
22
|
+
:prevent-close="true"
|
|
23
|
+
>
|
|
24
|
+
<div class="flex flex-col gap-5">
|
|
25
|
+
<p class="text-center heading-02">
|
|
26
|
+
{{ modalText.title }}
|
|
27
|
+
</p>
|
|
28
|
+
<a-ill-ok class="w-full" />
|
|
29
|
+
<p class="text-center body-400">
|
|
30
|
+
{{ modalText.info }}
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
<template #footer>
|
|
34
|
+
<a-button
|
|
35
|
+
view="outline"
|
|
36
|
+
block
|
|
37
|
+
@click="cancel"
|
|
38
|
+
>
|
|
39
|
+
{{ modalText.close }}
|
|
40
|
+
</a-button>
|
|
41
|
+
</template>
|
|
42
|
+
</a-modal>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_PublicProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:modelValue": (value: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
7
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
8
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { handleElementPosition } from "#adata-ui/utils/getMaxZindex";
|
|
3
|
+
import { useI18n } from "#i18n";
|
|
4
|
+
import AModal from "#adata-ui/components/Modal.vue";
|
|
5
|
+
import AButton from "#adata-ui/components/button/Button.vue";
|
|
6
|
+
import AIllTurnOnTariff from "#adata-ui/illustrations/turn-on-tariff.vue";
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
tariff: { type: String, required: true, default: "" },
|
|
9
|
+
deleteFromDom: { type: Boolean, required: false, default: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["buyTariff"]);
|
|
12
|
+
const { t } = useI18n();
|
|
13
|
+
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
14
|
+
function confirm() {
|
|
15
|
+
emit("buyTariff", props.tariff);
|
|
16
|
+
}
|
|
17
|
+
function cancel() {
|
|
18
|
+
isOpen.value = false;
|
|
19
|
+
}
|
|
20
|
+
if (props.deleteFromDom) {
|
|
21
|
+
handleElementPosition("connecting-tariff");
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<a-modal
|
|
27
|
+
v-model="isOpen"
|
|
28
|
+
name="connecting-tariff"
|
|
29
|
+
>
|
|
30
|
+
<div class="flex flex-col gap-5">
|
|
31
|
+
<p class="heading-02 text-center">
|
|
32
|
+
{{ t("modals.connecting.title") }}
|
|
33
|
+
</p>
|
|
34
|
+
<a-ill-turn-on-tariff class="w-full" />
|
|
35
|
+
<p class="body-400 whitespace-pre-wrap text-center">
|
|
36
|
+
{{ t("modals.connecting.questions") }}
|
|
37
|
+
</p>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<template #footer>
|
|
41
|
+
<div class="flex gap-2 ">
|
|
42
|
+
<a-button
|
|
43
|
+
view="outline"
|
|
44
|
+
block
|
|
45
|
+
@click="cancel"
|
|
46
|
+
>
|
|
47
|
+
{{ t("modals.buttons.close") }}
|
|
48
|
+
</a-button>
|
|
49
|
+
<a-button
|
|
50
|
+
block
|
|
51
|
+
@click="confirm"
|
|
52
|
+
>
|
|
53
|
+
{{ t("reuse.yes") }}
|
|
54
|
+
</a-button>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</a-modal>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
tariff: string;
|
|
3
|
+
deleteFromDom?: boolean;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: boolean) => any;
|
|
10
|
+
} & {
|
|
11
|
+
buyTariff: (num: number) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
onBuyTariff?: ((num: number) => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
tariff: string;
|
|
17
|
+
deleteFromDom: boolean;
|
|
18
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { handleElementPosition } from "#adata-ui/utils/getMaxZindex";
|
|
3
|
+
import { useI18n } from "#i18n";
|
|
4
|
+
import { usePayment } from "#adata-ui/composables/usePayment";
|
|
5
|
+
import AModal from "#adata-ui/components/Modal.vue";
|
|
6
|
+
import AIllEmptyWallet from "#adata-ui/illustrations/empty-wallet.vue";
|
|
7
|
+
import AButton from "#adata-ui/components/button/Button.vue";
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
deleteFromDom: { type: Boolean, required: false, default: false }
|
|
10
|
+
});
|
|
11
|
+
const emit = defineEmits(["next"]);
|
|
12
|
+
const { t } = useI18n();
|
|
13
|
+
const { topUpSidePanel } = usePayment();
|
|
14
|
+
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
15
|
+
const userInfo = useState("user-info", () => ({}));
|
|
16
|
+
function confirm() {
|
|
17
|
+
isOpen.value = false;
|
|
18
|
+
topUpSidePanel.value = true;
|
|
19
|
+
}
|
|
20
|
+
function cancel() {
|
|
21
|
+
isOpen.value = false;
|
|
22
|
+
}
|
|
23
|
+
if (props.deleteFromDom) {
|
|
24
|
+
handleElementPosition("insufficient-funds");
|
|
25
|
+
}
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<a-modal
|
|
30
|
+
v-model="isOpen"
|
|
31
|
+
name="insufficient-funds"
|
|
32
|
+
>
|
|
33
|
+
<div class="flex flex-col gap-5">
|
|
34
|
+
<p class="heading-02 text-center">
|
|
35
|
+
{{ t("modals.low_balance.title") }}
|
|
36
|
+
</p>
|
|
37
|
+
<a-ill-empty-wallet class="self-center" />
|
|
38
|
+
<div class="m-[0_-32px] flex flex-col bg-green-500 py-1.5">
|
|
39
|
+
<p class="body-600 text-center text-white ">
|
|
40
|
+
{{ t("modals.low_balance.current_balance") }}
|
|
41
|
+
</p>
|
|
42
|
+
<p class="body-600 text-center text-xl text-white ">
|
|
43
|
+
{{ userInfo?.balance ? userInfo?.balance.toLocaleString("ru-RU") : 0 }}₸
|
|
44
|
+
</p>
|
|
45
|
+
</div>
|
|
46
|
+
<p class="text-center">
|
|
47
|
+
{{ t("modals.low_balance.questions") }}
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
<template #footer>
|
|
51
|
+
<div class="flex gap-2 ">
|
|
52
|
+
<a-button
|
|
53
|
+
view="outline"
|
|
54
|
+
block
|
|
55
|
+
@click="cancel"
|
|
56
|
+
>
|
|
57
|
+
{{ t("modals.buttons.close") }}
|
|
58
|
+
</a-button>
|
|
59
|
+
<a-button
|
|
60
|
+
block
|
|
61
|
+
@click="confirm"
|
|
62
|
+
>
|
|
63
|
+
{{ t("modals.buttons.topUp") }}
|
|
64
|
+
</a-button>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
</a-modal>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = Props;
|
|
2
|
+
interface Props {
|
|
3
|
+
deleteFromDom?: boolean;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: boolean) => any;
|
|
10
|
+
} & {
|
|
11
|
+
next: () => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
14
|
+
onNext?: (() => any) | undefined;
|
|
15
|
+
}>, {
|
|
16
|
+
deleteFromDom: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import * as z from "zod";
|
|
3
|
+
import useUIValidation from "#adata-ui/composables/useUIValidation";
|
|
4
|
+
import { useI18n } from "#i18n";
|
|
5
|
+
import AModal from "#adata-ui/components/Modal.vue";
|
|
6
|
+
import AIllMail from "#adata-ui/illustrations/mail.vue";
|
|
7
|
+
import AInputStandard from "#adata-ui/components/forms/input/standard/InputStandard.vue";
|
|
8
|
+
import ATextarea from "#adata-ui/components/forms/input/textarea/ATextarea.vue";
|
|
9
|
+
import AButton from "#adata-ui/components/button/Button.vue";
|
|
10
|
+
const emit = defineEmits(["send"]);
|
|
11
|
+
const { t } = useI18n();
|
|
12
|
+
const isOpen = defineModel({ type: Boolean, ...{ default: false } });
|
|
13
|
+
const form = reactive({
|
|
14
|
+
name: "",
|
|
15
|
+
email: "",
|
|
16
|
+
phone: "",
|
|
17
|
+
comment: ""
|
|
18
|
+
});
|
|
19
|
+
const scheme = z.object({
|
|
20
|
+
name: z.string().nonempty(t("modals.submit_application_modal.rules.required")),
|
|
21
|
+
email: z.string().nonempty(t("modals.submit_application_modal.rules.required")).email(t("modals.submit_application_modal.rules.email")),
|
|
22
|
+
phone: z.string().nonempty(t("modals.submit_application_modal.rules.required")).min(17, t("forms.feedback.phoneMinLength", { count: 10 })),
|
|
23
|
+
comment: z.string().nonempty(t("modals.submit_application_modal.rules.required"))
|
|
24
|
+
});
|
|
25
|
+
const submitted = ref(false);
|
|
26
|
+
const { validation, getError } = useUIValidation(
|
|
27
|
+
scheme,
|
|
28
|
+
() => form,
|
|
29
|
+
submitted
|
|
30
|
+
);
|
|
31
|
+
const send = () => {
|
|
32
|
+
submitted.value = true;
|
|
33
|
+
if (validation.value) return;
|
|
34
|
+
emit("send", form);
|
|
35
|
+
form.name = "";
|
|
36
|
+
form.email = "";
|
|
37
|
+
form.phone = "";
|
|
38
|
+
form.comment = "";
|
|
39
|
+
};
|
|
40
|
+
const cancel = () => {
|
|
41
|
+
isOpen.value = false;
|
|
42
|
+
};
|
|
43
|
+
defineExpose({
|
|
44
|
+
reset: () => submitted.value = false
|
|
45
|
+
});
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<a-modal
|
|
50
|
+
v-model="isOpen"
|
|
51
|
+
name="submit-application"
|
|
52
|
+
:prevent-close="true"
|
|
53
|
+
>
|
|
54
|
+
<div class="flex flex-col gap-5">
|
|
55
|
+
<p class="text-center heading-02">
|
|
56
|
+
{{ t("modals.submit_application_modal.title") }}
|
|
57
|
+
</p>
|
|
58
|
+
<a-ill-mail class="w-full" />
|
|
59
|
+
<div class="flex flex-col gap-2">
|
|
60
|
+
<a-input-standard
|
|
61
|
+
v-model="form.name"
|
|
62
|
+
:label="t('modals.submit_application_modal.labels.name')"
|
|
63
|
+
:error="getError('name')"
|
|
64
|
+
required
|
|
65
|
+
/>
|
|
66
|
+
<a-input-standard
|
|
67
|
+
v-model="form.email"
|
|
68
|
+
:label="t('modals.submit_application_modal.labels.email')"
|
|
69
|
+
:error="getError('email')"
|
|
70
|
+
required
|
|
71
|
+
/>
|
|
72
|
+
<a-input-standard
|
|
73
|
+
v-model="form.phone"
|
|
74
|
+
v-maska
|
|
75
|
+
:label="t('modals.submit_application_modal.labels.phone')"
|
|
76
|
+
data-maska="8 (###) ###-##-##"
|
|
77
|
+
:error="getError('phone')"
|
|
78
|
+
clearable
|
|
79
|
+
required
|
|
80
|
+
/>
|
|
81
|
+
<a-textarea
|
|
82
|
+
v-model="form.comment"
|
|
83
|
+
:label="t('modals.submit_application_modal.labels.comment')"
|
|
84
|
+
:error="getError('comment')"
|
|
85
|
+
resizeable="none"
|
|
86
|
+
required
|
|
87
|
+
/>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
<template #footer>
|
|
91
|
+
<div class="flex gap-2 ">
|
|
92
|
+
<a-button
|
|
93
|
+
view="outline"
|
|
94
|
+
block
|
|
95
|
+
@click="cancel"
|
|
96
|
+
>
|
|
97
|
+
{{ t("reuse.close") }}
|
|
98
|
+
</a-button>
|
|
99
|
+
<a-button
|
|
100
|
+
block
|
|
101
|
+
@click="send"
|
|
102
|
+
>
|
|
103
|
+
{{ t("reuse.send") }}
|
|
104
|
+
</a-button>
|
|
105
|
+
</div>
|
|
106
|
+
</template>
|
|
107
|
+
</a-modal>
|
|
108
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type __VLS_PublicProps = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
5
|
+
reset: () => boolean;
|
|
6
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: boolean) => any;
|
|
8
|
+
} & {
|
|
9
|
+
send: (num: number) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
12
|
+
onSend?: ((num: number) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useCurrentModule: () =>
|
|
2
|
-
export declare const useContacts: () =>
|
|
1
|
+
export declare const useCurrentModule: () => any;
|
|
2
|
+
export declare const useContacts: () => any;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function useBuyTariffs(): {
|
|
2
|
+
buyTariff: (tariffs: any) => Promise<void>;
|
|
3
|
+
viaKaspiBank: (tariffId: any, sum: any) => Promise<void>;
|
|
4
|
+
checkNumber: any;
|
|
5
|
+
leaveRequest: (name: any, email: any, phone: any, comment: any, rateCode?: any) => Promise<void>;
|
|
6
|
+
messageRate: any;
|
|
7
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { removeTrailingSlash } from "#adata-ui/utils/removeTrailingSlash";
|
|
2
|
+
import { useLocalePath, useI18n } from "#i18n";
|
|
3
|
+
export function useBuyTariffs() {
|
|
4
|
+
const { commonAuth } = useAppConfig();
|
|
5
|
+
const userApiURL = commonAuth.userApiURL;
|
|
6
|
+
const { locale } = useI18n();
|
|
7
|
+
const localePath = useLocalePath();
|
|
8
|
+
const checkNumber = ref(0);
|
|
9
|
+
const messageRate = ref(null);
|
|
10
|
+
const isAuthenticated = computed(() => {
|
|
11
|
+
const accessToken = useCookie("accessToken");
|
|
12
|
+
return accessToken.value;
|
|
13
|
+
});
|
|
14
|
+
async function buyTariff(tariffs) {
|
|
15
|
+
await $fetch(`${removeTrailingSlash(userApiURL)}/user/rate`, {
|
|
16
|
+
method: "PUT",
|
|
17
|
+
credentials: "include",
|
|
18
|
+
headers: {
|
|
19
|
+
lang: locale.value,
|
|
20
|
+
Authorization: `Bearer ${isAuthenticated.value}`
|
|
21
|
+
},
|
|
22
|
+
body: { rate_code: tariffs }
|
|
23
|
+
});
|
|
24
|
+
location.reload();
|
|
25
|
+
}
|
|
26
|
+
async function viaKaspiBank(tariffId, sum) {
|
|
27
|
+
try {
|
|
28
|
+
const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/user/kaspi-balance/request/`, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
credentials: "include",
|
|
31
|
+
headers: {
|
|
32
|
+
lang: locale.value,
|
|
33
|
+
Authorization: `Bearer ${isAuthenticated.value}`
|
|
34
|
+
},
|
|
35
|
+
body: { amount: sum, rate_id: tariffId }
|
|
36
|
+
});
|
|
37
|
+
checkNumber.value = data.request_id;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
} finally {
|
|
41
|
+
window.open(localePath(`https://kaspi.kz/pay/adata?service_id=5964&9507=${checkNumber.value}`), "_blank");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function leaveRequest(name, email, phone, comment, rateCode = "adata_pro") {
|
|
45
|
+
try {
|
|
46
|
+
const { data } = await $fetch(`${removeTrailingSlash(userApiURL)}/message/rate`, {
|
|
47
|
+
method: "POST",
|
|
48
|
+
credentials: "include",
|
|
49
|
+
headers: {
|
|
50
|
+
lang: locale.value,
|
|
51
|
+
Authorization: `Bearer ${isAuthenticated.value}`
|
|
52
|
+
},
|
|
53
|
+
body: {
|
|
54
|
+
sender_name: name,
|
|
55
|
+
email,
|
|
56
|
+
phone_number: phone,
|
|
57
|
+
message: comment,
|
|
58
|
+
rate_code: rateCode
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
messageRate.value = data;
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.error(error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
buyTariff,
|
|
68
|
+
viaKaspiBank,
|
|
69
|
+
checkNumber,
|
|
70
|
+
leaveRequest,
|
|
71
|
+
messageRate
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
export declare function useIdModals(): {
|
|
2
|
-
accessModal:
|
|
3
|
-
loginModal:
|
|
4
|
-
twoFactorModal:
|
|
5
|
-
registrationModal:
|
|
6
|
-
confirmAccountOtpModal:
|
|
7
|
-
recoveryModal:
|
|
8
|
-
resetPasswordOtpModal:
|
|
9
|
-
newPasswordModal:
|
|
10
|
-
passwordSuccessfulModal:
|
|
11
|
-
confirmSuccessfulModal:
|
|
12
|
-
intermediateState:
|
|
13
|
-
email: string;
|
|
14
|
-
password: string;
|
|
15
|
-
otp: string;
|
|
16
|
-
token: string;
|
|
17
|
-
}, {
|
|
18
|
-
email: string;
|
|
19
|
-
password: string;
|
|
20
|
-
otp: string;
|
|
21
|
-
token: string;
|
|
22
|
-
}>;
|
|
2
|
+
accessModal: any;
|
|
3
|
+
loginModal: any;
|
|
4
|
+
twoFactorModal: any;
|
|
5
|
+
registrationModal: any;
|
|
6
|
+
confirmAccountOtpModal: any;
|
|
7
|
+
recoveryModal: any;
|
|
8
|
+
resetPasswordOtpModal: any;
|
|
9
|
+
newPasswordModal: any;
|
|
10
|
+
passwordSuccessfulModal: any;
|
|
11
|
+
confirmSuccessfulModal: any;
|
|
12
|
+
intermediateState: any;
|
|
23
13
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare function usePayment(): {
|
|
2
|
-
rateId:
|
|
3
|
-
topUpSidePanel:
|
|
4
|
-
methodSidePanel:
|
|
5
|
-
kaspiQRSidePanel:
|
|
6
|
-
kaspiRedirectSidePanel:
|
|
2
|
+
rateId: any;
|
|
3
|
+
topUpSidePanel: any;
|
|
4
|
+
methodSidePanel: any;
|
|
5
|
+
kaspiQRSidePanel: any;
|
|
6
|
+
kaspiRedirectSidePanel: any;
|
|
7
7
|
payByCard: (sum: number, rate?: any) => Promise<void>;
|
|
8
8
|
};
|
|
@@ -25,6 +25,8 @@ declare const _default: {
|
|
|
25
25
|
date: string;
|
|
26
26
|
or: string;
|
|
27
27
|
successfully: string;
|
|
28
|
+
send: string;
|
|
29
|
+
close: string;
|
|
28
30
|
};
|
|
29
31
|
header: {
|
|
30
32
|
top: {
|
|
@@ -68,6 +70,7 @@ declare const _default: {
|
|
|
68
70
|
tariffs: string;
|
|
69
71
|
contacts: string;
|
|
70
72
|
api: string;
|
|
73
|
+
services: string;
|
|
71
74
|
};
|
|
72
75
|
products: {
|
|
73
76
|
counterparties: {
|
|
@@ -805,6 +808,8 @@ declare const _default: {
|
|
|
805
808
|
date: string;
|
|
806
809
|
or: string;
|
|
807
810
|
successfully: string;
|
|
811
|
+
send: string;
|
|
812
|
+
close: string;
|
|
808
813
|
};
|
|
809
814
|
header: {
|
|
810
815
|
top: {
|
|
@@ -848,6 +853,7 @@ declare const _default: {
|
|
|
848
853
|
tariffs: string;
|
|
849
854
|
contacts: string;
|
|
850
855
|
api: string;
|
|
856
|
+
services: string;
|
|
851
857
|
};
|
|
852
858
|
products: {
|
|
853
859
|
counterparties: {
|
|
@@ -1585,6 +1591,8 @@ declare const _default: {
|
|
|
1585
1591
|
date: string;
|
|
1586
1592
|
or: string;
|
|
1587
1593
|
successfully: string;
|
|
1594
|
+
send: string;
|
|
1595
|
+
close: string;
|
|
1588
1596
|
};
|
|
1589
1597
|
header: {
|
|
1590
1598
|
top: {
|
|
@@ -1628,6 +1636,7 @@ declare const _default: {
|
|
|
1628
1636
|
tariffs: string;
|
|
1629
1637
|
contacts: string;
|
|
1630
1638
|
api: string;
|
|
1639
|
+
services: string;
|
|
1631
1640
|
};
|
|
1632
1641
|
products: {
|
|
1633
1642
|
counterparties: {
|
package/dist/runtime/i18n.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|