@feedmepos/mf-connect 0.1.113-beta.3 → 0.1.114-dev
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-YfpYV7C0.js → App-CIWTDYuZ.js} +11 -11
- package/dist/{AuditLogs-kD0_HO_p.js → AuditLogs-BluLDXu9.js} +12 -12
- package/dist/{Bin-Dr-Xp3pn.js → Bin-jS6pM4L3.js} +8 -8
- package/dist/{Broadcast-CEbHu2xA.js → Broadcast-DBqsSZ0S.js} +12 -12
- package/dist/{CampaignAnalytic-DDiGxPwp.js → CampaignAnalytic-DJrjXD4H.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cc_Yho9-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CzwigRLi.js} +8 -8
- package/dist/{Card-BUnwg0eM.js → Card-B10nLilL.js} +22 -22
- package/dist/{Collections-CKyBkKq2.js → Collections-BN42A73p.js} +8 -8
- package/dist/{Credit-CJOXWLV1.js → Credit-0SS26HGE.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DmEBLeNI.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B3wozBFs.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Ce5R4Un6.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BRd5RVYe.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CMFmlqfF.js → EffectSheet.vue_vue_type_style_index_0_lang-zV9dLCWp.js} +6 -6
- package/dist/{Experience-C_Am5CTY.js → Experience-D7qPzsrc.js} +13 -13
- package/dist/{FileSaver.min-CueAGbjq.js → FileSaver.min-BKWoklMK.js} +1 -1
- package/dist/{Game-B6GO_LVU.js → Game-BoYMwfog.js} +13 -13
- package/dist/{GiftCardSetup-CVLDDpI2.js → GiftCardSetup-B87O0xzo.js} +10 -10
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-isfGhKO1.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B3uGbEFY.js} +7 -7
- package/dist/{Goals-BX-sMV2V.js → Goals-CVxf3xCA.js} +4 -4
- package/dist/{Grab-Bh335Srh.js → Grab-mGL1Mue_.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-srSgUY3e.js → ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js} +1 -1
- package/dist/{Index-CyXRbwcm.js → Index-Dptuy-6c.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-S3GB2Ems.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cjc4UeKz.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-ZlWHXwXZ.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bh0ari3f.js} +1 -1
- package/dist/{LoyaltyDashboard-DrTq8oiu.js → LoyaltyDashboard-BxhI6RAE.js} +15 -15
- package/dist/{MainLayout-KbKkpX5n.js → MainLayout-YfDxvZXl.js} +1 -1
- package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-2D5ate_s.js → MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js} +3 -3
- package/dist/{Marketing-DQT1MWQg.js → Marketing-C2cVJacf.js} +4 -4
- package/dist/{MarketingMaterialEdit-fSqr53-M.js → MarketingMaterialEdit-DkOEy_L-.js} +6 -6
- package/dist/{Member-DwDUCzlv.js → Member-DufbKDOh.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DaQ4Lw8f.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CU8EmBxy.js} +23 -23
- package/dist/{MemberImportHistory-D4ezvJGZ.js → MemberImportHistory-DlFN-uQl.js} +7 -7
- package/dist/{MemberList-DFieV7Qk.js → MemberList-B344n8I4.js} +14 -14
- package/dist/{MemberTransactions-BPOXyAuC.js → MemberTransactions-BS7H640M.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhfsgDd4.js → MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CX8bk_IQ.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lY0jlyOG.js} +1 -1
- package/dist/{Mission-nErb05Es.js → Mission-D2ed_oKn.js} +14 -14
- package/dist/{Overview-DuJr_hAg.js → Overview-CLh_T6YY.js} +4 -4
- package/dist/{Overview-7G31a7B-.js → Overview-DJa-hXDC.js} +20 -20
- package/dist/{Point-PWDLemD4.js → Point-DAPeg1VD.js} +14 -14
- package/dist/{Promotion-N80Tj8M6.js → Promotion-CPPCMMFl.js} +14 -14
- package/dist/{Queue-M7ZpgiMT.js → Queue-BcPwCRcM.js} +12 -12
- package/dist/{Record-NhxrdvWv.js → Record-C5XKn--g.js} +9 -9
- package/dist/{Review-DiAaAzIG.js → Review-Cc51luIv.js} +2 -2
- package/dist/{ReviewFacebookCallback-JdyxFbNl.js → ReviewFacebookCallback-BSGInFB8.js} +5 -5
- package/dist/{ReviewGoogleCallback-BXbI3Bsh.js → ReviewGoogleCallback-C1gY4vcP.js} +5 -5
- package/dist/{Reward-yTaOqOT8.js → Reward-k1R3hLiF.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BWPfjZ9K.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGbbGVK4.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Cz2H9MKe.js → RuleGroup.vue_vue_type_script_setup_true_lang-Coh3L11L.js} +14 -14
- package/dist/{Segment-DE9Bcd6R.js → Segment-DsBnIvje.js} +25 -25
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pmv0cb4J.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CMKpvXN-.js} +14 -14
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BeWwkTix.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-LyAtRMs8.js} +4 -4
- package/dist/{Setting-C0JAxIRT.js → Setting-BRueNgc4.js} +14 -14
- package/dist/{SettingAdvertisements-DxueyKU8.js → SettingAdvertisements-BrVcQyhF.js} +12 -12
- package/dist/{Settings-Cs46AcxZ.js → Settings-fOvXd29Z.js} +5 -5
- package/dist/{Store-DqQae9nE.js → Store-rrh2pIHH.js} +26 -26
- package/dist/{StoreRewards-JxSUsOzJ.js → StoreRewards-D-jivVKr.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-qgrBtUNX.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CvQXsZbH.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D7ifzgsI.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js} +2 -2
- package/dist/{Tier-DWhgWush.js → Tier-DJiLtw3M.js} +26 -26
- package/dist/{Title-DUNeMdz8.js → Title-s0bzA7yZ.js} +22 -22
- package/dist/{Transaction-DAv-LVhC.js → Transaction-CQ-CJ_eh.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cih-9IoW.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bfy8SZH1.js} +6 -6
- package/dist/{Voucher-uLTq9RSK.js → Voucher-9vydRET7.js} +18 -18
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BevVL_Kx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dq7veRL5.js} +12 -12
- package/dist/{WhatsappAccount-BpXQ4q0P.js → WhatsappAccount-D12Hvzfl.js} +52 -51
- package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-EssnbsgT.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BrZEDi6O.js} +1 -1
- package/dist/WhatsappBot-o5b_0CnB.js +629 -0
- package/dist/{WhatsappBotLogs-DDN4H_bv.js → WhatsappBotLogs-CK_V_iT5.js} +39 -39
- package/dist/WhatsappBotSettings-BooibLUg.js +694 -0
- package/dist/{WhatsappLayout-DSnq84Uo.js → WhatsappLayout-bOyNHGUI.js} +3 -3
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-Cytrffdh.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CR-F0x1r.js → ZodTextField.vue_vue_type_script_setup_true_lang-96t_eUzk.js} +2 -2
- package/dist/{app-Devzv4gO.js → app-DV3e2LkD.js} +342 -267
- package/dist/app.js +1 -1
- package/dist/{base.export-CCSMkvAm.js → base.export-DQUUtGmy.js} +2 -2
- package/dist/{business-BjAmUqNA.js → business-BZ0boE-5.js} +1 -1
- package/dist/{campaign-C5c47GqT.js → campaign-CsfFq2S-.js} +8 -8
- package/dist/{campaign-CTe-T5Gd.js → campaign-DMrtYWcs.js} +2 -2
- package/dist/{campaign.fn-DxAO8A5b.js → campaign.fn-C-CdNNdR.js} +185 -185
- package/dist/{collection.fn-C9l-OtNt.js → collection.fn-C-rryKSc.js} +2 -2
- package/dist/{currency-mwm4AWXK.js → currency-BOd9iVZV.js} +1 -1
- package/dist/{duplicateCampaign-BbC4AwQ1.js → duplicateCampaign-ey_rW0Bz.js} +2 -2
- package/dist/{effect-D8ba9z0K.js → effect-BP6Hkxmj.js} +1 -1
- package/dist/{email-addresses-BR5J6_Jz.js → email-addresses-CO61QAq0.js} +2 -2
- package/dist/{feature-flag-C-5NdFW8.js → feature-flag-Bq1SgbYC.js} +1 -1
- package/dist/{feature-flag-CNcU4_3r.js → feature-flag-lvPP0ED-.js} +1 -1
- package/dist/{helper-D9cEaMIv.js → helper-BRpts-M-.js} +1 -1
- package/dist/{index-OvnHt5x5.js → index-03WIXl-H.js} +2 -2
- package/dist/{index-BfoDdVQS.js → index-B0RavybO.js} +2 -2
- package/dist/{index-BvY2hQac.js → index-BDNkoALK.js} +1 -1
- package/dist/{index-CmzjBrHR.js → index-BV5aPSYo.js} +8 -8
- package/dist/{index-B_gzo75q.js → index-Bk20uvPY.js} +1 -1
- package/dist/{index-Drmh0FT-.js → index-Bn19rfby.js} +3 -3
- package/dist/{index-DwTBiVts.js → index-Cj-eugzc.js} +1 -1
- package/dist/{index-DtcUCknS.js → index-CoROn5OA.js} +2 -2
- package/dist/{index-DnepoNWn.js → index-CrBhcMaL.js} +3 -3
- package/dist/{index-CZfqqrVu.js → index-CsBjAM3E.js} +1 -1
- package/dist/{index-yGSko6Eq.js → index-D1t4_KaG.js} +1 -1
- package/dist/{index-B7HH6vKF.js → index-D3wGTCWf.js} +2 -2
- package/dist/{index-D34iYRdc.js → index-D41kjcrZ.js} +4 -4
- package/dist/{index-B1jP-_Z_.js → index-DIZLkVe0.js} +10 -10
- package/dist/{index-Ct6YjTIW.js → index-DucKyzrD.js} +2 -2
- package/dist/{index-D4k1G2oE.js → index-R5WS21OL.js} +1 -1
- package/dist/{index-BFaZp6Et.js → index-VYI0zWNC.js} +2 -2
- package/dist/{index-0H82-X0n.js → index-ZRE89TKq.js} +1 -1
- package/dist/{index-Byg4ztr-.js → index-_Cj-bsd_.js} +14 -14
- package/dist/{index-VqAbYyHH.js → index-mToWKHVs.js} +2 -2
- package/dist/{index.esm2017-DLb2VyCT.js → index.esm2017-B_Sag8Pg.js} +76 -76
- package/dist/{loading-CUNk5u1d.js → loading-C5fVI0ry.js} +1 -1
- package/dist/{lodash-BJXravls.js → lodash-COo8_xCU.js} +1 -1
- package/dist/{member-import-DjYoddBi.js → member-import-I_pKwUfF.js} +1 -1
- package/dist/{membership-ByJUFP8f.js → membership-BgfH9Kva.js} +2 -2
- package/dist/{money-Bf2IEMJJ.js → money-Cr07YDlV.js} +1 -1
- package/dist/{number-CRBHrRUL.js → number-DFsj0dkh.js} +1 -1
- package/dist/objectid-Cu89BzwI.js +145 -0
- package/dist/{onboarding-CQ3lw7eY.js → onboarding-DlkJCm-5.js} +3 -3
- package/dist/{onboardingSetup-CsdZKGFk.js → onboardingSetup-BEhVj613.js} +2 -2
- package/dist/{plugins-iTZLbJGy.js → plugins-CPTtiKqf.js} +3 -3
- package/dist/{reward-DTN6JpEd.js → reward-DqY0mQ_5.js} +1 -1
- package/dist/{rule-BYACNQOL.js → rule-mJJ48eKw.js} +9 -9
- package/dist/{template--Vr0PCjB.js → template-C1QftpDG.js} +6 -6
- package/dist/{timezone-DwzjOED-.js → timezone-BBgBHels.js} +1 -1
- package/dist/{transaction.fn-DapYe3n7.js → transaction.fn-Sr0hj3kY.js} +2 -2
- package/dist/{trigger-D8r76yb0.js → trigger-PUP0mwKM.js} +7 -7
- package/dist/{useMarketingMaterialActions-CdMmibPE.js → useMarketingMaterialActions-faslwaHd.js} +3 -3
- package/dist/{usePagination-BRcQJkO1.js → usePagination-Be6nIQ9y.js} +1 -1
- package/dist/{user-vBZFKqXQ.js → user-DBSYzG_9.js} +1 -1
- package/dist/{vue-i18n-Cw6fF11e.js → vue-i18n-C6c2jsH3.js} +409 -409
- package/dist/{xlsx-Muy_Rjhk.js → xlsx-Bfo19lFv.js} +224 -224
- package/dist/{zod-CCPTOeUz.js → zod-CihbDg3N.js} +1 -1
- package/package.json +1 -1
- package/dist/WhatsappBot-DB4NRZMd.js +0 -589
- package/dist/WhatsappBotSettings-Bkv1VNwF.js +0 -387
- package/dist/WhatsappBotTickets-DAKgnE6T.js +0 -162
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-1BvxPD-k.js +0 -195
- package/dist/objectid-58gyOvdR.js +0 -145
- package/dist/useWhatsappAccount-BOJ8fz84.js +0 -62
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as U, useModel as A, resolveComponent as k, openBlock as c, createElementBlock as p, createElementVNode as r, toDisplayString as m, unref as e, createVNode as g, computed as E, Fragment as N, renderList as X, normalizeClass as D, createTextVNode as O, createCommentVNode as T, withDirectives as Y, vModelRadio as Z, ref as f, watch as ee, onBeforeUnmount as te, createBlock as oe } from "vue";
|
|
2
|
-
import { u as M } from "./vue-i18n-Cw6fF11e.js";
|
|
3
|
-
import { useSnackbar as ae } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as j, a as C, b as le, c as se, d as ne, e as $, f as re } from "./index-RwNlbTO8.js";
|
|
5
|
-
import { S as ie } from "./index-OvnHt5x5.js";
|
|
6
|
-
import { w as z } from "./index-0H82-X0n.js";
|
|
7
|
-
import { p as ce } from "./plugins-iTZLbJGy.js";
|
|
8
|
-
const de = { class: "flex flex-col gap-[16px]" }, pe = { class: "flex flex-col gap-[4px]" }, ue = { class: "text-[16px] leading-[24px] font-semibold" }, me = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, ve = /* @__PURE__ */ L({
|
|
9
|
-
__name: "BotInstructions",
|
|
10
|
-
props: /* @__PURE__ */ U({
|
|
11
|
-
disabled: { type: Boolean }
|
|
12
|
-
}, {
|
|
13
|
-
modelValue: { required: !0 },
|
|
14
|
-
modelModifiers: {}
|
|
15
|
-
}),
|
|
16
|
-
emits: ["update:modelValue"],
|
|
17
|
-
setup(d) {
|
|
18
|
-
const o = A(d, "modelValue"), { t: a } = M();
|
|
19
|
-
return (i, t) => {
|
|
20
|
-
const v = k("FmTextarea");
|
|
21
|
-
return c(), p("div", de, [
|
|
22
|
-
r("div", pe, [
|
|
23
|
-
r("h2", ue, m(e(a)("connect.whatsappBot.botSettings.instructions")), 1),
|
|
24
|
-
r("p", me, m(e(a)("connect.whatsappBot.botSettings.description")), 1)
|
|
25
|
-
]),
|
|
26
|
-
g(v, {
|
|
27
|
-
modelValue: o.value,
|
|
28
|
-
"onUpdate:modelValue": t[0] || (t[0] = (n) => o.value = n),
|
|
29
|
-
"aria-label": e(a)("connect.whatsappBot.botSettings.instructions"),
|
|
30
|
-
placeholder: e(a)("connect.whatsappBot.botSettings.placeholder"),
|
|
31
|
-
"max-length": e(j),
|
|
32
|
-
disabled: d.disabled,
|
|
33
|
-
"show-word-count": "",
|
|
34
|
-
class: "bot-instructions-textarea"
|
|
35
|
-
}, null, 8, ["modelValue", "aria-label", "placeholder", "max-length", "disabled"])
|
|
36
|
-
]);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}), xe = {
|
|
40
|
-
"aria-labelledby": "knowledge-base-title",
|
|
41
|
-
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
42
|
-
}, be = { class: "flex flex-col gap-[4px]" }, ge = {
|
|
43
|
-
id: "knowledge-base-title",
|
|
44
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
45
|
-
}, fe = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, he = { class: "flex flex-wrap gap-[8px]" }, _e = ["title", "aria-expanded", "disabled", "onClick"], ye = ["disabled"], we = {
|
|
46
|
-
key: 0,
|
|
47
|
-
class: "text-[14px] text-fm-color-typo-tertiary"
|
|
48
|
-
}, Se = {
|
|
49
|
-
key: 1,
|
|
50
|
-
class: "text-[14px] text-fm-color-typo-secondary"
|
|
51
|
-
}, Be = /* @__PURE__ */ L({
|
|
52
|
-
__name: "KnowledgeBase",
|
|
53
|
-
props: /* @__PURE__ */ U({
|
|
54
|
-
disabled: { type: Boolean }
|
|
55
|
-
}, {
|
|
56
|
-
modelValue: {
|
|
57
|
-
required: !0
|
|
58
|
-
},
|
|
59
|
-
modelModifiers: {},
|
|
60
|
-
activeTopicIndex: {
|
|
61
|
-
required: !0
|
|
62
|
-
},
|
|
63
|
-
activeTopicIndexModifiers: {}
|
|
64
|
-
}),
|
|
65
|
-
emits: ["update:modelValue", "update:activeTopicIndex"],
|
|
66
|
-
setup(d) {
|
|
67
|
-
const o = d, a = A(d, "modelValue"), i = A(d, "activeTopicIndex"), { t } = M(), v = E(
|
|
68
|
-
() => i.value === null ? null : a.value[i.value]
|
|
69
|
-
);
|
|
70
|
-
function n() {
|
|
71
|
-
o.disabled || a.value.length >= C || (a.value.push({ title: "", description: "" }), i.value = a.value.length - 1);
|
|
72
|
-
}
|
|
73
|
-
function _() {
|
|
74
|
-
o.disabled || i.value === null || (a.value.splice(i.value, 1), i.value = null);
|
|
75
|
-
}
|
|
76
|
-
return (y, w) => {
|
|
77
|
-
const h = k("FmIcon"), F = k("FmTextField"), P = k("FmTextarea"), S = k("FmButton");
|
|
78
|
-
return c(), p("section", xe, [
|
|
79
|
-
r("div", be, [
|
|
80
|
-
r("h2", ge, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.title")), 1),
|
|
81
|
-
r("p", fe, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.description")), 1)
|
|
82
|
-
]),
|
|
83
|
-
r("div", he, [
|
|
84
|
-
(c(!0), p(N, null, X(a.value, (u, x) => (c(), p("button", {
|
|
85
|
-
key: x,
|
|
86
|
-
type: "button",
|
|
87
|
-
title: u.title.trim() || e(t)("connect.whatsappBot.botSettings.knowledgeBase.untitled"),
|
|
88
|
-
"aria-expanded": i.value === x,
|
|
89
|
-
"aria-controls": "knowledge-topic-editor",
|
|
90
|
-
disabled: d.disabled,
|
|
91
|
-
class: D(["h-[32px] max-w-[240px] rounded-[8px] border-[1px] px-[12px] truncate text-[14px] font-medium transition-colors focus-visible:ring-2 focus-visible:ring-fm-color-primary disabled:opacity-60", [
|
|
92
|
-
i.value === x ? "border-fm-color-primary bg-fm-color-primary-oats text-fm-color-primary" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
93
|
-
d.disabled ? "cursor-default" : "cursor-pointer hover:border-fm-color-primary"
|
|
94
|
-
]]),
|
|
95
|
-
onClick: (H) => i.value = i.value === x ? null : x
|
|
96
|
-
}, m(u.title.trim() || e(t)("connect.whatsappBot.botSettings.knowledgeBase.untitled")), 11, _e))), 128)),
|
|
97
|
-
r("button", {
|
|
98
|
-
type: "button",
|
|
99
|
-
disabled: d.disabled || a.value.length >= e(C),
|
|
100
|
-
class: "h-[32px] rounded-[8px] border-[1px] border-dashed border-fm-color-neutral-gray-200 bg-fm-color-neutral-white px-[12px] flex items-center gap-[6px] text-[14px] font-semibold text-fm-color-primary hover:border-fm-color-primary focus-visible:ring-2 focus-visible:ring-fm-color-primary disabled:opacity-60 disabled:cursor-default",
|
|
101
|
-
onClick: n
|
|
102
|
-
}, [
|
|
103
|
-
g(h, {
|
|
104
|
-
name: "add",
|
|
105
|
-
size: "sm"
|
|
106
|
-
}),
|
|
107
|
-
O(" " + m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.addTopic")), 1)
|
|
108
|
-
], 8, ye)
|
|
109
|
-
]),
|
|
110
|
-
a.value.length === 0 ? (c(), p("p", we, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.empty")), 1)) : T("", !0),
|
|
111
|
-
a.value.length >= e(C) ? (c(), p("p", Se, m(e(t)("connect.whatsappBot.botSettings.knowledgeBase.topicLimit", {
|
|
112
|
-
count: e(C)
|
|
113
|
-
})), 1)) : T("", !0),
|
|
114
|
-
v.value ? (c(), p("div", {
|
|
115
|
-
id: "knowledge-topic-editor",
|
|
116
|
-
key: i.value ?? void 0,
|
|
117
|
-
class: "rounded-[8px] border-[1px] border-fm-color-neutral-gray-100 p-[16px] flex flex-col gap-[12px]"
|
|
118
|
-
}, [
|
|
119
|
-
g(F, {
|
|
120
|
-
modelValue: v.value.title,
|
|
121
|
-
"onUpdate:modelValue": w[0] || (w[0] = (u) => v.value.title = u),
|
|
122
|
-
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.titleLabel"),
|
|
123
|
-
placeholder: e(t)("connect.whatsappBot.botSettings.knowledgeBase.titlePlaceholder"),
|
|
124
|
-
"max-length": e(le),
|
|
125
|
-
disabled: d.disabled
|
|
126
|
-
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
127
|
-
g(P, {
|
|
128
|
-
modelValue: v.value.description,
|
|
129
|
-
"onUpdate:modelValue": w[1] || (w[1] = (u) => v.value.description = u),
|
|
130
|
-
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.descriptionLabel"),
|
|
131
|
-
placeholder: e(t)(
|
|
132
|
-
"connect.whatsappBot.botSettings.knowledgeBase.descriptionPlaceholder"
|
|
133
|
-
),
|
|
134
|
-
"max-length": e(se),
|
|
135
|
-
disabled: d.disabled,
|
|
136
|
-
"show-word-count": "",
|
|
137
|
-
class: "bot-instructions-textarea"
|
|
138
|
-
}, null, 8, ["modelValue", "label", "placeholder", "max-length", "disabled"]),
|
|
139
|
-
g(S, {
|
|
140
|
-
variant: "plain",
|
|
141
|
-
size: "sm",
|
|
142
|
-
"prepend-icon": "delete",
|
|
143
|
-
"text-color": "typo-error",
|
|
144
|
-
label: e(t)("connect.whatsappBot.botSettings.knowledgeBase.removeTopic"),
|
|
145
|
-
disabled: d.disabled,
|
|
146
|
-
class: "self-start",
|
|
147
|
-
onClick: _
|
|
148
|
-
}, null, 8, ["label", "disabled"])
|
|
149
|
-
])) : T("", !0)
|
|
150
|
-
]);
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}), ke = {
|
|
154
|
-
"aria-labelledby": "response-speed-title",
|
|
155
|
-
class: "border-t-[1px] border-fm-color-neutral-gray-100 pt-[20px] flex flex-col gap-[12px]"
|
|
156
|
-
}, Te = { class: "flex flex-col gap-[4px]" }, Ve = {
|
|
157
|
-
id: "response-speed-title",
|
|
158
|
-
class: "text-[16px] leading-[24px] font-semibold"
|
|
159
|
-
}, Fe = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, Ie = {
|
|
160
|
-
role: "radiogroup",
|
|
161
|
-
"aria-labelledby": "response-speed-title",
|
|
162
|
-
"aria-describedby": "response-speed-detail",
|
|
163
|
-
class: "grid grid-cols-[repeat(auto-fit,minmax(150px,1fr))] gap-[8px]"
|
|
164
|
-
}, Ee = ["value", "disabled"], Pe = { class: "flex items-center gap-[8px] text-[14px] leading-[20px] font-semibold" }, Ce = {
|
|
165
|
-
key: 0,
|
|
166
|
-
class: "w-[8px] h-[8px] rounded-full bg-fm-color-primary"
|
|
167
|
-
}, $e = { class: "text-[12px] leading-[16px] text-fm-color-typo-secondary" }, Ae = {
|
|
168
|
-
id: "response-speed-detail",
|
|
169
|
-
"aria-live": "polite",
|
|
170
|
-
class: "text-[14px] leading-[20px] text-fm-color-typo-secondary"
|
|
171
|
-
}, Ne = {
|
|
172
|
-
key: 0,
|
|
173
|
-
class: "rounded-[8px] bg-fm-color-system-warning-100 px-[12px] py-[10px] flex items-start gap-[10px] text-[14px] leading-[20px]"
|
|
174
|
-
}, Oe = /* @__PURE__ */ L({
|
|
175
|
-
__name: "ResponseSpeed",
|
|
176
|
-
props: /* @__PURE__ */ U({
|
|
177
|
-
disabled: { type: Boolean }
|
|
178
|
-
}, {
|
|
179
|
-
modelValue: {
|
|
180
|
-
required: !0
|
|
181
|
-
},
|
|
182
|
-
modelModifiers: {}
|
|
183
|
-
}),
|
|
184
|
-
emits: ["update:modelValue"],
|
|
185
|
-
setup(d) {
|
|
186
|
-
const o = A(d, "modelValue"), { t: a } = M();
|
|
187
|
-
return (i, t) => {
|
|
188
|
-
const v = k("FmIcon");
|
|
189
|
-
return c(), p("section", ke, [
|
|
190
|
-
r("div", Te, [
|
|
191
|
-
r("h2", Ve, m(e(a)("connect.whatsappBot.botSettings.responseSpeed.title")), 1),
|
|
192
|
-
r("p", Fe, m(e(a)("connect.whatsappBot.botSettings.responseSpeed.description")), 1)
|
|
193
|
-
]),
|
|
194
|
-
r("div", Ie, [
|
|
195
|
-
(c(!0), p(N, null, X(e(ne), (n) => (c(), p("label", { key: n }, [
|
|
196
|
-
Y(r("input", {
|
|
197
|
-
"onUpdate:modelValue": t[0] || (t[0] = (_) => o.value = _),
|
|
198
|
-
type: "radio",
|
|
199
|
-
name: "response-speed",
|
|
200
|
-
value: n,
|
|
201
|
-
disabled: d.disabled,
|
|
202
|
-
class: "sr-only peer"
|
|
203
|
-
}, null, 8, Ee), [
|
|
204
|
-
[Z, o.value]
|
|
205
|
-
]),
|
|
206
|
-
r("span", {
|
|
207
|
-
class: D(["h-full border-[1px] rounded-[8px] p-[12px] flex flex-col gap-[4px] transition-colors peer-focus-visible:ring-2 peer-focus-visible:ring-fm-color-primary", [
|
|
208
|
-
o.value === n ? "border-fm-color-primary bg-fm-color-primary-oats" : "border-fm-color-neutral-gray-200 bg-fm-color-neutral-white",
|
|
209
|
-
d.disabled ? "cursor-default opacity-60" : "cursor-pointer hover:border-fm-color-primary"
|
|
210
|
-
]])
|
|
211
|
-
}, [
|
|
212
|
-
r("span", Pe, [
|
|
213
|
-
r("span", {
|
|
214
|
-
"aria-hidden": "true",
|
|
215
|
-
class: D([
|
|
216
|
-
"w-[16px] h-[16px] shrink-0 rounded-full border-[1.5px] bg-fm-color-neutral-white flex items-center justify-center",
|
|
217
|
-
o.value === n ? "border-fm-color-primary" : "border-fm-color-neutral-gray-300"
|
|
218
|
-
])
|
|
219
|
-
}, [
|
|
220
|
-
o.value === n ? (c(), p("span", Ce)) : T("", !0)
|
|
221
|
-
], 2),
|
|
222
|
-
O(" " + m(e(a)(`connect.whatsappBot.botSettings.responseSpeed.${n}.label`)), 1)
|
|
223
|
-
]),
|
|
224
|
-
r("span", $e, m(e(a)(`connect.whatsappBot.botSettings.responseSpeed.${n}.hint`)), 1)
|
|
225
|
-
], 2)
|
|
226
|
-
]))), 128))
|
|
227
|
-
]),
|
|
228
|
-
r("p", Ae, m(e(a)(
|
|
229
|
-
`connect.whatsappBot.botSettings.responseSpeed.${o.value}.detail`
|
|
230
|
-
)), 1),
|
|
231
|
-
o.value === "immediate" ? (c(), p("div", Ne, [
|
|
232
|
-
g(v, {
|
|
233
|
-
name: "warning",
|
|
234
|
-
size: "sm",
|
|
235
|
-
class: "mt-[2px] shrink-0 text-fm-color-typo-warning"
|
|
236
|
-
}),
|
|
237
|
-
O(" " + m(e(a)("connect.whatsappBot.botSettings.responseSpeed.immediateWarning")), 1)
|
|
238
|
-
])) : T("", !0)
|
|
239
|
-
]);
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
}), Le = { class: "mt-[24px] w-full flex flex-col gap-[20px]" }, Me = {
|
|
243
|
-
key: 0,
|
|
244
|
-
role: "status",
|
|
245
|
-
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
246
|
-
}, We = {
|
|
247
|
-
key: 1,
|
|
248
|
-
role: "alert",
|
|
249
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
250
|
-
}, De = { class: "flex items-center justify-end gap-[12px] flex-wrap" }, je = /* @__PURE__ */ L({
|
|
251
|
-
__name: "WhatsappBotSettings",
|
|
252
|
-
setup(d) {
|
|
253
|
-
const { t: o } = M(), a = ae(), i = E(() => ie.getBusinessId() ?? ""), t = f(""), v = f(""), n = f([]), _ = f([]), y = f(null), w = E(
|
|
254
|
-
() => n.value.filter(
|
|
255
|
-
(l) => l.title.trim() || l.description.trim()
|
|
256
|
-
)
|
|
257
|
-
), h = f(
|
|
258
|
-
$
|
|
259
|
-
), F = f(
|
|
260
|
-
$
|
|
261
|
-
), P = f(!0), S = f(!1), u = f(!1), x = f(""), H = j, J = E(
|
|
262
|
-
() => t.value !== v.value || h.value !== F.value || JSON.stringify(n.value) !== JSON.stringify(_.value)
|
|
263
|
-
), W = E(
|
|
264
|
-
() => !S.value || u.value || !J.value
|
|
265
|
-
), R = E(
|
|
266
|
-
() => !S.value || u.value || t.value.length > H || !re.safeParse(w.value).success
|
|
267
|
-
);
|
|
268
|
-
let b;
|
|
269
|
-
function G(l) {
|
|
270
|
-
t.value = l.botInstructions, v.value = l.botInstructions, h.value = l.responseSpeed, F.value = l.responseSpeed, n.value = l.knowledgeBase.map((s) => ({ ...s })), _.value = l.knowledgeBase.map((s) => ({
|
|
271
|
-
...s
|
|
272
|
-
}));
|
|
273
|
-
}
|
|
274
|
-
async function K() {
|
|
275
|
-
b == null || b.abort();
|
|
276
|
-
const l = new AbortController();
|
|
277
|
-
b = l, P.value = !0, S.value = !1, u.value = !1, x.value = "", t.value = "", v.value = "", h.value = $, F.value = $, n.value = [], _.value = [], y.value = null;
|
|
278
|
-
try {
|
|
279
|
-
if (!i.value)
|
|
280
|
-
throw new Error(o("connect.whatsappBot.errors.selectBusiness"));
|
|
281
|
-
const s = await z.getSettings(
|
|
282
|
-
i.value,
|
|
283
|
-
l.signal
|
|
284
|
-
);
|
|
285
|
-
if (l.signal.aborted) return;
|
|
286
|
-
G(s), S.value = !0;
|
|
287
|
-
} catch (s) {
|
|
288
|
-
l.signal.aborted || (x.value = s instanceof Error ? s.message : o("connect.whatsappBot.errors.loadSettings"));
|
|
289
|
-
} finally {
|
|
290
|
-
l.signal.aborted || (P.value = !1);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
async function q() {
|
|
294
|
-
if (R.value) return;
|
|
295
|
-
b == null || b.abort();
|
|
296
|
-
const l = new AbortController();
|
|
297
|
-
b = l, u.value = !0, x.value = "";
|
|
298
|
-
const s = y.value === null ? void 0 : n.value[y.value], I = s ? w.value.indexOf(s) : -1;
|
|
299
|
-
try {
|
|
300
|
-
const B = await z.saveSettings(
|
|
301
|
-
i.value,
|
|
302
|
-
{
|
|
303
|
-
botInstructions: t.value,
|
|
304
|
-
responseSpeed: h.value,
|
|
305
|
-
knowledgeBase: w.value
|
|
306
|
-
},
|
|
307
|
-
l.signal
|
|
308
|
-
);
|
|
309
|
-
if (l.signal.aborted) return;
|
|
310
|
-
G(B), y.value = I < 0 ? null : I, a.open({
|
|
311
|
-
type: "success",
|
|
312
|
-
message: o("connect.whatsappBot.botSettings.saved")
|
|
313
|
-
});
|
|
314
|
-
} catch (B) {
|
|
315
|
-
l.signal.aborted || (x.value = B instanceof Error ? B.message : o("connect.whatsappBot.errors.saveSettings"), a.open({ type: "error", message: x.value }));
|
|
316
|
-
} finally {
|
|
317
|
-
l.signal.aborted || (u.value = !1);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
async function Q() {
|
|
321
|
-
if (W.value) return;
|
|
322
|
-
const l = b;
|
|
323
|
-
!await ce.confirm(
|
|
324
|
-
o("connect.whatsappBot.botSettings.discardChangesMessage"),
|
|
325
|
-
o("connect.whatsappBot.botSettings.discardChangesTitle"),
|
|
326
|
-
o("connect.common.confirm"),
|
|
327
|
-
o("connect.common.cancel")
|
|
328
|
-
) || W.value || b !== l || (t.value = v.value, h.value = F.value, n.value = _.value.map((I) => ({ ...I })), y.value = null);
|
|
329
|
-
}
|
|
330
|
-
return ee(i, K, { immediate: !0 }), te(() => {
|
|
331
|
-
b == null || b.abort();
|
|
332
|
-
}), (l, s) => {
|
|
333
|
-
const I = k("FmCircularProgress"), B = k("FmButton");
|
|
334
|
-
return c(), p("div", Le, [
|
|
335
|
-
P.value ? (c(), p("div", Me, [
|
|
336
|
-
g(I),
|
|
337
|
-
O(" " + m(e(o)("connect.whatsappBot.botSettings.loading")), 1)
|
|
338
|
-
])) : (c(), p(N, { key: 1 }, [
|
|
339
|
-
S.value ? (c(), p(N, { key: 0 }, [
|
|
340
|
-
g(ve, {
|
|
341
|
-
modelValue: t.value,
|
|
342
|
-
"onUpdate:modelValue": s[0] || (s[0] = (V) => t.value = V),
|
|
343
|
-
disabled: u.value
|
|
344
|
-
}, null, 8, ["modelValue", "disabled"]),
|
|
345
|
-
g(Be, {
|
|
346
|
-
modelValue: n.value,
|
|
347
|
-
"onUpdate:modelValue": s[1] || (s[1] = (V) => n.value = V),
|
|
348
|
-
"active-topic-index": y.value,
|
|
349
|
-
"onUpdate:activeTopicIndex": s[2] || (s[2] = (V) => y.value = V),
|
|
350
|
-
disabled: u.value
|
|
351
|
-
}, null, 8, ["modelValue", "active-topic-index", "disabled"]),
|
|
352
|
-
g(Oe, {
|
|
353
|
-
modelValue: h.value,
|
|
354
|
-
"onUpdate:modelValue": s[3] || (s[3] = (V) => h.value = V),
|
|
355
|
-
disabled: u.value
|
|
356
|
-
}, null, 8, ["modelValue", "disabled"])
|
|
357
|
-
], 64)) : T("", !0),
|
|
358
|
-
x.value ? (c(), p("p", We, m(x.value), 1)) : T("", !0),
|
|
359
|
-
S.value ? T("", !0) : (c(), oe(B, {
|
|
360
|
-
key: 2,
|
|
361
|
-
class: "self-start",
|
|
362
|
-
label: e(o)("connect.whatsappBot.tryAgain"),
|
|
363
|
-
"prepend-icon": "refresh",
|
|
364
|
-
onClick: K
|
|
365
|
-
}, null, 8, ["label"])),
|
|
366
|
-
r("div", De, [
|
|
367
|
-
g(B, {
|
|
368
|
-
variant: "secondary",
|
|
369
|
-
label: e(o)("connect.common.cancel"),
|
|
370
|
-
disabled: W.value,
|
|
371
|
-
onClick: Q
|
|
372
|
-
}, null, 8, ["label", "disabled"]),
|
|
373
|
-
g(B, {
|
|
374
|
-
label: e(o)("connect.common.save"),
|
|
375
|
-
disabled: R.value,
|
|
376
|
-
loading: u.value,
|
|
377
|
-
onClick: q
|
|
378
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
379
|
-
])
|
|
380
|
-
], 64))
|
|
381
|
-
]);
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
export {
|
|
386
|
-
je as default
|
|
387
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, ref as h, computed as $, watch as L, onBeforeUnmount as R, resolveComponent as w, openBlock as n, createElementBlock as l, createElementVNode as s, toDisplayString as r, unref as c, createVNode as g, createTextVNode as b, createCommentVNode as B, Fragment as T, renderList as z } from "vue";
|
|
2
|
-
import { u as M } from "./vue-i18n-Cw6fF11e.js";
|
|
3
|
-
import { S as A } from "./index-OvnHt5x5.js";
|
|
4
|
-
import { w as W } from "./index-0H82-X0n.js";
|
|
5
|
-
const G = { class: "mt-[20px] w-full flex flex-col gap-[16px]" }, H = { class: "text-[14px] leading-[20px] text-fm-color-typo-secondary" }, J = {
|
|
6
|
-
key: 0,
|
|
7
|
-
role: "status",
|
|
8
|
-
class: "flex items-center gap-[6px] text-[14px] text-fm-color-typo-success"
|
|
9
|
-
}, K = {
|
|
10
|
-
key: 1,
|
|
11
|
-
role: "status",
|
|
12
|
-
class: "py-[56px] flex flex-col items-center gap-[12px] text-[14px] text-fm-color-typo-secondary"
|
|
13
|
-
}, O = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "flex items-center gap-[12px] flex-wrap"
|
|
16
|
-
}, Q = {
|
|
17
|
-
role: "alert",
|
|
18
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
19
|
-
}, X = {
|
|
20
|
-
key: 1,
|
|
21
|
-
role: "alert",
|
|
22
|
-
class: "text-[14px] text-fm-color-typo-error"
|
|
23
|
-
}, Y = {
|
|
24
|
-
key: 2,
|
|
25
|
-
class: "border border-fm-color-neutral-gray-200 rounded-[16px] px-[24px] py-[56px] flex flex-col items-center text-center gap-[8px]"
|
|
26
|
-
}, Z = { class: "text-[20px] font-semibold" }, q = { class: "max-w-[420px] text-[14px] leading-[20px] text-fm-color-typo-secondary" }, ee = {
|
|
27
|
-
key: 3,
|
|
28
|
-
class: "flex flex-col gap-[12px]"
|
|
29
|
-
}, te = {
|
|
30
|
-
"aria-hidden": "true",
|
|
31
|
-
class: "w-[40px] h-[40px] rounded-full overflow-hidden bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary text-[14px] font-semibold flex items-center justify-center flex-shrink-0 self-start"
|
|
32
|
-
}, oe = ["src", "onError"], se = { key: 1 }, re = { class: "flex-1 min-w-[200px] flex flex-col gap-[2px]" }, ae = { class: "flex items-center gap-[8px] flex-wrap" }, ne = { class: "text-[14px] leading-[20px] font-semibold break-words" }, le = { class: "flex items-center gap-[6px] rounded-[6px] px-[8px] py-[2px] text-[12px] font-semibold bg-fm-color-system-warning-100 text-fm-color-typo-warning" }, ce = { class: "text-[12px] leading-[16px] text-fm-color-typo-tertiary break-words" }, pe = { class: "mt-[6px] text-[14px] leading-[20px] text-fm-color-typo-secondary whitespace-pre-wrap break-words" }, ie = { class: "flex items-center gap-[16px] ml-auto flex-wrap" }, de = ["datetime"], he = /* @__PURE__ */ U({
|
|
33
|
-
__name: "WhatsappBotTickets",
|
|
34
|
-
props: {
|
|
35
|
-
tickets: {},
|
|
36
|
-
loading: { type: Boolean },
|
|
37
|
-
error: {}
|
|
38
|
-
},
|
|
39
|
-
emits: ["retry", "resolved"],
|
|
40
|
-
setup(m, { emit: F }) {
|
|
41
|
-
const E = m, k = F, { t: o, locale: S } = M(), i = h(""), u = h(""), d = h(""), y = h({});
|
|
42
|
-
let x, v;
|
|
43
|
-
const I = $(
|
|
44
|
-
() => [...E.tickets].sort((t, a) => a.updatedAt.localeCompare(t.updatedAt))
|
|
45
|
-
);
|
|
46
|
-
function _(t) {
|
|
47
|
-
return t.customerName || t.phoneNumber || t.customerLid;
|
|
48
|
-
}
|
|
49
|
-
function D(t) {
|
|
50
|
-
return t.customerName ? t.customerName.trim().split(/\s+/).slice(0, 2).map((a) => Array.from(a)[0]).join("").toUpperCase() : "?";
|
|
51
|
-
}
|
|
52
|
-
function V(t) {
|
|
53
|
-
return new Intl.DateTimeFormat(S.value, {
|
|
54
|
-
dateStyle: "medium",
|
|
55
|
-
timeStyle: "short"
|
|
56
|
-
}).format(new Date(t));
|
|
57
|
-
}
|
|
58
|
-
async function j(t) {
|
|
59
|
-
if (i.value) return;
|
|
60
|
-
const a = A.getBusinessId();
|
|
61
|
-
if (!a || t.businessId !== a) return;
|
|
62
|
-
const p = new AbortController();
|
|
63
|
-
x = p, i.value = t.id, u.value = "", d.value = "", clearTimeout(v);
|
|
64
|
-
try {
|
|
65
|
-
if (await W.resolveTicket(a, t.id, p.signal), p.signal.aborted) return;
|
|
66
|
-
k("resolved", t.id), d.value = o("connect.whatsappBot.tickets.resolvedMessage", {
|
|
67
|
-
name: _(t)
|
|
68
|
-
}), v = setTimeout(() => d.value = "", 3e3);
|
|
69
|
-
} catch (f) {
|
|
70
|
-
p.signal.aborted || (u.value = f instanceof Error ? f.message : o("connect.whatsappBot.tickets.resolveError"));
|
|
71
|
-
} finally {
|
|
72
|
-
p.signal.aborted || (i.value = "");
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function C() {
|
|
76
|
-
x == null || x.abort(), clearTimeout(v), i.value = "", u.value = "", d.value = "", y.value = {};
|
|
77
|
-
}
|
|
78
|
-
return L(() => A.getBusinessId(), C), R(C), (t, a) => {
|
|
79
|
-
const p = w("FmIcon"), f = w("FmCircularProgress"), N = w("FmButton");
|
|
80
|
-
return n(), l("section", G, [
|
|
81
|
-
s("p", H, r(c(o)("connect.whatsappBot.tickets.description")), 1),
|
|
82
|
-
d.value ? (n(), l("p", J, [
|
|
83
|
-
g(p, {
|
|
84
|
-
name: "check",
|
|
85
|
-
size: "sm"
|
|
86
|
-
}),
|
|
87
|
-
b(" " + r(d.value), 1)
|
|
88
|
-
])) : B("", !0),
|
|
89
|
-
m.loading ? (n(), l("div", K, [
|
|
90
|
-
g(f),
|
|
91
|
-
b(" " + r(c(o)("connect.whatsappBot.tickets.loading")), 1)
|
|
92
|
-
])) : (n(), l(T, { key: 2 }, [
|
|
93
|
-
m.error ? (n(), l("div", O, [
|
|
94
|
-
s("p", Q, r(m.error), 1),
|
|
95
|
-
g(N, {
|
|
96
|
-
variant: "secondary",
|
|
97
|
-
label: c(o)("connect.whatsappBot.tryAgain"),
|
|
98
|
-
"prepend-icon": "refresh",
|
|
99
|
-
onClick: a[0] || (a[0] = (e) => k("retry"))
|
|
100
|
-
}, null, 8, ["label"])
|
|
101
|
-
])) : B("", !0),
|
|
102
|
-
u.value ? (n(), l("p", X, r(u.value), 1)) : B("", !0),
|
|
103
|
-
!I.value.length && !m.error ? (n(), l("div", Y, [
|
|
104
|
-
s("h2", Z, r(c(o)("connect.whatsappBot.tickets.empty.open.title")), 1),
|
|
105
|
-
s("p", q, r(c(o)("connect.whatsappBot.tickets.empty.open.description")), 1)
|
|
106
|
-
])) : (n(), l("ul", ee, [
|
|
107
|
-
(n(!0), l(T, null, z(I.value, (e) => (n(), l("li", {
|
|
108
|
-
key: e.id,
|
|
109
|
-
class: "border border-fm-color-neutral-gray-100 rounded-[16px] bg-fm-color-neutral-white p-[16px] flex items-center gap-[12px] flex-wrap"
|
|
110
|
-
}, [
|
|
111
|
-
s("div", te, [
|
|
112
|
-
e.profileImage && y.value[e.id] !== e.profileImage ? (n(), l("img", {
|
|
113
|
-
key: 0,
|
|
114
|
-
src: e.profileImage,
|
|
115
|
-
alt: "",
|
|
116
|
-
class: "w-full h-full object-cover",
|
|
117
|
-
referrerpolicy: "no-referrer",
|
|
118
|
-
onError: (P) => y.value[e.id] = e.profileImage ?? ""
|
|
119
|
-
}, null, 40, oe)) : (n(), l("span", se, r(D(e)), 1))
|
|
120
|
-
]),
|
|
121
|
-
s("div", re, [
|
|
122
|
-
s("div", ae, [
|
|
123
|
-
s("span", ne, r(_(e)), 1),
|
|
124
|
-
s("span", le, [
|
|
125
|
-
a[1] || (a[1] = s("span", { class: "w-[6px] h-[6px] rounded-full bg-current" }, null, -1)),
|
|
126
|
-
b(" " + r(c(o)("connect.whatsappBot.tickets.paused")), 1)
|
|
127
|
-
])
|
|
128
|
-
]),
|
|
129
|
-
s("p", ce, r(e.phoneNumber || c(o)("connect.whatsappBot.phoneUnavailable")), 1),
|
|
130
|
-
s("p", pe, r(e.source === "staff" ? c(o)("connect.whatsappBot.tickets.staffReason") : c(o)("connect.whatsappBot.tickets.botReason", {
|
|
131
|
-
reason: e.reason
|
|
132
|
-
})), 1)
|
|
133
|
-
]),
|
|
134
|
-
s("div", ie, [
|
|
135
|
-
s("time", {
|
|
136
|
-
datetime: e.updatedAt,
|
|
137
|
-
class: "text-[12px] text-fm-color-typo-tertiary tabular-nums"
|
|
138
|
-
}, r(c(o)("connect.whatsappBot.tickets.pausedSince", {
|
|
139
|
-
date: V(e.updatedAt)
|
|
140
|
-
})), 9, de),
|
|
141
|
-
g(N, {
|
|
142
|
-
variant: "secondary",
|
|
143
|
-
"prepend-icon": "check",
|
|
144
|
-
label: c(o)("connect.whatsappBot.tickets.resolve"),
|
|
145
|
-
"aria-label": c(o)("connect.whatsappBot.tickets.resolveCustomer", {
|
|
146
|
-
name: _(e)
|
|
147
|
-
}),
|
|
148
|
-
loading: i.value === e.id,
|
|
149
|
-
disabled: !!i.value,
|
|
150
|
-
onClick: (P) => j(e)
|
|
151
|
-
}, null, 8, ["label", "aria-label", "loading", "disabled", "onClick"])
|
|
152
|
-
])
|
|
153
|
-
]))), 128))
|
|
154
|
-
]))
|
|
155
|
-
], 64))
|
|
156
|
-
]);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
export {
|
|
161
|
-
he as default
|
|
162
|
-
};
|