@feedmepos/mf-connect 0.1.38-beta.2 → 0.1.39-prod
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-D8WCDkga.js +427 -0
- package/dist/{App-D11A2JY1.js → App-CTnXtg1W.js} +352 -364
- package/dist/{Bin-9wV4Ah3M.js → Bin-BY6-bvFj.js} +8 -8
- package/dist/{Broadcast-I3BtSk8V.js → Broadcast-5VTEIQAr.js} +40 -40
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-XJqTXbKr.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BuAQxEM4.js} +18 -18
- package/dist/{Card-CqALG5RM.js → Card-8ivdV-Qz.js} +159 -159
- package/dist/{Collections-rg3SzoUb.js → Collections-CFszRHmE.js} +91 -103
- package/dist/{Credit-BNn1sYZv.js → Credit-DFslY__4.js} +74 -74
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-PJ8q72XH.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BvCLYtJ3.js} +488 -489
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Sww7KNle.js → EffectSheet.vue_vue_type_style_index_0_lang-Ci_bp7GH.js} +94 -94
- package/dist/{Experience-D_Qm8SUj.js → Experience-BxfiZNlY.js} +41 -41
- package/dist/{Game-CKXgXm6Q.js → Game-0FZJcLmj.js} +31 -31
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{Index-D4DGfUHd.js → Index-ByeKKbuM.js} +10 -10
- package/dist/Marketing-C7F4abzg.js +319 -0
- package/dist/{Member-B55vWHDd.js → Member-DP0fLSIV.js} +64 -64
- package/dist/MemberList-DFW2bMbr.js +1606 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-CP5EI-W0.js → MemberTransactions-CW62fvgx.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-iJXNbgsB.js +455 -0
- package/dist/{Mission-CFvhROuB.js → Mission-DEgQHJw6.js} +21 -21
- package/dist/{Overview-4273yNwL.js → Overview-5jDtZKi8.js} +335 -335
- package/dist/{Point-B_-_C919.js → Point-D2lB1-xB.js} +41 -41
- package/dist/{Promotion-D2S3COxk.js → Promotion-Diz1gIa0.js} +42 -42
- package/dist/{Queue-BmS1Oi-C.js → Queue-DIAuq7HG.js} +51 -51
- package/dist/{Record-DRBl0M8g.js → Record-T608yda1.js} +9 -9
- package/dist/{Reward-8056NmfK.js → Reward-fZzHrHCW.js} +173 -173
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CJ_WC2gV.js → RewardGroup.vue_vue_type_script_setup_true_lang-YOKVfimM.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DqNQl_nz.js → RuleGroup.vue_vue_type_script_setup_true_lang-C3_lmBe5.js} +431 -431
- package/dist/Segment-DDQIzsrk.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-4nNkkklE.js → SelectItems.vue_vue_type_script_setup_true_lang-B5oUf91Q.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Dnf2oxOG.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C2U6Kzvx.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BLYP-5U9.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRmqgxES.js} +3 -3
- package/dist/{Setting-BrJfYoru.js → Setting-CQNyXmp4.js} +432 -432
- package/dist/{Store-Bpl_4yZW.js → Store-CIA1Rtsg.js} +210 -210
- package/dist/StoreRewards-D5zlE6cE.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BkTYngJ_.js +995 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-QucRaI08.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D8l3fQyz.js} +1 -1
- package/dist/{Tier-_LnXg3n6.js → Tier-jFXVOje_.js} +106 -106
- package/dist/{Title-B7AGStvx.js → Title-DVpZ1YMK.js} +131 -133
- package/dist/{Transaction-Chxv6V7u.js → Transaction-BF_wmok6.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CzXNmobp.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Cex1Z43W.js} +6 -6
- package/dist/{Voucher-C5z2kOq9.js → Voucher-CaBMU5w0.js} +37 -37
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BXt2fLOD.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BlXzEWA6.js → ZodTextField.vue_vue_type_script_setup_true_lang-CtHjWpUe.js} +1 -1
- package/dist/{app-BVojNX0w.js → app-CPhyKlyf.js} +1 -1
- package/dist/{app-7cvPyHJ7.js → app-DuIzRGvb.js} +124 -161
- package/dist/app.js +3 -4
- package/dist/{business-CmxV69wT.js → business-TTvv3aTz.js} +1 -1
- package/dist/{campaign-Dq5C_no-.js → campaign-BiMCoAzx.js} +3 -5
- package/dist/{campaign-CT_cNJEL.js → campaign-CjEVStN1.js} +9 -9
- package/dist/{campaign.enum-dp7yHKzF.js → campaign.enum-DpYmj9jp.js} +1 -1
- package/dist/campaign.fn-DJ6J98jS.js +758 -0
- package/dist/{collectible.enum-DxbB4DxT.js → collectible.enum-Cgmm_s-C.js} +1 -1
- package/dist/{collection.fn-CNZRdUgy.js → collection.fn-BsYCNgfJ.js} +2 -2
- package/dist/{dto-CT9zZbv9.js → dto-DgmHIlZ2.js} +4 -4
- package/dist/{effect-FIlOEC4H.js → effect-DnAVIDFy.js} +1 -1
- package/dist/{email-addresses-Ba7xImfX.js → email-addresses-CMRgb6Uv.js} +1 -1
- package/dist/{export-uzjZFNF9.js → export-DtarK6IJ.js} +3 -3
- package/dist/{helper-D4sAZde0.js → helper-BKZghMbF.js} +1 -1
- package/dist/{index-l2F5MnLF.js → index-2OAcPmuQ.js} +1 -1
- package/dist/{index-BI3m1Ehv.js → index-B0YZKHyu.js} +3 -3
- package/dist/{index-CH3z92VV.js → index-B5oXFFlO.js} +1 -1
- package/dist/{index-CvBcve-r.js → index-BQ3KHJXX.js} +1 -1
- package/dist/{index-B9pl4zRZ.js → index-B_893fH7.js} +79 -179
- package/dist/{index-CNJLP3D5.js → index-BoR-BOFw.js} +1 -1
- package/dist/{index-DNxa8Rqx.js → index-C7rl1eHp.js} +449 -516
- package/dist/{index-BXz54M1s.js → index-CBcbwf0k.js} +1 -1
- package/dist/{index-CS3Jmojj.js → index-CIztuDE4.js} +2462 -2453
- package/dist/{index-D5rvMvzx.js → index-CK67enPK.js} +1 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D2uZzjpn.js +44 -0
- package/dist/{index-CUfS9Kp1.js → index-DWdAUovq.js} +9 -9
- package/dist/{index-CONvJfKv.js → index-DkWcEDHA.js} +1 -1
- package/dist/{index-BjU8LVUC.js → index-VHu8hYtE.js} +385 -376
- package/dist/{index.esm2017-ATcsD5N4.js → index.esm2017-DkwLmmR_.js} +127 -127
- package/dist/{loading-BWGQSrCB.js → loading-BFkEqWR6.js} +1 -1
- package/dist/{membership-Cc4OZ8-U.js → membership-D0eN3i_T.js} +3 -3
- package/dist/{money-D7p8nfun.js → money-DS9ZQwSP.js} +1 -1
- package/dist/{number-CMJjC4qz.js → number-C8Gt93v9.js} +1 -1
- package/dist/objectid-Cr99eTPd.js +145 -0
- package/dist/{plugins-eQis66QR.js → plugins-DK_ue6Xa.js} +2 -2
- package/dist/{reward-DrnzbG20.js → reward-CW2dSLDW.js} +1 -1
- package/dist/{rule-CtRxkYXB.js → rule-CebKyXSm.js} +3 -3
- package/dist/{rule-builder-Di9RIYHF.js → rule-builder-kQq14RfN.js} +17 -17
- package/dist/style.css +1 -1
- package/dist/{template-C3UfY0v5.js → template-CxUxlb6-.js} +64 -64
- package/dist/{trigger-C9U7Zgad.js → trigger-RqJo06KA.js} +4 -4
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{user-D7n9yYmO.js → user-DhV5Iy52.js} +1 -1
- package/dist/{vue-i18n-Bz45zC04.js → vue-i18n-BtvUK9hI.js} +419 -419
- package/dist/{xlsx-D4S4qbcZ.js → xlsx-WnLDq4qn.js} +381 -381
- package/package.json +3 -9
- package/dist/Analytic-BjSfI2Ff.js +0 -761
- package/dist/AuditLogs-DWCFYoRg.js +0 -1887
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +0 -58
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/Marketing-Dn9A1vgH.js +0 -20073
- package/dist/MemberList-BWTG9Ohy.js +0 -1606
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-D--_An-f.js +0 -60279
- package/dist/Segment-Bzq-pyhc.js +0 -882
- package/dist/StoreRewards-Cu7n7Pjz.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-T3Wo2maC.js +0 -1029
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DdGMrk2C.js +0 -419
- package/dist/campaign.fn-BYZgKDN7.js +0 -758
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-CwsMG2cV.js +0 -56
- package/dist/objectid-D5T27iny.js +0 -145
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
|
@@ -1,761 +0,0 @@
|
|
|
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
|
-
};
|