@feedmepos/mf-connect 0.1.37-prod → 0.1.38-beta.2
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/Analytic-BjSfI2Ff.js +761 -0
- package/dist/{App-Bpo0XZSs.js → App-D11A2JY1.js} +364 -352
- package/dist/AuditLogs-DWCFYoRg.js +1887 -0
- package/dist/{Bin-ohZ2CZZR.js → Bin-9wV4Ah3M.js} +8 -8
- package/dist/{Broadcast-D5x0_-zC.js → Broadcast-I3BtSk8V.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CYb38NXA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js} +18 -18
- package/dist/{Card-BM-Lrm5y.js → Card-CqALG5RM.js} +159 -159
- package/dist/{Collections-Cr4aoJer.js → Collections-rg3SzoUb.js} +103 -91
- package/dist/{Credit-DzDVFv4H.js → Credit-BNn1sYZv.js} +74 -74
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bs8o9n1V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js} +491 -488
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-koqrPPqM.js → EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js} +91 -89
- package/dist/{Experience-CjaDdbvZ.js → Experience-D_Qm8SUj.js} +41 -41
- package/dist/{FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js → FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js} +2 -6
- package/dist/{Game-BuiTygow.js → Game-CKXgXm6Q.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{Index-CQGzUU-w.js → Index-D4DGfUHd.js} +10 -10
- package/dist/Marketing-Dn9A1vgH.js +20073 -0
- package/dist/Member-B55vWHDd.js +279 -0
- package/dist/MemberList-BWTG9Ohy.js +1606 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DzG1fY0c.js → MemberTransactions-CP5EI-W0.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +60279 -0
- package/dist/{Mission-BtypT2uF.js → Mission-CFvhROuB.js} +21 -21
- package/dist/{Overview-Be7bUtRO.js → Overview-4273yNwL.js} +335 -335
- package/dist/{Point-Bw4lnLqp.js → Point-B_-_C919.js} +41 -41
- package/dist/Promotion-D2S3COxk.js +289 -0
- package/dist/{Queue-CpPEVgn8.js → Queue-BmS1Oi-C.js} +52 -52
- package/dist/{Record-DQq4P69i.js → Record-DRBl0M8g.js} +9 -9
- package/dist/{Reward-DJH0eM8u.js → Reward-8056NmfK.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-_kw_PR0h.js → RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CRGep1RK.js → RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js} +635 -548
- package/dist/Segment-Bzq-pyhc.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Dx6Ew9Z_.js → SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B60_8Toi.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCaJ3xKT.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js} +3 -3
- package/dist/{Setting-GRIUo7vg.js → Setting-BrJfYoru.js} +432 -432
- package/dist/{Store-H0UDQpln.js → Store-Bpl_4yZW.js} +211 -211
- package/dist/StoreRewards-Cu7n7Pjz.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +1029 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jL1oGS.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js} +1 -1
- package/dist/{Tier-CJufQcIz.js → Tier-_LnXg3n6.js} +106 -106
- package/dist/{Title-BBMgGUld.js → Title-B7AGStvx.js} +133 -131
- package/dist/{Transaction-DsucPnfp.js → Transaction-Chxv6V7u.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CwOcZEQX.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js} +6 -6
- package/dist/{Voucher-BPvxKO_w.js → Voucher-C5z2kOq9.js} +153 -123
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DMs4XKXM.js → ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js} +1 -1
- package/dist/{app-D3MT1deX.js → app-7cvPyHJ7.js} +164 -125
- package/dist/{app-Bo0JpadQ.js → app-BVojNX0w.js} +1 -1
- package/dist/app.js +4 -3
- package/dist/business-CmxV69wT.js +79 -0
- package/dist/{campaign-Z3l7BoMg.js → campaign-CT_cNJEL.js} +9 -9
- package/dist/{campaign-j1c3ou7l.js → campaign-Dq5C_no-.js} +5 -3
- package/dist/{campaign.enum-CVXPc5Pd.js → campaign.enum-dp7yHKzF.js} +1 -1
- package/dist/campaign.fn-BYZgKDN7.js +758 -0
- package/dist/{collectible.enum-CDSikBAy.js → collectible.enum-DxbB4DxT.js} +1 -1
- package/dist/{collection.fn-Bz38mGMa.js → collection.fn-CNZRdUgy.js} +2 -2
- package/dist/{dto-D648NN4s.js → dto-CT9zZbv9.js} +4 -4
- package/dist/{effect-DbMAmVSR.js → effect-FIlOEC4H.js} +1 -1
- package/dist/{email-addresses-KOVDrRiK.js → email-addresses-Ba7xImfX.js} +1 -1
- package/dist/{export-cTZf8Avd.js → export-uzjZFNF9.js} +3 -3
- package/dist/{helper-BYyfcLqw.js → helper-D4sAZde0.js} +1 -1
- package/dist/{index-BIaCtk8e.js → index-B9pl4zRZ.js} +192 -79
- package/dist/{index-B4MqsaBz.js → index-BI3m1Ehv.js} +3 -3
- package/dist/{index-E-0tTd0_.js → index-BXz54M1s.js} +1 -1
- package/dist/{index-BMl2KZts.js → index-BjU8LVUC.js} +11447 -10969
- package/dist/index-CH3z92VV.js +31 -0
- package/dist/{index-BTb8I_eB.js → index-CNJLP3D5.js} +1 -1
- package/dist/{index-BrKXRxe_.js → index-CONvJfKv.js} +1 -1
- package/dist/index-CS3Jmojj.js +32260 -0
- package/dist/{index-CTPMbFf5.js → index-CUfS9Kp1.js} +10 -9
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-nF9iYTlh.js → index-CvBcve-r.js} +1 -1
- package/dist/index-CwsMG2cV.js +56 -0
- package/dist/{index-B3p0hmIV.js → index-D5rvMvzx.js} +1 -1
- package/dist/{index-CvoShC5J.js → index-DNxa8Rqx.js} +536 -461
- package/dist/{index-DPBHiqsJ.js → index-l2F5MnLF.js} +1 -1
- package/dist/{index.esm2017-DFYwde30.js → index.esm2017-ATcsD5N4.js} +127 -127
- package/dist/{loading-vUArhX_O.js → loading-BWGQSrCB.js} +1 -1
- package/dist/{membership-BHKv29yt.js → membership-Cc4OZ8-U.js} +3 -3
- package/dist/{money-Bl3_QRkE.js → money-D7p8nfun.js} +1 -1
- package/dist/{number-hh_S9w7k.js → number-CMJjC4qz.js} +1 -1
- package/dist/objectid-D5T27iny.js +145 -0
- package/dist/{plugins-CVes2wzE.js → plugins-eQis66QR.js} +2 -2
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/{reward-ANZOdWzf.js → reward-DrnzbG20.js} +1 -1
- package/dist/{rule-BvFk5bQg.js → rule-CtRxkYXB.js} +3 -3
- package/dist/{rule-builder-BSN777PN.js → rule-builder-Di9RIYHF.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-Dh9lDLs_.js → template-C3UfY0v5.js} +64 -64
- package/dist/{trigger-C7THbt7R.js → trigger-C9U7Zgad.js} +7 -7
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/{user-DtNR9JY2.js → user-D7n9yYmO.js} +1 -1
- package/dist/{vue-i18n-BWyHnm4m.js → vue-i18n-Bz45zC04.js} +387 -387
- package/dist/{xlsx-7u9SB0oa.js → xlsx-D4S4qbcZ.js} +226 -226
- package/package.json +9 -3
- package/dist/Analytic-CavR2bzs.js +0 -427
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-BSspYuhg.js +0 -319
- package/dist/Member-B4S0UNGq.js +0 -287
- package/dist/MemberList-CfnUJ3mh.js +0 -1606
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-hZUWLTWj.js +0 -455
- package/dist/Promotion-Bg6x0rAh.js +0 -255
- package/dist/Segment-BLB4VWNJ.js +0 -882
- package/dist/StoreRewards--TNIFaCo.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfB8tA5l.js +0 -995
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Bg-9YqLP.js +0 -419
- package/dist/business-DMALI7ZO.js +0 -78
- package/dist/campaign.fn-rsRhHYZP.js +0 -758
- package/dist/index-BsCGyJMY.js +0 -29566
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DFKmjCG1.js +0 -44
- package/dist/index-Dbd4WA4r.js +0 -61
- package/dist/objectid-CEyMlMge.js +0 -145
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
import { defineComponent as B, openBlock as i, createElementBlock as k, Fragment as T, renderList as P, createElementVNode as a, toDisplayString as $, createCommentVNode as I, resolveComponent as _, createBlock as V, withCtx as R, createVNode as d, unref as e, ref as h, computed as L, onMounted as q, watch as ee, isRef as K, createSlots as te, createTextVNode as ae, reactive as ne, onBeforeMount as oe, normalizeClass as se } from "vue";
|
|
2
|
+
import { _ as le } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { f as ie } from "./number-CMJjC4qz.js";
|
|
4
|
+
import { C as re } from "./campaign-CT_cNJEL.js";
|
|
5
|
+
import { useRouter as Q } from "vue-router";
|
|
6
|
+
import { c as G } from "./index-D5rvMvzx.js";
|
|
7
|
+
import { _ as ce } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js";
|
|
8
|
+
import { Z as ue } from "./zod-Bg2FbC-D.js";
|
|
9
|
+
import { F as me } from "./dto-CT9zZbv9.js";
|
|
10
|
+
import { J as de } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
+
import "./index-CS3Jmojj.js";
|
|
12
|
+
import { useSnackbar as pe } from "@feedmepos/ui-library";
|
|
13
|
+
import { u as fe } from "./app-wDQR6dpb.js";
|
|
14
|
+
import { u as ye } from "./loading-BWGQSrCB.js";
|
|
15
|
+
import { C as ve } from "./campaign.fn-BYZgKDN7.js";
|
|
16
|
+
import { g as _e } from "./object-qECH92oz.js";
|
|
17
|
+
import { u as ge } from "./campaign-Dq5C_no-.js";
|
|
18
|
+
import { u as he } from "./membership-Cc4OZ8-U.js";
|
|
19
|
+
import { u as be } from "./vue-i18n-Bz45zC04.js";
|
|
20
|
+
import { c as xe } from "./index-BjU8LVUC.js";
|
|
21
|
+
import { h as Ce } from "./moment-BWErdI6_.js";
|
|
22
|
+
import { m as X } from "./index-CvBcve-r.js";
|
|
23
|
+
const ke = { class: "divide-x flex flex-wrap" }, Fe = { class: "fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, Se = { class: "fm-typo-en-title-sm-800" }, we = /* @__PURE__ */ B({
|
|
24
|
+
__name: "CampaignStat",
|
|
25
|
+
props: {
|
|
26
|
+
data: {
|
|
27
|
+
type: Object,
|
|
28
|
+
required: !0
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setup(y) {
|
|
32
|
+
const r = y, c = [
|
|
33
|
+
{ label: "Credit Received", key: "CREDIT" },
|
|
34
|
+
{ label: "EXP Received", key: "POINT" },
|
|
35
|
+
{ label: "Points Received", key: "COIN" },
|
|
36
|
+
{ label: "Message Sent", key: "BROADCAST" },
|
|
37
|
+
{ label: "Vouchers Claimed", key: "VOUCHER" },
|
|
38
|
+
{ label: "Users Joined", key: "UNIQUE_USER" }
|
|
39
|
+
];
|
|
40
|
+
function u(g) {
|
|
41
|
+
var p;
|
|
42
|
+
return ie((p = r.data) == null ? void 0 : p[g], 2, !0) || 0;
|
|
43
|
+
}
|
|
44
|
+
return (g, p) => (i(), k("div", ke, [
|
|
45
|
+
(i(), k(T, null, P(c, (s) => (i(), k(T, null, [
|
|
46
|
+
s.key in y.data ? (i(), k("div", {
|
|
47
|
+
key: s.key,
|
|
48
|
+
class: "px-16"
|
|
49
|
+
}, [
|
|
50
|
+
a("div", Fe, $(s.label), 1),
|
|
51
|
+
a("div", Se, $(u(s.key)), 1)
|
|
52
|
+
])) : I("", !0)
|
|
53
|
+
], 64))), 64))
|
|
54
|
+
]));
|
|
55
|
+
}
|
|
56
|
+
}), $e = { class: "bg-fm-color-neutral-gray-100 gap-4 h-[30px] inline-flex items-center justify-center max-w-[250px] px-8 py-4 rounded-md" }, Ve = { class: "fm-typo-en-body-md-600 overflow-hidden select-none text-ellipsis text-fm-color-typo-secondary whitespace-nowrap" }, Te = /* @__PURE__ */ B({
|
|
57
|
+
__name: "CampaignChip",
|
|
58
|
+
props: {
|
|
59
|
+
type: { type: String, required: !0 },
|
|
60
|
+
icon: {
|
|
61
|
+
type: Object,
|
|
62
|
+
default: () => ({ icon: "circle", color: "typo-sucess" })
|
|
63
|
+
},
|
|
64
|
+
label: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: ""
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
setup(y) {
|
|
70
|
+
const c = re[y.type];
|
|
71
|
+
return (u, g) => {
|
|
72
|
+
const p = _("FmIcon"), s = _("FmTooltip");
|
|
73
|
+
return i(), V(s, {
|
|
74
|
+
variant: "plain",
|
|
75
|
+
placement: "top",
|
|
76
|
+
content: y.label
|
|
77
|
+
}, {
|
|
78
|
+
default: R(() => [
|
|
79
|
+
a("div", $e, [
|
|
80
|
+
d(p, {
|
|
81
|
+
name: e(c).icon,
|
|
82
|
+
outline: "",
|
|
83
|
+
size: "sm"
|
|
84
|
+
}, null, 8, ["name"]),
|
|
85
|
+
a("div", Ve, $(y.label), 1),
|
|
86
|
+
d(p, {
|
|
87
|
+
name: y.icon.name,
|
|
88
|
+
color: y.icon.color,
|
|
89
|
+
size: "sm"
|
|
90
|
+
}, null, 8, ["name", "color"])
|
|
91
|
+
])
|
|
92
|
+
]),
|
|
93
|
+
_: 1
|
|
94
|
+
}, 8, ["content"]);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}), Ae = { class: "flex flex-col" }, Re = { class: "flex flex-nowrap items-center justify-between mb-12" }, Ee = { class: "flex gap-4 items-center justify-start" }, Oe = { class: "fm-typo-en-title-sm-800" }, Me = { class: "flex flex-wrap gap-4 items-center mb-16 overflow-y-hidden" }, Pe = /* @__PURE__ */ B({
|
|
98
|
+
__name: "CampaignGroup",
|
|
99
|
+
props: {
|
|
100
|
+
group: {
|
|
101
|
+
type: Object,
|
|
102
|
+
required: !0
|
|
103
|
+
},
|
|
104
|
+
onEdit: {
|
|
105
|
+
type: Function,
|
|
106
|
+
required: !0
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
emits: ["changed"],
|
|
110
|
+
setup(y, { emit: r }) {
|
|
111
|
+
Q(), h(!1);
|
|
112
|
+
const c = y, u = h([]), g = L(
|
|
113
|
+
() => u.value.reduce(
|
|
114
|
+
(s, l) => ({ ...s, [l.type]: l.totalAmount }),
|
|
115
|
+
{}
|
|
116
|
+
)
|
|
117
|
+
), p = L(() => {
|
|
118
|
+
var s;
|
|
119
|
+
return ((s = c.group.pf_campaigns) == null ? void 0 : s.map((l) => ({
|
|
120
|
+
campaign: l,
|
|
121
|
+
label: l.name
|
|
122
|
+
}))) || [];
|
|
123
|
+
});
|
|
124
|
+
return q(async () => {
|
|
125
|
+
u.value = await G.readStats({
|
|
126
|
+
groupId: c.group._id.toString()
|
|
127
|
+
});
|
|
128
|
+
}), (s, l) => {
|
|
129
|
+
const m = _("FmButton"), o = _("FmCard");
|
|
130
|
+
return i(), V(o, {
|
|
131
|
+
class: "mb-24 p-24",
|
|
132
|
+
variant: "outlined"
|
|
133
|
+
}, {
|
|
134
|
+
default: R(() => [
|
|
135
|
+
a("div", Ae, [
|
|
136
|
+
a("div", Re, [
|
|
137
|
+
a("div", Ee, [
|
|
138
|
+
a("div", Oe, $(y.group.name), 1),
|
|
139
|
+
d(m, {
|
|
140
|
+
icon: "edit",
|
|
141
|
+
variant: "tertiary",
|
|
142
|
+
onClick: l[0] || (l[0] = (b) => y.onEdit(y.group))
|
|
143
|
+
})
|
|
144
|
+
])
|
|
145
|
+
]),
|
|
146
|
+
a("div", Me, [
|
|
147
|
+
(i(!0), k(T, null, P(e(p), (b) => (i(), V(Te, {
|
|
148
|
+
key: s.index,
|
|
149
|
+
type: b.campaign.type,
|
|
150
|
+
label: b.label
|
|
151
|
+
}, null, 8, ["type", "label"]))), 128))
|
|
152
|
+
]),
|
|
153
|
+
d(we, { data: e(g) }, null, 8, ["data"])
|
|
154
|
+
])
|
|
155
|
+
]),
|
|
156
|
+
_: 1
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}), Be = { class: "ml-32 flex flex-col" }, Ue = /* @__PURE__ */ B({
|
|
161
|
+
__name: "CampaignCard",
|
|
162
|
+
props: {
|
|
163
|
+
title: {},
|
|
164
|
+
items: {},
|
|
165
|
+
modelValue: {}
|
|
166
|
+
},
|
|
167
|
+
emits: ["update:model-value"],
|
|
168
|
+
setup(y, { emit: r }) {
|
|
169
|
+
const c = y, u = r, g = (m) => {
|
|
170
|
+
m ? l.value = c.items.map((o) => o.value) : l.value = [], s.value = m, u("update:model-value", l.value);
|
|
171
|
+
}, p = (m) => {
|
|
172
|
+
l.value = m, s.value = m.length === c.items.length, u("update:model-value", m);
|
|
173
|
+
}, s = h(!1), l = h([]);
|
|
174
|
+
return ee(
|
|
175
|
+
() => c.modelValue,
|
|
176
|
+
() => {
|
|
177
|
+
l.value = c.modelValue.filter(
|
|
178
|
+
(m) => c.items.find((o) => o.value === m)
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
), q(() => {
|
|
182
|
+
l.value = c.modelValue.filter(
|
|
183
|
+
(m) => c.items.find((o) => o.value === m)
|
|
184
|
+
);
|
|
185
|
+
}), (m, o) => {
|
|
186
|
+
const b = _("FmCheckbox"), S = _("FmCard");
|
|
187
|
+
return i(), V(S, {
|
|
188
|
+
variant: "outlined",
|
|
189
|
+
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
190
|
+
}, {
|
|
191
|
+
default: R(() => [
|
|
192
|
+
d(b, {
|
|
193
|
+
"model-value": e(s),
|
|
194
|
+
value: "1",
|
|
195
|
+
label: c.title,
|
|
196
|
+
indeterminate: e(l).length > 0,
|
|
197
|
+
"onUpdate:modelValue": g
|
|
198
|
+
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
199
|
+
a("div", Be, [
|
|
200
|
+
(i(!0), k(T, null, P(c.items, (x, D) => (i(), V(b, {
|
|
201
|
+
key: D,
|
|
202
|
+
"model-value": e(l),
|
|
203
|
+
label: x.label,
|
|
204
|
+
value: x.value,
|
|
205
|
+
"onUpdate:modelValue": p
|
|
206
|
+
}, null, 8, ["model-value", "label", "value"]))), 128))
|
|
207
|
+
])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}), Ie = { class: "space-y-16" }, Le = { class: "flex items-center" }, De = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ge = { class: "space-y-[40px]" }, Ne = /* @__PURE__ */ B({
|
|
214
|
+
__name: "LinkCampaign",
|
|
215
|
+
props: {
|
|
216
|
+
modelValue: {
|
|
217
|
+
type: Array,
|
|
218
|
+
required: !0
|
|
219
|
+
},
|
|
220
|
+
campaigns: {
|
|
221
|
+
type: Object,
|
|
222
|
+
required: !0
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
emits: ["update:model-value"],
|
|
226
|
+
setup(y, { emit: r }) {
|
|
227
|
+
const c = h(""), u = h([]), g = y, p = r, s = L(() => Object.entries(g.campaigns).reduce((m, [o, b]) => {
|
|
228
|
+
const S = b.filter(
|
|
229
|
+
(x) => x.label.toLowerCase().includes(c.value.toLowerCase())
|
|
230
|
+
);
|
|
231
|
+
return S.length > 0 && (m[o] = S), m;
|
|
232
|
+
}, {}));
|
|
233
|
+
function l(m, o) {
|
|
234
|
+
u.value = u.value.filter(
|
|
235
|
+
(b) => !o.map((S) => S.value).includes(b)
|
|
236
|
+
), u.value = [.../* @__PURE__ */ new Set([...u.value, ...m])], p("update:model-value", u.value);
|
|
237
|
+
}
|
|
238
|
+
return q(() => {
|
|
239
|
+
u.value = g.modelValue;
|
|
240
|
+
}), (m, o) => {
|
|
241
|
+
const b = _("FmTextField");
|
|
242
|
+
return i(), k(T, null, [
|
|
243
|
+
d(de, { json: y.campaigns }, null, 8, ["json"]),
|
|
244
|
+
a("div", Ie, [
|
|
245
|
+
a("div", Le, [
|
|
246
|
+
a("div", De, $(e(u).length) + " campaign(s) linked ", 1),
|
|
247
|
+
d(b, {
|
|
248
|
+
modelValue: e(c),
|
|
249
|
+
"onUpdate:modelValue": o[0] || (o[0] = (S) => K(c) ? c.value = S : null),
|
|
250
|
+
"prepend-icon": "search",
|
|
251
|
+
placeholder: "Search",
|
|
252
|
+
class: "w-full"
|
|
253
|
+
}, null, 8, ["modelValue"])
|
|
254
|
+
]),
|
|
255
|
+
a("div", Ge, [
|
|
256
|
+
(i(!0), k(T, null, P(e(s), (S, x) => (i(), V(Ue, {
|
|
257
|
+
"model-value": e(u),
|
|
258
|
+
title: x,
|
|
259
|
+
items: S,
|
|
260
|
+
"onUpdate:modelValue": (D) => l(D, S)
|
|
261
|
+
}, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
|
|
262
|
+
])
|
|
263
|
+
])
|
|
264
|
+
], 64);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
}), je = { class: "flex items-center gap-x-8" }, He = {
|
|
268
|
+
key: 0,
|
|
269
|
+
class: "space-y-16 pr-12"
|
|
270
|
+
}, qe = { class: "flex items-center gap-x-16" }, ze = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Je = { class: "mt-16" }, Ke = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, We = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Ze = { class: "flex items-center gap-8" }, Qe = /* @__PURE__ */ B({
|
|
271
|
+
__name: "AnalyticSheet",
|
|
272
|
+
emits: ["success"],
|
|
273
|
+
setup(y, { expose: r, emit: c }) {
|
|
274
|
+
const u = c, g = fe();
|
|
275
|
+
pe();
|
|
276
|
+
const p = h(!1), s = h(!1), l = {
|
|
277
|
+
name: "",
|
|
278
|
+
campaigns: []
|
|
279
|
+
}, m = h(""), o = h({ ...l }), b = me.superRefine((n, t) => {
|
|
280
|
+
}), S = h([]), x = h(null), { global: D, minor: z } = ye, W = L(() => {
|
|
281
|
+
const n = b.safeParse(o.value);
|
|
282
|
+
return n.success ? [] : n.error.errors;
|
|
283
|
+
});
|
|
284
|
+
function A(n) {
|
|
285
|
+
var t;
|
|
286
|
+
p.value = !0, n ? (x.value = { ...n }, o.value = { ...n, campaigns: (t = n.pf_campaigns) == null ? void 0 : t.map((F) => F._id) }) : (x.value = null, o.value = { ...l });
|
|
287
|
+
}
|
|
288
|
+
function N() {
|
|
289
|
+
p.value = !1, x.value = null;
|
|
290
|
+
}
|
|
291
|
+
function C() {
|
|
292
|
+
s.value = !0;
|
|
293
|
+
}
|
|
294
|
+
async function f() {
|
|
295
|
+
const n = await G.readAll({
|
|
296
|
+
limit: 1e3,
|
|
297
|
+
skip: 0,
|
|
298
|
+
sortBy: "_id",
|
|
299
|
+
search: "",
|
|
300
|
+
descending: !0
|
|
301
|
+
});
|
|
302
|
+
S.value = n.resources.filter(
|
|
303
|
+
(t) => !["MEMBERSHIP", "REWARD_POOL"].includes(t.type) && !["ISSUE_REWARD"].includes("event" in t ? t == null ? void 0 : t.event.type : "")
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
const v = L(() => {
|
|
307
|
+
const n = (F) => F.map((O) => ({
|
|
308
|
+
label: O.name,
|
|
309
|
+
value: O._id
|
|
310
|
+
}));
|
|
311
|
+
return _e(
|
|
312
|
+
S.value,
|
|
313
|
+
(F) => ve.formattedType(F.type),
|
|
314
|
+
n
|
|
315
|
+
);
|
|
316
|
+
}), M = L(() => Object.entries(v.value).reduce(
|
|
317
|
+
(n, [t, F]) => {
|
|
318
|
+
const O = F.filter((H) => {
|
|
319
|
+
var J, w;
|
|
320
|
+
return (w = (J = o.value) == null ? void 0 : J.campaigns) == null ? void 0 : w.includes(H.value);
|
|
321
|
+
}).filter(
|
|
322
|
+
(H) => H.label.toLowerCase().includes(m.value.toLowerCase())
|
|
323
|
+
);
|
|
324
|
+
return O.length > 0 && (n[t] = O), n;
|
|
325
|
+
},
|
|
326
|
+
{}
|
|
327
|
+
));
|
|
328
|
+
function E(n) {
|
|
329
|
+
var F, O;
|
|
330
|
+
const t = (F = o.value.campaigns) == null ? void 0 : F.indexOf(n);
|
|
331
|
+
t != null && t > -1 && ((O = o.value.campaigns) == null || O.splice(t, 1));
|
|
332
|
+
}
|
|
333
|
+
async function U() {
|
|
334
|
+
b.safeParse(o.value).success && await z(
|
|
335
|
+
async () => {
|
|
336
|
+
var t;
|
|
337
|
+
x.value ? await G.updateGroup(
|
|
338
|
+
(t = x.value) == null ? void 0 : t._id,
|
|
339
|
+
o.value
|
|
340
|
+
) : await G.createGroup(o.value), u("success"), N();
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
message: "Saving group",
|
|
344
|
+
successMessage: "Group saved"
|
|
345
|
+
}
|
|
346
|
+
);
|
|
347
|
+
}
|
|
348
|
+
async function j() {
|
|
349
|
+
await z(
|
|
350
|
+
async () => {
|
|
351
|
+
var n;
|
|
352
|
+
await G.deleteGroup((n = x.value) == null ? void 0 : n._id), u("success"), N();
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
message: "Deleting group",
|
|
356
|
+
successMessage: "Group deleted"
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
return q(async () => {
|
|
361
|
+
await f();
|
|
362
|
+
}), r({
|
|
363
|
+
showSheet: A,
|
|
364
|
+
hideSheet: N
|
|
365
|
+
}), (n, t) => {
|
|
366
|
+
const F = _("FmButton"), O = _("FmTextField"), H = _("FmList"), J = _("FmSideSheet");
|
|
367
|
+
return i(), V(J, {
|
|
368
|
+
modelValue: e(p),
|
|
369
|
+
"onUpdate:modelValue": t[7] || (t[7] = (w) => K(p) ? p.value = w : null),
|
|
370
|
+
header: e(x) ? "Edit group" : "Add group",
|
|
371
|
+
"dismiss-away": "",
|
|
372
|
+
"close-button": !0,
|
|
373
|
+
"max-width": 550
|
|
374
|
+
}, te({
|
|
375
|
+
"side-sheet-footer": R(() => [
|
|
376
|
+
a("div", Ze, [
|
|
377
|
+
e(s) ? I("", !0) : (i(), k(T, { key: 0 }, [
|
|
378
|
+
d(F, {
|
|
379
|
+
label: "Submit",
|
|
380
|
+
onClick: U,
|
|
381
|
+
disabled: e(W).length > 0 || e(g).isLoading
|
|
382
|
+
}, null, 8, ["disabled"]),
|
|
383
|
+
d(F, {
|
|
384
|
+
label: "Cancel",
|
|
385
|
+
onClick: t[4] || (t[4] = (w) => N()),
|
|
386
|
+
variant: "tertiary"
|
|
387
|
+
}),
|
|
388
|
+
e(x) ? (i(), V(F, {
|
|
389
|
+
key: 0,
|
|
390
|
+
label: "Delete",
|
|
391
|
+
variant: "plain",
|
|
392
|
+
class: "ml-auto fm-color-system-error-300",
|
|
393
|
+
onClick: t[5] || (t[5] = (w) => j())
|
|
394
|
+
})) : I("", !0)
|
|
395
|
+
], 64)),
|
|
396
|
+
e(s) ? (i(), V(F, {
|
|
397
|
+
key: 1,
|
|
398
|
+
label: "Confirm",
|
|
399
|
+
onClick: t[6] || (t[6] = (w) => s.value = !1)
|
|
400
|
+
})) : I("", !0)
|
|
401
|
+
])
|
|
402
|
+
]),
|
|
403
|
+
default: R(() => [
|
|
404
|
+
e(s) ? I("", !0) : (i(), k("div", He, [
|
|
405
|
+
t[9] || (t[9] = a("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
|
|
406
|
+
d(ce, {
|
|
407
|
+
modelValue: e(o).name,
|
|
408
|
+
"onUpdate:modelValue": t[1] || (t[1] = (w) => e(o).name = w),
|
|
409
|
+
label: "Name",
|
|
410
|
+
schema: e(ue).typeAtPath(e(b), "name")
|
|
411
|
+
}, null, 8, ["modelValue", "schema"]),
|
|
412
|
+
t[10] || (t[10] = a("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1)),
|
|
413
|
+
a("div", qe, [
|
|
414
|
+
a("div", ze, $(e(o).campaigns.length) + " campaign(s) linked ", 1),
|
|
415
|
+
d(O, {
|
|
416
|
+
modelValue: e(m),
|
|
417
|
+
"onUpdate:modelValue": t[2] || (t[2] = (w) => K(m) ? m.value = w : null),
|
|
418
|
+
"prepend-icon": "search",
|
|
419
|
+
placeholder: "Search",
|
|
420
|
+
class: "w-auto"
|
|
421
|
+
}, null, 8, ["modelValue"])
|
|
422
|
+
]),
|
|
423
|
+
d(F, {
|
|
424
|
+
variant: "plain",
|
|
425
|
+
icon: "link",
|
|
426
|
+
label: "Link Campaign",
|
|
427
|
+
onClick: C
|
|
428
|
+
})
|
|
429
|
+
])),
|
|
430
|
+
e(s) ? (i(), V(Ne, {
|
|
431
|
+
key: 1,
|
|
432
|
+
modelValue: e(o).campaigns,
|
|
433
|
+
"onUpdate:modelValue": t[3] || (t[3] = (w) => e(o).campaigns = w),
|
|
434
|
+
campaigns: e(v)
|
|
435
|
+
}, null, 8, ["modelValue", "campaigns"])) : I("", !0),
|
|
436
|
+
a("div", Je, [
|
|
437
|
+
e(s) ? I("", !0) : (i(!0), k(T, { key: 0 }, P(e(M), (w, Y) => (i(), k("div", null, [
|
|
438
|
+
a("div", Ke, $(Y), 1),
|
|
439
|
+
d(H, { separator: !0 }, {
|
|
440
|
+
default: R(() => [
|
|
441
|
+
(i(!0), k(T, null, P(w, (Z) => (i(), k("div", We, [
|
|
442
|
+
a("div", null, $(Z.label), 1),
|
|
443
|
+
a("div", null, [
|
|
444
|
+
d(F, {
|
|
445
|
+
icon: "delete",
|
|
446
|
+
onClick: (yt) => E(Z.value),
|
|
447
|
+
variant: "tertiary"
|
|
448
|
+
}, null, 8, ["onClick"])
|
|
449
|
+
])
|
|
450
|
+
]))), 256))
|
|
451
|
+
]),
|
|
452
|
+
_: 2
|
|
453
|
+
}, 1024)
|
|
454
|
+
]))), 256))
|
|
455
|
+
])
|
|
456
|
+
]),
|
|
457
|
+
_: 2
|
|
458
|
+
}, [
|
|
459
|
+
e(s) ? {
|
|
460
|
+
name: "side-sheet-header",
|
|
461
|
+
fn: R(() => [
|
|
462
|
+
a("div", je, [
|
|
463
|
+
d(F, {
|
|
464
|
+
icon: "arrow_back",
|
|
465
|
+
variant: "tertiary",
|
|
466
|
+
onClick: t[0] || (t[0] = (w) => s.value = !1)
|
|
467
|
+
}),
|
|
468
|
+
t[8] || (t[8] = ae("Link campaign "))
|
|
469
|
+
])
|
|
470
|
+
]),
|
|
471
|
+
key: "0"
|
|
472
|
+
} : void 0
|
|
473
|
+
]), 1032, ["modelValue", "header"]);
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
}), Xe = {
|
|
477
|
+
class: "flex justify-center",
|
|
478
|
+
style: { height: "400px" }
|
|
479
|
+
}, Ye = /* @__PURE__ */ B({
|
|
480
|
+
__name: "TierDistribution",
|
|
481
|
+
props: {
|
|
482
|
+
data: {},
|
|
483
|
+
metrics: {}
|
|
484
|
+
},
|
|
485
|
+
setup(y) {
|
|
486
|
+
const r = y;
|
|
487
|
+
return (c, u) => {
|
|
488
|
+
const g = _("JsonViewer"), p = _("FmPieChart");
|
|
489
|
+
return i(), k(T, null, [
|
|
490
|
+
d(g, {
|
|
491
|
+
json: r.data
|
|
492
|
+
}, null, 8, ["json"]),
|
|
493
|
+
a("div", Xe, [
|
|
494
|
+
d(p, {
|
|
495
|
+
paragraph: "",
|
|
496
|
+
variant: "doughnut",
|
|
497
|
+
datasets: r.data,
|
|
498
|
+
metrics: r.metrics,
|
|
499
|
+
legend: !1,
|
|
500
|
+
"text-color": "#1C1C1E",
|
|
501
|
+
"text-style": "bold 50px sans-serif",
|
|
502
|
+
height: 400,
|
|
503
|
+
"maintain-aspect-ratio": !1
|
|
504
|
+
}, null, 8, ["datasets", "metrics"])
|
|
505
|
+
])
|
|
506
|
+
], 64);
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}), et = { class: "grow" }, tt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, at = { class: "flex flex-col items-end" }, nt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ot = /* @__PURE__ */ B({
|
|
510
|
+
__name: "TopSpentMemberList",
|
|
511
|
+
setup(y) {
|
|
512
|
+
const r = h([]);
|
|
513
|
+
async function c(u) {
|
|
514
|
+
const g = await X.read({
|
|
515
|
+
limit: u,
|
|
516
|
+
skip: 0,
|
|
517
|
+
sortBy: "stats.avgBillSize",
|
|
518
|
+
search: "",
|
|
519
|
+
descending: !0
|
|
520
|
+
});
|
|
521
|
+
r.value = g.resources, console.log(`top ${u} members:`, g.resources);
|
|
522
|
+
}
|
|
523
|
+
return q(async () => {
|
|
524
|
+
await c(3);
|
|
525
|
+
}), (u, g) => {
|
|
526
|
+
const p = _("FmCardHeader"), s = _("FmListItem"), l = _("FmList"), m = _("FmCard");
|
|
527
|
+
return i(), V(m, {
|
|
528
|
+
variant: "outlined",
|
|
529
|
+
class: "p-16"
|
|
530
|
+
}, {
|
|
531
|
+
default: R(() => [
|
|
532
|
+
d(p, { title: "Top spent members" }),
|
|
533
|
+
d(l, { class: "w-full" }, {
|
|
534
|
+
default: R(() => [
|
|
535
|
+
(i(!0), k(T, null, P(e(r), (o) => (i(), V(s, null, {
|
|
536
|
+
default: R(() => [
|
|
537
|
+
a("div", et, [
|
|
538
|
+
a("div", null, $(o.name), 1),
|
|
539
|
+
a("div", tt, $(o.phoneNumber), 1)
|
|
540
|
+
]),
|
|
541
|
+
a("div", at, [
|
|
542
|
+
a("div", null, $(e(xe.Dinero).fromNumber({
|
|
543
|
+
number: Number(
|
|
544
|
+
o.stats.avgBillSize * o.stats.visitCount || 0
|
|
545
|
+
)
|
|
546
|
+
}).toFormat(!0)), 1),
|
|
547
|
+
a("div", nt, " Last visit " + $(e(Ce)(o.stats.lastVisit).fromNow()), 1)
|
|
548
|
+
])
|
|
549
|
+
]),
|
|
550
|
+
_: 2
|
|
551
|
+
}, 1024))), 256))
|
|
552
|
+
]),
|
|
553
|
+
_: 1
|
|
554
|
+
})
|
|
555
|
+
]),
|
|
556
|
+
_: 1
|
|
557
|
+
});
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
}), st = { class: "px-24 space-y-32 pb-24" }, lt = { class: "space-y-16" }, it = { class: "flex items-center justify-end" }, rt = { class: "fm-typo-en-body-lg-600" }, ct = { class: "grid grid-cols-6 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, ut = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, mt = { class: "fm-typo-en-title-sm-800" }, dt = { class: "grid grid-cols-3 xs:grid-cols-1 gap-16" }, pt = { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, ft = { class: "flex gap-16 items-center" }, It = /* @__PURE__ */ B({
|
|
561
|
+
__name: "Analytic",
|
|
562
|
+
setup(y) {
|
|
563
|
+
const { t: r } = be(), c = {
|
|
564
|
+
label: r("connect.analytic.addGroup"),
|
|
565
|
+
value: "create",
|
|
566
|
+
isPrimary: !0,
|
|
567
|
+
prependIcon: "add"
|
|
568
|
+
}, u = ge(), g = h(), p = h([]), s = h(""), l = ne({
|
|
569
|
+
totalCampaign: 0,
|
|
570
|
+
totalProgram: 0,
|
|
571
|
+
totalMember: 0,
|
|
572
|
+
totalTier: 0,
|
|
573
|
+
totalTitle: 0
|
|
574
|
+
}), m = h("1"), o = h([]), b = h([]), S = [
|
|
575
|
+
{
|
|
576
|
+
key: r("connect.analytic.summary.totalCampaign"),
|
|
577
|
+
value: () => l.totalCampaign
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
key: r("connect.analytic.summary.totalProgram"),
|
|
581
|
+
value: () => l.totalProgram
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
key: r("connect.analytic.summary.totalMember"),
|
|
585
|
+
value: () => l.totalMember
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
key: r("connect.analytic.summary.totalTitle"),
|
|
589
|
+
value: () => l.totalTitle
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
key: r("connect.analytic.summary.totalTier"),
|
|
593
|
+
value: () => l.totalTier
|
|
594
|
+
}
|
|
595
|
+
];
|
|
596
|
+
function x(C) {
|
|
597
|
+
var f;
|
|
598
|
+
m.value = (/* @__PURE__ */ new Date()).toISOString(), (f = g.value) == null || f.showSheet(C);
|
|
599
|
+
}
|
|
600
|
+
async function D() {
|
|
601
|
+
await u.readGroups();
|
|
602
|
+
const C = await G.readAllGrouped({
|
|
603
|
+
limit: 100,
|
|
604
|
+
skip: 0,
|
|
605
|
+
sortBy: "_id",
|
|
606
|
+
search: "",
|
|
607
|
+
descending: !0
|
|
608
|
+
});
|
|
609
|
+
p.value = C.resources;
|
|
610
|
+
}
|
|
611
|
+
async function z() {
|
|
612
|
+
var M, E, U, j;
|
|
613
|
+
const C = await X.read({
|
|
614
|
+
limit: 1,
|
|
615
|
+
skip: 0,
|
|
616
|
+
sortBy: "_id",
|
|
617
|
+
search: "",
|
|
618
|
+
descending: !1
|
|
619
|
+
}), f = await G.readAll({
|
|
620
|
+
limit: 1e3,
|
|
621
|
+
skip: 0,
|
|
622
|
+
sortBy: "_id",
|
|
623
|
+
search: "",
|
|
624
|
+
descending: !1
|
|
625
|
+
});
|
|
626
|
+
l.totalCampaign = ((M = f.resources) == null ? void 0 : M.filter(
|
|
627
|
+
(n) => ["PROMOTION", "VOUCHER", "BROADCAST"].includes(n.type) && !["ISSUE_REWARD"].includes("event" in n ? n == null ? void 0 : n.event.type : "")
|
|
628
|
+
).length) ?? 0, l.totalProgram = ((E = f.resources) == null ? void 0 : E.filter(
|
|
629
|
+
(n) => ["POINT", "COIN", "CREDIT", "GAME", "MISSION"].includes(n.type)
|
|
630
|
+
).length) ?? 0, l.totalMember = C.meta.totalResources ?? 0;
|
|
631
|
+
const v = f.resources.find(
|
|
632
|
+
(n) => n.type === "MEMBERSHIP"
|
|
633
|
+
);
|
|
634
|
+
l.totalTier = ((U = v == null ? void 0 : v.tiers) == null ? void 0 : U.length) ?? 0, l.totalTitle = ((j = v == null ? void 0 : v.titles) == null ? void 0 : j.length) ?? 0;
|
|
635
|
+
}
|
|
636
|
+
const W = L(() => p.value.filter((C) => {
|
|
637
|
+
var f;
|
|
638
|
+
return C.name.includes(s.value) || ((f = C.pf_campaigns) == null ? void 0 : f.filter((v) => v.name.includes(s.value)).length);
|
|
639
|
+
})), A = he();
|
|
640
|
+
Q(), h(!0), L(() => {
|
|
641
|
+
var C, f, v, M;
|
|
642
|
+
return !A.storeOption || !A.storeOption.company ? -1 : !A.payoutAccount || !A.payoutAccount.enable || A.payoutAccount.status != "APPROVED" ? 0 : (f = (C = A.store) == null ? void 0 : C.categories) != null && f.length ? (M = (v = A.store) == null ? void 0 : v.categories) != null && M.some(
|
|
643
|
+
(E) => E.bundles.some((U) => U.isFeedvibe)
|
|
644
|
+
) ? 3 : 2 : 1;
|
|
645
|
+
});
|
|
646
|
+
function N() {
|
|
647
|
+
const C = A.sortedTiers;
|
|
648
|
+
b.value = (C == null ? void 0 : C.map((v) => v.name)) || [];
|
|
649
|
+
const f = C.map((v) => (v == null ? void 0 : v.member_count) || 0) || [];
|
|
650
|
+
o.value = [
|
|
651
|
+
{
|
|
652
|
+
label: "Total Members",
|
|
653
|
+
data: f,
|
|
654
|
+
backgroundColor: [
|
|
655
|
+
"#FF5D53",
|
|
656
|
+
"#007BA7",
|
|
657
|
+
"#FCA23E",
|
|
658
|
+
"#8CE6D7",
|
|
659
|
+
"#73C8E6",
|
|
660
|
+
"#F2F2F7"
|
|
661
|
+
],
|
|
662
|
+
hoverOffset: 5
|
|
663
|
+
}
|
|
664
|
+
];
|
|
665
|
+
}
|
|
666
|
+
return oe(async () => {
|
|
667
|
+
await u.read(), await D(), await z(), await A.readMemberStore(), await A.readMembership(), await N(), await A.readPayoutAccount();
|
|
668
|
+
}), (C, f) => {
|
|
669
|
+
const v = _("FmPageHead"), M = _("FmSearch"), E = _("FmCard"), U = _("FmCardHeader"), j = _("FmButton");
|
|
670
|
+
return i(), k(T, null, [
|
|
671
|
+
d(v, {
|
|
672
|
+
title: e(r)("connect.analytic.title"),
|
|
673
|
+
actions: e(p).length > 0 ? [c] : [],
|
|
674
|
+
"onClick:action": f[0] || (f[0] = (n) => x())
|
|
675
|
+
}, null, 8, ["title", "actions"]),
|
|
676
|
+
a("div", st, [
|
|
677
|
+
a("div", lt, [
|
|
678
|
+
a("div", it, [
|
|
679
|
+
d(M, {
|
|
680
|
+
class: "xs:hidden",
|
|
681
|
+
modelValue: e(s),
|
|
682
|
+
"onUpdate:modelValue": f[1] || (f[1] = (n) => K(s) ? s.value = n : null),
|
|
683
|
+
placeholder: e(r)("connect.analytic.search"),
|
|
684
|
+
collapsible: ""
|
|
685
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
686
|
+
]),
|
|
687
|
+
d(E, {
|
|
688
|
+
variant: "outlined",
|
|
689
|
+
class: "flex flex-col gap-16 p-16"
|
|
690
|
+
}, {
|
|
691
|
+
default: R(() => [
|
|
692
|
+
a("div", rt, $(e(r)("connect.analytic.summary.title")), 1),
|
|
693
|
+
a("div", ct, [
|
|
694
|
+
(i(), k(T, null, P(S, (n, t) => a("div", {
|
|
695
|
+
key: n.key,
|
|
696
|
+
class: se(["px-8", { "xs:!border-r": t % 2 == 0 }])
|
|
697
|
+
}, [
|
|
698
|
+
a("div", ut, $(n.key), 1),
|
|
699
|
+
a("div", mt, $(n.value()), 1)
|
|
700
|
+
], 2)), 64))
|
|
701
|
+
])
|
|
702
|
+
]),
|
|
703
|
+
_: 1
|
|
704
|
+
})
|
|
705
|
+
]),
|
|
706
|
+
a("div", dt, [
|
|
707
|
+
d(E, {
|
|
708
|
+
variant: "outlined",
|
|
709
|
+
class: "p-16"
|
|
710
|
+
}, {
|
|
711
|
+
default: R(() => [
|
|
712
|
+
d(U, { title: "Tier Distribution" }),
|
|
713
|
+
d(Ye, {
|
|
714
|
+
data: e(o),
|
|
715
|
+
metrics: e(b)
|
|
716
|
+
}, null, 8, ["data", "metrics"])
|
|
717
|
+
]),
|
|
718
|
+
_: 1
|
|
719
|
+
}),
|
|
720
|
+
d(ot)
|
|
721
|
+
]),
|
|
722
|
+
e(p).length ? I("", !0) : (i(), V(E, {
|
|
723
|
+
key: 0,
|
|
724
|
+
variant: "outlined",
|
|
725
|
+
class: "flex flex-col gap-y-24 items-center p-16"
|
|
726
|
+
}, {
|
|
727
|
+
default: R(() => [
|
|
728
|
+
f[3] || (f[3] = a("img", {
|
|
729
|
+
src: le,
|
|
730
|
+
class: "w-[150px]"
|
|
731
|
+
}, null, -1)),
|
|
732
|
+
f[4] || (f[4] = a("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Create campaign group to track performance ", -1)),
|
|
733
|
+
a("div", pt, $(e(r)("connect.analytic.emptyState.description")), 1),
|
|
734
|
+
a("div", ft, [
|
|
735
|
+
d(j, {
|
|
736
|
+
label: e(r)("connect.analytic.emptyState.action"),
|
|
737
|
+
icon: "add",
|
|
738
|
+
onClick: f[2] || (f[2] = (n) => x())
|
|
739
|
+
}, null, 8, ["label"])
|
|
740
|
+
])
|
|
741
|
+
]),
|
|
742
|
+
_: 1
|
|
743
|
+
})),
|
|
744
|
+
(i(!0), k(T, null, P(e(W), (n) => (i(), V(Pe, {
|
|
745
|
+
key: n._id.toString(),
|
|
746
|
+
group: n,
|
|
747
|
+
"on-edit": x
|
|
748
|
+
}, null, 8, ["group"]))), 128)),
|
|
749
|
+
d(Qe, {
|
|
750
|
+
ref_key: "sheetRef",
|
|
751
|
+
ref: g,
|
|
752
|
+
onSuccess: D
|
|
753
|
+
}, null, 512)
|
|
754
|
+
])
|
|
755
|
+
], 64);
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
export {
|
|
760
|
+
It as default
|
|
761
|
+
};
|