@feedmepos/mf-connect 0.1.1-prod → 0.1.3-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-DiPWt78u.js +423 -0
- package/dist/{App-DlRvkDpN.js → App-DvtYt9h5.js} +5 -5
- package/dist/{Broadcast-DpCGUS6r.js → Broadcast-Dv4XcvBh.js} +14 -14
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cj4IcH5D.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DoH4RX_Y.js} +8 -8
- package/dist/{Card-DjGC6jmq.js → Card-DDvwlZF0.js} +30 -30
- package/dist/{Collections-Q2pYWnJF.js → Collections-C5-k8WkG.js} +4 -4
- package/dist/{Credit-DOIq2VYW.js → Credit-BDQIr_FJ.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D7ML8ePp.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js} +22 -22
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CyxWG5I7.js → EffectSheet.vue_vue_type_style_index_0_lang-BQzgcn4V.js} +5 -5
- package/dist/{Experience-DUst4I0H.js → Experience-B9H3tOF0.js} +13 -13
- package/dist/{Game-CXnQR-wV.js → Game-cy3_ppLO.js} +15 -15
- package/dist/{Marketing-CZfHsMFC.js → Marketing-CWXV2n5F.js} +4 -4
- package/dist/{Member-CX5Ohgeg.js → Member-DyTX22Zk.js} +3 -3
- package/dist/{MemberList-D8I3SaAs.js → MemberList-CMefeirT.js} +84 -84
- package/dist/{MemberTransactions-DfZNbCHD.js → MemberTransactions-B9oYdzjR.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BxFVEoBX.js → MessageInput.vue_vue_type_script_setup_true_lang-B0T7ze7r.js} +2 -2
- package/dist/{Mission-S1pwDbqp.js → Mission-DxSO3iES.js} +13 -13
- package/dist/{Point-BdLUcGZy.js → Point-C5UtlqkX.js} +7 -7
- package/dist/{Promotion-DWAeQGkU.js → Promotion-DhSGTj-R.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Dux_NMO5.js → RuleGroup.vue_vue_type_script_setup_true_lang-BGM1doWM.js} +14 -14
- package/dist/Segment-BzI6Ykxp.js +564 -0
- package/dist/{Setting-CLuXuEId.js → Setting-SRUWwF9w.js} +7 -7
- package/dist/{Store-Be3cui0S.js → Store-CIrn_7Mh.js} +11 -11
- package/dist/{StoreRewards-zFy_w8p4.js → StoreRewards-BYc0vgnr.js} +10 -10
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DxGJKgbc.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JumDBZLs.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Dreo45H1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BtBCggcN.js} +1 -1
- package/dist/{Tier-ChzcISYF.js → Tier-ms8r2E7c.js} +13 -13
- package/dist/{Title-DQSjhBkT.js → Title-BBKoBs46.js} +13 -13
- package/dist/{Transaction-CeWmWpN_.js → Transaction-IZL9-6fe.js} +1 -1
- package/dist/{Voucher-BkLIxiZN.js → Voucher-CIWulmcc.js} +10 -10
- package/dist/{app-CLNirPsB.js → app-BQvluJk_.js} +24 -24
- package/dist/{app-DuNsy0aC.js → app-CGgrMOc_.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-COGiTmLD.js → business-DeMUnCNX.js} +1 -1
- package/dist/{campaign-BHZMjQi5.js → campaign-CBszI6An.js} +2 -2
- package/dist/{collection.fn-sAxtYO_r.js → collection.fn-D4Qgx1aW.js} +2 -2
- package/dist/{dto-ndeeV_nc.js → dto-Dtvg93Bz.js} +40 -40
- package/dist/{effect-BQt0rkdT.js → effect-2p4_SGbQ.js} +1 -1
- package/dist/{email-addresses-B3PazwKs.js → email-addresses-Bc9od2gA.js} +1 -1
- package/dist/{export-D6r-xNji.js → export-BK6FgeQO.js} +3 -3
- package/dist/{helper-CrjQw_Et.js → helper-DUkKW7uc.js} +1 -1
- package/dist/{index-C3AAy__p.js → index-AZ8cKg9n.js} +1 -1
- package/dist/{index-CqpEhMr6.js → index-B9f-K1No.js} +2 -2
- package/dist/{index-CvHj-wYi.js → index-BFcrfL4W.js} +1 -1
- package/dist/{index-DXpd07G3.js → index-BWWnWRpt.js} +2 -2
- package/dist/{index-Btlj28Vg.js → index-CTmiZrHu.js} +1 -1
- package/dist/{index-Daax_BQa.js → index-Ci8tkzSn.js} +1 -1
- package/dist/{index-Buy-yvAZ.js → index-Cvbyv9Hx.js} +1 -1
- package/dist/{index-DGLmbBnE.js → index-D4HYMbSu.js} +3 -3
- package/dist/{index-DrLEuIe1.js → index-DRaETKbn.js} +5 -5
- package/dist/{index-tSEYvA-2.js → index-M1SmasnI.js} +3 -3
- package/dist/{index-CHAaFSD2.js → index-UR1Lxi0C.js} +1 -1
- package/dist/{index-Cg3RFxc9.js → index-g4L04WYz.js} +5 -5
- package/dist/{index.esm2017-a5BlZ76G.js → index.esm2017-kvuav0Sd.js} +1 -1
- package/dist/{loading-B3XGyQ8W.js → loading-MNCADfHc.js} +4 -4
- package/dist/{membership-GIOJ1ptN.js → membership-CsbTF-DX.js} +3 -3
- package/dist/{money-z7VwzhZP.js → money-Lo7kavmu.js} +1 -1
- package/dist/{number-DHYb2ua_.js → number-BviV2K5O.js} +1 -1
- package/dist/{rule-iIEblTE4.js → rule-DKrUrnrM.js} +3 -3
- package/dist/{rule-builder-CcsWd5r9.js → rule-builder-DjPniLk6.js} +1 -1
- package/dist/{template-DMRMDZOW.js → template-DteMEC9C.js} +4 -4
- package/dist/{usePagination-CNFe0T2B.js → usePagination-BKTq-UbV.js} +1 -1
- package/package.json +1 -1
- package/dist/Analytic-C2etD-eu.js +0 -620
- package/dist/Segment-CXSE8Bzf.js +0 -560
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { defineComponent as T, ref as y, watch as X, onMounted as j, resolveComponent as h, openBlock as d, createBlock as S, withCtx as L, createVNode as g, unref as a, createElementVNode as r, createElementBlock as C, Fragment as F, renderList as O, computed as P, toDisplayString as E, isRef as D, createSlots as Y, createCommentVNode as k, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
|
|
2
|
+
import { _ as ne } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import "./index-D4HYMbSu.js";
|
|
4
|
+
import { F as le, C as oe } from "./dto-Dtvg93Bz.js";
|
|
5
|
+
import { useRouter as se } from "vue-router";
|
|
6
|
+
import { c as B } from "./index-CTmiZrHu.js";
|
|
7
|
+
import { _ as ie, Z as re } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
8
|
+
import { J as ue } from "./JsonViewer-v8_C7l5N.js";
|
|
9
|
+
import { u as ce } from "./loading-MNCADfHc.js";
|
|
10
|
+
import { useSnackbar as de } from "@feedmepos/ui-library";
|
|
11
|
+
import { u as me } from "./app-wDQR6dpb.js";
|
|
12
|
+
import { g as pe } from "./object-qECH92oz.js";
|
|
13
|
+
import { u as ve } from "./campaign-CBszI6An.js";
|
|
14
|
+
import { u as fe } from "./membership-CsbTF-DX.js";
|
|
15
|
+
const _e = { class: "ml-32 flex flex-col" }, ye = /* @__PURE__ */ T({
|
|
16
|
+
__name: "CampaignCard",
|
|
17
|
+
props: {
|
|
18
|
+
title: {},
|
|
19
|
+
items: {},
|
|
20
|
+
modelValue: {}
|
|
21
|
+
},
|
|
22
|
+
emits: ["update:model-value"],
|
|
23
|
+
setup(A, { emit: w }) {
|
|
24
|
+
const u = A, m = w, b = (l) => {
|
|
25
|
+
l ? _.value = u.items.map((e) => e.value) : _.value = [], p.value = l, m("update:model-value", _.value);
|
|
26
|
+
}, f = (l) => {
|
|
27
|
+
_.value = l, p.value = l.length === u.items.length, m("update:model-value", l);
|
|
28
|
+
}, p = y(!1), _ = y([]);
|
|
29
|
+
return X(
|
|
30
|
+
() => u.modelValue,
|
|
31
|
+
() => {
|
|
32
|
+
_.value = u.modelValue.filter(
|
|
33
|
+
(l) => u.items.find((e) => e.value === l)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
), j(() => {
|
|
37
|
+
_.value = u.modelValue.filter(
|
|
38
|
+
(l) => u.items.find((e) => e.value === l)
|
|
39
|
+
);
|
|
40
|
+
}), (l, e) => {
|
|
41
|
+
const o = h("FmCheckbox"), n = h("FmCard");
|
|
42
|
+
return d(), S(n, {
|
|
43
|
+
variant: "outlined",
|
|
44
|
+
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
45
|
+
}, {
|
|
46
|
+
default: L(() => [
|
|
47
|
+
g(o, {
|
|
48
|
+
"model-value": a(p),
|
|
49
|
+
value: "1",
|
|
50
|
+
label: u.title,
|
|
51
|
+
indeterminate: a(_).length > 0,
|
|
52
|
+
"onUpdate:modelValue": b
|
|
53
|
+
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
54
|
+
r("div", _e, [
|
|
55
|
+
(d(!0), C(F, null, O(u.items, (s, V) => (d(), S(o, {
|
|
56
|
+
key: V,
|
|
57
|
+
"model-value": a(_),
|
|
58
|
+
label: s.label,
|
|
59
|
+
value: s.value,
|
|
60
|
+
"onUpdate:modelValue": f
|
|
61
|
+
}, null, 8, ["model-value", "label", "value"]))), 128))
|
|
62
|
+
])
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}), ge = { class: "space-y-16" }, he = { class: "flex items-center" }, be = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, xe = { class: "space-y-[40px]" }, Ce = /* @__PURE__ */ T({
|
|
69
|
+
__name: "LinkCampaign",
|
|
70
|
+
props: {
|
|
71
|
+
modelValue: {
|
|
72
|
+
type: Array,
|
|
73
|
+
required: !0
|
|
74
|
+
},
|
|
75
|
+
campaigns: {
|
|
76
|
+
type: Object,
|
|
77
|
+
required: !0
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
emits: ["update:model-value"],
|
|
81
|
+
setup(A, { emit: w }) {
|
|
82
|
+
const u = y(""), m = y([]), b = A, f = w, p = P(() => Object.entries(b.campaigns).reduce((l, [e, o]) => {
|
|
83
|
+
const n = o.filter(
|
|
84
|
+
(s) => s.label.toLowerCase().includes(u.value.toLowerCase())
|
|
85
|
+
);
|
|
86
|
+
return n.length > 0 && (l[e] = n), l;
|
|
87
|
+
}, {}));
|
|
88
|
+
function _(l, e) {
|
|
89
|
+
m.value = m.value.filter(
|
|
90
|
+
(o) => !e.map((n) => n.value).includes(o)
|
|
91
|
+
), m.value = [.../* @__PURE__ */ new Set([...m.value, ...l])], f("update:model-value", m.value);
|
|
92
|
+
}
|
|
93
|
+
return j(() => {
|
|
94
|
+
m.value = b.modelValue;
|
|
95
|
+
}), (l, e) => {
|
|
96
|
+
const o = h("FmTextField");
|
|
97
|
+
return d(), C(F, null, [
|
|
98
|
+
g(ue, { json: A.campaigns }, null, 8, ["json"]),
|
|
99
|
+
r("div", ge, [
|
|
100
|
+
r("div", he, [
|
|
101
|
+
r("div", be, E(a(m).length) + " campaign(s) linked ", 1),
|
|
102
|
+
g(o, {
|
|
103
|
+
modelValue: a(u),
|
|
104
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => D(u) ? u.value = n : null),
|
|
105
|
+
"prepend-icon": "search",
|
|
106
|
+
placeholder: "Search",
|
|
107
|
+
class: "w-full"
|
|
108
|
+
}, null, 8, ["modelValue"])
|
|
109
|
+
]),
|
|
110
|
+
r("div", xe, [
|
|
111
|
+
(d(!0), C(F, null, O(a(p), (n, s) => (d(), S(ye, {
|
|
112
|
+
"model-value": a(m),
|
|
113
|
+
title: s,
|
|
114
|
+
items: n,
|
|
115
|
+
"onUpdate:modelValue": (V) => _(V, n)
|
|
116
|
+
}, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
|
|
117
|
+
])
|
|
118
|
+
])
|
|
119
|
+
], 64);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}), ke = { class: "flex items-center gap-x-8" }, Ve = {
|
|
123
|
+
key: 0,
|
|
124
|
+
class: "space-y-16 pr-12"
|
|
125
|
+
}, Se = /* @__PURE__ */ r("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), we = /* @__PURE__ */ r("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Fe = { class: "flex items-center gap-x-16" }, Ae = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, $e = { class: "mt-16" }, Ue = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Le = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Pe = { class: "flex items-center gap-8" }, Ge = /* @__PURE__ */ T({
|
|
126
|
+
__name: "AnalyticSheet",
|
|
127
|
+
emits: ["success"],
|
|
128
|
+
setup(A, { expose: w, emit: u }) {
|
|
129
|
+
const m = u, b = me();
|
|
130
|
+
de();
|
|
131
|
+
const f = y(!1), p = y(!1), _ = {
|
|
132
|
+
name: "",
|
|
133
|
+
campaigns: []
|
|
134
|
+
}, l = y(""), e = y({ ..._ }), o = le.superRefine((i, t) => {
|
|
135
|
+
}), n = y([]), s = y(null), { global: V, minor: $ } = ce, U = P(() => {
|
|
136
|
+
const i = o.safeParse(e.value);
|
|
137
|
+
return i.success ? [] : i.error.errors;
|
|
138
|
+
});
|
|
139
|
+
function H(i) {
|
|
140
|
+
var t;
|
|
141
|
+
f.value = !0, i ? (s.value = { ...i }, e.value = { ...i, campaigns: (t = i.pf_campaigns) == null ? void 0 : t.map((c) => c._id) }) : (s.value = null, e.value = { ..._ });
|
|
142
|
+
}
|
|
143
|
+
function M() {
|
|
144
|
+
f.value = !1, s.value = null;
|
|
145
|
+
}
|
|
146
|
+
function K() {
|
|
147
|
+
p.value = !0;
|
|
148
|
+
}
|
|
149
|
+
async function W() {
|
|
150
|
+
const i = await B.readAll({
|
|
151
|
+
limit: 1e3,
|
|
152
|
+
skip: 0,
|
|
153
|
+
sortBy: "_id",
|
|
154
|
+
search: "",
|
|
155
|
+
descending: !0
|
|
156
|
+
});
|
|
157
|
+
n.value = i.resources.filter(
|
|
158
|
+
(t) => !["MEMBERSHIP", "REWARD_POOL"].includes(t.type) && !["ISSUE_REWARD"].includes("event" in t ? t == null ? void 0 : t.event.type : "")
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
const I = P(() => {
|
|
162
|
+
const i = (c) => c.map((x) => ({
|
|
163
|
+
label: x.name,
|
|
164
|
+
value: x._id
|
|
165
|
+
}));
|
|
166
|
+
return pe(
|
|
167
|
+
n.value,
|
|
168
|
+
(c) => oe.formattedType(c.type),
|
|
169
|
+
i
|
|
170
|
+
);
|
|
171
|
+
}), q = P(() => Object.entries(I.value).reduce(
|
|
172
|
+
(i, [t, c]) => {
|
|
173
|
+
const x = c.filter((G) => {
|
|
174
|
+
var R, v;
|
|
175
|
+
return (v = (R = e.value) == null ? void 0 : R.campaigns) == null ? void 0 : v.includes(G.value);
|
|
176
|
+
}).filter(
|
|
177
|
+
(G) => G.label.toLowerCase().includes(l.value.toLowerCase())
|
|
178
|
+
);
|
|
179
|
+
return x.length > 0 && (i[t] = x), i;
|
|
180
|
+
},
|
|
181
|
+
{}
|
|
182
|
+
));
|
|
183
|
+
function J(i) {
|
|
184
|
+
var c, x;
|
|
185
|
+
const t = (c = e.value.campaigns) == null ? void 0 : c.indexOf(i);
|
|
186
|
+
t != null && t > -1 && ((x = e.value.campaigns) == null || x.splice(t, 1));
|
|
187
|
+
}
|
|
188
|
+
async function Z() {
|
|
189
|
+
o.safeParse(e.value).success && await $(
|
|
190
|
+
async () => {
|
|
191
|
+
var t;
|
|
192
|
+
s.value ? await B.updateGroup(
|
|
193
|
+
(t = s.value) == null ? void 0 : t._id,
|
|
194
|
+
e.value
|
|
195
|
+
) : await B.createGroup(e.value), m("success"), M();
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
message: "Saving group",
|
|
199
|
+
successMessage: "Group saved"
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
async function z() {
|
|
204
|
+
await $(
|
|
205
|
+
async () => {
|
|
206
|
+
var i;
|
|
207
|
+
await B.deleteGroup((i = s.value) == null ? void 0 : i._id), m("success"), M();
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
message: "Deleting group",
|
|
211
|
+
successMessage: "Group deleted"
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
return j(async () => {
|
|
216
|
+
await W();
|
|
217
|
+
}), w({
|
|
218
|
+
showSheet: H,
|
|
219
|
+
hideSheet: M
|
|
220
|
+
}), (i, t) => {
|
|
221
|
+
const c = h("FmButton"), x = h("FmTextField"), G = h("FmList"), R = h("FmSideSheet");
|
|
222
|
+
return d(), S(R, {
|
|
223
|
+
modelValue: a(f),
|
|
224
|
+
"onUpdate:modelValue": t[7] || (t[7] = (v) => D(f) ? f.value = v : null),
|
|
225
|
+
header: a(s) ? "Edit group" : "Add group",
|
|
226
|
+
"dismiss-away": "",
|
|
227
|
+
"close-button": !0,
|
|
228
|
+
"max-width": 550
|
|
229
|
+
}, Y({
|
|
230
|
+
"side-sheet-footer": L(() => [
|
|
231
|
+
r("div", Pe, [
|
|
232
|
+
a(p) ? k("", !0) : (d(), C(F, { key: 0 }, [
|
|
233
|
+
g(c, {
|
|
234
|
+
label: "Submit",
|
|
235
|
+
onClick: Z,
|
|
236
|
+
disabled: a(U).length > 0 || a(b).isLoading
|
|
237
|
+
}, null, 8, ["disabled"]),
|
|
238
|
+
g(c, {
|
|
239
|
+
label: "Cancel",
|
|
240
|
+
onClick: t[4] || (t[4] = (v) => M()),
|
|
241
|
+
variant: "tertiary"
|
|
242
|
+
}),
|
|
243
|
+
a(s) ? (d(), S(c, {
|
|
244
|
+
key: 0,
|
|
245
|
+
label: "Delete",
|
|
246
|
+
variant: "plain",
|
|
247
|
+
class: "ml-auto fm-color-system-error-300",
|
|
248
|
+
onClick: t[5] || (t[5] = (v) => z())
|
|
249
|
+
})) : k("", !0)
|
|
250
|
+
], 64)),
|
|
251
|
+
a(p) ? (d(), S(c, {
|
|
252
|
+
key: 1,
|
|
253
|
+
label: "Confirm",
|
|
254
|
+
onClick: t[6] || (t[6] = (v) => p.value = !1)
|
|
255
|
+
})) : k("", !0)
|
|
256
|
+
])
|
|
257
|
+
]),
|
|
258
|
+
default: L(() => [
|
|
259
|
+
a(p) ? k("", !0) : (d(), C("div", Ve, [
|
|
260
|
+
Se,
|
|
261
|
+
g(ie, {
|
|
262
|
+
modelValue: a(e).name,
|
|
263
|
+
"onUpdate:modelValue": t[1] || (t[1] = (v) => a(e).name = v),
|
|
264
|
+
label: "Name",
|
|
265
|
+
schema: a(re).typeAtPath(a(o), "name")
|
|
266
|
+
}, null, 8, ["modelValue", "schema"]),
|
|
267
|
+
we,
|
|
268
|
+
r("div", Fe, [
|
|
269
|
+
r("div", Ae, E(a(e).campaigns.length) + " campaign(s) linked ", 1),
|
|
270
|
+
g(x, {
|
|
271
|
+
modelValue: a(l),
|
|
272
|
+
"onUpdate:modelValue": t[2] || (t[2] = (v) => D(l) ? l.value = v : null),
|
|
273
|
+
"prepend-icon": "search",
|
|
274
|
+
placeholder: "Search",
|
|
275
|
+
class: "w-auto"
|
|
276
|
+
}, null, 8, ["modelValue"])
|
|
277
|
+
]),
|
|
278
|
+
g(c, {
|
|
279
|
+
variant: "plain",
|
|
280
|
+
icon: "link",
|
|
281
|
+
label: "Link Campaign",
|
|
282
|
+
onClick: K
|
|
283
|
+
})
|
|
284
|
+
])),
|
|
285
|
+
a(p) ? (d(), S(Ce, {
|
|
286
|
+
key: 1,
|
|
287
|
+
modelValue: a(e).campaigns,
|
|
288
|
+
"onUpdate:modelValue": t[3] || (t[3] = (v) => a(e).campaigns = v),
|
|
289
|
+
campaigns: a(I)
|
|
290
|
+
}, null, 8, ["modelValue", "campaigns"])) : k("", !0),
|
|
291
|
+
r("div", $e, [
|
|
292
|
+
a(p) ? k("", !0) : (d(!0), C(F, { key: 0 }, O(a(q), (v, Q) => (d(), C("div", null, [
|
|
293
|
+
r("div", Ue, E(Q), 1),
|
|
294
|
+
g(G, { separator: !0 }, {
|
|
295
|
+
default: L(() => [
|
|
296
|
+
(d(!0), C(F, null, O(v, (N) => (d(), C("div", Le, [
|
|
297
|
+
r("div", null, E(N.label), 1),
|
|
298
|
+
r("div", null, [
|
|
299
|
+
g(c, {
|
|
300
|
+
icon: "delete",
|
|
301
|
+
onClick: (Te) => J(N.value),
|
|
302
|
+
variant: "tertiary"
|
|
303
|
+
}, null, 8, ["onClick"])
|
|
304
|
+
])
|
|
305
|
+
]))), 256))
|
|
306
|
+
]),
|
|
307
|
+
_: 2
|
|
308
|
+
}, 1024)
|
|
309
|
+
]))), 256))
|
|
310
|
+
])
|
|
311
|
+
]),
|
|
312
|
+
_: 2
|
|
313
|
+
}, [
|
|
314
|
+
a(p) ? {
|
|
315
|
+
name: "side-sheet-header",
|
|
316
|
+
fn: L(() => [
|
|
317
|
+
r("div", ke, [
|
|
318
|
+
g(c, {
|
|
319
|
+
icon: "arrow_back",
|
|
320
|
+
variant: "tertiary",
|
|
321
|
+
onClick: t[0] || (t[0] = (v) => p.value = !1)
|
|
322
|
+
}),
|
|
323
|
+
ee("Link campaign ")
|
|
324
|
+
])
|
|
325
|
+
]),
|
|
326
|
+
key: "0"
|
|
327
|
+
} : void 0
|
|
328
|
+
]), 1032, ["modelValue", "header"]);
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
}), Be = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Me = { class: "space-y-16" }, Re = { class: "flex items-center justify-end" }, Ee = /* @__PURE__ */ r("img", {
|
|
332
|
+
src: ne,
|
|
333
|
+
class: "w-[150px]"
|
|
334
|
+
}, null, -1), Oe = /* @__PURE__ */ r("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1), De = /* @__PURE__ */ r("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " We apologize for the inconvenience. The analytics dashboard is currently under maintenance to improve your experience. Please check back later for updates on system availability. ", -1), tt = /* @__PURE__ */ T({
|
|
335
|
+
__name: "Analytic",
|
|
336
|
+
setup(A) {
|
|
337
|
+
const w = {
|
|
338
|
+
label: "Add group",
|
|
339
|
+
value: "create",
|
|
340
|
+
isPrimary: !0,
|
|
341
|
+
prependIcon: "add"
|
|
342
|
+
}, u = ve(), m = y(), b = y([]), f = y("");
|
|
343
|
+
te({
|
|
344
|
+
totalCampaign: 0,
|
|
345
|
+
totalProgram: 0,
|
|
346
|
+
totalMember: 0
|
|
347
|
+
});
|
|
348
|
+
const p = y("1");
|
|
349
|
+
function _(o) {
|
|
350
|
+
var n;
|
|
351
|
+
p.value = (/* @__PURE__ */ new Date()).toISOString(), (n = m.value) == null || n.showSheet(o);
|
|
352
|
+
}
|
|
353
|
+
async function l() {
|
|
354
|
+
await u.readGroups();
|
|
355
|
+
const o = await B.readAllGrouped({
|
|
356
|
+
limit: 100,
|
|
357
|
+
skip: 0,
|
|
358
|
+
sortBy: "_id",
|
|
359
|
+
search: "",
|
|
360
|
+
descending: !0
|
|
361
|
+
});
|
|
362
|
+
b.value = o.resources;
|
|
363
|
+
}
|
|
364
|
+
P(() => b.value.filter((o) => {
|
|
365
|
+
var n;
|
|
366
|
+
return o.name.includes(f.value) || ((n = o.pf_campaigns) == null ? void 0 : n.filter((s) => s.name.includes(f.value)).length);
|
|
367
|
+
}));
|
|
368
|
+
const e = fe();
|
|
369
|
+
return se(), y(!0), P(() => {
|
|
370
|
+
var o, n, s, V;
|
|
371
|
+
return !e.storeOption || !e.storeOption.company ? -1 : !e.payoutAccount || !e.payoutAccount.enable || e.payoutAccount.status != "APPROVED" ? 0 : (n = (o = e.store) == null ? void 0 : o.categories) != null && n.length ? (V = (s = e.store) == null ? void 0 : s.categories) != null && V.some(
|
|
372
|
+
($) => $.bundles.some((U) => U.isFeedvibe)
|
|
373
|
+
) ? 3 : 2 : 1;
|
|
374
|
+
}), ae(async () => {
|
|
375
|
+
await e.readMemberStore(), await e.readMembership(), await e.readPayoutAccount();
|
|
376
|
+
}), (o, n) => {
|
|
377
|
+
const s = h("FmPageHead"), V = h("FmSearch"), $ = h("FmCard");
|
|
378
|
+
return h("FmButton"), h("FmIcon"), d(), C(F, null, [
|
|
379
|
+
g(s, {
|
|
380
|
+
title: "Analytic",
|
|
381
|
+
actions: a(b).length > 0 ? [w] : [],
|
|
382
|
+
"onClick:action": n[0] || (n[0] = (U) => _())
|
|
383
|
+
}, null, 8, ["actions"]),
|
|
384
|
+
r("div", Be, [
|
|
385
|
+
r("div", Me, [
|
|
386
|
+
r("div", Re, [
|
|
387
|
+
g(V, {
|
|
388
|
+
class: "xs:hidden",
|
|
389
|
+
modelValue: a(f),
|
|
390
|
+
"onUpdate:modelValue": n[1] || (n[1] = (U) => D(f) ? f.value = U : null),
|
|
391
|
+
placeholder: "Search",
|
|
392
|
+
collapsible: ""
|
|
393
|
+
}, null, 8, ["modelValue"])
|
|
394
|
+
]),
|
|
395
|
+
k("", !0)
|
|
396
|
+
]),
|
|
397
|
+
k("", !0),
|
|
398
|
+
a(b).length ? k("", !0) : (d(), S($, {
|
|
399
|
+
key: 1,
|
|
400
|
+
variant: "outlined",
|
|
401
|
+
class: "flex flex-col gap-y-24 items-center p-16"
|
|
402
|
+
}, {
|
|
403
|
+
default: L(() => [
|
|
404
|
+
Ee,
|
|
405
|
+
Oe,
|
|
406
|
+
De
|
|
407
|
+
]),
|
|
408
|
+
_: 1
|
|
409
|
+
})),
|
|
410
|
+
k("", !0),
|
|
411
|
+
g(Ge, {
|
|
412
|
+
ref_key: "sheetRef",
|
|
413
|
+
ref: m,
|
|
414
|
+
onSuccess: l
|
|
415
|
+
}, null, 512)
|
|
416
|
+
])
|
|
417
|
+
], 64);
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
export {
|
|
422
|
+
tt as default
|
|
423
|
+
};
|
|
@@ -2,14 +2,14 @@ import { defineComponent as lt, ref as te, h as Q, watch as ut, resolveComponent
|
|
|
2
2
|
import { useRouter as nn, useRoute as ht, RouterView as rn } from "vue-router";
|
|
3
3
|
import { useCoreStore as We, FeedMeAuth as sn } from "@feedmepos/mf-common";
|
|
4
4
|
import { u as on } from "./app-wDQR6dpb.js";
|
|
5
|
-
import { u as an } from "./business-
|
|
6
|
-
import "./index-
|
|
5
|
+
import { u as an } from "./business-DeMUnCNX.js";
|
|
6
|
+
import "./index-UR1Lxi0C.js";
|
|
7
7
|
import { components as Z, useSnackbar as cn, useDialog as ln } from "@feedmepos/ui-library";
|
|
8
|
-
import { R as f } from "./app-
|
|
8
|
+
import { R as f } from "./app-BQvluJk_.js";
|
|
9
9
|
import { J as un } from "./JsonViewer-v8_C7l5N.js";
|
|
10
|
-
import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-
|
|
10
|
+
import { r as ye, L as dn, g as ft, i as hn, a as fn, _ as je, C as Ge, b as pn, S as z, c as w, d as j, E as be, e as mn, f as pt, h as gn, j as _n, k as mt, l as g, m as vn, F as Re, n as In, q as K, o as Tn, p as wn, s as yn, t as En, u as kn } from "./index.esm2017-kvuav0Sd.js";
|
|
11
11
|
import { _ as Pe } from "./tslib.es6-BCqqvLQ_.js";
|
|
12
|
-
import { S as Be, c as Sn } from "./index-
|
|
12
|
+
import { S as Be, c as Sn } from "./index-D4HYMbSu.js";
|
|
13
13
|
const bn = /* @__PURE__ */ lt({
|
|
14
14
|
__name: "NavigationTab",
|
|
15
15
|
setup(n) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as _, createVNode as r, unref as a, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as
|
|
1
|
+
import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as l, openBlock as i, createElementBlock as f, Fragment as _, createVNode as r, unref as a, createElementVNode as s, withCtx as h, renderList as j, createBlock as w, resolveDynamicComponent as E, toDisplayString as C, createCommentVNode as H, h as q } from "vue";
|
|
2
2
|
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as Q, p as W } from "./loading-
|
|
5
|
-
import { u as X } from "./business-
|
|
6
|
-
import { u as Y } from "./campaign-
|
|
7
|
-
import { g as F,
|
|
4
|
+
import { u as Q, p as W } from "./loading-MNCADfHc.js";
|
|
5
|
+
import { u as X } from "./business-DeMUnCNX.js";
|
|
6
|
+
import { u as Y } from "./campaign-CBszI6An.js";
|
|
7
|
+
import { g as F, a as k } from "./dto-Dtvg93Bz.js";
|
|
8
8
|
import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
-
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { u as te } from "./template-
|
|
11
|
-
import { c as y } from "./index-
|
|
9
|
+
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js";
|
|
10
|
+
import { u as te } from "./template-DteMEC9C.js";
|
|
11
|
+
import { c as y } from "./index-CTmiZrHu.js";
|
|
12
12
|
const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ne = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "space-y-4" }, ce = { class: "fm-typo-en-body-lg-600" }, me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, de = { key: 0 }, ue = /* @__PURE__ */ s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), pe = [
|
|
13
13
|
ue
|
|
14
14
|
], fe = /* @__PURE__ */ s("img", {
|
|
@@ -25,7 +25,7 @@ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-
|
|
|
25
25
|
value: "create",
|
|
26
26
|
isPrimary: !0,
|
|
27
27
|
prependIcon: "add"
|
|
28
|
-
}, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor:
|
|
28
|
+
}, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: b } = Q, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
|
|
29
29
|
searchKey: "",
|
|
30
30
|
location: null
|
|
31
31
|
}), u = U(
|
|
@@ -66,7 +66,7 @@ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-
|
|
|
66
66
|
}
|
|
67
67
|
], v = g();
|
|
68
68
|
async function x(e) {
|
|
69
|
-
await W.remove(`Are you sure you want to remove ${e.name}?`) && await
|
|
69
|
+
await W.remove(`Are you sure you want to remove ${e.name}?`) && await b(
|
|
70
70
|
async () => {
|
|
71
71
|
await y.delete(e._id), await c.read("BROADCAST");
|
|
72
72
|
},
|
|
@@ -91,7 +91,7 @@ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
async function $(e) {
|
|
94
|
-
await
|
|
94
|
+
await b(
|
|
95
95
|
async () => {
|
|
96
96
|
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await c.read("BROADCAST");
|
|
97
97
|
},
|
|
@@ -164,11 +164,11 @@ const oe = { class: "px-24 flex flex-col gap-y-16" }, ae = { class: "flex items-
|
|
|
164
164
|
s("div", ne, [
|
|
165
165
|
s("div", re, [
|
|
166
166
|
(i(), w(E(a(F)(t)))),
|
|
167
|
-
s("div", le,
|
|
167
|
+
s("div", le, C(t.currentReceive ?? 0) + " sent ", 1)
|
|
168
168
|
]),
|
|
169
169
|
s("div", ie, [
|
|
170
|
-
s("div", ce,
|
|
171
|
-
s("div", me,
|
|
170
|
+
s("div", ce, C(t.name), 1),
|
|
171
|
+
s("div", me, C(a(k)(t)), 1)
|
|
172
172
|
])
|
|
173
173
|
]),
|
|
174
174
|
r(S, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as RuleOperator, _ } from "./index-
|
|
2
|
-
import { i as isRuleGroup } from "./rule-builder-
|
|
1
|
+
import { R as RuleOperator, _ } from "./index-Cvbyv9Hx.js";
|
|
2
|
+
import { i as isRuleGroup } from "./rule-builder-DjPniLk6.js";
|
|
3
3
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
|
|
4
4
|
import { useDialog } from "@feedmepos/ui-library";
|
|
5
|
-
import "./index-
|
|
6
|
-
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
5
|
+
import "./index-BWWnWRpt.js";
|
|
6
|
+
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-g4L04WYz.js";
|
|
7
|
+
import "./index-M1SmasnI.js";
|
|
8
|
+
import "./index-DRaETKbn.js";
|
|
9
|
+
import "./index-B9f-K1No.js";
|
|
10
|
+
import "./index-Ci8tkzSn.js";
|
|
11
11
|
function validateRule(data, r, date) {
|
|
12
12
|
const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
|
|
13
13
|
function meetConditions(e) {
|