@feedmepos/mf-connect 0.1.113-prod → 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/README.md +66 -1
- package/dist/{App-2J4yDonr.js → App-CIWTDYuZ.js} +700 -654
- package/dist/AuditLogs-BluLDXu9.js +2016 -0
- package/dist/{Bin-BU_hVuxJ.js → Bin-jS6pM4L3.js} +8 -8
- package/dist/Broadcast-DBqsSZ0S.js +306 -0
- package/dist/{CampaignAnalytic-DUUmFMvy.js → CampaignAnalytic-DJrjXD4H.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BZirReIy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CzwigRLi.js} +9 -9
- package/dist/{Card-DS2K_LFv.js → Card-B10nLilL.js} +25 -24
- package/dist/{Collections-BFdRdPHR.js → Collections-BN42A73p.js} +197 -185
- package/dist/{Credit-CODfiox3.js → Credit-0SS26HGE.js} +21 -20
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-B2T5G1hZ.js → DateRangeChip.vue_vue_type_script_setup_true_lang-B3wozBFs.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BRd5RVYe.js +4442 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-KvZebiOu.js → EffectSheet.vue_vue_type_style_index_0_lang-zV9dLCWp.js} +32 -32
- package/dist/{Experience-BGBWc8Ep.js → Experience-D7qPzsrc.js} +32 -31
- package/dist/{FileSaver.min-DJAN3Eu0.js → FileSaver.min-BKWoklMK.js} +1 -1
- package/dist/{Game-6yyn0uAd.js → Game-BoYMwfog.js} +19 -18
- package/dist/{GiftCardSetup-B096bTm0.js → GiftCardSetup-B87O0xzo.js} +75 -75
- package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-ChvUXdF-.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-B3uGbEFY.js} +7 -7
- package/dist/{Goals-Db2mwbRo.js → Goals-CVxf3xCA.js} +4 -4
- package/dist/Grab-mGL1Mue_.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-xdEzwMcS.js → ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js} +1 -1
- package/dist/{Index-580WNkG2.js → Index-Dptuy-6c.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BkAQXKNJ.js → LocationPicker.vue_vue_type_script_setup_true_lang-Cjc4UeKz.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CR6sSnx4.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bh0ari3f.js} +1 -1
- package/dist/{LoyaltyDashboard-Clr2aiUP.js → LoyaltyDashboard-BxhI6RAE.js} +15 -15
- package/dist/MainLayout-YfDxvZXl.js +4 -0
- package/dist/{MainLayout-_iCyT5mw.js → MainLayout.vue_vue_type_script_setup_true_lang-BgXpznbi.js} +5 -4
- package/dist/{Marketing-fq1wxANq.js → Marketing-C2cVJacf.js} +4 -4
- package/dist/MarketingMaterialEdit-DkOEy_L-.js +1037 -0
- package/dist/{Member-BfRy196y.js → Member-DufbKDOh.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BAR44Qcp.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CU8EmBxy.js} +43 -50
- package/dist/{MemberImportHistory-C4622Ivs.js → MemberImportHistory-DlFN-uQl.js} +7 -7
- package/dist/{MemberList-DqtsMN_N.js → MemberList-B344n8I4.js} +103 -105
- package/dist/{MemberTransactions-DsUoFg3z.js → MemberTransactions-BS7H640M.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CzFMUgXM.js → MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js} +4228 -4176
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-CVQYcuQ6.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-lY0jlyOG.js} +1 -1
- package/dist/{Mission-B0GO4LiM.js → Mission-D2ed_oKn.js} +22 -21
- package/dist/{Overview-XpJJmHqs.js → Overview-CLh_T6YY.js} +145 -144
- package/dist/{Overview-CVITimwN.js → Overview-DJa-hXDC.js} +23 -22
- package/dist/{Point-B7aCrMkI.js → Point-DAPeg1VD.js} +22 -21
- package/dist/{Promotion-DfVcuXHy.js → Promotion-CPPCMMFl.js} +137 -131
- package/dist/{Queue-BT7O2cvj.js → Queue-BcPwCRcM.js} +47 -46
- package/dist/{Record-CAc030dz.js → Record-C5XKn--g.js} +9 -9
- package/dist/{Review-CyXo4GTY.js → Review-Cc51luIv.js} +2 -2
- package/dist/ReviewFacebookCallback-BSGInFB8.js +225 -0
- package/dist/{ReviewGoogleCallback-BxiFOl0B.js → ReviewGoogleCallback-C1gY4vcP.js} +5 -5
- package/dist/{Reward-ChfNtdwX.js → Reward-k1R3hLiF.js} +29 -29
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CpQu_QBQ.js → RewardGroup.vue_vue_type_script_setup_true_lang-BGbbGVK4.js} +16 -15
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Coh3L11L.js +1923 -0
- package/dist/{Segment-H2zBDZeh.js → Segment-DsBnIvje.js} +290 -291
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B0jCJ-Xq.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CMKpvXN-.js} +31 -30
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DW_ViNZM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-LyAtRMs8.js} +4 -4
- package/dist/Setting-BRueNgc4.js +574 -0
- package/dist/{SettingAdvertisements-DPQHP3-B.js → SettingAdvertisements-BrVcQyhF.js} +12 -12
- package/dist/Settings-fOvXd29Z.js +286 -0
- package/dist/{Store-B2f5HVQc.js → Store-rrh2pIHH.js} +661 -654
- package/dist/{StoreRewards-QxfaEt9f.js → StoreRewards-D-jivVKr.js} +15 -15
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CvQXsZbH.js +1319 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js +7007 -0
- package/dist/{Tier-BSk4rBm8.js → Tier-DJiLtw3M.js} +2576 -687
- package/dist/{Title-CIzpB8TT.js → Title-s0bzA7yZ.js} +94 -92
- package/dist/{Transaction-BjxxNEHa.js → Transaction-CQ-CJ_eh.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BMutYxOU.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Bfy8SZH1.js} +26 -26
- package/dist/{Voucher-B2lFq21Y.js → Voucher-9vydRET7.js} +19 -19
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BWV631It.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Dq7veRL5.js} +16 -16
- package/dist/WhatsappAccount-D12Hvzfl.js +159 -0
- package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-BrZEDi6O.js +39 -0
- package/dist/WhatsappBot-o5b_0CnB.js +629 -0
- package/dist/WhatsappBotLogs-CK_V_iT5.js +372 -0
- package/dist/WhatsappBotSettings-BooibLUg.js +694 -0
- package/dist/WhatsappLayout-bOyNHGUI.js +21 -0
- package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-Cytrffdh.js +253 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BCoB0Fsa.js → ZodTextField.vue_vue_type_script_setup_true_lang-96t_eUzk.js} +2 -2
- package/dist/{app-DgFVWdhA.js → app-DV3e2LkD.js} +10610 -8223
- package/dist/app.js +4 -3
- package/dist/{base.export-B6Rojjek.js → base.export-DQUUtGmy.js} +2 -2
- package/dist/browser-BSAOEeIM.js +1478 -0
- package/dist/{business-C6ID0exl.js → business-BZ0boE-5.js} +1 -1
- package/dist/campaign-CsfFq2S-.js +400 -0
- package/dist/{campaign-BgSJXWdU.js → campaign-DMrtYWcs.js} +31 -25
- package/dist/{campaign.enum-CVvm0LMm.js → campaign.enum-Dx-Zo68Q.js} +3 -2
- package/dist/campaign.fn-C-CdNNdR.js +776 -0
- package/dist/{collectible.enum-DGQVW464.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/{collection.fn-dV4F8R-j.js → collection.fn-C-rryKSc.js} +2 -2
- package/dist/{currency-DlHi_3WN.js → currency-BOd9iVZV.js} +1 -1
- package/dist/duplicateCampaign-ey_rW0Bz.js +51 -0
- package/dist/{effect-BJgmiWY4.js → effect-BP6Hkxmj.js} +1 -1
- package/dist/{email-addresses-3GTx_xTh.js → email-addresses-CO61QAq0.js} +2 -2
- package/dist/feature-flag-Bq1SgbYC.js +868 -0
- package/dist/feature-flag-lvPP0ED-.js +50 -0
- package/dist/google-BQK68wbe.js +5 -0
- package/dist/{helper-BX0JQP06.js → helper-BRpts-M-.js} +1 -1
- package/dist/{index-BIpAzktM.js → index-03WIXl-H.js} +8 -7
- package/dist/{index-BeCKw7Y3.js → index-B0RavybO.js} +19 -6
- package/dist/{index-DeNbsrQx.js → index-BDNkoALK.js} +1 -1
- package/dist/{index-Bl5aHABH.js → index-BV5aPSYo.js} +11 -10
- package/dist/{index-Cnw0B8Lc.js → index-Bk20uvPY.js} +1 -1
- package/dist/index-Bn19rfby.js +14571 -0
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-nmw7_9ZE.js → index-Cj-eugzc.js} +1 -1
- package/dist/{index-uXgPJlic.js → index-CoROn5OA.js} +2700 -2613
- package/dist/{index-DdMVrWZy.js → index-CrBhcMaL.js} +8028 -10767
- package/dist/{index-2xed2K8D.js → index-CsBjAM3E.js} +4 -3
- package/dist/{index-CiFReW-F.js → index-D1t4_KaG.js} +1 -1
- package/dist/{index-DRNdJ_KC.js → index-D3wGTCWf.js} +8 -7
- package/dist/{index-CtBLnWVG.js → index-D41kjcrZ.js} +683 -581
- package/dist/{index-CNULhBPM.js → index-DIZLkVe0.js} +691 -230
- package/dist/{index-QaWLGgEC.js → index-DucKyzrD.js} +2 -2
- package/dist/{index-o2OQljHs.js → index-R5WS21OL.js} +4 -4
- package/dist/index-RwNlbTO8.js +115 -0
- package/dist/{index-R0qlOO6J.js → index-VYI0zWNC.js} +29 -15
- package/dist/index-ZRE89TKq.js +80 -0
- package/dist/{index-BHT6cvWA.js → index-_Cj-bsd_.js} +396 -232
- package/dist/{index-Y2Pu1YkB.js → index-mToWKHVs.js} +2 -2
- package/dist/{index.esm2017-Dum0onrS.js → index.esm2017-B_Sag8Pg.js} +209 -209
- package/dist/{loading-B2mSdkfy.js → loading-C5fVI0ry.js} +1 -1
- package/dist/{lodash-DtOypaKt.js → lodash-COo8_xCU.js} +1 -1
- package/dist/{member-import-C2pLnh44.js → member-import-I_pKwUfF.js} +6 -5
- package/dist/{membership-BWyBGF4n.js → membership-BgfH9Kva.js} +3 -3
- package/dist/{money-3lCCVCeP.js → money-Cr07YDlV.js} +1 -1
- package/dist/{number-zlqy2MLG.js → number-DFsj0dkh.js} +1 -1
- package/dist/objectid-Cu89BzwI.js +145 -0
- package/dist/{onboarding-BqD3B4M1.js → onboarding-DlkJCm-5.js} +25 -25
- package/dist/{onboardingSetup-CCQ90jg7.js → onboardingSetup-BEhVj613.js} +2 -2
- package/dist/{plugins-Bj3npYnL.js → plugins-CPTtiKqf.js} +3 -3
- package/dist/{MarketingMaterialEdit-0h7E0n5e.js → remy-icon-BhUGu2NI.js} +2 -1031
- package/dist/{reward-5dDuZEb7.js → reward-DqY0mQ_5.js} +1 -1
- package/dist/{rule-NqLeSyoO.js → rule-mJJ48eKw.js} +572 -492
- package/dist/style.css +1 -1
- package/dist/template-C1QftpDG.js +188 -0
- package/dist/{timezone-B0lkgvh-.js → timezone-BBgBHels.js} +1 -1
- package/dist/{transaction.fn-CACuVUBe.js → transaction.fn-Sr0hj3kY.js} +2 -2
- package/dist/{trigger-BKJwKTJx.js → trigger-PUP0mwKM.js} +8 -8
- package/dist/{useMarketingMaterialActions-DERvOmen.js → useMarketingMaterialActions-faslwaHd.js} +3 -3
- package/dist/{usePagination-FkjroUq2.js → usePagination-Be6nIQ9y.js} +1 -1
- package/dist/{user-H9MnsLbu.js → user-DBSYzG_9.js} +1 -1
- package/dist/vue-i18n-C6c2jsH3.js +2365 -0
- package/dist/{xlsx-BVmtIl_i.js → xlsx-Bfo19lFv.js} +786 -786
- package/dist/{zod-DI7OBdxu.js → zod-CihbDg3N.js} +1 -1
- package/package.json +12 -3
- package/dist/Broadcast-CoirZUyr.js +0 -271
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DyIOw_HH.js +0 -2431
- package/dist/ReviewFacebookCallback--IcyheQA.js +0 -238
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang--5K-qagY.js +0 -1883
- package/dist/Setting-D4XOHSHT.js +0 -2036
- package/dist/Settings-Dt_oLoGl.js +0 -179
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Db2cd6ny.js +0 -1264
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D9L-AayN.js +0 -142
- package/dist/campaign-DDfFBFye.js +0 -228
- package/dist/campaign.fn-DRabv93K.js +0 -776
- package/dist/google-C3S8u0mT.js +0 -4
- package/dist/index-CmhDYsk6.js +0 -51
- package/dist/objectid-b2KGvMA7.js +0 -145
- package/dist/rule-builder-BzYwbbj4.js +0 -102
- package/dist/template-fjUz6xrU.js +0 -236
- package/dist/vue-i18n-DbJO6sZW.js +0 -2365
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { defineComponent as J, ref as k, computed as E, onMounted as de, resolveComponent as u, openBlock as f, createBlock as B, withCtx as $, createElementVNode as t, createVNode as c, unref as e, isRef as Z, watch as ke, createElementBlock as V, toDisplayString as i, Fragment as R, renderList as G, createTextVNode as T, createCommentVNode as z } from "vue";
|
|
2
|
+
import { h as Ue } from "./moment-D7p2TMB-.js";
|
|
3
|
+
import { Z as ce } from "./zod-CihbDg3N.js";
|
|
4
|
+
import { useDialog as me } from "@feedmepos/ui-library";
|
|
5
|
+
import { u as Fe } from "./loading-C5fVI0ry.js";
|
|
6
|
+
import { u as Ae } from "./app-wDQR6dpb.js";
|
|
7
|
+
import { u as K, l as ue } from "./business-BZ0boE-5.js";
|
|
8
|
+
import { u as pe } from "./membership-BgfH9Kva.js";
|
|
9
|
+
import { P as Q } from "./index-CrBhcMaL.js";
|
|
10
|
+
import { m as Pe, b as Se } from "./index-_Cj-bsd_.js";
|
|
11
|
+
import { _ as $e } from "./ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js";
|
|
12
|
+
import { c as fe, p as Me, f as O } from "./plugins-CPTtiKqf.js";
|
|
13
|
+
import { b as Le } from "./browser-BSAOEeIM.js";
|
|
14
|
+
import { p as De, r as Ie, _ as Ee } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js";
|
|
15
|
+
import { u as ve } from "./vue-i18n-C6c2jsH3.js";
|
|
16
|
+
import { M as Te, b as Re } from "./MessageInput.vue_vue_type_script_setup_true_lang-CxDtXvwd.js";
|
|
17
|
+
import { useCoreStore as Be } from "@feedmepos/mf-common";
|
|
18
|
+
import { useRouter as Ne } from "vue-router";
|
|
19
|
+
import { R as He } from "./app-DV3e2LkD.js";
|
|
20
|
+
import { m as W } from "./index-B0RavybO.js";
|
|
21
|
+
import { S as re } from "./index-03WIXl-H.js";
|
|
22
|
+
import { o as Oe } from "./objectId-dwaoBfJX.js";
|
|
23
|
+
import { a as je } from "./object-BYyQ0PZp.js";
|
|
24
|
+
async function qe(v, x = 350) {
|
|
25
|
+
try {
|
|
26
|
+
return await Le.toDataURL(v, {
|
|
27
|
+
width: x,
|
|
28
|
+
margin: 0
|
|
29
|
+
});
|
|
30
|
+
} catch (g) {
|
|
31
|
+
console.error(g);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
var Xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
35
|
+
const ze = { class: "flex items-start" }, Qe = { class: "flex flex-col gap-16 mt-16" }, We = ["src"], Ye = /* @__PURE__ */ J({
|
|
36
|
+
__name: "LinkDeviceDialog",
|
|
37
|
+
setup(v) {
|
|
38
|
+
const x = K(), g = pe(), h = me(), p = k(), y = k(), U = Xe.crmUrl, b = k(), D = E(() => g.membership), o = E(() => {
|
|
39
|
+
var d, a;
|
|
40
|
+
return `https://${(d = D.value) != null && d.url ? D.value.url : (a = D.value) == null ? void 0 : a.business}.${U}`;
|
|
41
|
+
});
|
|
42
|
+
async function F(d) {
|
|
43
|
+
const a = await ue.getOtp(d);
|
|
44
|
+
return `${o.value}?link-device=${a.otp}`;
|
|
45
|
+
}
|
|
46
|
+
async function A(d) {
|
|
47
|
+
const a = await F(d);
|
|
48
|
+
b.value = a, p.value = await qe(a);
|
|
49
|
+
}
|
|
50
|
+
return de(async () => {
|
|
51
|
+
if (await x.readLocations(), !x.locations.length) {
|
|
52
|
+
h.close();
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const d = x.locations[0]._id;
|
|
56
|
+
y.value = d, await A(d);
|
|
57
|
+
}), (d, a) => {
|
|
58
|
+
const _ = u("FmIcon"), P = u("FmSelect"), w = u("FmButton"), n = u("FmCard");
|
|
59
|
+
return f(), B(n, { class: "p-24 max-w-[350px]" }, {
|
|
60
|
+
default: $(() => [
|
|
61
|
+
t("div", ze, [
|
|
62
|
+
a[3] || (a[3] = t("div", null, [
|
|
63
|
+
t("div", { class: "fm-typo-en-title-sm-800" }, "Link device"),
|
|
64
|
+
t("div", { class: "fm-typo-en-body-sm-400" }, " Open your camera on your device to link counter app. ")
|
|
65
|
+
], -1)),
|
|
66
|
+
c(_, {
|
|
67
|
+
name: "close",
|
|
68
|
+
onClick: a[0] || (a[0] = (S) => e(h).close()),
|
|
69
|
+
class: "cursor-pointer"
|
|
70
|
+
})
|
|
71
|
+
]),
|
|
72
|
+
t("div", Qe, [
|
|
73
|
+
c(P, {
|
|
74
|
+
modelValue: e(y),
|
|
75
|
+
"onUpdate:modelValue": [
|
|
76
|
+
a[1] || (a[1] = (S) => Z(y) ? y.value = S : null),
|
|
77
|
+
A
|
|
78
|
+
],
|
|
79
|
+
label: "Select Location",
|
|
80
|
+
items: e(x).locationItems.filter((S) => !!S.value)
|
|
81
|
+
}, null, 8, ["modelValue", "items"]),
|
|
82
|
+
t("img", {
|
|
83
|
+
src: e(p),
|
|
84
|
+
class: "aspect-square w-full"
|
|
85
|
+
}, null, 8, We),
|
|
86
|
+
c(w, {
|
|
87
|
+
class: "mx-auto",
|
|
88
|
+
variant: "plain",
|
|
89
|
+
icon: "content_copy",
|
|
90
|
+
onClick: a[2] || (a[2] = (S) => e(fe)(e(b)))
|
|
91
|
+
})
|
|
92
|
+
])
|
|
93
|
+
]),
|
|
94
|
+
_: 1
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}), Ze = { class: "space-y-4" }, Ge = { key: 0 }, Ke = { key: 1 }, Je = { key: 2 }, et = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, tt = /* @__PURE__ */ J({
|
|
99
|
+
__name: "AllowedPhoneCountriesSelect",
|
|
100
|
+
props: {
|
|
101
|
+
modelValue: {}
|
|
102
|
+
},
|
|
103
|
+
emits: ["update:modelValue"],
|
|
104
|
+
setup(v, { emit: x }) {
|
|
105
|
+
const { t: g } = ve(), h = v, p = x, y = [...new Set(Q.map((d) => d.phoneCode))], U = k(""), b = k(!1), D = E(() => {
|
|
106
|
+
const d = U.value.toLowerCase();
|
|
107
|
+
return Q.filter(
|
|
108
|
+
(a) => a.name.toLowerCase().includes(d) || a.phoneCode.toLowerCase().includes(d)
|
|
109
|
+
);
|
|
110
|
+
});
|
|
111
|
+
function o(d, a) {
|
|
112
|
+
const _ = d ? De([...h.modelValue || []], a) : Ie(h.modelValue || y, a);
|
|
113
|
+
p("update:modelValue", _);
|
|
114
|
+
}
|
|
115
|
+
const F = E(() => {
|
|
116
|
+
var _;
|
|
117
|
+
const a = ((_ = h.modelValue) == null ? void 0 : _.slice(0, 5).map(
|
|
118
|
+
(P) => {
|
|
119
|
+
var w;
|
|
120
|
+
return ((w = Q.find((n) => n.phoneCode === P)) == null ? void 0 : w.name) || P;
|
|
121
|
+
}
|
|
122
|
+
)) || [];
|
|
123
|
+
return h.modelValue && h.modelValue.length > 5 && a.push(`+${h.modelValue.length - 5} more`), a;
|
|
124
|
+
}), A = E(() => {
|
|
125
|
+
const d = h.modelValue;
|
|
126
|
+
return Array.isArray(d) && d.length === 0 ? g("connect.setting.allowedPhoneCountries.helper.noneAllowed") : d == null ? g("connect.setting.allowedPhoneCountries.helper.allAllowed") : g("connect.setting.allowedPhoneCountries.helper.selectedOnly");
|
|
127
|
+
});
|
|
128
|
+
return ke(b, (d) => {
|
|
129
|
+
d && (U.value = "");
|
|
130
|
+
}), (d, a) => {
|
|
131
|
+
const _ = u("FmChip"), P = u("FmField"), w = u("FmTextField"), n = u("FmCheckbox"), S = u("FmMenu");
|
|
132
|
+
return f(), V("div", Ze, [
|
|
133
|
+
c(S, {
|
|
134
|
+
modelValue: e(b),
|
|
135
|
+
"onUpdate:modelValue": a[2] || (a[2] = (m) => Z(b) ? b.value = m : null),
|
|
136
|
+
onMenuChanged: a[3] || (a[3] = (m) => b.value = m),
|
|
137
|
+
placement: "top-end"
|
|
138
|
+
}, {
|
|
139
|
+
"menu-button": $(() => [
|
|
140
|
+
c(P, {
|
|
141
|
+
"append-icon": e(b) ? "expand_more" : "expand_less",
|
|
142
|
+
class: "!h-auto"
|
|
143
|
+
}, {
|
|
144
|
+
default: $(() => [
|
|
145
|
+
v.modelValue ? v.modelValue.length ? (f(), V("div", Je, [
|
|
146
|
+
(f(!0), V(R, null, G(e(F), (m, I) => (f(), B(_, {
|
|
147
|
+
key: I,
|
|
148
|
+
label: m,
|
|
149
|
+
class: "max-w-[130px] text-ellipsis"
|
|
150
|
+
}, null, 8, ["label"]))), 128))
|
|
151
|
+
])) : (f(), V("div", Ke, i(e(g)("connect.setting.allowedPhoneCountries.noCountries")), 1)) : (f(), V("div", Ge, i(e(g)("connect.setting.allowedPhoneCountries.allCountries")), 1))
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}, 8, ["append-icon"])
|
|
155
|
+
]),
|
|
156
|
+
default: $(() => [
|
|
157
|
+
c(w, {
|
|
158
|
+
modelValue: e(U),
|
|
159
|
+
"onUpdate:modelValue": a[0] || (a[0] = (m) => Z(U) ? U.value = m : null),
|
|
160
|
+
placeholder: e(g)("connect.setting.allowedPhoneCountries.searchCountries"),
|
|
161
|
+
class: "my-8"
|
|
162
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
163
|
+
c(n, {
|
|
164
|
+
class: "my-8",
|
|
165
|
+
value: null,
|
|
166
|
+
indeterminate: v.modelValue != null && v.modelValue.length > 0 && v.modelValue.length < y.length,
|
|
167
|
+
label: e(g)("connect.setting.allowedPhoneCountries.allCountries"),
|
|
168
|
+
"model-value": v.modelValue == null || v.modelValue.length === y.length,
|
|
169
|
+
"onUpdate:modelValue": a[1] || (a[1] = (m) => p("update:modelValue", m ? null : []))
|
|
170
|
+
}, null, 8, ["indeterminate", "label", "model-value"]),
|
|
171
|
+
(f(!0), V(R, null, G(e(D), (m) => (f(), B(n, {
|
|
172
|
+
class: "my-8",
|
|
173
|
+
key: m.iso2,
|
|
174
|
+
value: m.phoneCode,
|
|
175
|
+
label: `${m.name} (${m.phoneCode})`,
|
|
176
|
+
"model-value": !v.modelValue || v.modelValue.includes(m.phoneCode),
|
|
177
|
+
"onUpdate:modelValue": (I) => o(I, m.phoneCode)
|
|
178
|
+
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
179
|
+
]),
|
|
180
|
+
_: 1
|
|
181
|
+
}, 8, ["modelValue"]),
|
|
182
|
+
t("div", et, i(e(A)), 1)
|
|
183
|
+
]);
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
var Y = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
188
|
+
const nt = { class: "hidden xs:!flex items-center justify-between px-16 py-12 border-b border-fm-color-neutral-gray-100" }, ot = { class: "fm-typo-en-title-md-800" }, lt = {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: "px-24 gap-32 grid grid-cols-3 xs:pt-16"
|
|
191
|
+
}, st = { class: "col-span-2 flex flex-col xs:col-span-3 space-y-8" }, at = { class: "fm-typo-en-title-sm-800" }, it = { class: "space-y-24" }, ct = { class: "space-y-8" }, rt = { class: "fm-typo-en-title-sm-800" }, dt = { class: "fm-typo-body-lg-400" }, mt = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, ut = { class: "fm-typo-body-md-400 text-fm-color-typo-secondary" }, pt = { class: "space-y-8" }, ft = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, vt = { class: "fm-typo-en-body-lg-600" }, gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, yt = { class: "space-y-8" }, ht = { class: "space-y-8" }, bt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, _t = { class: "space-y-8" }, wt = { class: "fm-typo-en-title-sm-800" }, Ct = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, xt = { class: "space-y-8" }, Vt = { class: "fm-typo-en-title-sm-800" }, kt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-error" }, Ut = { class: "space-y-8" }, Ft = { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, At = { class: "space-y-8" }, Pt = { class: "space-y-8" }, St = { class: "fm-typo-en-title-sm-800" }, $t = { class: "space-y-8" }, Mt = { class: "fm-typo-en-title-sm-800" }, Lt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Dt = { class: "flex justify-end pb-24" }, It = { class: "col-span-1 space-y-8 xs:hidden" }, Et = { class: "fm-typo-en-body-lg-600" }, Tt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Rt = { class: "fm-typo-en-body-lg-600" }, Bt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Nt = { class: "fm-typo-en-body-lg-600" }, Ht = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-lg-600" }, jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, qt = { class: "fm-typo-en-body-lg-600" }, vn = /* @__PURE__ */ J({
|
|
192
|
+
__name: "Setting",
|
|
193
|
+
setup(v) {
|
|
194
|
+
const x = Ne(), g = Ae(), h = Be(), p = K(), y = pe(), { global: U, minor: b } = Fe, D = me(), o = k(), F = k([]), A = k(null), d = Pe, a = [
|
|
195
|
+
(r) => !r || r.length >= 6 || "Invalid URL format, please enter at least 6 characters",
|
|
196
|
+
(r) => !r || new RegExp(/^[a-z0-9][a-z0-9\-]{4,}[a-z0-9]$/).test(r) || "Invalid URL format, url should start with a letter or number and can only include lowercase letters, numbers, or hyphens"
|
|
197
|
+
], _ = Y.appUrl, P = E(() => {
|
|
198
|
+
var r;
|
|
199
|
+
return `https://${(r = o.value) == null ? void 0 : r.business}.${_}/user?join=true`;
|
|
200
|
+
}), w = k(), { t: n } = ve(), S = h.currentCountry.value || "MY", m = [
|
|
201
|
+
"user.name",
|
|
202
|
+
"user.gender",
|
|
203
|
+
"user.birthday",
|
|
204
|
+
"user.phoneNumber",
|
|
205
|
+
"membership.url"
|
|
206
|
+
].filter(
|
|
207
|
+
(r) => {
|
|
208
|
+
var l;
|
|
209
|
+
return !((l = Te[S]) != null && l.includes(r));
|
|
210
|
+
}
|
|
211
|
+
), I = k(
|
|
212
|
+
n("connect.setting.sms.welcomeMessage")
|
|
213
|
+
);
|
|
214
|
+
async function ge() {
|
|
215
|
+
D.open({
|
|
216
|
+
title: "",
|
|
217
|
+
dialogComponent: Ye,
|
|
218
|
+
closeButton: !1
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
async function ye(r) {
|
|
222
|
+
await Me.remove(
|
|
223
|
+
"Are you sure you want to unlink this device?",
|
|
224
|
+
"Unlink device",
|
|
225
|
+
"Unlink"
|
|
226
|
+
) && await b(
|
|
227
|
+
async () => {
|
|
228
|
+
await ue.unregisterDevice(r), await p.readLocationDevices();
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
message: "Unlinking device",
|
|
232
|
+
successMessage: "Unlinked device successfully"
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
async function he() {
|
|
237
|
+
await b(
|
|
238
|
+
async () => {
|
|
239
|
+
var N;
|
|
240
|
+
const r = je(o.value);
|
|
241
|
+
console.log(o.value), r.welcomeMessage && !((N = r.welcomeMessage) != null && N.content) && (r.welcomeMessage.content = "Hi there, you have been invited to join our membership");
|
|
242
|
+
const l = Se.parse(r);
|
|
243
|
+
w.value === null && l.image ? await O.delete(O.coverImagePath()) : w.value && (l.image = await O.update(
|
|
244
|
+
O.coverImagePath(),
|
|
245
|
+
w.value
|
|
246
|
+
)), await W.update(l), await y.readMembership(), o.value = y.membership;
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
message: "Updating membership",
|
|
250
|
+
successMessage: "Membership updated successfully"
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
async function be() {
|
|
255
|
+
const r = await W.getEmailAddresses();
|
|
256
|
+
console.log(r), F.value = r, A.value = r.find((l) => l.default.includes("Marketing"));
|
|
257
|
+
}
|
|
258
|
+
async function _e() {
|
|
259
|
+
window.open(
|
|
260
|
+
`${Y.licensePortalUrl}business/${re.businessId}/settings`,
|
|
261
|
+
"_blank"
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
async function we() {
|
|
265
|
+
const r = `${Y.licensePortalUrl}settings?businessId=${re.businessId}`;
|
|
266
|
+
console.log("Opening", r), window.open(r, "_blank");
|
|
267
|
+
}
|
|
268
|
+
return de(async () => {
|
|
269
|
+
await U(async () => {
|
|
270
|
+
await p.readPremium(), await p.readLocations(), await p.readLocationDevices(), await y.readMembership(), await be(), o.value = y.membership;
|
|
271
|
+
try {
|
|
272
|
+
const { content: r } = await W.getDefaultWelcomeMessage();
|
|
273
|
+
r && (I.value = r);
|
|
274
|
+
} catch (r) {
|
|
275
|
+
console.error("Failed to load default welcome message", r);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}), (r, l) => {
|
|
279
|
+
var te, ne, oe, le, se, ae, ie;
|
|
280
|
+
const N = u("FmPageHead"), M = u("FmButton"), H = u("FmTextField"), j = u("FmCard"), ee = u("FmPill"), Ce = u("FmSelect"), q = u("FmSwitch"), xe = u("FmMenuDivider");
|
|
281
|
+
return f(), V(R, null, [
|
|
282
|
+
c(N, {
|
|
283
|
+
title: e(n)("connect.setting.title"),
|
|
284
|
+
class: "xs:hidden"
|
|
285
|
+
}, null, 8, ["title"]),
|
|
286
|
+
t("div", nt, [
|
|
287
|
+
t("div", ot, i(e(n)("connect.setting.basicInfo.title")), 1),
|
|
288
|
+
c(M, {
|
|
289
|
+
icon: "info",
|
|
290
|
+
variant: "tertiary"
|
|
291
|
+
})
|
|
292
|
+
]),
|
|
293
|
+
e(o) ? (f(), V("div", lt, [
|
|
294
|
+
t("div", st, [
|
|
295
|
+
t("div", at, i(e(n)("connect.setting.basicInfo.title")), 1),
|
|
296
|
+
t("div", it, [
|
|
297
|
+
c(H, {
|
|
298
|
+
label: e(n)("connect.setting.basicInfo.membershipTitle"),
|
|
299
|
+
modelValue: e(o).name,
|
|
300
|
+
"onUpdate:modelValue": l[0] || (l[0] = (s) => e(o).name = s)
|
|
301
|
+
}, null, 8, ["label", "modelValue"]),
|
|
302
|
+
c(H, {
|
|
303
|
+
disabled: !0,
|
|
304
|
+
"model-value": e(o).business,
|
|
305
|
+
rules: a,
|
|
306
|
+
required: !0,
|
|
307
|
+
label: e(n)("connect.setting.basicInfo.memberAppUrl"),
|
|
308
|
+
"helper-text": e(P),
|
|
309
|
+
placeholder: e(o).business.toString(),
|
|
310
|
+
"onUpdate:modelValue": l[2] || (l[2] = (s) => e(o).url = s)
|
|
311
|
+
}, {
|
|
312
|
+
prepend: $(() => [...l[15] || (l[15] = [
|
|
313
|
+
T(" https:// ", -1)
|
|
314
|
+
])]),
|
|
315
|
+
append: $(() => [
|
|
316
|
+
T(" ." + i(e(_)) + " ", 1),
|
|
317
|
+
c(M, {
|
|
318
|
+
icon: "content_copy",
|
|
319
|
+
variant: "tertiary",
|
|
320
|
+
onClick: l[1] || (l[1] = (s) => e(fe)(e(P)))
|
|
321
|
+
})
|
|
322
|
+
]),
|
|
323
|
+
_: 1
|
|
324
|
+
}, 8, ["model-value", "label", "helper-text", "placeholder"]),
|
|
325
|
+
c($e, {
|
|
326
|
+
label: "Cover image",
|
|
327
|
+
class: "w-2/3 xs:w-full",
|
|
328
|
+
"image-fit": "cover",
|
|
329
|
+
"aspect-ratio": "3/1",
|
|
330
|
+
thumbnail: e(o).image || void 0,
|
|
331
|
+
"onUpdate:file": l[3] || (l[3] = async (s) => {
|
|
332
|
+
w.value = s, s || (e(o).image = null);
|
|
333
|
+
})
|
|
334
|
+
}, null, 8, ["thumbnail"]),
|
|
335
|
+
t("div", ct, [
|
|
336
|
+
t("div", rt, i(e(n)("connect.setting.counterApp.title")), 1),
|
|
337
|
+
c(M, {
|
|
338
|
+
variant: "plain",
|
|
339
|
+
icon: "link",
|
|
340
|
+
label: e(n)("connect.setting.counterApp.linkDevice"),
|
|
341
|
+
onClick: ge
|
|
342
|
+
}, null, 8, ["label"]),
|
|
343
|
+
(f(!0), V(R, null, G(e(p).locationDevices, (s, C) => (f(), B(j, {
|
|
344
|
+
key: C,
|
|
345
|
+
variant: "outlined",
|
|
346
|
+
class: "flex items-center justify-between px-16 py-12"
|
|
347
|
+
}, {
|
|
348
|
+
default: $(() => [
|
|
349
|
+
t("div", null, [
|
|
350
|
+
t("p", dt, i(s.name || `Device ${s._id}`), 1),
|
|
351
|
+
t("p", mt, i(e(n)("connect.setting.counterApp.device.activationDate")) + " " + i(e(Ue)(e(Oe)(s._id.toString())).format(
|
|
352
|
+
"D MMM YYYY"
|
|
353
|
+
)), 1),
|
|
354
|
+
t("p", ut, i(e(n)("connect.setting.counterApp.device.linkedLocation")) + " " + i(e(p).locations.find((L) => L._id == s.location).name), 1)
|
|
355
|
+
]),
|
|
356
|
+
c(M, {
|
|
357
|
+
icon: "link_off",
|
|
358
|
+
variant: "tertiary",
|
|
359
|
+
onClick: (L) => ye(s._id)
|
|
360
|
+
}, null, 8, ["onClick"])
|
|
361
|
+
]),
|
|
362
|
+
_: 2
|
|
363
|
+
}, 1024))), 128))
|
|
364
|
+
]),
|
|
365
|
+
t("div", pt, [
|
|
366
|
+
t("div", ft, [
|
|
367
|
+
T(i(e(n)("connect.setting.advertisement.title")) + " ", 1),
|
|
368
|
+
c(ee, { variant: "premium" })
|
|
369
|
+
]),
|
|
370
|
+
c(j, {
|
|
371
|
+
variant: "outlined",
|
|
372
|
+
class: "p-16 flex items-center justify-between"
|
|
373
|
+
}, {
|
|
374
|
+
default: $(() => {
|
|
375
|
+
var s;
|
|
376
|
+
return [
|
|
377
|
+
t("div", null, [
|
|
378
|
+
t("div", vt, i(e(n)("connect.setting.advertisement.manageAd")), 1),
|
|
379
|
+
t("div", gt, i(e(n)("connect.setting.advertisement.activeAdsShowing", {
|
|
380
|
+
count: ((s = e(o).advertisements) == null ? void 0 : s.length) ?? 0
|
|
381
|
+
})), 1)
|
|
382
|
+
]),
|
|
383
|
+
c(M, {
|
|
384
|
+
label: e(n)("connect.setting.advertisement.manage"),
|
|
385
|
+
icon: "arrow_forward",
|
|
386
|
+
"icon-position": "right",
|
|
387
|
+
disabled: !e(p).isPremium,
|
|
388
|
+
onClick: l[4] || (l[4] = (C) => e(x).push({
|
|
389
|
+
name: e(He)["$connect-SETTING_ADVERTISEMENTS"]
|
|
390
|
+
}))
|
|
391
|
+
}, null, 8, ["label", "disabled"])
|
|
392
|
+
];
|
|
393
|
+
}),
|
|
394
|
+
_: 1
|
|
395
|
+
})
|
|
396
|
+
]),
|
|
397
|
+
t("div", yt, [
|
|
398
|
+
l[16] || (l[16] = t("div", { class: "fm-typo-en-title-sm-800" }, "SMS", -1)),
|
|
399
|
+
c(H, {
|
|
400
|
+
"model-value": ((te = e(o)) == null ? void 0 : te.brand) || "",
|
|
401
|
+
"max-length": 15,
|
|
402
|
+
label: e(n)("connect.setting.sms.brandName"),
|
|
403
|
+
"show-word-count": "",
|
|
404
|
+
"helper-text": e(n)("connect.setting.sms.messageFormat", {
|
|
405
|
+
brand: ((ne = e(o)) == null ? void 0 : ne.brand) || ""
|
|
406
|
+
}),
|
|
407
|
+
"onUpdate:modelValue": l[5] || (l[5] = (s) => e(o).brand = s)
|
|
408
|
+
}, null, 8, ["model-value", "label", "helper-text"]),
|
|
409
|
+
c(Re, {
|
|
410
|
+
modelValue: e(o).welcomeMessage,
|
|
411
|
+
"onUpdate:modelValue": l[6] || (l[6] = (s) => e(o).welcomeMessage = s),
|
|
412
|
+
"hide-credit-card": !0,
|
|
413
|
+
variables: e(m),
|
|
414
|
+
placeholder: e(I)
|
|
415
|
+
}, null, 8, ["modelValue", "variables", "placeholder"])
|
|
416
|
+
]),
|
|
417
|
+
t("div", ht, [
|
|
418
|
+
l[17] || (l[17] = t("div", { class: "fm-typo-en-title-sm-800" }, "Email", -1)),
|
|
419
|
+
t("div", bt, i(e(n)("connect.setting.email.description")), 1),
|
|
420
|
+
e(F).length ? z("", !0) : (f(), B(M, {
|
|
421
|
+
key: 0,
|
|
422
|
+
onClick: _e,
|
|
423
|
+
label: e(n)("connect.setting.email.addNewAddress")
|
|
424
|
+
}, null, 8, ["label"])),
|
|
425
|
+
e(F).length ? (f(), V(R, { key: 1 }, [
|
|
426
|
+
c(Ce, {
|
|
427
|
+
"model-value": ((le = (oe = e(o)) == null ? void 0 : oe.email) == null ? void 0 : le.from) || null,
|
|
428
|
+
label: e(n)("connect.setting.email.fromAddress"),
|
|
429
|
+
items: e(F).map((s) => ({
|
|
430
|
+
label: s.emailAddress,
|
|
431
|
+
value: s.emailAddress
|
|
432
|
+
})),
|
|
433
|
+
placeholder: e(A) ? e(A).emailAddress : e(n)("connect.setting.email.noAddressAvailable"),
|
|
434
|
+
"onUpdate:modelValue": l[7] || (l[7] = (s) => {
|
|
435
|
+
var C, L;
|
|
436
|
+
(C = e(o)) != null && C.email || (e(o).email = {
|
|
437
|
+
from: s,
|
|
438
|
+
name: (L = e(F).find((X) => X.emailAddress == s)) == null ? void 0 : L.name
|
|
439
|
+
}), e(o).email.from = s || null;
|
|
440
|
+
}),
|
|
441
|
+
rules: [e(ce).ruleAtPath(e(d), "email.from")]
|
|
442
|
+
}, null, 8, ["model-value", "label", "items", "placeholder", "rules"]),
|
|
443
|
+
c(H, {
|
|
444
|
+
"model-value": ((ae = (se = e(o)) == null ? void 0 : se.email) == null ? void 0 : ae.name) || null,
|
|
445
|
+
label: e(n)("connect.setting.email.senderName"),
|
|
446
|
+
disabled: "",
|
|
447
|
+
placeholder: ((ie = e(A)) == null ? void 0 : ie.name) || null,
|
|
448
|
+
"onUpdate:modelValue": l[8] || (l[8] = (s) => {
|
|
449
|
+
var C;
|
|
450
|
+
(C = e(o)) != null && C.email || (e(o).email = {
|
|
451
|
+
name: s
|
|
452
|
+
}), e(o).email.name = s || null;
|
|
453
|
+
}),
|
|
454
|
+
rules: [e(ce).ruleAtPath(e(d), "email.name")]
|
|
455
|
+
}, null, 8, ["model-value", "label", "placeholder", "rules"])
|
|
456
|
+
], 64)) : z("", !0)
|
|
457
|
+
]),
|
|
458
|
+
t("div", _t, [
|
|
459
|
+
t("div", wt, i(e(n)("connect.setting.whatsapp.title")), 1),
|
|
460
|
+
t("div", Ct, i(e(n)("connect.setting.whatsapp.description")), 1),
|
|
461
|
+
c(M, {
|
|
462
|
+
label: e(n)("connect.setting.whatsapp.manageChannel"),
|
|
463
|
+
icon: "open_in_new",
|
|
464
|
+
onClick: l[9] || (l[9] = (s) => we())
|
|
465
|
+
}, null, 8, ["label"])
|
|
466
|
+
]),
|
|
467
|
+
t("div", xt, [
|
|
468
|
+
t("div", Vt, [
|
|
469
|
+
T(i(e(n)("connect.setting.freeCredit.title")) + " ", 1),
|
|
470
|
+
t("span", kt, i(e(n)("connect.setting.freeCredit.posVersion")), 1)
|
|
471
|
+
]),
|
|
472
|
+
c(q, {
|
|
473
|
+
"model-value": e(o).freeCreditAsDiscount ?? !1,
|
|
474
|
+
"onUpdate:modelValue": l[10] || (l[10] = (s) => e(o).freeCreditAsDiscount = s),
|
|
475
|
+
label: e(n)("connect.setting.freeCredit.title"),
|
|
476
|
+
sublabel: e(n)("connect.setting.freeCredit.description"),
|
|
477
|
+
"label-placement": "right",
|
|
478
|
+
value: ""
|
|
479
|
+
}, null, 8, ["model-value", "label", "sublabel"])
|
|
480
|
+
]),
|
|
481
|
+
t("div", Ut, [
|
|
482
|
+
t("div", Ft, [
|
|
483
|
+
T(i(e(n)("connect.setting.memberCard.title")) + " ", 1),
|
|
484
|
+
c(ee, { variant: "premium" })
|
|
485
|
+
]),
|
|
486
|
+
c(q, {
|
|
487
|
+
"model-value": e(o).cardEnable ?? !1,
|
|
488
|
+
"onUpdate:modelValue": l[11] || (l[11] = (s) => e(o).cardEnable = s),
|
|
489
|
+
label: "",
|
|
490
|
+
sublabel: e(n)("connect.setting.memberCard.description"),
|
|
491
|
+
"label-placement": "right",
|
|
492
|
+
value: "",
|
|
493
|
+
disabled: !e(p).isPremium
|
|
494
|
+
}, null, 8, ["model-value", "sublabel", "disabled"])
|
|
495
|
+
]),
|
|
496
|
+
t("div", At, [
|
|
497
|
+
l[18] || (l[18] = t("div", { class: "fm-typo-en-title-sm-800 flex items-center gap-8" }, " Auto Revert Reward ", -1)),
|
|
498
|
+
c(q, {
|
|
499
|
+
"model-value": e(o).autoRevertReward ?? !1,
|
|
500
|
+
"onUpdate:modelValue": l[12] || (l[12] = (s) => e(o).autoRevertReward = s),
|
|
501
|
+
label: "",
|
|
502
|
+
sublabel: "When enabled, rewards are automatically revert when if a refund is processed in POS",
|
|
503
|
+
"label-placement": "right",
|
|
504
|
+
value: ""
|
|
505
|
+
}, null, 8, ["model-value"])
|
|
506
|
+
]),
|
|
507
|
+
t("div", Pt, [
|
|
508
|
+
t("div", St, i(e(n)("connect.setting.location.title")), 1),
|
|
509
|
+
c(Ee, {
|
|
510
|
+
label: e(n)("connect.setting.location.selectLabel"),
|
|
511
|
+
"model-value": e(o).targetLocation ?? null,
|
|
512
|
+
"onUpdate:modelValue": l[13] || (l[13] = (s) => e(o).targetLocation = s)
|
|
513
|
+
}, null, 8, ["label", "model-value"])
|
|
514
|
+
]),
|
|
515
|
+
t("div", $t, [
|
|
516
|
+
t("div", Mt, i(e(n)("connect.setting.allowedPhoneCountries.title")), 1),
|
|
517
|
+
t("div", Lt, i(e(n)("connect.setting.allowedPhoneCountries.description")), 1),
|
|
518
|
+
c(tt, {
|
|
519
|
+
modelValue: e(o).allowedPhoneCountries,
|
|
520
|
+
"onUpdate:modelValue": l[14] || (l[14] = (s) => e(o).allowedPhoneCountries = s)
|
|
521
|
+
}, null, 8, ["modelValue"])
|
|
522
|
+
]),
|
|
523
|
+
t("div", Dt, [
|
|
524
|
+
c(M, {
|
|
525
|
+
label: e(n)("connect.setting.action.update"),
|
|
526
|
+
type: "button",
|
|
527
|
+
onClick: he,
|
|
528
|
+
disabled: !!e(g).loadingQueue.length,
|
|
529
|
+
loading: !!e(g).loadingQueue.length
|
|
530
|
+
}, null, 8, ["label", "disabled", "loading"])
|
|
531
|
+
])
|
|
532
|
+
])
|
|
533
|
+
]),
|
|
534
|
+
t("div", It, [
|
|
535
|
+
c(j, {
|
|
536
|
+
variant: "outlined",
|
|
537
|
+
class: "flex flex-col p-24 gap-8"
|
|
538
|
+
}, {
|
|
539
|
+
default: $(() => {
|
|
540
|
+
var s, C, L;
|
|
541
|
+
return [
|
|
542
|
+
t("div", Et, i(e(n)("connect.setting.summary.title")), 1),
|
|
543
|
+
c(xe, { class: "my-4" }),
|
|
544
|
+
t("div", null, [
|
|
545
|
+
t("div", Tt, i(e(n)("connect.setting.summary.name")), 1),
|
|
546
|
+
t("div", Rt, i(e(o).name), 1)
|
|
547
|
+
]),
|
|
548
|
+
t("div", null, [
|
|
549
|
+
t("div", Bt, i(e(n)("connect.setting.summary.advertisement")), 1),
|
|
550
|
+
t("div", Nt, i((((s = e(o).advertisements) == null ? void 0 : s.length) ?? 0) || e(n)("connect.setting.summary.noAds")), 1)
|
|
551
|
+
]),
|
|
552
|
+
t("div", null, [
|
|
553
|
+
t("div", Ht, i(e(n)("connect.setting.summary.freeCredit")), 1),
|
|
554
|
+
t("div", Ot, i(e(o).freeCreditAsDiscount ? e(n)("connect.setting.summary.enabled") : e(n)("connect.setting.summary.disabled")), 1)
|
|
555
|
+
]),
|
|
556
|
+
t("div", null, [
|
|
557
|
+
t("div", jt, i(e(n)("connect.setting.summary.locations")), 1),
|
|
558
|
+
t("div", qt, i(!e(o).targetLocation || e(o).targetLocation.length == e(K)().locations.length ? e(n)("connect.setting.summary.allLocations") : (L = (C = e(o)) == null ? void 0 : C.targetLocation) == null ? void 0 : L.map(
|
|
559
|
+
(X) => e(p).locations.find((Ve) => Ve._id == X).name
|
|
560
|
+
).join(", ")), 1)
|
|
561
|
+
])
|
|
562
|
+
];
|
|
563
|
+
}),
|
|
564
|
+
_: 1
|
|
565
|
+
})
|
|
566
|
+
])
|
|
567
|
+
])) : z("", !0)
|
|
568
|
+
], 64);
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
});
|
|
572
|
+
export {
|
|
573
|
+
vn as default
|
|
574
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { defineComponent as J, ref as y, computed as z, onMounted as K, resolveComponent as A, openBlock as u, createElementBlock as b, createElementVNode as s, createVNode as d, createTextVNode as W, toDisplayString as v, unref as e, withCtx as k, createBlock as B, Fragment as Y, renderList as Z, createCommentVNode as N, isRef as ee } from "vue";
|
|
2
|
-
import { u as te } from "./loading-
|
|
2
|
+
import { u as te } from "./loading-C5fVI0ry.js";
|
|
3
3
|
import { u as ne } from "./app-wDQR6dpb.js";
|
|
4
|
-
import { u as se } from "./business-
|
|
5
|
-
import { u as oe } from "./membership-
|
|
6
|
-
import "./index-
|
|
7
|
-
import { b as ae } from "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { f as D, p as ie } from "./plugins-
|
|
11
|
-
import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { u as ce } from "./vue-i18n-
|
|
4
|
+
import { u as se } from "./business-BZ0boE-5.js";
|
|
5
|
+
import { u as oe } from "./membership-BgfH9Kva.js";
|
|
6
|
+
import "./index-CrBhcMaL.js";
|
|
7
|
+
import { b as ae } from "./index-_Cj-bsd_.js";
|
|
8
|
+
import "./index-BDNkoALK.js";
|
|
9
|
+
import { _ as le } from "./ImageInput.vue_vue_type_script_setup_true_lang-HipBZ1_T.js";
|
|
10
|
+
import { f as D, p as ie } from "./plugins-CPTtiKqf.js";
|
|
11
|
+
import { _ as re } from "./TargetLocationInput.vue_vue_type_script_setup_true_lang-DbnY9VE9.js";
|
|
12
|
+
import { u as ce } from "./vue-i18n-C6c2jsH3.js";
|
|
13
13
|
import { useRouter as de } from "vue-router";
|
|
14
|
-
import { m as me } from "./index-
|
|
15
|
-
import { R as ue } from "./app-
|
|
14
|
+
import { m as me } from "./index-B0RavybO.js";
|
|
15
|
+
import { R as ue } from "./app-DV3e2LkD.js";
|
|
16
16
|
import { a as ve } from "./object-BYyQ0PZp.js";
|
|
17
17
|
const pe = { class: "min-h-screen bg-fm-color-neutral-gray-50" }, fe = { class: "bg-white border-b border-fm-color-neutral-gray-100 sticky top-0 z-10" }, ge = { class: "px-24 py-16 flex items-center justify-between" }, _e = { class: "flex items-center gap-16" }, he = { class: "fm-typo-en-title-md-800 flex items-center gap-8" }, ye = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, be = {
|
|
18
18
|
key: 0,
|