@feedmepos/mf-connect 0.1.98-beta.82 → 0.1.98-beta.84
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/{App-DIWPN6WH.js → App-2gK-7sDH.js} +9 -9
- package/dist/{AuditLogs-BTZKJs5f.js → AuditLogs-DsvvAt8f.js} +12 -12
- package/dist/{Bin-DJXuzg5t.js → Bin-f4C6ymIq.js} +8 -8
- package/dist/{Broadcast-DtG0edQa.js → Broadcast-tdqUBB_9.js} +12 -12
- package/dist/{CampaignAnalytic-DbLBzibb.js → CampaignAnalytic-BI7qfGV2.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C1yg2-DE.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CGAIYHt6.js} +7 -7
- package/dist/{Card-bcNLznin.js → Card-CBU8ZOFT.js} +22 -22
- package/dist/{Collections-DCq-oxmB.js → Collections-DWPcYM4M.js} +8 -8
- package/dist/{Credit-EwMv7P6u.js → Credit-Cq12WUk_.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-EhwxqiPf.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BwpYtfRw.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DkkO_gn1.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7b6aFq3.js} +34 -34
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BirRksYU.js → EffectSheet.vue_vue_type_style_index_0_lang-KkAGKKsV.js} +6 -6
- package/dist/{Experience-QuulWZ2l.js → Experience-BuIgMiB3.js} +13 -13
- package/dist/{FileSaver.min-RTo5UlWI.js → FileSaver.min-DS15uUce.js} +1 -1
- package/dist/{Game-BGGe7pFk.js → Game-_NIMd0cY.js} +13 -13
- package/dist/{GiftCardSetup-CNPP7HtQ.js → GiftCardSetup-Bw_8x29B.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-yBUVNHEP.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B1sHLgFd.js} +7 -7
- package/dist/{Goals-D-Q-ht66.js → Goals-BE_FaHh-.js} +4 -4
- package/dist/{Grab-D2jS-RCL.js → Grab-CIIr5EZR.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-Byemh4AD.js → ImageInput.vue_vue_type_script_setup_true_lang-fg6xOcnj.js} +1 -1
- package/dist/{Index-QP8P79Tu.js → Index-BiShzj-5.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CrYa6Vek.js → LocationPicker.vue_vue_type_script_setup_true_lang-DQXs_qw9.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BGxbglj5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B6NRhdWR.js} +1 -1
- package/dist/{LoyaltyDashboard-Bkquum-3.js → LoyaltyDashboard-B5AG4nLL.js} +15 -15
- package/dist/{MainLayout-BQ_PiBqS.js → MainLayout-DxqoiKXJ.js} +3 -3
- package/dist/{Marketing-CHTPSOIj.js → Marketing-rtJPqmHZ.js} +4 -4
- package/dist/{MarketingMaterialEdit-BAYHnYKe.js → MarketingMaterialEdit-DZbsKiMW.js} +6 -6
- package/dist/{Member-D7xDe5Rt.js → Member-B_4IU8GD.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-B3074-er.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CtQiWe15.js} +23 -23
- package/dist/{MemberImportHistory-BndvQb_w.js → MemberImportHistory-DepqkpDF.js} +7 -7
- package/dist/{MemberList-Ctxdpre8.js → MemberList-RbR2vpfv.js} +14 -14
- package/dist/{MemberTransactions-qQXjqnUy.js → MemberTransactions-BXJy6Ism.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bzc0IePL.js → MessageInput.vue_vue_type_script_setup_true_lang-0OCCIP0v.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-1fr2pugZ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DnECpLmj.js} +1 -1
- package/dist/{Mission-B4wOanDj.js → Mission-CMNVAn_S.js} +14 -14
- package/dist/{Overview-Dg8Uoyo3.js → Overview-C-QEY2MS.js} +4 -4
- package/dist/{Overview-D8-Xzdh4.js → Overview-C05OOSXQ.js} +20 -20
- package/dist/{Point-CS4mzCm5.js → Point-XEJSumy7.js} +14 -14
- package/dist/{Promotion-Ccuo6zoT.js → Promotion-DfzE_BnO.js} +14 -14
- package/dist/{Queue-ChNawIta.js → Queue-D4Td8Bgv.js} +12 -12
- package/dist/{Record-DmH2pbgo.js → Record-DgkTuKc4.js} +9 -9
- package/dist/{Review-vhLtZ7y7.js → Review-8ZMji0fb.js} +2 -2
- package/dist/{ReviewFacebookCallback-TgdFbPrW.js → ReviewFacebookCallback-Ve87-GyX.js} +5 -5
- package/dist/{ReviewGoogleCallback-CpK6sWqa.js → ReviewGoogleCallback-DRpVe1uq.js} +5 -5
- package/dist/{Reward-645jqAha.js → Reward-CEhr7Ns0.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-G_iME05g.js → RewardGroup.vue_vue_type_script_setup_true_lang-w3QixigS.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-e3CagrVZ.js → RuleGroup.vue_vue_type_script_setup_true_lang-CnTY1iff.js} +14 -14
- package/dist/{Segment-fj3Nqtpv.js → Segment-CeMerVn4.js} +25 -25
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D_yFLAc4.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CQ038K1l.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D3JDTWXp.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cq5ywNFY.js} +4 -4
- package/dist/{Setting-CBVP-Mpb.js → Setting-Rge2DsP0.js} +14 -14
- package/dist/{SettingAdvertisements-BdPPUvDC.js → SettingAdvertisements-YXLfS10e.js} +12 -12
- package/dist/{Settings-BT6OdqEM.js → Settings-Cnp1yLCt.js} +5 -5
- package/dist/{Store-nlIBDj84.js → Store-BqNd-YZA.js} +26 -26
- package/dist/{StoreRewards-DaMOOzw0.js → StoreRewards-CtFg932k.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-UyV-RU5E.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DSLRZ4_T.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Dnr-6tzT.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-ViE-riFl.js} +2 -2
- package/dist/{Tier-DUvEF-Ns.js → Tier-77bfKMw8.js} +26 -26
- package/dist/{Title-C3FZriO7.js → Title-ExsDsweT.js} +22 -22
- package/dist/{Transaction-Ctd7qzJI.js → Transaction-rtSeIIw0.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CI8jF-Vn.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CRBQ9Fda.js} +6 -6
- package/dist/{Voucher-IoMmmYh2.js → Voucher-BkZtSGlP.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CdBrD2bP.js → VoucherEditor.vue_vue_type_script_setup_true_lang-4PYSnlPB.js} +12 -12
- package/dist/{WhatsappAccount-D1a0ABEK.js → WhatsappAccount-BHhjnuXB.js} +5 -5
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DUdFMygT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js} +1 -1
- package/dist/{WhatsappBot-CVirkYvU.js → WhatsappBot-DDDfDb-u.js} +180 -175
- package/dist/{WhatsappBotSettings-BV_HgL-p.js → WhatsappBotSettings-BuKmIjV8.js} +3 -3
- package/dist/{WhatsappBotTickets-Ca_c5_B2.js → WhatsappBotTickets-D1fGYaRQ.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Z4TFGdcH.js → ZodTextField.vue_vue_type_script_setup_true_lang-CZfhn5Jq.js} +2 -2
- package/dist/{app-Cj6OWO36.js → app-Bc6LqwtE.js} +222 -217
- package/dist/app.js +1 -1
- package/dist/{base.export-7wLpz1Vu.js → base.export-Btj8Rg8X.js} +2 -2
- package/dist/{business-COKUtA0N.js → business-D764zw_0.js} +1 -1
- package/dist/{campaign-B2HD3DRn.js → campaign-BQup_7UA.js} +8 -8
- package/dist/{campaign-CIyWTu9f.js → campaign-z0b9Kjkw.js} +2 -2
- package/dist/{campaign.fn-DJzUFP-T.js → campaign.fn-CFw7_K_I.js} +103 -103
- package/dist/{collection.fn-LB9uKdHM.js → collection.fn-C4U4ilHh.js} +2 -2
- package/dist/{currency-B3pBZiCD.js → currency-ByFTp6eT.js} +1 -1
- package/dist/{duplicateCampaign-CiIDQH1W.js → duplicateCampaign-CbmUt1Lo.js} +2 -2
- package/dist/{effect-Bp0w1Vly.js → effect-DsO-mw9A.js} +1 -1
- package/dist/{email-addresses-qxmP-ghm.js → email-addresses-CL-EMr73.js} +2 -2
- package/dist/{helper-PRIAnsXY.js → helper-Avy2CxJa.js} +1 -1
- package/dist/{index-fjrIMEy7.js → index-0iobnNos.js} +1 -1
- package/dist/{index-BLH6nPs9.js → index-4Gb9FUwx.js} +3 -3
- package/dist/{index-nyzNkE9r.js → index-6kHtFMu_.js} +1 -1
- package/dist/{index-DgR5Yphl.js → index-BGYPv4nh.js} +1 -1
- package/dist/{index-aTCNe4X_.js → index-BOX-kv2H.js} +1 -1
- package/dist/{index-B_fZHfs-.js → index-BYJfzCGF.js} +2 -2
- package/dist/{index-DS__Cknq.js → index-BaRq5efe.js} +1 -1
- package/dist/{index-DiuFB2hK.js → index-BqBHO03o.js} +2 -2
- package/dist/{index-DMRdy2Kz.js → index-BtlTdbMh.js} +2 -2
- package/dist/{index-BId5mHYh.js → index-BwbjP4YO.js} +3 -3
- package/dist/{index-F3o5W57q.js → index-C_ZRQxuy.js} +8 -8
- package/dist/{index-CA5-wXVF.js → index-CqHP5Wpq.js} +1 -1
- package/dist/{index-DbdZvsUQ.js → index-DIEsCZpR.js} +2 -2
- package/dist/{index-TRXyLWUu.js → index-DJBDlwI0.js} +2 -2
- package/dist/{index-DPF_QE13.js → index-DKVgQIxK.js} +2 -2
- package/dist/{index-C6jzfbh8.js → index-DLWc6jN6.js} +7 -7
- package/dist/{index-BV4bWZM1.js → index-DUiP6eMM.js} +4 -4
- package/dist/{index-XzWyheJy.js → index-DV97WJgE.js} +1 -1
- package/dist/{index-BZ42-wj6.js → index-Dw1JLMxf.js} +4 -4
- package/dist/{index-DA-OPM4v.js → index-QesgyoGt.js} +2 -2
- package/dist/{index.esm2017-DZIDjb2C.js → index.esm2017-6fTAB2zC.js} +1 -1
- package/dist/{loading-CSdKEjY5.js → loading-Ctv0pifD.js} +1 -1
- package/dist/{lodash-BIB2o8LD.js → lodash-voP8B3y-.js} +1 -1
- package/dist/{member-import-PcGNpuqH.js → member-import-Cnclh9kc.js} +1 -1
- package/dist/{membership-ivTpKFxy.js → membership-BFw22ljB.js} +2 -2
- package/dist/{money-BSDhQ-zg.js → money-UKkYKlYB.js} +1 -1
- package/dist/{number-ByYnVDwR.js → number-C3ZVrlnG.js} +1 -1
- package/dist/{objectid-BJu8QMfW.js → objectid-cm0MpmhJ.js} +12 -12
- package/dist/{onboarding-Cr2iuJY2.js → onboarding-DPlyVNxC.js} +3 -3
- package/dist/{onboardingSetup-D6I4p209.js → onboardingSetup-DNxWR49X.js} +2 -2
- package/dist/{plugins-D3BYIk9P.js → plugins-CmODURCb.js} +3 -3
- package/dist/{reward-UplovmpX.js → reward-PFP-zWBV.js} +1 -1
- package/dist/{rule-CI8Gfa0f.js → rule-O6gC43w9.js} +9 -9
- package/dist/style.css +1 -1
- package/dist/{template-Bepdb4Vy.js → template-C3wE6QI8.js} +6 -6
- package/dist/{timezone-CdDDjOpp.js → timezone-h8QjEIVE.js} +1 -1
- package/dist/{transaction.fn-DiRDf20s.js → transaction.fn-CMLlNsBi.js} +2 -2
- package/dist/{trigger-B9BqJ3WQ.js → trigger-rwKj95on.js} +5 -5
- package/dist/{useMarketingMaterialActions-Do9xLe-A.js → useMarketingMaterialActions-DFhA_QMl.js} +3 -3
- package/dist/{usePagination-CuHuUThw.js → usePagination-DG6Ztr9a.js} +1 -1
- package/dist/{user-CX4hU-xf.js → user-B8GnAjaS.js} +1 -1
- package/dist/{vue-i18n-DOpMPUHr.js → vue-i18n-Bc5Ls0lk.js} +314 -314
- package/dist/{xlsx-BQVBwvzT.js → xlsx-CKvgpuVs.js} +1 -1
- package/dist/{zod-Jw_6SDXB.js → zod-Bt021IY2.js} +1 -1
- package/package.json +1 -1
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { u as G } from "./vue-i18n-
|
|
1
|
+
import { defineComponent as M, ref as w, computed as H, watch as R, onBeforeUnmount as K, resolveComponent as y, openBlock as n, createElementBlock as h, createElementVNode as t, normalizeClass as U, unref as e, toDisplayString as r, createBlock as C, withCtx as I, createTextVNode as z, createVNode as A, createCommentVNode as O, withModifiers as ae, Fragment as Q, renderList as Y, useModel as se, mergeProps as le, createSlots as re } from "vue";
|
|
2
|
+
import { u as G } from "./vue-i18n-Bc5Ls0lk.js";
|
|
3
3
|
import { useRouter as ce } from "vue-router";
|
|
4
|
-
import { S as j } from "./index-
|
|
5
|
-
import { w as
|
|
6
|
-
import { u as
|
|
7
|
-
import { R as k } from "./app-
|
|
8
|
-
import { b as
|
|
9
|
-
const
|
|
4
|
+
import { S as j, a as ie } from "./index-BqBHO03o.js";
|
|
5
|
+
import { w as L } from "./index-BaRq5efe.js";
|
|
6
|
+
import { u as ue, _ as pe, w as de } from "./WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DKFevg6y.js";
|
|
7
|
+
import { R as k } from "./app-Bc6LqwtE.js";
|
|
8
|
+
import { b as me } from "./browser-BSAOEeIM.js";
|
|
9
|
+
const fe = { class: "flex items-center gap-[12px]" }, xe = { class: "min-w-0 flex-1" }, ve = ["title"], he = { key: 1 }, _e = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary break-all" }, ge = { class: "relative z-10 flex shrink-0 items-center gap-[12px]" }, be = ["aria-label", "title", "disabled", "aria-busy"], ye = { class: "flex items-center justify-between flex-wrap gap-[8px] border-t border-fm-color-neutral-gray-100 pt-[12px]" }, we = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "text-[12px] text-fm-color-typo-secondary"
|
|
12
|
-
},
|
|
12
|
+
}, Be = {
|
|
13
13
|
key: 0,
|
|
14
14
|
role: "alert",
|
|
15
15
|
class: "text-[14px] text-fm-color-typo-error"
|
|
16
|
-
},
|
|
16
|
+
}, Te = /* @__PURE__ */ M({
|
|
17
17
|
__name: "WhatsappAccountCard",
|
|
18
18
|
props: {
|
|
19
19
|
account: {}
|
|
20
20
|
},
|
|
21
21
|
emits: ["removed"],
|
|
22
22
|
setup(F, { emit: i }) {
|
|
23
|
-
const a = F,
|
|
24
|
-
let
|
|
25
|
-
const { name: $, phoneNumber: P, initials: g, state: E, avatarColor: W } =
|
|
23
|
+
const a = F, d = i, { t: m, locale: u } = G(), l = w(!1), _ = w("");
|
|
24
|
+
let f;
|
|
25
|
+
const { name: $, phoneNumber: P, initials: g, state: E, avatarColor: W } = ue(
|
|
26
26
|
() => a.account
|
|
27
|
-
),
|
|
27
|
+
), x = H(() => E.value === "connected"), c = H(() => ({
|
|
28
28
|
name: k["$connect-WHATSAPP_ACCOUNT"],
|
|
29
29
|
params: { clientId: a.account.clientId }
|
|
30
30
|
}));
|
|
31
|
-
function
|
|
32
|
-
return new Intl.DateTimeFormat(
|
|
31
|
+
function v(V) {
|
|
32
|
+
return new Intl.DateTimeFormat(u.value, {
|
|
33
33
|
year: "numeric",
|
|
34
34
|
month: "short",
|
|
35
35
|
day: "numeric"
|
|
36
36
|
}).format(new Date(V));
|
|
37
37
|
}
|
|
38
|
-
async function
|
|
39
|
-
if (
|
|
38
|
+
async function p() {
|
|
39
|
+
if (l.value) return;
|
|
40
40
|
const V = j.getBusinessId();
|
|
41
41
|
if (!V) {
|
|
42
|
-
|
|
42
|
+
_.value = m("connect.whatsappBot.errors.selectBusiness");
|
|
43
43
|
return;
|
|
44
44
|
}
|
|
45
45
|
const b = a.account.clientId, B = new AbortController();
|
|
46
|
-
|
|
46
|
+
f = B, l.value = !0, _.value = "";
|
|
47
47
|
try {
|
|
48
|
-
await
|
|
48
|
+
await L.deleteClient(V, b, B.signal), B.signal.aborted || d("removed", b);
|
|
49
49
|
} catch {
|
|
50
|
-
B.signal.aborted || (
|
|
50
|
+
B.signal.aborted || (_.value = m("connect.whatsappBot.errors.removeAccount"));
|
|
51
51
|
} finally {
|
|
52
|
-
|
|
52
|
+
f === B && (f = void 0, l.value = !1);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
function S() {
|
|
56
|
-
|
|
56
|
+
f == null || f.abort(), f = void 0, l.value = !1, _.value = "";
|
|
57
57
|
}
|
|
58
|
-
return
|
|
58
|
+
return R(() => j.getBusinessId(), S), K(S), (V, b) => {
|
|
59
59
|
const B = y("RouterLink"), s = y("FmIcon"), o = y("FmCircularProgress");
|
|
60
|
-
return n(),
|
|
60
|
+
return n(), h("li", null, [
|
|
61
61
|
t("div", {
|
|
62
62
|
class: U(["relative h-full border border-fm-color-neutral-gray-100 rounded-[16px] p-[20px] flex flex-col gap-[16px] bg-fm-color-neutral-white text-fm-color-typo-primary", {
|
|
63
|
-
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100":
|
|
63
|
+
"cursor-pointer transition-shadow hover:border-fm-color-neutral-gray-200 hover:fm-shadow-light-100": x.value
|
|
64
64
|
}])
|
|
65
65
|
}, [
|
|
66
|
-
t("div",
|
|
66
|
+
t("div", fe, [
|
|
67
67
|
t("div", {
|
|
68
68
|
"aria-hidden": "true",
|
|
69
69
|
class: U(["w-[48px] h-[48px] rounded-full shrink-0 flex items-center justify-center text-[16px] font-semibold text-fm-color-typo-white", e(W)])
|
|
70
|
-
},
|
|
71
|
-
t("div",
|
|
70
|
+
}, r(e(g)), 3),
|
|
71
|
+
t("div", xe, [
|
|
72
72
|
t("h2", {
|
|
73
73
|
class: "text-[16px] leading-[24px] font-semibold truncate",
|
|
74
74
|
title: e($)
|
|
75
75
|
}, [
|
|
76
|
-
|
|
76
|
+
x.value ? (n(), C(B, {
|
|
77
77
|
key: 0,
|
|
78
78
|
to: c.value,
|
|
79
79
|
class: "text-inherit no-underline after:absolute after:inset-0 after:rounded-[16px] focus-visible:outline-none focus-visible:after:ring-[2px] focus-visible:after:ring-fm-color-primary focus-visible:after:ring-offset-[2px]"
|
|
80
80
|
}, {
|
|
81
81
|
default: I(() => [
|
|
82
|
-
z(
|
|
82
|
+
z(r(e($)), 1)
|
|
83
83
|
]),
|
|
84
84
|
_: 1
|
|
85
|
-
}, 8, ["to"])) : (n(),
|
|
86
|
-
], 8,
|
|
87
|
-
t("p",
|
|
85
|
+
}, 8, ["to"])) : (n(), h("span", he, r(e($)), 1))
|
|
86
|
+
], 8, ve),
|
|
87
|
+
t("p", _e, r(e(P)), 1)
|
|
88
88
|
]),
|
|
89
|
-
t("div",
|
|
90
|
-
|
|
89
|
+
t("div", ge, [
|
|
90
|
+
x.value ? (n(), C(B, {
|
|
91
91
|
key: 0,
|
|
92
92
|
to: c.value,
|
|
93
|
-
"aria-label": e(
|
|
94
|
-
title: e(
|
|
93
|
+
"aria-label": e(m)("connect.common.edit"),
|
|
94
|
+
title: e(m)("connect.common.edit"),
|
|
95
95
|
class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary no-underline transition-colors hover:bg-fm-color-neutral-gray-100 hover:text-fm-color-typo-primary focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary"
|
|
96
96
|
}, {
|
|
97
97
|
default: I(() => [
|
|
@@ -106,14 +106,14 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
106
106
|
}, 8, ["to", "aria-label", "title"])) : O("", !0),
|
|
107
107
|
t("button", {
|
|
108
108
|
type: "button",
|
|
109
|
-
"aria-label": e(
|
|
110
|
-
title: e(
|
|
111
|
-
disabled:
|
|
112
|
-
"aria-busy":
|
|
109
|
+
"aria-label": e(m)("connect.common.remove"),
|
|
110
|
+
title: e(m)("connect.common.remove"),
|
|
111
|
+
disabled: l.value,
|
|
112
|
+
"aria-busy": l.value,
|
|
113
113
|
class: "w-[32px] h-[32px] flex items-center justify-center rounded-[8px] text-fm-color-typo-tertiary transition-colors hover:bg-fm-color-system-error-100 hover:text-fm-color-typo-error focus-visible:outline-none focus-visible:ring-[2px] focus-visible:ring-fm-color-primary disabled:cursor-wait disabled:opacity-50",
|
|
114
|
-
onClick: ae(
|
|
114
|
+
onClick: ae(p, ["stop"])
|
|
115
115
|
}, [
|
|
116
|
-
|
|
116
|
+
l.value ? (n(), C(o, {
|
|
117
117
|
key: 0,
|
|
118
118
|
size: "md",
|
|
119
119
|
"aria-hidden": "true"
|
|
@@ -124,21 +124,21 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
124
124
|
outline: "",
|
|
125
125
|
"aria-hidden": "true"
|
|
126
126
|
}))
|
|
127
|
-
], 8,
|
|
127
|
+
], 8, be)
|
|
128
128
|
])
|
|
129
129
|
]),
|
|
130
|
-
t("div",
|
|
130
|
+
t("div", ye, [
|
|
131
131
|
A(pe, { state: e(E) }, null, 8, ["state"]),
|
|
132
|
-
|
|
133
|
-
date:
|
|
132
|
+
x.value && F.account.connectedAt ? (n(), h("span", we, r(e(m)("connect.whatsappBot.connectedSince", {
|
|
133
|
+
date: v(F.account.connectedAt)
|
|
134
134
|
})), 1)) : O("", !0)
|
|
135
135
|
]),
|
|
136
|
-
|
|
136
|
+
_.value ? (n(), h("p", Be, r(_.value), 1)) : O("", !0)
|
|
137
137
|
], 2)
|
|
138
138
|
]);
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
|
-
}),
|
|
141
|
+
}), ke = { class: "mt-[24px] grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] xs:grid-cols-1 gap-[16px]" }, Ae = /* @__PURE__ */ M({
|
|
142
142
|
__name: "WhatsappAccountList",
|
|
143
143
|
props: {
|
|
144
144
|
accounts: {}
|
|
@@ -146,37 +146,37 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
146
146
|
emits: ["removed"],
|
|
147
147
|
setup(F, { emit: i }) {
|
|
148
148
|
const a = i;
|
|
149
|
-
return (
|
|
150
|
-
(n(!0),
|
|
151
|
-
key:
|
|
152
|
-
account:
|
|
153
|
-
onRemoved:
|
|
149
|
+
return (d, m) => (n(), h("ul", ke, [
|
|
150
|
+
(n(!0), h(Q, null, Y(F.accounts, (u) => (n(), C(Te, {
|
|
151
|
+
key: u.clientId,
|
|
152
|
+
account: u,
|
|
153
|
+
onRemoved: m[0] || (m[0] = (l) => a("removed", l))
|
|
154
154
|
}, null, 8, ["account"]))), 128))
|
|
155
155
|
]));
|
|
156
156
|
}
|
|
157
|
-
}),
|
|
157
|
+
}), Ce = { class: "text-[18px] font-semibold" }, $e = {
|
|
158
158
|
key: 0,
|
|
159
159
|
role: "status",
|
|
160
160
|
class: "flex flex-col items-center text-center gap-[8px] px-[8px] py-[40px]"
|
|
161
|
-
},
|
|
161
|
+
}, Pe = { class: "text-[18px] font-semibold" }, Se = { class: "text-[14px] text-fm-color-typo-secondary break-all" }, Ie = {
|
|
162
162
|
key: 1,
|
|
163
163
|
class: "grid grid-cols-[minmax(0,1fr)_232px] xs:grid-cols-1 gap-[32px] p-[8px] xs:p-[0px]"
|
|
164
|
-
},
|
|
164
|
+
}, Fe = { class: "flex flex-col gap-[20px] text-[14px] leading-[20px]" }, Ee = { class: "text-fm-color-typo-secondary" }, We = { class: "flex flex-col gap-[14px]" }, Ve = { class: "w-[22px] h-[22px] shrink-0 rounded-full bg-fm-color-neutral-gray-100 flex items-center justify-center text-[12px] font-semibold" }, De = { key: 0 }, Ne = { class: "font-semibold" }, Oe = { class: "font-semibold" }, je = { class: "font-semibold" }, He = { class: "font-semibold" }, Le = { key: 3 }, Me = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Re = { class: "relative w-[232px] h-[232px] xs:justify-self-center border border-fm-color-neutral-gray-100 rounded-xl flex items-center justify-center overflow-hidden" }, Ue = {
|
|
165
165
|
key: 0,
|
|
166
166
|
role: "status",
|
|
167
167
|
class: "flex flex-col items-center gap-[12px] text-[13px]"
|
|
168
|
-
},
|
|
168
|
+
}, ze = {
|
|
169
169
|
key: 1,
|
|
170
170
|
class: "flex flex-col items-center text-center gap-[12px] p-[12px]"
|
|
171
|
-
},
|
|
171
|
+
}, Ge = {
|
|
172
172
|
role: "alert",
|
|
173
173
|
class: "text-[14px] text-fm-color-typo-error"
|
|
174
|
-
},
|
|
174
|
+
}, Ke = ["src", "alt"], Qe = {
|
|
175
175
|
key: 3,
|
|
176
176
|
role: "status",
|
|
177
177
|
"aria-live": "polite",
|
|
178
178
|
class: "absolute inset-0 bg-fm-color-neutral-white/90 flex flex-col items-center justify-center gap-[10px] text-[13px] font-medium"
|
|
179
|
-
},
|
|
179
|
+
}, Ze = /* @__PURE__ */ M({
|
|
180
180
|
__name: "WhatsappConnectDialog",
|
|
181
181
|
props: {
|
|
182
182
|
modelValue: { type: Boolean, required: !0 },
|
|
@@ -184,64 +184,69 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
184
184
|
},
|
|
185
185
|
emits: ["update:modelValue"],
|
|
186
186
|
setup(F) {
|
|
187
|
-
const i = se(F, "modelValue"), { t: a } = G(),
|
|
188
|
-
let
|
|
187
|
+
const i = se(F, "modelValue"), { t: a } = G(), d = w(""), m = w(!1), u = w(""), l = w(!1), _ = w();
|
|
188
|
+
let f, $, P;
|
|
189
189
|
function g() {
|
|
190
|
-
|
|
190
|
+
f == null || f.abort(), clearTimeout($), $ = void 0, clearTimeout(P), P = void 0;
|
|
191
191
|
}
|
|
192
|
-
async function E(
|
|
193
|
-
if (!
|
|
192
|
+
async function E(x, c, v) {
|
|
193
|
+
if (!v.aborted) {
|
|
194
194
|
try {
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
if (
|
|
198
|
-
g(),
|
|
195
|
+
const p = await L.getClient(x, c, v);
|
|
196
|
+
if (v.aborted) return;
|
|
197
|
+
if (l.value = p.status === "connected" || p.status === "connecting" && p.connectedAt !== null, p.status === "connected" && p.connectedAt !== null && p.profileStatus === "ready") {
|
|
198
|
+
g(), l.value = !1, _.value = p, P = setTimeout(() => {
|
|
199
199
|
i.value = !1;
|
|
200
200
|
}, 1800);
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
if (
|
|
204
|
-
g(),
|
|
203
|
+
if (p.status === "disconnected") {
|
|
204
|
+
g(), l.value = !1, d.value = "", u.value = a("connect.whatsappBot.errors.qrExpired");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
} catch (p) {
|
|
208
|
+
if (v.aborted) return;
|
|
209
|
+
if (p instanceof ie && p.status === 409) {
|
|
210
|
+
g(), l.value = !1, d.value = "", u.value = a("connect.whatsappBot.errors.accountAlreadyLinked");
|
|
205
211
|
return;
|
|
206
212
|
}
|
|
207
|
-
} catch {
|
|
208
213
|
}
|
|
209
|
-
|
|
210
|
-
E(
|
|
214
|
+
v.aborted || ($ = setTimeout(() => {
|
|
215
|
+
E(x, c, v);
|
|
211
216
|
}, 2e3));
|
|
212
217
|
}
|
|
213
218
|
}
|
|
214
219
|
async function W() {
|
|
215
220
|
g();
|
|
216
|
-
const
|
|
217
|
-
|
|
221
|
+
const x = new AbortController();
|
|
222
|
+
f = x, d.value = "", u.value = "", l.value = !1, _.value = void 0, m.value = !0;
|
|
218
223
|
try {
|
|
219
224
|
const c = j.getBusinessId();
|
|
220
225
|
if (!c)
|
|
221
226
|
throw new Error(a("connect.whatsappBot.errors.selectBusiness"));
|
|
222
|
-
const
|
|
227
|
+
const v = await L.createClient(
|
|
223
228
|
c,
|
|
224
|
-
|
|
225
|
-
),
|
|
229
|
+
x.signal
|
|
230
|
+
), p = await me.toDataURL(v.qr, {
|
|
226
231
|
width: 224,
|
|
227
232
|
margin: 2,
|
|
228
233
|
errorCorrectionLevel: "M"
|
|
229
234
|
});
|
|
230
|
-
|
|
235
|
+
x.signal.aborted || (d.value = p, E(c, v.clientId, x.signal));
|
|
231
236
|
} catch (c) {
|
|
232
|
-
|
|
237
|
+
x.signal.aborted || (u.value = c instanceof Error ? c.message : a("connect.whatsappBot.errors.loadQr"));
|
|
233
238
|
} finally {
|
|
234
|
-
|
|
239
|
+
x.signal.aborted || (m.value = !1);
|
|
235
240
|
}
|
|
236
241
|
}
|
|
237
|
-
return
|
|
242
|
+
return R(
|
|
238
243
|
i,
|
|
239
|
-
(
|
|
240
|
-
|
|
244
|
+
(x) => {
|
|
245
|
+
x ? W() : g();
|
|
241
246
|
},
|
|
242
247
|
{ immediate: !0 }
|
|
243
|
-
), K(g), (
|
|
244
|
-
const
|
|
248
|
+
), K(g), (x, c) => {
|
|
249
|
+
const v = y("i18n-t"), p = y("FmCircularProgress"), S = y("FmButton"), V = y("FmDialog");
|
|
245
250
|
return n(), C(V, {
|
|
246
251
|
modelValue: i.value,
|
|
247
252
|
"onUpdate:modelValue": c[0] || (c[0] = (b) => i.value = b),
|
|
@@ -251,12 +256,12 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
251
256
|
"dismiss-away": ""
|
|
252
257
|
}, {
|
|
253
258
|
"dialog-header": I(() => [
|
|
254
|
-
t("h2",
|
|
259
|
+
t("h2", Ce, r(e(a)("connect.whatsappBot.connectAccount")), 1)
|
|
255
260
|
]),
|
|
256
261
|
default: I(() => {
|
|
257
262
|
var b, B, s;
|
|
258
263
|
return [
|
|
259
|
-
|
|
264
|
+
_.value ? (n(), h("div", $e, [
|
|
260
265
|
c[1] || (c[1] = t("div", {
|
|
261
266
|
"aria-hidden": "true",
|
|
262
267
|
class: "w-[64px] h-[64px] rounded-full bg-fm-color-system-success-100 text-fm-color-typo-success flex items-center justify-center mb-[8px]"
|
|
@@ -274,70 +279,70 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
274
279
|
t("path", { d: "M20 6 9 17l-5-5" })
|
|
275
280
|
])
|
|
276
281
|
], -1)),
|
|
277
|
-
t("h3",
|
|
278
|
-
t("p",
|
|
279
|
-
])) : (n(),
|
|
280
|
-
t("div",
|
|
281
|
-
t("p",
|
|
282
|
-
t("ol",
|
|
283
|
-
(n(),
|
|
282
|
+
t("h3", Pe, r(e(a)("connect.whatsappBot.accountConnected")), 1),
|
|
283
|
+
t("p", Se, r(((b = _.value.account) == null ? void 0 : b.businessName) || ((B = _.value.account) == null ? void 0 : B.name) || e(a)("connect.whatsappBot.unnamedAccount")) + " · " + r(((s = _.value.account) == null ? void 0 : s.phoneNumber) || e(a)("connect.whatsappBot.phoneUnavailable")), 1)
|
|
284
|
+
])) : (n(), h("div", Ie, [
|
|
285
|
+
t("div", Fe, [
|
|
286
|
+
t("p", Ee, r(e(a)("connect.whatsappBot.scanDescription")), 1),
|
|
287
|
+
t("ol", We, [
|
|
288
|
+
(n(), h(Q, null, Y(4, (o) => t("li", {
|
|
284
289
|
key: o,
|
|
285
290
|
class: "flex gap-[12px]"
|
|
286
291
|
}, [
|
|
287
|
-
t("span",
|
|
288
|
-
o === 1 ? (n(),
|
|
292
|
+
t("span", Ve, r(o), 1),
|
|
293
|
+
o === 1 ? (n(), h("span", De, r(e(a)("connect.whatsappBot.steps.openApp")), 1)) : o === 2 ? (n(), C(v, {
|
|
289
294
|
key: 1,
|
|
290
295
|
keypath: "connect.whatsappBot.steps.openSettings",
|
|
291
296
|
tag: "span",
|
|
292
297
|
scope: "global"
|
|
293
298
|
}, {
|
|
294
299
|
menu: I(() => [
|
|
295
|
-
t("b",
|
|
300
|
+
t("b", Ne, r(e(a)("connect.whatsappBot.menu")), 1)
|
|
296
301
|
]),
|
|
297
302
|
settings: I(() => [
|
|
298
|
-
t("b",
|
|
303
|
+
t("b", Oe, r(e(a)("connect.whatsappBot.settings")), 1)
|
|
299
304
|
]),
|
|
300
305
|
_: 1
|
|
301
|
-
})) : o === 3 ? (n(), C(
|
|
306
|
+
})) : o === 3 ? (n(), C(v, {
|
|
302
307
|
key: 2,
|
|
303
308
|
keypath: "connect.whatsappBot.steps.linkDevice",
|
|
304
309
|
tag: "span",
|
|
305
310
|
scope: "global"
|
|
306
311
|
}, {
|
|
307
312
|
linkedDevices: I(() => [
|
|
308
|
-
t("b",
|
|
313
|
+
t("b", je, r(e(a)("connect.whatsappBot.linkedDevices")), 1)
|
|
309
314
|
]),
|
|
310
315
|
linkDevice: I(() => [
|
|
311
|
-
t("b",
|
|
316
|
+
t("b", He, r(e(a)("connect.whatsappBot.linkDevice")), 1)
|
|
312
317
|
]),
|
|
313
318
|
_: 1
|
|
314
|
-
})) : (n(),
|
|
319
|
+
})) : (n(), h("span", Le, r(e(a)("connect.whatsappBot.steps.scanQr")), 1))
|
|
315
320
|
])), 64))
|
|
316
321
|
]),
|
|
317
|
-
t("p", Me,
|
|
322
|
+
t("p", Me, r(e(a)("connect.whatsappBot.connectionNote")), 1)
|
|
318
323
|
]),
|
|
319
324
|
t("div", Re, [
|
|
320
|
-
|
|
321
|
-
A(
|
|
322
|
-
z(
|
|
323
|
-
])) :
|
|
324
|
-
t("p",
|
|
325
|
+
m.value ? (n(), h("div", Ue, [
|
|
326
|
+
A(p),
|
|
327
|
+
z(r(e(a)("connect.whatsappBot.generatingQr")), 1)
|
|
328
|
+
])) : u.value ? (n(), h("div", ze, [
|
|
329
|
+
t("p", Ge, r(u.value), 1),
|
|
325
330
|
A(S, {
|
|
326
331
|
label: e(a)("connect.whatsappBot.tryAgain"),
|
|
327
332
|
"prepend-icon": "refresh",
|
|
328
333
|
onClick: W
|
|
329
334
|
}, null, 8, ["label"])
|
|
330
|
-
])) :
|
|
335
|
+
])) : d.value ? (n(), h("img", {
|
|
331
336
|
key: 2,
|
|
332
|
-
src:
|
|
337
|
+
src: d.value,
|
|
333
338
|
alt: e(a)("connect.whatsappBot.qrAlt"),
|
|
334
339
|
width: "224",
|
|
335
340
|
height: "224",
|
|
336
|
-
class: U({ "opacity-20":
|
|
337
|
-
}, null, 10,
|
|
338
|
-
|
|
339
|
-
A(
|
|
340
|
-
z(" " +
|
|
341
|
+
class: U({ "opacity-20": l.value })
|
|
342
|
+
}, null, 10, Ke)) : O("", !0),
|
|
343
|
+
l.value ? (n(), h("div", Qe, [
|
|
344
|
+
A(p),
|
|
345
|
+
z(" " + r(e(a)("connect.whatsappBot.connecting")), 1)
|
|
341
346
|
])) : O("", !0)
|
|
342
347
|
])
|
|
343
348
|
]))
|
|
@@ -347,15 +352,15 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
347
352
|
}, 8, ["modelValue"]);
|
|
348
353
|
};
|
|
349
354
|
}
|
|
350
|
-
}),
|
|
355
|
+
}), Je = { class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[8px]" }, Xe = { class: "text-[20px] leading-[28px] font-bold" }, Ye = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary max-w-[420px]" }, qe = /* @__PURE__ */ M({
|
|
351
356
|
__name: "WhatsappEmptyState",
|
|
352
357
|
emits: ["connect"],
|
|
353
358
|
setup(F, { emit: i }) {
|
|
354
|
-
const a = i, { t:
|
|
355
|
-
return (
|
|
356
|
-
const
|
|
357
|
-
return n(),
|
|
358
|
-
|
|
359
|
+
const a = i, { t: d } = G();
|
|
360
|
+
return (m, u) => {
|
|
361
|
+
const l = y("FmButton");
|
|
362
|
+
return n(), h("div", Je, [
|
|
363
|
+
u[1] || (u[1] = t("div", { class: "w-[72px] h-[72px] rounded-full bg-fm-color-primary-oats text-fm-color-primary flex items-center justify-center mb-[12px]" }, [
|
|
359
364
|
t("svg", {
|
|
360
365
|
width: "34",
|
|
361
366
|
height: "34",
|
|
@@ -371,37 +376,37 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
371
376
|
t("path", { d: "M9 10h.01M12 10h.01M15 10h.01" })
|
|
372
377
|
])
|
|
373
378
|
], -1)),
|
|
374
|
-
t("h2",
|
|
375
|
-
t("p",
|
|
376
|
-
A(
|
|
379
|
+
t("h2", Xe, r(e(d)("connect.whatsappBot.emptyTitle")), 1),
|
|
380
|
+
t("p", Ye, r(e(d)("connect.whatsappBot.emptyDescription")), 1),
|
|
381
|
+
A(l, {
|
|
377
382
|
class: "mt-[16px]",
|
|
378
|
-
label: e(
|
|
383
|
+
label: e(d)("connect.whatsappBot.connectAccountCta"),
|
|
379
384
|
"prepend-icon": "add",
|
|
380
|
-
onClick:
|
|
385
|
+
onClick: u[0] || (u[0] = (_) => a("connect"))
|
|
381
386
|
}, null, 8, ["label"])
|
|
382
387
|
]);
|
|
383
388
|
};
|
|
384
389
|
}
|
|
385
|
-
}),
|
|
390
|
+
}), et = { class: "px-[24px] xs:px-[12px] pt-[20px] pb-[40px] text-fm-color-typo-primary" }, tt = { class: "flex items-center justify-between gap-[16px] flex-wrap min-h-[40px]" }, ot = { class: "flex items-center gap-8" }, nt = { class: "text-[24px] leading-[32px] font-semibold tracking-[-0.01em]" }, at = {
|
|
386
391
|
key: 2,
|
|
387
392
|
role: "status",
|
|
388
393
|
class: "mt-[24px] py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
389
|
-
},
|
|
394
|
+
}, st = {
|
|
390
395
|
key: 3,
|
|
391
396
|
class: "mt-[24px] border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[16px]"
|
|
392
|
-
},
|
|
397
|
+
}, lt = {
|
|
393
398
|
role: "alert",
|
|
394
399
|
class: "text-[14px] text-fm-color-typo-error"
|
|
395
|
-
},
|
|
400
|
+
}, xt = /* @__PURE__ */ M({
|
|
396
401
|
__name: "WhatsappBot",
|
|
397
402
|
setup(F) {
|
|
398
|
-
const { t: i } = G(), a = ce(),
|
|
399
|
-
let
|
|
400
|
-
const
|
|
403
|
+
const { t: i } = G(), a = ce(), d = w([]), m = w(!0), u = w("");
|
|
404
|
+
let l, _;
|
|
405
|
+
const f = w([]), $ = w(!0), P = w("");
|
|
401
406
|
let g, E;
|
|
402
407
|
const W = H(
|
|
403
|
-
() =>
|
|
404
|
-
),
|
|
408
|
+
() => d.value.filter((s) => de(s) !== void 0)
|
|
409
|
+
), x = H(() => [
|
|
405
410
|
{
|
|
406
411
|
label: i("connect.whatsappBot.accounts"),
|
|
407
412
|
value: k["$connect-WHATSAPP_BOT"],
|
|
@@ -414,13 +419,13 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
414
419
|
{
|
|
415
420
|
label: i("connect.whatsappBot.tickets.title"),
|
|
416
421
|
value: k["$connect-WHATSAPP_BOT_TICKETS"],
|
|
417
|
-
badge:
|
|
422
|
+
badge: f.value.length
|
|
418
423
|
}
|
|
419
424
|
]), c = H(() => {
|
|
420
425
|
const s = a.currentRoute.value.name;
|
|
421
426
|
return s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"] ? s : k["$connect-WHATSAPP_BOT"];
|
|
422
427
|
});
|
|
423
|
-
async function
|
|
428
|
+
async function v(s = !1) {
|
|
424
429
|
clearTimeout(E), g == null || g.abort();
|
|
425
430
|
const o = new AbortController();
|
|
426
431
|
g = o, s || ($.value = !0, P.value = "");
|
|
@@ -428,35 +433,35 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
428
433
|
const T = j.getBusinessId();
|
|
429
434
|
if (!T)
|
|
430
435
|
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
431
|
-
const N = await
|
|
432
|
-
o.signal.aborted || (
|
|
436
|
+
const N = await L.listTickets(T, o.signal);
|
|
437
|
+
o.signal.aborted || (f.value = N, P.value = "");
|
|
433
438
|
} catch (T) {
|
|
434
439
|
o.signal.aborted || (P.value = T instanceof Error ? T.message : i("connect.whatsappBot.tickets.loadError"));
|
|
435
440
|
} finally {
|
|
436
|
-
o.signal.aborted || ($.value = !1, E = setTimeout(() => void
|
|
441
|
+
o.signal.aborted || ($.value = !1, E = setTimeout(() => void v(!0), 1e4));
|
|
437
442
|
}
|
|
438
443
|
}
|
|
439
|
-
function
|
|
440
|
-
|
|
444
|
+
function p(s) {
|
|
445
|
+
f.value = f.value.filter((o) => o.id !== s), v(!0);
|
|
441
446
|
}
|
|
442
447
|
async function S(s = !1) {
|
|
443
|
-
clearTimeout(
|
|
448
|
+
clearTimeout(_), l == null || l.abort();
|
|
444
449
|
const o = new AbortController();
|
|
445
|
-
|
|
450
|
+
l = o, s || (m.value = !0, u.value = "");
|
|
446
451
|
try {
|
|
447
452
|
const T = j.getBusinessId();
|
|
448
453
|
if (!T)
|
|
449
454
|
throw new Error(i("connect.whatsappBot.errors.selectBusiness"));
|
|
450
|
-
const N = await
|
|
451
|
-
o.signal.aborted || (
|
|
455
|
+
const N = await L.listClients(T, o.signal);
|
|
456
|
+
o.signal.aborted || (d.value = N, u.value = "");
|
|
452
457
|
} catch (T) {
|
|
453
|
-
!o.signal.aborted && !s && (
|
|
458
|
+
!o.signal.aborted && !s && (u.value = T instanceof Error ? T.message : i("connect.whatsappBot.errors.loadSessions"));
|
|
454
459
|
} finally {
|
|
455
|
-
o.signal.aborted || (
|
|
460
|
+
o.signal.aborted || (m.value = !1, _ = setTimeout(() => void S(!0), 1e4));
|
|
456
461
|
}
|
|
457
462
|
}
|
|
458
463
|
function V(s) {
|
|
459
|
-
|
|
464
|
+
d.value = d.value.filter(
|
|
460
465
|
(o) => o.clientId !== s
|
|
461
466
|
), S(!0);
|
|
462
467
|
}
|
|
@@ -464,23 +469,23 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
464
469
|
function B(s) {
|
|
465
470
|
(s === k["$connect-WHATSAPP_BOT"] || s === k["$connect-WHATSAPP_BOT_SETTINGS"] || s === k["$connect-WHATSAPP_BOT_TICKETS"]) && a.push({ name: s });
|
|
466
471
|
}
|
|
467
|
-
return
|
|
472
|
+
return R(b, (s) => {
|
|
468
473
|
s || S();
|
|
469
|
-
}),
|
|
474
|
+
}), R(
|
|
470
475
|
() => j.getBusinessId(),
|
|
471
476
|
() => {
|
|
472
|
-
b.value = !1,
|
|
477
|
+
b.value = !1, d.value = [], f.value = [], S(), v();
|
|
473
478
|
},
|
|
474
479
|
{ immediate: !0 }
|
|
475
480
|
), K(() => {
|
|
476
|
-
|
|
481
|
+
l == null || l.abort(), clearTimeout(_), g == null || g.abort(), clearTimeout(E);
|
|
477
482
|
}), (s, o) => {
|
|
478
483
|
const T = y("FmPill"), N = y("FmButton"), q = y("FmBadge"), ee = y("FmTab"), te = y("FmTabs"), Z = y("RouterView"), oe = y("FmCircularProgress");
|
|
479
|
-
return n(),
|
|
480
|
-
t("div",
|
|
481
|
-
t("div",
|
|
482
|
-
t("div",
|
|
483
|
-
t("h1",
|
|
484
|
+
return n(), h(Q, null, [
|
|
485
|
+
t("div", et, [
|
|
486
|
+
t("div", tt, [
|
|
487
|
+
t("div", ot, [
|
|
488
|
+
t("h1", nt, r(e(i)("connect.navigation.whatsappBot")), 1),
|
|
484
489
|
A(T, { variant: "beta" })
|
|
485
490
|
]),
|
|
486
491
|
c.value === e(k)["$connect-WHATSAPP_BOT"] && W.value.length ? (n(), C(N, {
|
|
@@ -492,7 +497,7 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
492
497
|
]),
|
|
493
498
|
A(te, {
|
|
494
499
|
"model-value": c.value,
|
|
495
|
-
items:
|
|
500
|
+
items: x.value,
|
|
496
501
|
role: "tablist",
|
|
497
502
|
"aria-label": e(i)("connect.navigation.whatsappBot"),
|
|
498
503
|
class: "mt-[16px] border-b border-fm-color-neutral-gray-100"
|
|
@@ -524,31 +529,31 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
524
529
|
}, 8, ["model-value", "items", "aria-label"]),
|
|
525
530
|
c.value === e(k)["$connect-WHATSAPP_BOT_SETTINGS"] ? (n(), C(Z, { key: 0 })) : c.value === e(k)["$connect-WHATSAPP_BOT_TICKETS"] ? (n(), C(Z, {
|
|
526
531
|
key: 1,
|
|
527
|
-
tickets:
|
|
532
|
+
tickets: f.value,
|
|
528
533
|
loading: $.value,
|
|
529
534
|
error: P.value,
|
|
530
|
-
onRetry: o[1] || (o[1] = (D) =>
|
|
531
|
-
onResolved:
|
|
532
|
-
}, null, 8, ["tickets", "loading", "error"])) :
|
|
535
|
+
onRetry: o[1] || (o[1] = (D) => v()),
|
|
536
|
+
onResolved: p
|
|
537
|
+
}, null, 8, ["tickets", "loading", "error"])) : m.value ? (n(), h("div", at, [
|
|
533
538
|
A(oe),
|
|
534
|
-
z(" " +
|
|
535
|
-
])) :
|
|
536
|
-
t("p",
|
|
539
|
+
z(" " + r(e(i)("connect.whatsappBot.loadingSessions")), 1)
|
|
540
|
+
])) : u.value ? (n(), h("div", st, [
|
|
541
|
+
t("p", lt, r(u.value), 1),
|
|
537
542
|
A(N, {
|
|
538
543
|
label: e(i)("connect.whatsappBot.tryAgain"),
|
|
539
544
|
"prepend-icon": "refresh",
|
|
540
545
|
onClick: o[2] || (o[2] = (D) => S())
|
|
541
546
|
}, null, 8, ["label"])
|
|
542
|
-
])) : W.value.length ? (n(), C(
|
|
547
|
+
])) : W.value.length ? (n(), C(Ae, {
|
|
543
548
|
key: 4,
|
|
544
549
|
accounts: W.value,
|
|
545
550
|
onRemoved: V
|
|
546
|
-
}, null, 8, ["accounts"])) : (n(), C(
|
|
551
|
+
}, null, 8, ["accounts"])) : (n(), C(qe, {
|
|
547
552
|
key: 5,
|
|
548
553
|
onConnect: o[3] || (o[3] = (D) => b.value = !0)
|
|
549
554
|
}))
|
|
550
555
|
]),
|
|
551
|
-
A(
|
|
556
|
+
A(Ze, {
|
|
552
557
|
modelValue: b.value,
|
|
553
558
|
"onUpdate:modelValue": o[4] || (o[4] = (D) => b.value = D)
|
|
554
559
|
}, null, 8, ["modelValue"])
|
|
@@ -557,5 +562,5 @@ const me = { class: "flex items-center gap-[12px]" }, fe = { class: "min-w-0 fle
|
|
|
557
562
|
}
|
|
558
563
|
});
|
|
559
564
|
export {
|
|
560
|
-
|
|
565
|
+
xt as default
|
|
561
566
|
};
|