@feedmepos/mf-connect 0.0.5-beta.13 → 0.0.5-beta.14
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-B7IpziVv.js → Analytic-CI7u8uHq.js} +78 -76
- package/dist/{Broadcast-BmNvBKID.js → Broadcast-D-6yG2H_.js} +49 -47
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CPaGUFN7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-SEkduLOh.js} +8 -8
- package/dist/{Card-DGGk4IG5.js → Card-CFaujO6W.js} +23 -21
- package/dist/{Collections-QHD3qzDS.js → Collections-F9SkwyBw.js} +14 -12
- package/dist/{Credit-CwcpXFeF.js → Credit-C7GHbcjH.js} +10 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-_APQQMfG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DJOPf7HG.js} +173 -161
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-C72dqCjj.js → EffectSheet.vue_vue_type_style_index_0_lang-BRrL9c4R.js} +6 -6
- package/dist/{Experience-DkFmW68q.js → Experience-J_WAHdEx.js} +10 -8
- package/dist/{Game-D_9s4HpH.js → Game-DBOkj0Sm.js} +21 -19
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DMsxZkxf.js → ImageInput.vue_vue_type_script_setup_true_lang-Cby5g9Gw.js} +1 -1
- package/dist/{MainLayout-BCT5RGN3.js → LottieAnimation.vue_vue_type_script_setup_true_lang-B-gOaF33.js} +20 -53
- package/dist/MainLayout-DBG1TR8x.js +41 -0
- package/dist/{Marketing-BRw1TWaQ.js → Marketing-CssyzueX.js} +41 -41
- package/dist/{Member-QyJbYoqm.js → Member-KmXvN2JR.js} +2 -2
- package/dist/MemberList-DIpvABre.js +1673 -0
- package/dist/{MemberTransactions-D0qtN_n0.js → MemberTransactions-BpcyQZUb.js} +2 -2
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-CvsCQehh.js +395 -0
- package/dist/{Point-GsnIg16I.js → Point-rvfPYTRC.js} +24 -22
- package/dist/{Promotion-oUetBJOL.js → Promotion-Bs-7JEbD.js} +11 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BzubM0WS.js → RuleGroup.vue_vue_type_script_setup_true_lang-B_rGmgBm.js} +15 -14
- package/dist/{Segment-BoSwxho7.js → Segment-CWuViE9E.js} +63 -61
- package/dist/{Setting-DOImAjRm.js → Setting-CVDqj30p.js} +591 -559
- package/dist/Store-CClPFnAG.js +1437 -0
- package/dist/{StoreRewards-BUscgAAm.js → StoreRewards-DKQkyKWz.js} +40 -37
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-3hP-sXQ9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-B-ZhQjB1.js} +73 -73
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CHzFWm_h.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C5D7wzi-.js} +1 -1
- package/dist/{Tier-Dv7WQcNG.js → Tier-BNB2tjj7.js} +205 -199
- package/dist/{Title-B6X7sVT0.js → Title-DahV-1W0.js} +98 -91
- package/dist/{Transaction-Bhw60pPn.js → Transaction-LXao_ZjZ.js} +1 -1
- package/dist/{Voucher-DMIZwMl5.js → Voucher-BaYbM3Sh.js} +78 -77
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js +55 -0
- package/dist/app-BbSvXV58.js +31396 -0
- package/dist/app.js +3 -3
- package/dist/campaign-gFq18CQ_.js +90 -0
- package/dist/{collection.fn-DHlfGYAC.js → collection.fn-B0G-IbaZ.js} +4 -2
- package/dist/dto-Desowk9r.js +1093 -0
- package/dist/{effect-NJxcT7hf.js → effect-BhJA3un4.js} +1 -1
- package/dist/{helper-BSW3sFO6.js → helper-_D-x0tLL.js} +1 -1
- package/dist/{index-Cho3vuXZ.js → index-B6Srf7Qk.js} +1324 -1302
- package/dist/{index-5-01FGmt.js → index-BPVnwDa4.js} +8 -9
- package/dist/{index-D8lqoN-g.js → index-BtpApc23.js} +2 -2
- package/dist/index-CDbIjUqF.js +1736 -0
- package/dist/{index-CKoxiKng.js → index-Cf8eWMqV.js} +144 -132
- package/dist/{index-Do0lqtez.js → index-D6DPD3Px.js} +5 -6
- package/dist/index-DJsfkPyh.js +95 -0
- package/dist/{index-saYS0aT9.js → index-DS4DBOFZ.js} +101 -84
- package/dist/index-DW42bi_w.js +104 -0
- package/dist/{index-CcL5gr7R.js → index-QSEC4xWd.js} +23 -24
- package/dist/{loading-BJHiTZV8.js → loading-JcwqhNwc.js} +2 -2
- package/dist/{lodash-BM1DnUsi.js → lodash-CnyIrMM1.js} +1 -1
- package/dist/membership-D60sV4a6.js +210 -0
- package/dist/{money-Bg7y_-Gs.js → money-Dhk8f-Hr.js} +1 -1
- package/dist/{number-DowMzZGo.js → number-C-THZz5J.js} +3 -3
- package/dist/{plugins-_5zFIgDV.js → plugins-Bfrv3oTZ.js} +13901 -11161
- package/dist/{rule-builder-CBS0EimX.js → rule-builder-C0VKzAUb.js} +1 -1
- package/dist/{rule-DMILgPPp.js → rule-relqp19E.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{template-CIuNN_jY.js → template--qssrBD6.js} +6 -6
- package/dist/{usePagination-8uk6rDV3.js → usePagination-Q7fzhUEx.js} +1 -1
- package/dist/{xlsx-CBh3M-3u.js → xlsx-kbjfFCL4.js} +1 -1
- package/dist/zod-W_PvIofQ.js +90 -0
- package/package.json +1 -1
- package/dist/JsonViewer-uZbDYf50.js +0 -87
- package/dist/MemberList-Dq-AFUQE.js +0 -1662
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BnM_Vq5J.js +0 -166
- package/dist/Store-kvJB-lOm.js +0 -1422
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-doYfgN1H.js +0 -34515
- package/dist/dto-CC3RwNTH.js +0 -353
- package/dist/index-MmYykn_7.js +0 -1743
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { defineComponent as I, openBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { f as
|
|
4
|
-
import { C as se, F as ie, a as re } from "./dto-
|
|
1
|
+
import { defineComponent as I, openBlock as l, createElementBlock as h, Fragment as V, renderList as P, createElementVNode as a, toDisplayString as U, createCommentVNode as B, resolveComponent as S, createBlock as F, withCtx as O, createVNode as p, unref as n, ref as C, computed as G, onMounted as q, watch as X, isRef as N, createSlots as Y, createTextVNode as ee, reactive as te, onBeforeMount as ae, normalizeClass as ne } from "vue";
|
|
2
|
+
import { _ as oe } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { f as le } from "./number-C-THZz5J.js";
|
|
4
|
+
import { C as se, F as ie, a as re } from "./dto-Desowk9r.js";
|
|
5
5
|
import { useRouter as ce } from "vue-router";
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
import "./
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { c as T } from "./index-DW42bi_w.js";
|
|
7
|
+
import { _ as ue } from "./ZodTextField.vue_vue_type_script_setup_true_lang-CWt4tVdk.js";
|
|
8
|
+
import { Z as de } from "./zod-W_PvIofQ.js";
|
|
9
|
+
import { J as me, u as pe } from "./app-BbSvXV58.js";
|
|
10
|
+
import "./plugins-Bfrv3oTZ.js";
|
|
11
|
+
import { useSnackbar as fe } from "@feedmepos/ui-library";
|
|
12
|
+
import { u as ve } from "./loading-JcwqhNwc.js";
|
|
13
|
+
import { g as ye } from "./object-qECH92oz.js";
|
|
14
|
+
import { u as _e } from "./campaign-gFq18CQ_.js";
|
|
15
|
+
import { m as ge } from "./index-BtpApc23.js";
|
|
14
16
|
const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, xe = { class: "fm-typo-en-title-sm-800" }, Ce = /* @__PURE__ */ I({
|
|
15
17
|
__name: "CampaignStat",
|
|
16
18
|
props: {
|
|
@@ -30,11 +32,11 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
30
32
|
];
|
|
31
33
|
function u(_) {
|
|
32
34
|
var r;
|
|
33
|
-
return
|
|
35
|
+
return le((r = R.data) == null ? void 0 : r[_], 2, !0) || 0;
|
|
34
36
|
}
|
|
35
|
-
return (_, r) => (
|
|
36
|
-
(
|
|
37
|
-
e.key in m.data ? (
|
|
37
|
+
return (_, r) => (l(), h("div", he, [
|
|
38
|
+
(l(), h(V, null, P(i, (e) => (l(), h(V, null, [
|
|
39
|
+
e.key in m.data ? (l(), h("div", {
|
|
38
40
|
key: e.key,
|
|
39
41
|
class: "px-16"
|
|
40
42
|
}, [
|
|
@@ -61,7 +63,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
61
63
|
const i = se[m.type];
|
|
62
64
|
return (u, _) => {
|
|
63
65
|
const r = S("FmIcon"), e = S("FmTooltip");
|
|
64
|
-
return
|
|
66
|
+
return l(), F(e, {
|
|
65
67
|
variant: "plain",
|
|
66
68
|
placement: "top",
|
|
67
69
|
content: m.label
|
|
@@ -117,8 +119,8 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
117
119
|
groupId: i.group._id.toString()
|
|
118
120
|
});
|
|
119
121
|
}), (e, c) => {
|
|
120
|
-
const s = S("FmButton"),
|
|
121
|
-
return
|
|
122
|
+
const s = S("FmButton"), o = S("FmCard");
|
|
123
|
+
return l(), F(o, {
|
|
122
124
|
class: "mb-24 p-24",
|
|
123
125
|
variant: "outlined"
|
|
124
126
|
}, {
|
|
@@ -135,7 +137,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
135
137
|
])
|
|
136
138
|
]),
|
|
137
139
|
a("div", Ae, [
|
|
138
|
-
(
|
|
140
|
+
(l(!0), h(V, null, P(n(r), (f) => (l(), F(we, {
|
|
139
141
|
key: e.index,
|
|
140
142
|
type: f.campaign.type,
|
|
141
143
|
label: f.label
|
|
@@ -158,7 +160,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
158
160
|
emits: ["update:model-value"],
|
|
159
161
|
setup(m, { emit: R }) {
|
|
160
162
|
const i = m, u = R, _ = (s) => {
|
|
161
|
-
s ? c.value = i.items.map((
|
|
163
|
+
s ? c.value = i.items.map((o) => o.value) : c.value = [], e.value = s, u("update:model-value", c.value);
|
|
162
164
|
}, r = (s) => {
|
|
163
165
|
c.value = s, e.value = s.length === i.items.length, u("update:model-value", s);
|
|
164
166
|
}, e = C(!1), c = C([]);
|
|
@@ -166,16 +168,16 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
166
168
|
() => i.modelValue,
|
|
167
169
|
() => {
|
|
168
170
|
c.value = i.modelValue.filter(
|
|
169
|
-
(s) => i.items.find((
|
|
171
|
+
(s) => i.items.find((o) => o.value === s)
|
|
170
172
|
);
|
|
171
173
|
}
|
|
172
174
|
), q(() => {
|
|
173
175
|
c.value = i.modelValue.filter(
|
|
174
|
-
(s) => i.items.find((
|
|
176
|
+
(s) => i.items.find((o) => o.value === s)
|
|
175
177
|
);
|
|
176
|
-
}), (s,
|
|
178
|
+
}), (s, o) => {
|
|
177
179
|
const f = S("FmCheckbox"), b = S("FmCard");
|
|
178
|
-
return
|
|
180
|
+
return l(), F(b, {
|
|
179
181
|
variant: "outlined",
|
|
180
182
|
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
181
183
|
}, {
|
|
@@ -188,7 +190,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
188
190
|
"onUpdate:modelValue": _
|
|
189
191
|
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
190
192
|
a("div", Oe, [
|
|
191
|
-
(
|
|
193
|
+
(l(!0), h(V, null, P(i.items, (g, w) => (l(), F(f, {
|
|
192
194
|
key: w,
|
|
193
195
|
"model-value": n(c),
|
|
194
196
|
label: g.label,
|
|
@@ -215,36 +217,36 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
215
217
|
},
|
|
216
218
|
emits: ["update:model-value"],
|
|
217
219
|
setup(m, { emit: R }) {
|
|
218
|
-
const i = C(""), u = C([]), _ = m, r = R, e = G(() => Object.entries(_.campaigns).reduce((s, [
|
|
220
|
+
const i = C(""), u = C([]), _ = m, r = R, e = G(() => Object.entries(_.campaigns).reduce((s, [o, f]) => {
|
|
219
221
|
const b = f.filter(
|
|
220
222
|
(g) => g.label.toLowerCase().includes(i.value.toLowerCase())
|
|
221
223
|
);
|
|
222
|
-
return b.length > 0 && (s[
|
|
224
|
+
return b.length > 0 && (s[o] = b), s;
|
|
223
225
|
}, {}));
|
|
224
|
-
function c(s,
|
|
226
|
+
function c(s, o) {
|
|
225
227
|
u.value = u.value.filter(
|
|
226
|
-
(f) => !
|
|
228
|
+
(f) => !o.map((b) => b.value).includes(f)
|
|
227
229
|
), u.value = [.../* @__PURE__ */ new Set([...u.value, ...s])], r("update:model-value", u.value);
|
|
228
230
|
}
|
|
229
231
|
return q(() => {
|
|
230
232
|
u.value = _.modelValue;
|
|
231
|
-
}), (s,
|
|
233
|
+
}), (s, o) => {
|
|
232
234
|
const f = S("FmTextField");
|
|
233
|
-
return
|
|
234
|
-
p(
|
|
235
|
+
return l(), h(V, null, [
|
|
236
|
+
p(me, { json: m.campaigns }, null, 8, ["json"]),
|
|
235
237
|
a("div", Be, [
|
|
236
238
|
a("div", Pe, [
|
|
237
239
|
a("div", Te, U(n(u).length) + " campaign(s) linked ", 1),
|
|
238
240
|
p(f, {
|
|
239
241
|
modelValue: n(i),
|
|
240
|
-
"onUpdate:modelValue":
|
|
242
|
+
"onUpdate:modelValue": o[0] || (o[0] = (b) => N(i) ? i.value = b : null),
|
|
241
243
|
"prepend-icon": "search",
|
|
242
244
|
placeholder: "Search",
|
|
243
245
|
class: "w-full"
|
|
244
246
|
}, null, 8, ["modelValue"])
|
|
245
247
|
]),
|
|
246
248
|
a("div", Ge, [
|
|
247
|
-
(
|
|
249
|
+
(l(!0), h(V, null, P(n(e), (b, g) => (l(), F(Ee, {
|
|
248
250
|
"model-value": n(u),
|
|
249
251
|
title: g,
|
|
250
252
|
items: b,
|
|
@@ -262,19 +264,19 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
262
264
|
__name: "AnalyticSheet",
|
|
263
265
|
emits: ["success"],
|
|
264
266
|
setup(m, { expose: R, emit: i }) {
|
|
265
|
-
const u = i, _ =
|
|
266
|
-
|
|
267
|
+
const u = i, _ = pe();
|
|
268
|
+
fe();
|
|
267
269
|
const r = C(!1), e = C(!1), c = {
|
|
268
270
|
name: "",
|
|
269
271
|
campaigns: []
|
|
270
|
-
}, s = C(""),
|
|
271
|
-
}), b = C([]), g = C(null), { global: w, minor: v } =
|
|
272
|
-
const d = f.safeParse(
|
|
272
|
+
}, s = C(""), o = C({ ...c }), f = ie.superRefine((d, t) => {
|
|
273
|
+
}), b = C([]), g = C(null), { global: w, minor: v } = ve, E = G(() => {
|
|
274
|
+
const d = f.safeParse(o.value);
|
|
273
275
|
return d.success ? [] : d.error.errors;
|
|
274
276
|
});
|
|
275
277
|
function L(d) {
|
|
276
278
|
var t;
|
|
277
|
-
r.value = !0, d ? (g.value = { ...d },
|
|
279
|
+
r.value = !0, d ? (g.value = { ...d }, o.value = { ...d, campaigns: (t = d.pf_campaigns) == null ? void 0 : t.map((y) => y._id) }) : (g.value = null, o.value = { ...c });
|
|
278
280
|
}
|
|
279
281
|
function k() {
|
|
280
282
|
r.value = !1, g.value = null;
|
|
@@ -299,7 +301,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
299
301
|
label: A.name,
|
|
300
302
|
value: A._id
|
|
301
303
|
}));
|
|
302
|
-
return
|
|
304
|
+
return ye(
|
|
303
305
|
b.value,
|
|
304
306
|
(y) => re.formattedType(y.type),
|
|
305
307
|
d
|
|
@@ -308,7 +310,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
308
310
|
(d, [t, y]) => {
|
|
309
311
|
const A = y.filter((j) => {
|
|
310
312
|
var D, x;
|
|
311
|
-
return (x = (D =
|
|
313
|
+
return (x = (D = o.value) == null ? void 0 : D.campaigns) == null ? void 0 : x.includes(j.value);
|
|
312
314
|
}).filter(
|
|
313
315
|
(j) => j.label.toLowerCase().includes(s.value.toLowerCase())
|
|
314
316
|
);
|
|
@@ -318,17 +320,17 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
318
320
|
));
|
|
319
321
|
function J(d) {
|
|
320
322
|
var y, A;
|
|
321
|
-
const t = (y =
|
|
322
|
-
t != null && t > -1 && ((A =
|
|
323
|
+
const t = (y = o.value.campaigns) == null ? void 0 : y.indexOf(d);
|
|
324
|
+
t != null && t > -1 && ((A = o.value.campaigns) == null || A.splice(t, 1));
|
|
323
325
|
}
|
|
324
326
|
async function W() {
|
|
325
|
-
f.safeParse(
|
|
327
|
+
f.safeParse(o.value).success && await v(
|
|
326
328
|
async () => {
|
|
327
329
|
var t;
|
|
328
330
|
g.value ? await T.updateGroup(
|
|
329
331
|
(t = g.value) == null ? void 0 : t._id,
|
|
330
|
-
|
|
331
|
-
) : await T.createGroup(
|
|
332
|
+
o.value
|
|
333
|
+
) : await T.createGroup(o.value), u("success"), k();
|
|
332
334
|
},
|
|
333
335
|
{
|
|
334
336
|
message: "Saving group",
|
|
@@ -355,7 +357,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
355
357
|
hideSheet: k
|
|
356
358
|
}), (d, t) => {
|
|
357
359
|
const y = S("FmButton"), A = S("FmTextField"), j = S("FmList"), D = S("FmSideSheet");
|
|
358
|
-
return
|
|
360
|
+
return l(), F(D, {
|
|
359
361
|
modelValue: n(r),
|
|
360
362
|
"onUpdate:modelValue": t[7] || (t[7] = (x) => N(r) ? r.value = x : null),
|
|
361
363
|
header: n(g) ? "Edit group" : "Add group",
|
|
@@ -365,7 +367,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
365
367
|
}, Y({
|
|
366
368
|
"side-sheet-footer": O(() => [
|
|
367
369
|
a("div", Je, [
|
|
368
|
-
n(e) ? B("", !0) : (
|
|
370
|
+
n(e) ? B("", !0) : (l(), h(V, { key: 0 }, [
|
|
369
371
|
p(y, {
|
|
370
372
|
label: "Submit",
|
|
371
373
|
onClick: W,
|
|
@@ -376,7 +378,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
376
378
|
onClick: t[4] || (t[4] = (x) => k()),
|
|
377
379
|
variant: "tertiary"
|
|
378
380
|
}),
|
|
379
|
-
n(g) ? (
|
|
381
|
+
n(g) ? (l(), F(y, {
|
|
380
382
|
key: 0,
|
|
381
383
|
label: "Delete",
|
|
382
384
|
variant: "plain",
|
|
@@ -384,7 +386,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
384
386
|
onClick: t[5] || (t[5] = (x) => Z())
|
|
385
387
|
})) : B("", !0)
|
|
386
388
|
], 64)),
|
|
387
|
-
n(e) ? (
|
|
389
|
+
n(e) ? (l(), F(y, {
|
|
388
390
|
key: 1,
|
|
389
391
|
label: "Confirm",
|
|
390
392
|
onClick: t[6] || (t[6] = (x) => e.value = !1)
|
|
@@ -392,17 +394,17 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
392
394
|
])
|
|
393
395
|
]),
|
|
394
396
|
default: O(() => [
|
|
395
|
-
n(e) ? B("", !0) : (
|
|
397
|
+
n(e) ? B("", !0) : (l(), h("div", je, [
|
|
396
398
|
Me,
|
|
397
|
-
p(
|
|
398
|
-
modelValue: n(
|
|
399
|
-
"onUpdate:modelValue": t[1] || (t[1] = (x) => n(
|
|
399
|
+
p(ue, {
|
|
400
|
+
modelValue: n(o).name,
|
|
401
|
+
"onUpdate:modelValue": t[1] || (t[1] = (x) => n(o).name = x),
|
|
400
402
|
label: "Name",
|
|
401
|
-
schema: n(
|
|
403
|
+
schema: n(de).typeAtPath(n(f), "name")
|
|
402
404
|
}, null, 8, ["modelValue", "schema"]),
|
|
403
405
|
De,
|
|
404
406
|
a("div", Ne, [
|
|
405
|
-
a("div", qe, U(n(
|
|
407
|
+
a("div", qe, U(n(o).campaigns.length) + " campaign(s) linked ", 1),
|
|
406
408
|
p(A, {
|
|
407
409
|
modelValue: n(s),
|
|
408
410
|
"onUpdate:modelValue": t[2] || (t[2] = (x) => N(s) ? s.value = x : null),
|
|
@@ -418,18 +420,18 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
418
420
|
onClick: H
|
|
419
421
|
})
|
|
420
422
|
])),
|
|
421
|
-
n(e) ? (
|
|
423
|
+
n(e) ? (l(), F(Ie, {
|
|
422
424
|
key: 1,
|
|
423
|
-
modelValue: n(
|
|
424
|
-
"onUpdate:modelValue": t[3] || (t[3] = (x) => n(
|
|
425
|
+
modelValue: n(o).campaigns,
|
|
426
|
+
"onUpdate:modelValue": t[3] || (t[3] = (x) => n(o).campaigns = x),
|
|
425
427
|
campaigns: n(M)
|
|
426
428
|
}, null, 8, ["modelValue", "campaigns"])) : B("", !0),
|
|
427
429
|
a("div", He, [
|
|
428
|
-
n(e) ? B("", !0) : (
|
|
430
|
+
n(e) ? B("", !0) : (l(!0), h(V, { key: 0 }, P(n(K), (x, Q) => (l(), h("div", null, [
|
|
429
431
|
a("div", ze, U(Q), 1),
|
|
430
432
|
p(j, { separator: !0 }, {
|
|
431
433
|
default: O(() => [
|
|
432
|
-
(
|
|
434
|
+
(l(!0), h(V, null, P(x, (z) => (l(), h("div", Ke, [
|
|
433
435
|
a("div", null, U(z.label), 1),
|
|
434
436
|
a("div", null, [
|
|
435
437
|
p(y, {
|
|
@@ -465,9 +467,9 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
465
467
|
};
|
|
466
468
|
}
|
|
467
469
|
}), Ze = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Qe = { class: "space-y-16" }, Xe = { class: "flex items-center justify-end" }, Ye = /* @__PURE__ */ a("div", { class: "fm-typo-en-body-lg-600" }, "Connect summary", -1), et = { class: "grid grid-cols-4 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, tt = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, at = { class: "fm-typo-en-title-sm-800" }, nt = /* @__PURE__ */ a("img", {
|
|
468
|
-
src:
|
|
470
|
+
src: oe,
|
|
469
471
|
class: "w-[150px]"
|
|
470
|
-
}, null, -1),
|
|
472
|
+
}, null, -1), ot = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Create campaign group to track performance ", -1), lt = /* @__PURE__ */ a("div", { class: "fm-typo-body-en-md-400 text-center text-fm-color-typo-secondary" }, " Start organizing your campaigns and promotions by creating groups. Groups allow you to aggregate performance metrics across multiple vouchers, promotions, or other rewards. ", -1), st = { class: "flex gap-16 items-center" }, kt = /* @__PURE__ */ I({
|
|
471
473
|
__name: "Analytic",
|
|
472
474
|
setup(m) {
|
|
473
475
|
const R = {
|
|
@@ -475,7 +477,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
475
477
|
value: "create",
|
|
476
478
|
isPrimary: !0,
|
|
477
479
|
prependIcon: "add"
|
|
478
|
-
}, i =
|
|
480
|
+
}, i = _e(), u = C(), _ = C([]), r = C(""), e = te({
|
|
479
481
|
totalCampaign: 0,
|
|
480
482
|
totalProgram: 0,
|
|
481
483
|
totalMember: 0
|
|
@@ -493,7 +495,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
493
495
|
value: () => e.totalMember
|
|
494
496
|
}
|
|
495
497
|
];
|
|
496
|
-
function
|
|
498
|
+
function o(w) {
|
|
497
499
|
var v;
|
|
498
500
|
c.value = (/* @__PURE__ */ new Date()).toISOString(), (v = u.value) == null || v.showSheet(w);
|
|
499
501
|
}
|
|
@@ -537,11 +539,11 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
537
539
|
await f(), await b();
|
|
538
540
|
}), (w, v) => {
|
|
539
541
|
const E = S("FmPageHead"), L = S("FmSearch"), k = S("FmCard"), H = S("FmButton");
|
|
540
|
-
return
|
|
542
|
+
return l(), h(V, null, [
|
|
541
543
|
p(E, {
|
|
542
544
|
title: "Analytic",
|
|
543
545
|
actions: n(_).length > 0 ? [R] : [],
|
|
544
|
-
"onClick:action": v[0] || (v[0] = ($) =>
|
|
546
|
+
"onClick:action": v[0] || (v[0] = ($) => o())
|
|
545
547
|
}, null, 8, ["actions"]),
|
|
546
548
|
a("div", Ze, [
|
|
547
549
|
a("div", Qe, [
|
|
@@ -561,7 +563,7 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
561
563
|
default: O(() => [
|
|
562
564
|
Ye,
|
|
563
565
|
a("div", et, [
|
|
564
|
-
(
|
|
566
|
+
(l(), h(V, null, P(s, ($, M) => a("div", {
|
|
565
567
|
key: $.key,
|
|
566
568
|
class: ne(["px-8", { "xs:!border-r": M % 2 == 0 }])
|
|
567
569
|
}, [
|
|
@@ -573,29 +575,29 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
573
575
|
_: 1
|
|
574
576
|
})
|
|
575
577
|
]),
|
|
576
|
-
n(_).length ? B("", !0) : (
|
|
578
|
+
n(_).length ? B("", !0) : (l(), F(k, {
|
|
577
579
|
key: 0,
|
|
578
580
|
variant: "outlined",
|
|
579
581
|
class: "flex flex-col gap-y-24 items-center p-16"
|
|
580
582
|
}, {
|
|
581
583
|
default: O(() => [
|
|
582
584
|
nt,
|
|
583
|
-
lt,
|
|
584
585
|
ot,
|
|
586
|
+
lt,
|
|
585
587
|
a("div", st, [
|
|
586
588
|
p(H, {
|
|
587
589
|
label: "Create group",
|
|
588
590
|
icon: "add",
|
|
589
|
-
onClick: v[2] || (v[2] = ($) =>
|
|
591
|
+
onClick: v[2] || (v[2] = ($) => o())
|
|
590
592
|
})
|
|
591
593
|
])
|
|
592
594
|
]),
|
|
593
595
|
_: 1
|
|
594
596
|
})),
|
|
595
|
-
(
|
|
597
|
+
(l(!0), h(V, null, P(n(g), ($) => (l(), F(Ue, {
|
|
596
598
|
key: $._id.toString(),
|
|
597
599
|
group: $,
|
|
598
|
-
"on-edit":
|
|
600
|
+
"on-edit": o
|
|
599
601
|
}, null, 8, ["group"]))), 128)),
|
|
600
602
|
p(We, {
|
|
601
603
|
ref_key: "sheetRef",
|
|
@@ -608,5 +610,5 @@ const he = { class: "divide-x flex flex-wrap" }, be = { class: "fm-typo-en-body-
|
|
|
608
610
|
}
|
|
609
611
|
});
|
|
610
612
|
export {
|
|
611
|
-
|
|
613
|
+
kt as default
|
|
612
614
|
};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as
|
|
1
|
+
import { defineComponent as P, ref as g, computed as U, onMounted as M, resolveComponent as i, openBlock as l, 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 { p as Q } from "./plugins-
|
|
5
|
-
import { u as W } from "./loading-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { p as Q } from "./plugins-Bfrv3oTZ.js";
|
|
5
|
+
import { u as W } from "./loading-JcwqhNwc.js";
|
|
6
|
+
import { a as X } from "./app-BbSvXV58.js";
|
|
7
|
+
import { u as Y } from "./campaign-gFq18CQ_.js";
|
|
8
|
+
import { g as F, b as k } from "./dto-Desowk9r.js";
|
|
8
9
|
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
|
-
|
|
10
|
+
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DJOPf7HG.js";
|
|
11
|
+
import { u as te } from "./template--qssrBD6.js";
|
|
12
|
+
import { c as y } from "./index-DW42bi_w.js";
|
|
13
|
+
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" }, ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, le = { 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 = [
|
|
12
14
|
ue
|
|
13
15
|
], fe = /* @__PURE__ */ s("img", {
|
|
14
16
|
src: z,
|
|
@@ -16,7 +18,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
16
18
|
}, null, -1), ye = /* @__PURE__ */ s("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
17
19
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-title-sm-800" }, " Create your broadcast campaign "),
|
|
18
20
|
/* @__PURE__ */ s("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Broadcasts are virtual money that customers can use to pay for their purchases, similar to cash within your store. ")
|
|
19
|
-
], -1),
|
|
21
|
+
], -1), Ve = /* @__PURE__ */ P({
|
|
20
22
|
__name: "Broadcast",
|
|
21
23
|
setup(ge) {
|
|
22
24
|
const A = {
|
|
@@ -24,7 +26,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
24
26
|
value: "create",
|
|
25
27
|
isPrimary: !0,
|
|
26
28
|
prependIcon: "add"
|
|
27
|
-
}, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor:
|
|
29
|
+
}, V = te("BROADCAST", G()), R = X(), c = Y(), { global: D, minor: b } = W, L = g((/* @__PURE__ */ new Date()).toISOString()), n = g({
|
|
28
30
|
searchKey: "",
|
|
29
31
|
location: null
|
|
30
32
|
}), u = U(
|
|
@@ -57,15 +59,15 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
57
59
|
variant: "tertiary",
|
|
58
60
|
icon: "delete",
|
|
59
61
|
iconColor: "neutral-gray-400",
|
|
60
|
-
onClick: (
|
|
61
|
-
|
|
62
|
+
onClick: (o) => {
|
|
63
|
+
o.stopPropagation(), x(e.row.original);
|
|
62
64
|
}
|
|
63
65
|
});
|
|
64
66
|
}
|
|
65
67
|
}
|
|
66
68
|
], v = g();
|
|
67
69
|
async function x(e) {
|
|
68
|
-
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await
|
|
70
|
+
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await b(
|
|
69
71
|
async () => {
|
|
70
72
|
await y.delete(e._id), await c.read("BROADCAST");
|
|
71
73
|
},
|
|
@@ -76,10 +78,10 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
76
78
|
);
|
|
77
79
|
}
|
|
78
80
|
async function p(e) {
|
|
79
|
-
L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await
|
|
80
|
-
await
|
|
81
|
+
L.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await o() : V.open(async (m) => {
|
|
82
|
+
await o(m);
|
|
81
83
|
});
|
|
82
|
-
async function
|
|
84
|
+
async function o(m) {
|
|
83
85
|
var d;
|
|
84
86
|
(d = v.value) == null || d.showSheet(
|
|
85
87
|
!0,
|
|
@@ -90,7 +92,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
async function $(e) {
|
|
93
|
-
await
|
|
95
|
+
await b(
|
|
94
96
|
async () => {
|
|
95
97
|
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await c.read("BROADCAST");
|
|
96
98
|
},
|
|
@@ -104,38 +106,38 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
104
106
|
await D(async () => {
|
|
105
107
|
await c.read("BROADCAST");
|
|
106
108
|
});
|
|
107
|
-
}), (e,
|
|
108
|
-
const m =
|
|
109
|
-
return
|
|
109
|
+
}), (e, o) => {
|
|
110
|
+
const m = i("FmPageHead"), d = i("FmSearch"), K = i("FmTable"), S = i("FmButton"), I = i("FmListItem"), O = i("FmList"), N = i("FmCard");
|
|
111
|
+
return l(), f(_, null, [
|
|
110
112
|
r(m, {
|
|
111
113
|
title: "Broadcast",
|
|
112
|
-
actions:
|
|
113
|
-
"onClick:action":
|
|
114
|
+
actions: a(u).length > 0 ? [A] : [],
|
|
115
|
+
"onClick:action": o[0] || (o[0] = () => p())
|
|
114
116
|
}, null, 8, ["actions"]),
|
|
115
|
-
s("div",
|
|
117
|
+
s("div", oe, [
|
|
116
118
|
r(d, {
|
|
117
|
-
modelValue:
|
|
118
|
-
"onUpdate:modelValue":
|
|
119
|
+
modelValue: a(n).searchKey,
|
|
120
|
+
"onUpdate:modelValue": o[1] || (o[1] = (t) => a(n).searchKey = t),
|
|
119
121
|
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
120
122
|
placeholder: "search",
|
|
121
123
|
collapsible: ""
|
|
122
124
|
}, null, 8, ["modelValue"]),
|
|
123
|
-
|
|
124
|
-
s("div",
|
|
125
|
+
a(c).campaigns.broadcast && a(c).campaigns.broadcast.length > 0 ? (l(), f(_, { key: 0 }, [
|
|
126
|
+
s("div", ae, [
|
|
125
127
|
s("div", se, [
|
|
126
128
|
r(Z, {
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue":
|
|
129
|
+
modelValue: a(n).location,
|
|
130
|
+
"onUpdate:modelValue": o[2] || (o[2] = (t) => a(n).location = t),
|
|
129
131
|
label: "Location: ",
|
|
130
132
|
"show-item-label": !0,
|
|
131
133
|
icon: "storefront",
|
|
132
134
|
placement: "bottom-start",
|
|
133
|
-
items:
|
|
135
|
+
items: a(R).locationItems
|
|
134
136
|
}, null, 8, ["modelValue", "items"])
|
|
135
137
|
]),
|
|
136
138
|
r(d, {
|
|
137
|
-
modelValue:
|
|
138
|
-
"onUpdate:modelValue":
|
|
139
|
+
modelValue: a(n).searchKey,
|
|
140
|
+
"onUpdate:modelValue": o[3] || (o[3] = (t) => a(n).searchKey = t),
|
|
139
141
|
class: "xs:hidden",
|
|
140
142
|
placeholder: "search",
|
|
141
143
|
collapsible: ""
|
|
@@ -143,18 +145,18 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
143
145
|
]),
|
|
144
146
|
r(K, {
|
|
145
147
|
class: "xs:hidden",
|
|
146
|
-
"row-data":
|
|
148
|
+
"row-data": a(u),
|
|
147
149
|
"column-defs": T,
|
|
148
|
-
"search-value":
|
|
150
|
+
"search-value": a(n).searchKey,
|
|
149
151
|
"column-filter": [],
|
|
150
|
-
onRowClick:
|
|
152
|
+
onRowClick: o[4] || (o[4] = (t) => p(t.original)),
|
|
151
153
|
"hide-footer": !0
|
|
152
154
|
}, null, 8, ["row-data", "search-value"]),
|
|
153
155
|
r(O, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
154
156
|
default: h(() => [
|
|
155
|
-
(
|
|
156
|
-
(t) => t.name.toLowerCase().includes(
|
|
157
|
-
), (t) => (
|
|
157
|
+
(l(!0), f(_, null, j(a(u).filter(
|
|
158
|
+
(t) => t.name.toLowerCase().includes(a(n).searchKey.toLowerCase())
|
|
159
|
+
), (t) => (l(), w(I, {
|
|
158
160
|
key: t._id.toString(),
|
|
159
161
|
onClick: (B) => p(t),
|
|
160
162
|
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
@@ -162,12 +164,12 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
162
164
|
default: h(() => [
|
|
163
165
|
s("div", ne, [
|
|
164
166
|
s("div", re, [
|
|
165
|
-
(
|
|
166
|
-
s("div",
|
|
167
|
+
(l(), w(E(a(F)(t)))),
|
|
168
|
+
s("div", ie, C(t.currentReceive ?? 0) + " sent ", 1)
|
|
167
169
|
]),
|
|
168
|
-
s("div",
|
|
169
|
-
s("div", ce,
|
|
170
|
-
s("div", me,
|
|
170
|
+
s("div", le, [
|
|
171
|
+
s("div", ce, C(t.name), 1),
|
|
172
|
+
s("div", me, C(a(k)(t)), 1)
|
|
171
173
|
])
|
|
172
174
|
]),
|
|
173
175
|
r(S, {
|
|
@@ -182,8 +184,8 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
182
184
|
]),
|
|
183
185
|
_: 1
|
|
184
186
|
}),
|
|
185
|
-
|
|
186
|
-
], 64)) : (
|
|
187
|
+
a(u).length == 0 ? (l(), f("div", de, pe)) : H("", !0)
|
|
188
|
+
], 64)) : (l(), w(N, {
|
|
187
189
|
key: 1,
|
|
188
190
|
variant: "outlined",
|
|
189
191
|
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
@@ -195,7 +197,7 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
195
197
|
variant: "primary",
|
|
196
198
|
label: "Create broadcast campaign",
|
|
197
199
|
icon: "add",
|
|
198
|
-
onClick:
|
|
200
|
+
onClick: o[5] || (o[5] = (t) => p())
|
|
199
201
|
})
|
|
200
202
|
]),
|
|
201
203
|
_: 1
|
|
@@ -211,5 +213,5 @@ const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { class: "flex items-
|
|
|
211
213
|
}
|
|
212
214
|
});
|
|
213
215
|
export {
|
|
214
|
-
|
|
216
|
+
Ve as default
|
|
215
217
|
};
|
|
@@ -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-B6Srf7Qk.js";
|
|
2
|
+
import { i as isRuleGroup } from "./rule-builder-C0VKzAUb.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-BPVnwDa4.js";
|
|
6
|
+
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-Cf8eWMqV.js";
|
|
7
|
+
import "./index-CDbIjUqF.js";
|
|
8
|
+
import "./index-DS4DBOFZ.js";
|
|
9
|
+
import "./index-QSEC4xWd.js";
|
|
10
|
+
import "./index-D6DPD3Px.js";
|
|
11
11
|
function validateRule(data, r, date) {
|
|
12
12
|
const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
|
|
13
13
|
function meetConditions(e) {
|