@feedmepos/mf-connect 0.1.98-beta.3 → 0.1.98-beta.30
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-DEtGn29M.js → App-DUpK_Q7f.js} +808 -665
- package/dist/{AuditLogs-Mrm0iq9P.js → AuditLogs-DWYbj4lo.js} +9 -9
- package/dist/{Bin-D9Pu0L6h.js → Bin-DieOnDz0.js} +8 -8
- package/dist/{Broadcast-BZDQtN8x.js → Broadcast-UQ-vMYLl.js} +39 -36
- package/dist/CampaignAnalytic-CfvtyBoa.js +1656 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CuJWOZ3o.js} +6 -5
- package/dist/{Card-BdMSuxr4.js → Card-Te7LGbdC.js} +18 -18
- package/dist/{Collections-D2IOFKrJ.js → Collections-C-QeTQej.js} +14 -13
- package/dist/Credit-B459_0Nt.js +286 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Dp3i8kku.js} +34 -30
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js → EffectSheet.vue_vue_type_style_index_0_lang-XgrUL64F.js} +6 -6
- package/dist/{Experience-Dm5TDsKH.js → Experience-BUiwaqiZ.js} +112 -86
- package/dist/{FileSaver.min-G6JMp965.js → FileSaver.min-BBLnxnqN.js} +1 -1
- package/dist/Game-iOJbGiNe.js +356 -0
- package/dist/{Grab-BXfBhrCM.js → Grab-bC6BeXxc.js} +32 -31
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js → ImageInput.vue_vue_type_script_setup_true_lang-eiJJrTiu.js} +1 -1
- package/dist/{Index-DfPPobH8.js → Index-Utb2MWAQ.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js → LocationPicker.vue_vue_type_script_setup_true_lang-B7iWGh2L.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CppfUz1y.js} +1 -1
- package/dist/LoyaltyDashboard-BHSHnBpi.js +1345 -0
- package/dist/{MainLayout-DxAYEJg1.js → MainLayout-DMqkiGFT.js} +1 -1
- package/dist/{Marketing-CPQQG8Y9.js → Marketing-DGfDqW7v.js} +4 -4
- package/dist/{MarketingMaterialEdit-ssilnzNw.js → MarketingMaterialEdit-p5QBPd83.js} +6 -6
- package/dist/{Member-DmoUk3Dx.js → Member-C2KIOib-.js} +11 -11
- package/dist/{MemberList-Cm2BWPrW.js → MemberList-Esp9384f.js} +36 -35
- package/dist/{MemberTransactions-Cxr87RMl.js → MemberTransactions-CKYG04pY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js → MessageInput.vue_vue_type_script_setup_true_lang-CItc3B3N.js} +5434 -5279
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
- package/dist/Mission-BlckuFfz.js +360 -0
- package/dist/{Overview-CfigslHq.js → Overview-B5PSmDQr.js} +18 -18
- package/dist/Overview-suva6hd8.js +1104 -0
- package/dist/Point-CVexYech.js +288 -0
- package/dist/Promotion-VW7rqIn-.js +423 -0
- package/dist/{Queue-B7kxDPZV.js → Queue-Dh4C5OO9.js} +12 -12
- package/dist/{Record-BGULqygn.js → Record-CYGrQ_Cb.js} +9 -9
- package/dist/Review-mxbjxTB1.js +45 -0
- package/dist/ReviewFacebookCallback-C-pSgxeh.js +238 -0
- package/dist/ReviewGoogleCallback-CnNbGQdM.js +213 -0
- package/dist/{Reward-C0w5c1Th.js → Reward-CQ8AgV1m.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-DxaejEKe.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js → RuleGroup.vue_vue_type_script_setup_true_lang-CxHheatc.js} +16 -15
- package/dist/{Segment-I_p06AoA.js → Segment-Crm395ad.js} +39 -37
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js → SelectItems.vue_vue_type_script_setup_true_lang-CnA8A--R.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dd-mYmBN.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DgkPQA3H.js} +4 -4
- package/dist/{Setting-DOMSAMUz.js → Setting-AKRWf4zD.js} +40 -40
- package/dist/{SettingAdvertisements-IeGC6PHz.js → SettingAdvertisements-DD9U8S6N.js} +12 -12
- package/dist/Settings-D7c8sBA8.js +179 -0
- package/dist/{Store-DLzj0qGi.js → Store-BN3RP_u-.js} +21 -21
- package/dist/{StoreRewards-BPhAkGNl.js → StoreRewards-BXc96ZMM.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B76NSzNg.js} +190 -187
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DnhMV2aq.js} +2 -2
- package/dist/{Tier-7MveQA4f.js → Tier-Bbktc4H8.js} +36 -34
- package/dist/{Title-kyAzLGqm.js → Title-BU8pzF9c.js} +39 -37
- package/dist/{Transaction-Chl3d3Ai.js → Transaction-B3_M0MMz.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DtFoQXUu.js} +6 -6
- package/dist/{Voucher-CxIPPul5.js → Voucher-CJruHWmd.js} +156 -133
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DzIQ_1Nb.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js → ZodTextField.vue_vue_type_script_setup_true_lang-Lq5Z_Glg.js} +2 -2
- package/dist/{app-5YllsPJi.js → app-CmK_zWVU.js} +3356 -2864
- package/dist/app.js +1 -1
- package/dist/{business-C0zArPJj.js → business-Br3Sboxg.js} +1 -1
- package/dist/campaign-53KorSW_.js +100 -0
- package/dist/{campaign-BHl5a5Z1.js → campaign-Dz57HOfP.js} +74 -96
- package/dist/{campaign.enum-CHWTkc9k.js → campaign.enum-Dx-Zo68Q.js} +1 -1
- package/dist/{campaign.fn-BtwnAETQ.js → campaign.fn-D-J5-IK0.js} +127 -127
- package/dist/{collectible.enum-BvoISTK3.js → collectible.enum-Liy2wH3s.js} +1 -1
- package/dist/collection.fn-cEP4Vjv6.js +26 -0
- package/dist/{duplicateCampaign-C27ikU2f.js → duplicateCampaign-bBnEmbXg.js} +2 -2
- package/dist/{effect-CARgKjhU.js → effect-RQs_nrvo.js} +1 -1
- package/dist/{email-addresses-CnTsfZHe.js → email-addresses-CAX-uL1B.js} +2 -2
- package/dist/{export-CO8-3Ob9.js → export-DSgRDjwv.js} +3 -3
- package/dist/google-C3S8u0mT.js +4 -0
- package/dist/{helper-C617AZcV.js → helper-DlEUDhaf.js} +1 -1
- package/dist/{index-CMfyVF2h.js → index-BA0GllA8.js} +105 -123
- package/dist/index-BHdJaRRQ.js +146 -0
- package/dist/{index-9AxeGyVh.js → index-BpXYj8xl.js} +272 -369
- package/dist/index-C8cXXcLk.js +45 -0
- package/dist/{index-Da8trM3D.js → index-CBvgQWbo.js} +1 -1
- package/dist/{index-gPrU9b68.js → index-CHmtKN0J.js} +8027 -10766
- package/dist/{index-hKv7PcTR.js → index-CJ0Ofs8g.js} +1 -1
- package/dist/{index-CFO8nwbC.js → index-CQ40sF6g.js} +8 -7
- package/dist/index-C_H8jFYf.js +2743 -0
- package/dist/{index-DMvP3cOz.js → index-CbBnibrX.js} +184 -210
- package/dist/{index-DIcwj1r2.js → index-Cm4hBY6K.js} +1 -1
- package/dist/{index-CtXx42Yb.js → index-D3obFXMZ.js} +1 -1
- package/dist/{index-B0BE7PIS.js → index-DJQCoy-g.js} +1 -1
- package/dist/{index-DNf6qgpV.js → index-DansV6RZ.js} +2 -2
- package/dist/{index-wL9aIsub.js → index-Dpyep_-G.js} +587 -578
- package/dist/{index-B2ZvboNZ.js → index-ZFdRmzK7.js} +1 -1
- package/dist/{index-CEJgFylS.js → index-fVWfEBZV.js} +26 -17
- package/dist/{index.esm2017-BFgbXDc8.js → index.esm2017-GDYw3ujs.js} +105 -105
- package/dist/{loading-BxpiUNaf.js → loading-CevzAqpQ.js} +1 -1
- package/dist/{lodash-rPOvq9te.js → lodash-CcmP-ZWD.js} +1 -1
- package/dist/{membership-lfX5TNVQ.js → membership-CP-ZGC-Y.js} +3 -3
- package/dist/{money-CuUoYzPn.js → money-B_CYilsX.js} +1 -1
- package/dist/{number-DMk8hvKt.js → number-CqWVPhp0.js} +1 -1
- package/dist/objectid-DkTaCd6K.js +145 -0
- package/dist/{plugins-CyYjHO_X.js → plugins-Br271boW.js} +3 -3
- package/dist/{reward-BxwaSc-X.js → reward-CKQRdG-H.js} +1 -1
- package/dist/{rule-76SluGaP.js → rule-D0Rv4CuV.js} +3 -3
- package/dist/rule-builder-BUn6UMwW.js +126 -0
- package/dist/{template-ByceGw-A.js → template-D5GB4cAl.js} +6 -6
- package/dist/timezone-DqRsL54X.js +20 -0
- package/dist/{trigger-CxM5x3Sj.js → trigger-Ci92pTJU.js} +5 -5
- package/dist/{useMarketingMaterialActions-CHXVZ61f.js → useMarketingMaterialActions-C_mu-ac8.js} +3 -3
- package/dist/{usePagination-BKfoMHBB.js → usePagination-CWQ2WXiM.js} +1 -1
- package/dist/{user-Cqjv0IpD.js → user-CeAfYeZW.js} +1 -1
- package/dist/{vue-i18n-Q-nKu_E3.js → vue-i18n-P_SZNhrt.js} +419 -419
- package/dist/{xlsx-D1LobU8O.js → xlsx-CTo0cmDn.js} +1 -1
- package/dist/{zod-B5vUvKbD.js → zod-CPa57Pxb.js} +1 -1
- package/package.json +3 -3
- package/dist/Credit-BWyLeJpj.js +0 -260
- package/dist/Game-BB81nS7Y.js +0 -330
- package/dist/LoyaltyDashboard-BWC3rDDk.js +0 -1082
- package/dist/Mission-ChWPNxbI.js +0 -334
- package/dist/Point-Ko81Ny1q.js +0 -262
- package/dist/Promotion-CfyscRNN.js +0 -397
- package/dist/Review-C7Nx6a5t.js +0 -959
- package/dist/ReviewFacebookCallback-DKmL0TYZ.js +0 -243
- package/dist/ReviewGoogleCallback-C6iFFEfS.js +0 -208
- package/dist/campaign-C_49MeEc.js +0 -219
- package/dist/objectid-VPzb0Etb.js +0 -145
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, computed as T, openBlock as d, createElementBlock as g, normalizeClass as z, createElementVNode as m, createBlock as C, unref as e, toDisplayString as k, createCommentVNode as $, createVNode as v, onMounted as B, ref as P, Fragment as E, renderList as N, resolveComponent as R, isRef as U } from "vue";
|
|
2
|
-
import { u as M } from "./vue-i18n-Q-nKu_E3.js";
|
|
3
|
-
import { components as x } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as L } from "./index-CEJgFylS.js";
|
|
5
|
-
import { u as V } from "./business-C0zArPJj.js";
|
|
6
|
-
import { _ as A } from "./LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js";
|
|
7
|
-
import { useRouter as H } from "vue-router";
|
|
8
|
-
const D = ["src"], q = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, G = {
|
|
9
|
-
key: 2,
|
|
10
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
-
}, J = /* @__PURE__ */ S({
|
|
12
|
-
__name: "FacebookPageConfig",
|
|
13
|
-
props: {
|
|
14
|
-
page: {},
|
|
15
|
-
expanded: { type: Boolean },
|
|
16
|
-
availableLocations: {}
|
|
17
|
-
},
|
|
18
|
-
emits: ["toggleExpand", "toggleLocation"],
|
|
19
|
-
setup(c, { emit: n }) {
|
|
20
|
-
const b = c, i = n, { t: h } = M(), f = T(
|
|
21
|
-
() => b.page.locations.map((_) => _._id)
|
|
22
|
-
);
|
|
23
|
-
return (_, l) => (d(), g("div", {
|
|
24
|
-
class: z([
|
|
25
|
-
"rounded-lg border overflow-hidden transition-colors",
|
|
26
|
-
c.expanded ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
27
|
-
])
|
|
28
|
-
}, [
|
|
29
|
-
m("button", {
|
|
30
|
-
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
31
|
-
onClick: l[0] || (l[0] = (w) => i("toggleExpand"))
|
|
32
|
-
}, [
|
|
33
|
-
c.page.pageProfileImageUrl ? (d(), g("img", {
|
|
34
|
-
key: 0,
|
|
35
|
-
src: c.page.pageProfileImageUrl,
|
|
36
|
-
class: "w-32 h-32 rounded-full shrink-0 object-cover"
|
|
37
|
-
}, null, 8, D)) : (d(), C(e(x).FmIcon, {
|
|
38
|
-
key: 1,
|
|
39
|
-
name: "thumb_up",
|
|
40
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
41
|
-
})),
|
|
42
|
-
m("span", q, k(c.page.pageName), 1),
|
|
43
|
-
c.page.locations.length > 0 ? (d(), g("span", G, k(e(h)("connect.review.locationsSelected", c.page.locations.length)), 1)) : $("", !0),
|
|
44
|
-
v(e(x).FmIcon, {
|
|
45
|
-
name: c.expanded ? "expand_less" : "expand_more",
|
|
46
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
47
|
-
}, null, 8, ["name"])
|
|
48
|
-
]),
|
|
49
|
-
c.expanded ? (d(), C(A, {
|
|
50
|
-
key: 0,
|
|
51
|
-
locations: c.availableLocations,
|
|
52
|
-
"selected-ids": e(f),
|
|
53
|
-
onToggle: l[1] || (l[1] = (w) => i("toggleLocation", w))
|
|
54
|
-
}, null, 8, ["locations", "selected-ids"])) : $("", !0)
|
|
55
|
-
], 2));
|
|
56
|
-
}
|
|
57
|
-
}), K = { class: "flex flex-col gap-8" }, O = /* @__PURE__ */ S({
|
|
58
|
-
__name: "FacebookPageLocationMapping",
|
|
59
|
-
props: {
|
|
60
|
-
pages: {}
|
|
61
|
-
},
|
|
62
|
-
emits: ["update:pages"],
|
|
63
|
-
setup(c, { emit: n }) {
|
|
64
|
-
const b = c, i = V();
|
|
65
|
-
B(() => i.readLocations());
|
|
66
|
-
const h = n, f = P(null), _ = T(() => {
|
|
67
|
-
const r = /* @__PURE__ */ new Set();
|
|
68
|
-
for (const p of b.pages)
|
|
69
|
-
p.locations.forEach((a) => r.add(a._id));
|
|
70
|
-
return r;
|
|
71
|
-
});
|
|
72
|
-
function l(r) {
|
|
73
|
-
const p = new Set(r.locations.map((a) => a._id));
|
|
74
|
-
return i.locations.filter((a) => {
|
|
75
|
-
const t = a._id.toString();
|
|
76
|
-
return !_.value.has(t) || p.has(t);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
function w(r, p) {
|
|
80
|
-
const a = p._id.toString(), t = b.pages.map((o) => {
|
|
81
|
-
if (o.facebookPageId !== r) return o;
|
|
82
|
-
const u = o.locations.some(
|
|
83
|
-
(s) => s._id === a
|
|
84
|
-
);
|
|
85
|
-
return {
|
|
86
|
-
...o,
|
|
87
|
-
locations: u ? o.locations.filter((s) => s._id !== a) : [
|
|
88
|
-
...o.locations,
|
|
89
|
-
{
|
|
90
|
-
_id: a,
|
|
91
|
-
name: p.name
|
|
92
|
-
}
|
|
93
|
-
]
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
h("update:pages", t);
|
|
97
|
-
}
|
|
98
|
-
function I(r) {
|
|
99
|
-
f.value = f.value === r ? null : r;
|
|
100
|
-
}
|
|
101
|
-
return (r, p) => (d(), g("div", K, [
|
|
102
|
-
(d(!0), g(E, null, N(c.pages, (a) => (d(), C(J, {
|
|
103
|
-
key: a.facebookPageId,
|
|
104
|
-
page: a,
|
|
105
|
-
expanded: e(f) === a.facebookPageId,
|
|
106
|
-
"available-locations": l(a),
|
|
107
|
-
onToggleExpand: (t) => I(a.facebookPageId),
|
|
108
|
-
onToggleLocation: (t) => w(a.facebookPageId, t)
|
|
109
|
-
}, null, 8, ["page", "expanded", "available-locations", "onToggleExpand", "onToggleLocation"]))), 128))
|
|
110
|
-
]));
|
|
111
|
-
}
|
|
112
|
-
}), Q = { class: "flex flex-col min-h-full gap-16 p-24" }, W = {
|
|
113
|
-
key: 0,
|
|
114
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
115
|
-
}, X = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Y = {
|
|
116
|
-
key: 1,
|
|
117
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
118
|
-
}, Z = { class: "fm-typo-en-body-lg-600" }, ee = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, oe = {
|
|
119
|
-
key: 2,
|
|
120
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
121
|
-
}, te = { class: "fm-typo-en-body-lg-600" }, ne = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, ae = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, ge = /* @__PURE__ */ S({
|
|
122
|
-
__name: "ReviewFacebookCallback",
|
|
123
|
-
setup(c) {
|
|
124
|
-
const { t: n } = M(), b = H(), i = P([]), h = P(!1), f = P(!1), _ = P(!1), l = P(null), w = T(
|
|
125
|
-
() => i.value.some((t) => t.locations.length > 0)
|
|
126
|
-
);
|
|
127
|
-
function I(t, o) {
|
|
128
|
-
const u = new Map(
|
|
129
|
-
o.map((s) => [s.facebookPageId, s])
|
|
130
|
-
);
|
|
131
|
-
return t.map((s) => {
|
|
132
|
-
var y;
|
|
133
|
-
return {
|
|
134
|
-
...s,
|
|
135
|
-
locations: ((y = u.get(s.facebookPageId)) == null ? void 0 : y.locations) ?? []
|
|
136
|
-
};
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
function r(t, o) {
|
|
140
|
-
return t instanceof Error ? t.message : o;
|
|
141
|
-
}
|
|
142
|
-
async function p() {
|
|
143
|
-
var s;
|
|
144
|
-
const t = window.location.hash;
|
|
145
|
-
if (!t) {
|
|
146
|
-
l.value = n("connect.review.noToken");
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
const u = new URLSearchParams(t.slice(1)).get("access_token");
|
|
150
|
-
if (!u) {
|
|
151
|
-
l.value = n("connect.review.noToken");
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
h.value = !0;
|
|
155
|
-
try {
|
|
156
|
-
const y = await L.getSource(), j = ((s = y == null ? void 0 : y.facebook) == null ? void 0 : s.pages) ?? [], F = await L.connectFacebook(u);
|
|
157
|
-
i.value = I((F == null ? void 0 : F.pages) ?? [], j), i.value.length === 0 && (l.value = n("connect.review.facebook.noPages"));
|
|
158
|
-
} catch (y) {
|
|
159
|
-
l.value = r(y, n("connect.review.facebook.failed"));
|
|
160
|
-
} finally {
|
|
161
|
-
h.value = !1;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
async function a() {
|
|
165
|
-
const t = i.value.filter((o) => o.locations.length > 0).map((o) => ({
|
|
166
|
-
facebookPageId: o.facebookPageId,
|
|
167
|
-
locationIds: o.locations.map((u) => u._id)
|
|
168
|
-
}));
|
|
169
|
-
if (t.length === 0) {
|
|
170
|
-
l.value = n("connect.review.noMappings");
|
|
171
|
-
return;
|
|
172
|
-
}
|
|
173
|
-
f.value = !0;
|
|
174
|
-
try {
|
|
175
|
-
await L.updateFacebookPages(t), _.value = !0, setTimeout(() => b.replace("/review"), 2e3);
|
|
176
|
-
} catch (o) {
|
|
177
|
-
l.value = r(o, n("connect.review.facebook.failed"));
|
|
178
|
-
} finally {
|
|
179
|
-
f.value = !1;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return B(p), (t, o) => {
|
|
183
|
-
const u = R("FmPageHead");
|
|
184
|
-
return d(), g(E, null, [
|
|
185
|
-
v(u, {
|
|
186
|
-
title: e(n)("connect.navigation.review")
|
|
187
|
-
}, null, 8, ["title"]),
|
|
188
|
-
m("div", Q, [
|
|
189
|
-
e(h) ? (d(), g("div", W, [
|
|
190
|
-
v(e(x).FmIcon, {
|
|
191
|
-
name: "sync",
|
|
192
|
-
size: "xl",
|
|
193
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
194
|
-
}),
|
|
195
|
-
m("p", X, k(e(n)("connect.review.facebook.fetching")), 1)
|
|
196
|
-
])) : e(_) ? (d(), g("div", Y, [
|
|
197
|
-
v(e(x).FmIcon, {
|
|
198
|
-
name: "check_circle",
|
|
199
|
-
size: "xl",
|
|
200
|
-
class: "text-fm-color-typo-success"
|
|
201
|
-
}),
|
|
202
|
-
m("p", Z, k(e(n)("connect.review.facebook.success")), 1),
|
|
203
|
-
m("p", ee, k(e(n)("connect.review.redirecting")), 1)
|
|
204
|
-
])) : e(l) ? (d(), g("div", oe, [
|
|
205
|
-
v(e(x).FmIcon, {
|
|
206
|
-
name: "error",
|
|
207
|
-
size: "xl",
|
|
208
|
-
class: "text-fm-color-system-error-500"
|
|
209
|
-
}),
|
|
210
|
-
m("p", te, k(e(n)("connect.review.errorTitle")), 1),
|
|
211
|
-
m("p", ne, k(e(l)), 1),
|
|
212
|
-
v(e(x).FmButton, {
|
|
213
|
-
label: e(n)("connect.review.goBack"),
|
|
214
|
-
onClick: o[0] || (o[0] = (s) => e(b).replace("/review"))
|
|
215
|
-
}, null, 8, ["label"])
|
|
216
|
-
])) : e(i).length > 0 ? (d(), g(E, { key: 3 }, [
|
|
217
|
-
m("p", ae, k(e(n)("connect.review.facebook.selectPage")), 1),
|
|
218
|
-
v(O, {
|
|
219
|
-
pages: e(i),
|
|
220
|
-
"onUpdate:pages": o[1] || (o[1] = (s) => U(i) ? i.value = s : null)
|
|
221
|
-
}, null, 8, ["pages"]),
|
|
222
|
-
m("div", se, [
|
|
223
|
-
v(e(x).FmButton, {
|
|
224
|
-
variant: "outlined",
|
|
225
|
-
label: e(n)("connect.review.cancel"),
|
|
226
|
-
onClick: o[2] || (o[2] = (s) => e(b).replace("/review"))
|
|
227
|
-
}, null, 8, ["label"]),
|
|
228
|
-
v(e(x).FmButton, {
|
|
229
|
-
label: e(n)("connect.review.connect"),
|
|
230
|
-
disabled: !e(w),
|
|
231
|
-
loading: e(f),
|
|
232
|
-
onClick: a
|
|
233
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
234
|
-
])
|
|
235
|
-
], 64)) : $("", !0)
|
|
236
|
-
])
|
|
237
|
-
], 64);
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
export {
|
|
242
|
-
ge as default
|
|
243
|
-
};
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { defineComponent as S, onMounted as B, ref as h, computed as T, openBlock as d, createElementBlock as v, Fragment as F, renderList as z, normalizeClass as G, unref as e, createElementVNode as m, createVNode as u, toDisplayString as y, createCommentVNode as $, createBlock as P, resolveComponent as R, isRef as U } from "vue";
|
|
2
|
-
import { u as V } from "./vue-i18n-Q-nKu_E3.js";
|
|
3
|
-
import { components as _ } from "@feedmepos/ui-library";
|
|
4
|
-
import { r as C } from "./index-CEJgFylS.js";
|
|
5
|
-
import { u as A } from "./business-C0zArPJj.js";
|
|
6
|
-
import { _ as H } from "./LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js";
|
|
7
|
-
import { useRouter as D } from "vue-router";
|
|
8
|
-
const q = { class: "flex flex-col gap-8" }, J = ["onClick"], K = { class: "fm-typo-en-body-md-600 flex-1 truncate" }, O = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "fm-typo-en-body-sm-400 text-fm-color-primary-500 shrink-0"
|
|
11
|
-
}, Q = /* @__PURE__ */ S({
|
|
12
|
-
__name: "GoogleLocationMapping",
|
|
13
|
-
props: {
|
|
14
|
-
locations: {}
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:locations"],
|
|
17
|
-
setup(N, { emit: a }) {
|
|
18
|
-
const x = N, i = a, w = A();
|
|
19
|
-
B(() => w.readLocations());
|
|
20
|
-
const g = h(null), b = T(() => {
|
|
21
|
-
const s = /* @__PURE__ */ new Set();
|
|
22
|
-
for (const r of x.locations)
|
|
23
|
-
r.locationId && s.add(r.locationId);
|
|
24
|
-
return s;
|
|
25
|
-
});
|
|
26
|
-
function f(s) {
|
|
27
|
-
return w.locations.filter((r) => {
|
|
28
|
-
const t = r._id.toString();
|
|
29
|
-
return !b.value.has(t) || s.locationId === t;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function k(s, r) {
|
|
33
|
-
const t = r._id.toString(), n = x.locations.map((o) => {
|
|
34
|
-
if (o.googleLocationName !== s) return o;
|
|
35
|
-
const p = o.locationId === t;
|
|
36
|
-
return {
|
|
37
|
-
...o,
|
|
38
|
-
locationId: p ? null : t,
|
|
39
|
-
locationName: p ? null : r.name
|
|
40
|
-
};
|
|
41
|
-
});
|
|
42
|
-
i("update:locations", n);
|
|
43
|
-
}
|
|
44
|
-
function L(s) {
|
|
45
|
-
g.value = g.value === s ? null : s;
|
|
46
|
-
}
|
|
47
|
-
return (s, r) => (d(), v("div", q, [
|
|
48
|
-
(d(!0), v(F, null, z(N.locations, (t) => (d(), v("div", {
|
|
49
|
-
key: t.googleLocationName,
|
|
50
|
-
class: G([
|
|
51
|
-
"rounded-lg border overflow-hidden transition-colors",
|
|
52
|
-
e(g) === t.googleLocationName ? "border-fm-color-primary-500" : "border-fm-color-neutral-gray-200"
|
|
53
|
-
])
|
|
54
|
-
}, [
|
|
55
|
-
m("button", {
|
|
56
|
-
class: "w-full flex items-center gap-12 p-16 bg-white text-left hover:bg-fm-color-neutral-gray-50 transition-colors",
|
|
57
|
-
onClick: (n) => L(t.googleLocationName)
|
|
58
|
-
}, [
|
|
59
|
-
u(e(_).FmIcon, {
|
|
60
|
-
name: "storefront",
|
|
61
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
62
|
-
}),
|
|
63
|
-
m("span", K, y(t.displayName || t.googleLocationName), 1),
|
|
64
|
-
t.locationName ? (d(), v("span", O, y(t.locationName), 1)) : $("", !0),
|
|
65
|
-
u(e(_).FmIcon, {
|
|
66
|
-
name: e(g) === t.googleLocationName ? "expand_less" : "expand_more",
|
|
67
|
-
class: "text-fm-color-neutral-gray-400 shrink-0"
|
|
68
|
-
}, null, 8, ["name"])
|
|
69
|
-
], 8, J),
|
|
70
|
-
e(g) === t.googleLocationName ? (d(), P(H, {
|
|
71
|
-
key: 0,
|
|
72
|
-
locations: f(t),
|
|
73
|
-
"selected-ids": t.locationId ? [t.locationId] : [],
|
|
74
|
-
onToggle: (n) => k(t.googleLocationName, n)
|
|
75
|
-
}, null, 8, ["locations", "selected-ids", "onToggle"])) : $("", !0)
|
|
76
|
-
], 2))), 128))
|
|
77
|
-
]));
|
|
78
|
-
}
|
|
79
|
-
}), W = { class: "flex flex-col min-h-full gap-16 p-24" }, X = {
|
|
80
|
-
key: 0,
|
|
81
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
82
|
-
}, Y = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, Z = {
|
|
83
|
-
key: 1,
|
|
84
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
85
|
-
}, ee = { class: "fm-typo-en-body-lg-600" }, oe = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, te = {
|
|
86
|
-
key: 2,
|
|
87
|
-
class: "flex flex-col items-center justify-center flex-1 gap-16"
|
|
88
|
-
}, ne = { class: "fm-typo-en-body-lg-600" }, ae = { class: "fm-typo-en-body-md-400 text-fm-color-neutral-gray-400" }, le = { class: "fm-typo-en-body-lg-600" }, se = { class: "flex gap-8 justify-end mt-auto pt-8" }, fe = /* @__PURE__ */ S({
|
|
89
|
-
__name: "ReviewGoogleCallback",
|
|
90
|
-
setup(N) {
|
|
91
|
-
const { t: a } = V(), x = D(), i = h([]), w = h(!1), g = h(!1), b = h(!1), f = h(null), k = T(
|
|
92
|
-
() => i.value.some((n) => n.locationId !== null)
|
|
93
|
-
);
|
|
94
|
-
function L(n, o) {
|
|
95
|
-
return n instanceof Error ? n.message : o;
|
|
96
|
-
}
|
|
97
|
-
function s(n, o) {
|
|
98
|
-
const p = new Map(
|
|
99
|
-
o.map((l) => [l.googleLocationName, l.location])
|
|
100
|
-
);
|
|
101
|
-
return n.map((l) => {
|
|
102
|
-
const c = p.get(l.googleLocationName) ?? null;
|
|
103
|
-
return {
|
|
104
|
-
googleLocationName: l.googleLocationName,
|
|
105
|
-
displayName: l.displayName,
|
|
106
|
-
locationId: (c == null ? void 0 : c._id) ?? null,
|
|
107
|
-
locationName: (c == null ? void 0 : c.name) ?? null
|
|
108
|
-
};
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
async function r() {
|
|
112
|
-
var l;
|
|
113
|
-
const n = new URLSearchParams(window.location.search), o = n.get("code"), p = n.get("state");
|
|
114
|
-
if (!o || !p) {
|
|
115
|
-
f.value = a("connect.review.noToken");
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
w.value = !0;
|
|
119
|
-
try {
|
|
120
|
-
const c = await C.getSource(), E = ((l = c == null ? void 0 : c.google) == null ? void 0 : l.locations) ?? [], M = window.location.pathname.replace(/\/review(?:\/.*)?$/, ""), j = `${window.location.origin}${M}/review/google/callback`, I = await C.connectGoogle(o, j, p);
|
|
121
|
-
i.value = s((I == null ? void 0 : I.locations) ?? [], E), i.value.length === 0 && (f.value = a("connect.review.google.noLocations"));
|
|
122
|
-
} catch (c) {
|
|
123
|
-
f.value = L(c, a("connect.review.google.failed"));
|
|
124
|
-
} finally {
|
|
125
|
-
w.value = !1;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async function t() {
|
|
129
|
-
const n = i.value.map((o) => ({
|
|
130
|
-
googleLocationName: o.googleLocationName,
|
|
131
|
-
displayName: o.displayName,
|
|
132
|
-
locationId: o.locationId
|
|
133
|
-
}));
|
|
134
|
-
if (n.length === 0) {
|
|
135
|
-
f.value = a("connect.review.noMappings");
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
g.value = !0;
|
|
139
|
-
try {
|
|
140
|
-
await C.updateGoogleLocations(n), b.value = !0, setTimeout(() => x.replace("/review"), 2e3);
|
|
141
|
-
} catch (o) {
|
|
142
|
-
f.value = L(o, a("connect.review.google.failed"));
|
|
143
|
-
} finally {
|
|
144
|
-
g.value = !1;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return B(r), (n, o) => {
|
|
148
|
-
const p = R("FmPageHead");
|
|
149
|
-
return d(), v(F, null, [
|
|
150
|
-
u(p, {
|
|
151
|
-
title: e(a)("connect.navigation.review")
|
|
152
|
-
}, null, 8, ["title"]),
|
|
153
|
-
m("div", W, [
|
|
154
|
-
e(w) ? (d(), v("div", X, [
|
|
155
|
-
u(e(_).FmIcon, {
|
|
156
|
-
name: "sync",
|
|
157
|
-
size: "xl",
|
|
158
|
-
class: "animate-spin text-fm-color-neutral-gray-400"
|
|
159
|
-
}),
|
|
160
|
-
m("p", Y, y(e(a)("connect.review.google.fetching")), 1)
|
|
161
|
-
])) : e(b) ? (d(), v("div", Z, [
|
|
162
|
-
u(e(_).FmIcon, {
|
|
163
|
-
name: "check_circle",
|
|
164
|
-
size: "xl",
|
|
165
|
-
class: "text-fm-color-typo-success"
|
|
166
|
-
}),
|
|
167
|
-
m("p", ee, y(e(a)("connect.review.google.success")), 1),
|
|
168
|
-
m("p", oe, y(e(a)("connect.review.redirecting")), 1)
|
|
169
|
-
])) : e(f) ? (d(), v("div", te, [
|
|
170
|
-
u(e(_).FmIcon, {
|
|
171
|
-
name: "error",
|
|
172
|
-
size: "xl",
|
|
173
|
-
class: "text-fm-color-system-error-500"
|
|
174
|
-
}),
|
|
175
|
-
m("p", ne, y(e(a)("connect.review.errorTitle")), 1),
|
|
176
|
-
m("p", ae, y(e(f)), 1),
|
|
177
|
-
u(e(_).FmButton, {
|
|
178
|
-
label: e(a)("connect.review.goBack"),
|
|
179
|
-
onClick: o[0] || (o[0] = (l) => e(x).replace("/review"))
|
|
180
|
-
}, null, 8, ["label"])
|
|
181
|
-
])) : e(i).length > 0 ? (d(), v(F, { key: 3 }, [
|
|
182
|
-
m("p", le, y(e(a)("connect.review.google.selectLocation")), 1),
|
|
183
|
-
u(Q, {
|
|
184
|
-
locations: e(i),
|
|
185
|
-
"onUpdate:locations": o[1] || (o[1] = (l) => U(i) ? i.value = l : null)
|
|
186
|
-
}, null, 8, ["locations"]),
|
|
187
|
-
m("div", se, [
|
|
188
|
-
u(e(_).FmButton, {
|
|
189
|
-
variant: "outlined",
|
|
190
|
-
label: e(a)("connect.review.cancel"),
|
|
191
|
-
onClick: o[2] || (o[2] = (l) => e(x).replace("/review"))
|
|
192
|
-
}, null, 8, ["label"]),
|
|
193
|
-
u(e(_).FmButton, {
|
|
194
|
-
label: e(a)("connect.review.connect"),
|
|
195
|
-
disabled: !e(k),
|
|
196
|
-
loading: e(g),
|
|
197
|
-
onClick: t
|
|
198
|
-
}, null, 8, ["label", "disabled", "loading"])
|
|
199
|
-
])
|
|
200
|
-
], 64)) : $("", !0)
|
|
201
|
-
])
|
|
202
|
-
], 64);
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
export {
|
|
207
|
-
fe as default
|
|
208
|
-
};
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { defineStore as w } from "pinia";
|
|
2
|
-
import { reactive as I, onMounted as b, ref as o } from "vue";
|
|
3
|
-
import { g as a, S as l, b as d } from "./index-DNf6qgpV.js";
|
|
4
|
-
const s = () => {
|
|
5
|
-
const e = l.getBusinessId();
|
|
6
|
-
if (!e) throw new Error("Invalid business ID");
|
|
7
|
-
return d(`businesses/${e}/campaigns`, {
|
|
8
|
-
// url: 'http://localhost:3000/portal/',
|
|
9
|
-
});
|
|
10
|
-
}, u = {
|
|
11
|
-
async readAllGrouped(e) {
|
|
12
|
-
const t = a(
|
|
13
|
-
await s().get("grouped", { params: e })
|
|
14
|
-
);
|
|
15
|
-
return {
|
|
16
|
-
meta: t.meta,
|
|
17
|
-
resources: t.resources
|
|
18
|
-
};
|
|
19
|
-
},
|
|
20
|
-
async readAll(e, t) {
|
|
21
|
-
const n = a(
|
|
22
|
-
await s().get("", {
|
|
23
|
-
params: { ...e, ...t }
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
return {
|
|
27
|
-
meta: n.meta,
|
|
28
|
-
resources: n.resources
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
async readById(e) {
|
|
32
|
-
return a(await s().get(`/${e}`));
|
|
33
|
-
},
|
|
34
|
-
async create(e) {
|
|
35
|
-
return a(await s().post("", e));
|
|
36
|
-
},
|
|
37
|
-
async update(e, t) {
|
|
38
|
-
return a(await s().put(e, t));
|
|
39
|
-
},
|
|
40
|
-
async delete(e) {
|
|
41
|
-
return a(await s().delete(e));
|
|
42
|
-
},
|
|
43
|
-
async readCollectionsByCampaignId(e, t) {
|
|
44
|
-
const n = a(
|
|
45
|
-
await s().get(`/${e}/collections`, {
|
|
46
|
-
params: t
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
return {
|
|
50
|
-
meta: n.meta,
|
|
51
|
-
resources: n.resources
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
async readTransactions(e) {
|
|
55
|
-
return a(
|
|
56
|
-
await s().get(
|
|
57
|
-
`/${e}/collections/transactions`
|
|
58
|
-
)
|
|
59
|
-
);
|
|
60
|
-
},
|
|
61
|
-
async createCollectionByCampaignId(e, t) {
|
|
62
|
-
return a(
|
|
63
|
-
await s().post(`/${e}/collections`, t)
|
|
64
|
-
);
|
|
65
|
-
},
|
|
66
|
-
async readGroups() {
|
|
67
|
-
return a(await s().get("/groups")) ?? [];
|
|
68
|
-
},
|
|
69
|
-
async readStats(e) {
|
|
70
|
-
return a(
|
|
71
|
-
await s().get("/stats", { params: e })
|
|
72
|
-
);
|
|
73
|
-
},
|
|
74
|
-
async createGroup(e) {
|
|
75
|
-
return a(await s().post("/groups", e));
|
|
76
|
-
},
|
|
77
|
-
async updateGroup(e, t) {
|
|
78
|
-
return a(
|
|
79
|
-
await s().put(`/groups/${e}`, t)
|
|
80
|
-
);
|
|
81
|
-
},
|
|
82
|
-
async deleteGroup(e) {
|
|
83
|
-
return a(await s().delete(`/groups/${e}`));
|
|
84
|
-
},
|
|
85
|
-
async sendCollection(e, t) {
|
|
86
|
-
return a(
|
|
87
|
-
await s().post(
|
|
88
|
-
`/${e}/collections/send`,
|
|
89
|
-
t
|
|
90
|
-
)
|
|
91
|
-
);
|
|
92
|
-
},
|
|
93
|
-
async sendStamp(e, t) {
|
|
94
|
-
return a(
|
|
95
|
-
await s().post(
|
|
96
|
-
`/${e}/collections/send-stamp`,
|
|
97
|
-
t
|
|
98
|
-
)
|
|
99
|
-
);
|
|
100
|
-
},
|
|
101
|
-
async syncAllPromotion() {
|
|
102
|
-
return a(await s().post("/promotion/sync"));
|
|
103
|
-
},
|
|
104
|
-
async readAllDeleted(e, t) {
|
|
105
|
-
const n = a(
|
|
106
|
-
await s().get("/bin", {
|
|
107
|
-
params: { ...e, ...t }
|
|
108
|
-
})
|
|
109
|
-
);
|
|
110
|
-
return {
|
|
111
|
-
meta: n.meta,
|
|
112
|
-
resources: n.resources
|
|
113
|
-
};
|
|
114
|
-
},
|
|
115
|
-
async restore(e) {
|
|
116
|
-
return a(
|
|
117
|
-
await s().post(`/${e}/restore`)
|
|
118
|
-
);
|
|
119
|
-
},
|
|
120
|
-
async getPromotionQueue() {
|
|
121
|
-
return a(await s().get("/promotion/queue"));
|
|
122
|
-
}
|
|
123
|
-
}, p = () => {
|
|
124
|
-
const e = l.getBusinessId();
|
|
125
|
-
if (!e) throw new Error("Invalid business ID");
|
|
126
|
-
return d(`businesses/${e}/campaigns`, {
|
|
127
|
-
noIdRequired: !0
|
|
128
|
-
});
|
|
129
|
-
}, f = {
|
|
130
|
-
async readAll() {
|
|
131
|
-
return a(await p().get("templates"));
|
|
132
|
-
},
|
|
133
|
-
async readById(e) {
|
|
134
|
-
return a(
|
|
135
|
-
await p().get(`templates/${e}`)
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
}, E = w("mf-connect-campaign", () => {
|
|
139
|
-
const e = I({
|
|
140
|
-
promotion: [],
|
|
141
|
-
voucher: [],
|
|
142
|
-
broadcast: [],
|
|
143
|
-
experience: [],
|
|
144
|
-
point: [],
|
|
145
|
-
credit: [],
|
|
146
|
-
token: [],
|
|
147
|
-
mission: [],
|
|
148
|
-
grab: [],
|
|
149
|
-
all: []
|
|
150
|
-
});
|
|
151
|
-
b(() => {
|
|
152
|
-
console.log("🔧 CampaignStore Installed");
|
|
153
|
-
});
|
|
154
|
-
const t = o([]), n = o([]), c = o([]);
|
|
155
|
-
async function m(h) {
|
|
156
|
-
const i = await u.readAll({
|
|
157
|
-
limit: 1e3,
|
|
158
|
-
skip: 0,
|
|
159
|
-
sortBy: "_id",
|
|
160
|
-
descending: !0
|
|
161
|
-
});
|
|
162
|
-
Object.keys(e).forEach((r) => {
|
|
163
|
-
e[r] = [];
|
|
164
|
-
}), e.all = i.resources.filter(
|
|
165
|
-
(r) => r.type !== "MEMBERSHIP"
|
|
166
|
-
);
|
|
167
|
-
for (const r of i.resources)
|
|
168
|
-
switch (r.type) {
|
|
169
|
-
case "PROMOTION":
|
|
170
|
-
e.promotion.push(r);
|
|
171
|
-
break;
|
|
172
|
-
case "VOUCHER":
|
|
173
|
-
e.voucher.push(r), c.value.push(r);
|
|
174
|
-
break;
|
|
175
|
-
case "BROADCAST":
|
|
176
|
-
["SCHEDULE", "FEEDBACK"].includes(r.event.type) && e.broadcast.push(r);
|
|
177
|
-
break;
|
|
178
|
-
case "POINT":
|
|
179
|
-
e.experience.push(r);
|
|
180
|
-
break;
|
|
181
|
-
case "COIN":
|
|
182
|
-
e.point.push(r);
|
|
183
|
-
break;
|
|
184
|
-
case "CREDIT":
|
|
185
|
-
e.credit.push(r);
|
|
186
|
-
break;
|
|
187
|
-
case "GAME":
|
|
188
|
-
e.token.push(r);
|
|
189
|
-
break;
|
|
190
|
-
case "MISSION":
|
|
191
|
-
e.mission.push(r);
|
|
192
|
-
break;
|
|
193
|
-
case "GRAB":
|
|
194
|
-
e.grab.push(r);
|
|
195
|
-
break;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function g() {
|
|
199
|
-
n.value = await u.readGroups();
|
|
200
|
-
}
|
|
201
|
-
async function y() {
|
|
202
|
-
t.value = await f.readAll();
|
|
203
|
-
}
|
|
204
|
-
return {
|
|
205
|
-
// State
|
|
206
|
-
campaigns: e,
|
|
207
|
-
templates: t,
|
|
208
|
-
groups: n,
|
|
209
|
-
voucher: c,
|
|
210
|
-
// Actions
|
|
211
|
-
read: m,
|
|
212
|
-
readGroups: g,
|
|
213
|
-
readTemplates: y
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
export {
|
|
217
|
-
u as c,
|
|
218
|
-
E as u
|
|
219
|
-
};
|