adata-ui 3.1.85 → 3.1.86
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
CHANGED
|
@@ -46,6 +46,7 @@ function onBack(type) {
|
|
|
46
46
|
}
|
|
47
47
|
const userInfo = useState("user-info", () => ({}));
|
|
48
48
|
function pushReplenishmentEventToDataLayer() {
|
|
49
|
+
window.dataLayer = window.dataLayer || [];
|
|
49
50
|
window.dataLayer?.push({
|
|
50
51
|
event: "replenishment",
|
|
51
52
|
user_id: `${userInfo.value.id}`,
|
|
@@ -78,8 +79,12 @@ async function directionsBanks(bank, sum) {
|
|
|
78
79
|
$toast.error(error.data.message);
|
|
79
80
|
}
|
|
80
81
|
} else if (bank === "other") {
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
try {
|
|
83
|
+
await payByCard(sum);
|
|
84
|
+
pushReplenishmentEventToDataLayer();
|
|
85
|
+
} catch (error) {
|
|
86
|
+
console.error(error);
|
|
87
|
+
}
|
|
83
88
|
}
|
|
84
89
|
}
|
|
85
90
|
async function updateUserRate() {
|
|
@@ -26,30 +26,34 @@ export function usePayment() {
|
|
|
26
26
|
if (data) {
|
|
27
27
|
const { amount, id, user_id } = data;
|
|
28
28
|
const widget = new tiptop.Widget();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
onSuccess() {
|
|
46
|
-
$toast.success(t("payment.bank.paySuccess"));
|
|
29
|
+
await new Promise((resolve, reject) => {
|
|
30
|
+
widget.pay(
|
|
31
|
+
"charge",
|
|
32
|
+
{
|
|
33
|
+
publicId,
|
|
34
|
+
description: t("payment.bank.description"),
|
|
35
|
+
amount: Number.parseInt(amount),
|
|
36
|
+
currency: "KZT",
|
|
37
|
+
invoiceId: id.toString(),
|
|
38
|
+
accountId: user_id.toString(),
|
|
39
|
+
skin: "modern",
|
|
40
|
+
data: {
|
|
41
|
+
myProp: "myProp value",
|
|
42
|
+
rate
|
|
43
|
+
}
|
|
47
44
|
},
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
{
|
|
46
|
+
onSuccess() {
|
|
47
|
+
$toast.success(t("payment.bank.paySuccess"));
|
|
48
|
+
resolve();
|
|
49
|
+
},
|
|
50
|
+
onFail() {
|
|
51
|
+
$toast.error(t("payment.bank.payError"));
|
|
52
|
+
reject(new Error(t("payment.bank.payError")));
|
|
53
|
+
}
|
|
50
54
|
}
|
|
51
|
-
|
|
52
|
-
);
|
|
55
|
+
);
|
|
56
|
+
});
|
|
53
57
|
}
|
|
54
58
|
} catch (error) {
|
|
55
59
|
throw new Error(error.data.message);
|
package/dist/runtime/lang/en.js
CHANGED
package/dist/runtime/lang/kk.js
CHANGED
|
@@ -241,7 +241,7 @@ const KkLocale = {
|
|
|
241
241
|
st: "\u041A\u043E\u043C\u043F\u043B\u0430\u0435\u043D\u0441 \u0442\u04D9\u0443\u0435\u043A\u0435\u043B\u0434\u0435\u0440\u0456\u043D \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0442\u044B \u0442\u0435\u043A\u0441\u0435\u0440\u0443: \u0431\u0438\u0437\u043D\u0435\u0441\u0456\u04A3\u0456\u0437\u0434\u0456 \u043D\u0430\u049B\u0442\u044B \u0443\u0430\u049B\u044B\u0442 \u0440\u0435\u0436\u0438\u043C\u0456\u043D\u0434\u0435 \u049B\u043E\u0440\u0493\u0430\u0443."
|
|
242
242
|
},
|
|
243
243
|
assistant: {
|
|
244
|
-
t: "\
|
|
244
|
+
t: "AI \u0430\u0441\u0441\u0438\u0441\u0442\u0435\u043D\u0442",
|
|
245
245
|
st: ""
|
|
246
246
|
},
|
|
247
247
|
assignments: {
|
|
@@ -249,7 +249,7 @@ const KkLocale = {
|
|
|
249
249
|
st: ""
|
|
250
250
|
},
|
|
251
251
|
hotline: {
|
|
252
|
-
t: "\
|
|
252
|
+
t: "\u0416\u0435\u0434\u0435\u043B \u0436\u0435\u043B\u0456",
|
|
253
253
|
st: ""
|
|
254
254
|
},
|
|
255
255
|
sanctions: {
|
|
@@ -257,11 +257,11 @@ const KkLocale = {
|
|
|
257
257
|
st: ""
|
|
258
258
|
},
|
|
259
259
|
suppliers: {
|
|
260
|
-
t: "\
|
|
260
|
+
t: "\u0414\u043E\u0441\u044C\u0435",
|
|
261
261
|
st: ""
|
|
262
262
|
},
|
|
263
263
|
sb: {
|
|
264
|
-
t: "\u049A\u0430\u0443\u0456\u043F\u0441\u0456\u0437\u0434\u0456\u043A \u049B\u044B\u0437\u043C\u0435\u0442\u0456\u043D \u0442\u0435\u043A\u0441\u0435\u0440\u0443",
|
|
264
|
+
t: "\u049A\u0430\u0443\u0456\u043F\u0441\u0456\u0437\u0434\u0456\u043A \u049B\u044B\u0437\u043C\u0435\u0442\u0456\u043D\u0456\u04A3 \u0442\u0435\u043A\u0441\u0435\u0440\u0443\u0456",
|
|
265
265
|
st: ""
|
|
266
266
|
}
|
|
267
267
|
}
|