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
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
7
  "failOnWarn": false,
8
- "version": "3.1.85",
8
+ "version": "3.1.86",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "1.0.1",
11
11
  "unbuild": "3.5.0"
@@ -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
- await payByCard(sum);
82
- pushReplenishmentEventToDataLayer();
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
- widget.pay(
30
- "charge",
31
- {
32
- publicId,
33
- description: t("payment.bank.description"),
34
- amount: Number.parseInt(amount),
35
- currency: "KZT",
36
- invoiceId: id.toString(),
37
- accountId: user_id.toString(),
38
- skin: "modern",
39
- data: {
40
- myProp: "myProp value",
41
- rate
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
- onFail() {
49
- $toast.error(t("payment.bank.payError"));
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);
@@ -261,7 +261,7 @@ const EnLocale = {
261
261
  st: ""
262
262
  },
263
263
  sb: {
264
- t: "Security Service check",
264
+ t: "Security check",
265
265
  st: ""
266
266
  }
267
267
  }
@@ -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: "\u0416\u0430\u0441\u0430\u043D\u0434\u044B \u0438\u043D\u0442\u0435\u043B\u043B\u0435\u043A\u0442 \u043A\u04E9\u043C\u0435\u043A\u0448\u0456\u0441\u0456",
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: "\u042B\u0441\u0442\u044B\u049B \u0436\u0435\u043B\u0456",
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: "\u049A\u04B1\u0436\u0430\u0442",
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adata-ui",
3
- "version": "3.1.85",
3
+ "version": "3.1.86",
4
4
  "description": "Adata UI",
5
5
  "repository": "your-org/my-module",
6
6
  "license": "MIT",