@feedmepos/mf-connect 0.0.5-beta.12 → 0.0.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-CUX5-xQR.js → Analytic-Dv_LzcqY.js} +137 -137
- package/dist/{Broadcast-v7CP0LAw.js → Broadcast-D3jZhdCD.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CQuuTHgy.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-ChrE76H3.js} +8 -8
- package/dist/{Card-DqbAwLY9.js → Card-DWlrW_bj.js} +44 -44
- package/dist/{Collections-D6mUxTeb.js → Collections-jtrc9mrw.js} +9 -9
- package/dist/{Credit-MQzEFmKS.js → Credit-CAE6NIPg.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0o-vEFzM.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-6TgnyUt6.js} +21 -21
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGOuwruo.js +309 -0
- package/dist/{Experience-1zavl5Cz.js → Experience-CDpqPPy2.js} +7 -7
- package/dist/{Game-Brf7qBk6.js → Game-m-P1NEQW.js} +7 -7
- package/dist/{JsonViewer-CM3mQGeR.js → JsonViewer-Cw-PxhpP.js} +1 -1
- package/dist/{MainLayout-CmF8IpFn.js → MainLayout-BW7UPvBV.js} +9 -10
- package/dist/{Marketing-Cv8oBbi5.js → Marketing-DDnllsGc.js} +4 -4
- package/dist/{Member-CsuwPC67.js → Member-BUnpqvd_.js} +12 -12
- package/dist/{MemberList-BvEcNQLy.js → MemberList-CLE0iMrO.js} +12 -12
- package/dist/{MemberTransactions-C2tHglfj.js → MemberTransactions-lmMYCk29.js} +2 -2
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-5tf_r1kV.js → MessageInput.vue_vue_type_script_setup_true_lang-DIvaiiW_.js} +2 -2
- package/dist/{Point-EZ648C2S.js → Point-CPs1N38Y.js} +7 -7
- package/dist/{Promotion-DhJOKFiz.js → Promotion-Bon_LotA.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DFqdPg0D.js → RuleGroup.vue_vue_type_script_setup_true_lang-CJDAM7R-.js} +13 -13
- package/dist/{Segment-NwmeNOgB.js → Segment-DsG9jZVq.js} +56 -56
- package/dist/{Setting-CE44n1lp.js → Setting-3S2qjiRd.js} +8 -8
- package/dist/{Store-DfmDBapW.js → Store-BlFCkzus.js} +13 -13
- package/dist/{StoreRewards-DmXcW6FJ.js → StoreRewards-BDs1FBJd.js} +25 -25
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BMCS6_2b.js → StoreTransactions.vue_vue_type_script_setup_true_lang-l5hZbj_G.js} +5 -5
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DqtAHlXF.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DPMC728G.js} +1 -1
- package/dist/{Tier-Dn3qrgqi.js → Tier-DOJvlvnO.js} +17 -17
- package/dist/{Title-7UEUc4lB.js → Title-C9ZV3523.js} +13 -13
- package/dist/{Transaction-CXVLW1sZ.js → Transaction-BNUjFlP_.js} +1 -1
- package/dist/{Voucher-moIKIm9Y.js → Voucher-pBYsRoBB.js} +19 -19
- package/dist/{app-DfC4Wz5O.js → app-Dvev0uC3.js} +1365 -1369
- package/dist/app.js +1 -1
- package/dist/{campaign-BUhFqt7i.js → campaign-BE3eGawG.js} +2 -2
- package/dist/{dto-DAulHCaS.js → dto-BQE1JRsC.js} +8 -8
- package/dist/{effect-BSuXGgTS.js → effect-DdzbkRSh.js} +1 -1
- package/dist/{helper-BqSdP7S_.js → helper-Do84UMfe.js} +1 -1
- package/dist/{index-Osw8yB8l.js → index-B7hqpca6.js} +1 -1
- package/dist/{index-DGEH0xtv.js → index-BIbYuG3f.js} +2 -2
- package/dist/{index-D4h0WRgl.js → index-BPJIa0X2.js} +1 -1
- package/dist/{index-BZNH49ud.js → index-C9kOjsY9.js} +1 -1
- package/dist/{index-BAb2T24H.js → index-DQ_19j65.js} +3 -3
- package/dist/{index-0ZWqvP75.js → index-DmWjX4hp.js} +5 -5
- package/dist/{index-DMefGCH-.js → index-Dnq0Kzy7.js} +5 -5
- package/dist/{index-Csq4bOCD.js → index-DomUjFLo.js} +1 -1
- package/dist/{index-2QLy2rMc.js → index-DsAn5Q4W.js} +2 -2
- package/dist/{index-CcHhuVkx.js → index-F_SzjA2O.js} +2 -2
- package/dist/{index-BD_ef1Tj.js → index-eDAmIa0J.js} +3 -3
- package/dist/{loading-BbBkQmU8.js → loading-CTicD3SM.js} +2 -2
- package/dist/{lodash-Dwm-9TwD.js → lodash-DezmDnLI.js} +1 -1
- package/dist/{membership-hGD2o5qr.js → membership-DD5dO-ly.js} +3 -3
- package/dist/{money-CaVIc7e5.js → money-OOwcLral.js} +1 -1
- package/dist/{number-DFuwV1nt.js → number-r3ixpwL3.js} +1 -1
- package/dist/{rule-B-HQJ31S.js → rule-bmIVq7N9.js} +2 -2
- package/dist/{rule-builder-nlrinIF1.js → rule-builder-Dh4DvPql.js} +1 -1
- package/dist/{template-Bmql0Nfc.js → template-CyjQ7gNz.js} +5 -5
- package/dist/{xlsx-BKPvXeCZ.js → xlsx-CxVjVdxH.js} +226 -226
- package/package.json +1 -1
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-B6dqauXk.js +0 -30142
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as I, openBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { f as le } from "./number-
|
|
4
|
-
import { C as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { c as
|
|
7
|
-
import { _ as
|
|
8
|
-
import { J as
|
|
9
|
-
import "./index-
|
|
10
|
-
import { useSnackbar as
|
|
11
|
-
import { u as
|
|
12
|
-
import { u as
|
|
13
|
-
import { g as
|
|
14
|
-
import { u as
|
|
15
|
-
import { m as
|
|
16
|
-
const
|
|
1
|
+
import { defineComponent as I, openBlock as l, createElementBlock as h, Fragment as V, renderList as B, createElementVNode as a, toDisplayString as U, createCommentVNode as T, 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-r3ixpwL3.js";
|
|
4
|
+
import { C as se, F as ie, a as re } from "./dto-BQE1JRsC.js";
|
|
5
|
+
import { useRouter as ce } from "vue-router";
|
|
6
|
+
import { c as P } from "./index-BPJIa0X2.js";
|
|
7
|
+
import { _ as ue, Z as de } from "./ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js";
|
|
8
|
+
import { J as me } from "./JsonViewer-Cw-PxhpP.js";
|
|
9
|
+
import "./index-eDAmIa0J.js";
|
|
10
|
+
import { useSnackbar as pe } from "@feedmepos/ui-library";
|
|
11
|
+
import { u as fe } from "./app-Dvev0uC3.js";
|
|
12
|
+
import { u as ve } from "./loading-CTicD3SM.js";
|
|
13
|
+
import { g as ye } from "./object-qECH92oz.js";
|
|
14
|
+
import { u as _e } from "./campaign-BE3eGawG.js";
|
|
15
|
+
import { m as ge } from "./index-DomUjFLo.js";
|
|
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({
|
|
17
17
|
__name: "CampaignStat",
|
|
18
18
|
props: {
|
|
19
19
|
data: {
|
|
@@ -34,19 +34,19 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
34
34
|
var r;
|
|
35
35
|
return le((r = R.data) == null ? void 0 : r[_], 2, !0) || 0;
|
|
36
36
|
}
|
|
37
|
-
return (_, r) => (
|
|
38
|
-
(
|
|
39
|
-
e.key in m.data ? (
|
|
37
|
+
return (_, r) => (l(), h("div", he, [
|
|
38
|
+
(l(), h(V, null, B(i, (e) => (l(), h(V, null, [
|
|
39
|
+
e.key in m.data ? (l(), h("div", {
|
|
40
40
|
key: e.key,
|
|
41
41
|
class: "px-16"
|
|
42
42
|
}, [
|
|
43
|
-
a("div",
|
|
44
|
-
a("div",
|
|
43
|
+
a("div", be, U(e.label), 1),
|
|
44
|
+
a("div", xe, U(u(e.key)), 1)
|
|
45
45
|
])) : T("", !0)
|
|
46
46
|
], 64))), 64))
|
|
47
47
|
]));
|
|
48
48
|
}
|
|
49
|
-
}),
|
|
49
|
+
}), ke = { 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" }, Se = { class: "fm-typo-en-body-md-600 overflow-hidden select-none text-ellipsis text-fm-color-typo-secondary whitespace-nowrap" }, we = /* @__PURE__ */ I({
|
|
50
50
|
__name: "CampaignChip",
|
|
51
51
|
props: {
|
|
52
52
|
type: { type: String, required: !0 },
|
|
@@ -60,22 +60,22 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
setup(m) {
|
|
63
|
-
const i =
|
|
63
|
+
const i = se[m.type];
|
|
64
64
|
return (u, _) => {
|
|
65
65
|
const r = S("FmIcon"), e = S("FmTooltip");
|
|
66
|
-
return
|
|
66
|
+
return l(), F(e, {
|
|
67
67
|
variant: "plain",
|
|
68
68
|
placement: "top",
|
|
69
69
|
content: m.label
|
|
70
70
|
}, {
|
|
71
71
|
default: O(() => [
|
|
72
|
-
a("div",
|
|
72
|
+
a("div", ke, [
|
|
73
73
|
p(r, {
|
|
74
74
|
name: n(i).icon,
|
|
75
75
|
outline: "",
|
|
76
76
|
size: "sm"
|
|
77
77
|
}, null, 8, ["name"]),
|
|
78
|
-
a("div",
|
|
78
|
+
a("div", Se, U(m.label), 1),
|
|
79
79
|
p(r, {
|
|
80
80
|
name: m.icon.name,
|
|
81
81
|
color: m.icon.color,
|
|
@@ -87,7 +87,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
87
87
|
}, 8, ["content"]);
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
90
|
+
}), $e = { class: "flex flex-col" }, Fe = { class: "flex flex-nowrap items-center justify-between mb-12" }, Ve = { class: "flex gap-4 items-center justify-start" }, Re = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "flex flex-wrap gap-4 items-center mb-16 overflow-y-hidden" }, Ue = /* @__PURE__ */ I({
|
|
91
91
|
__name: "CampaignGroup",
|
|
92
92
|
props: {
|
|
93
93
|
group: {
|
|
@@ -101,7 +101,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
101
101
|
},
|
|
102
102
|
emits: ["changed"],
|
|
103
103
|
setup(m, { emit: R }) {
|
|
104
|
-
|
|
104
|
+
ce(), C(!1);
|
|
105
105
|
const i = m, u = C([]), _ = G(
|
|
106
106
|
() => u.value.reduce(
|
|
107
107
|
(e, c) => ({ ...e, [c.type]: c.totalAmount }),
|
|
@@ -114,21 +114,21 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
114
114
|
label: c.name
|
|
115
115
|
}))) || [];
|
|
116
116
|
});
|
|
117
|
-
return
|
|
118
|
-
u.value = await
|
|
117
|
+
return q(async () => {
|
|
118
|
+
u.value = await P.readStats({
|
|
119
119
|
groupId: i.group._id.toString()
|
|
120
120
|
});
|
|
121
121
|
}), (e, c) => {
|
|
122
|
-
const s = S("FmButton"),
|
|
123
|
-
return
|
|
122
|
+
const s = S("FmButton"), o = S("FmCard");
|
|
123
|
+
return l(), F(o, {
|
|
124
124
|
class: "mb-24 p-24",
|
|
125
125
|
variant: "outlined"
|
|
126
126
|
}, {
|
|
127
127
|
default: O(() => [
|
|
128
|
-
a("div",
|
|
129
|
-
a("div",
|
|
130
|
-
a("div",
|
|
131
|
-
a("div",
|
|
128
|
+
a("div", $e, [
|
|
129
|
+
a("div", Fe, [
|
|
130
|
+
a("div", Ve, [
|
|
131
|
+
a("div", Re, U(m.group.name), 1),
|
|
132
132
|
p(s, {
|
|
133
133
|
icon: "edit",
|
|
134
134
|
variant: "tertiary",
|
|
@@ -136,21 +136,21 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
136
136
|
})
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
139
|
-
a("div",
|
|
140
|
-
(
|
|
139
|
+
a("div", Ae, [
|
|
140
|
+
(l(!0), h(V, null, B(n(r), (f) => (l(), F(we, {
|
|
141
141
|
key: e.index,
|
|
142
142
|
type: f.campaign.type,
|
|
143
143
|
label: f.label
|
|
144
144
|
}, null, 8, ["type", "label"]))), 128))
|
|
145
145
|
]),
|
|
146
|
-
p(
|
|
146
|
+
p(Ce, { data: n(_) }, null, 8, ["data"])
|
|
147
147
|
])
|
|
148
148
|
]),
|
|
149
149
|
_: 1
|
|
150
150
|
});
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
153
|
+
}), Oe = { class: "ml-32 flex flex-col" }, Ee = /* @__PURE__ */ I({
|
|
154
154
|
__name: "CampaignCard",
|
|
155
155
|
props: {
|
|
156
156
|
title: {},
|
|
@@ -160,7 +160,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
160
160
|
emits: ["update:model-value"],
|
|
161
161
|
setup(m, { emit: R }) {
|
|
162
162
|
const i = m, u = R, _ = (s) => {
|
|
163
|
-
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);
|
|
164
164
|
}, r = (s) => {
|
|
165
165
|
c.value = s, e.value = s.length === i.items.length, u("update:model-value", s);
|
|
166
166
|
}, e = C(!1), c = C([]);
|
|
@@ -168,16 +168,16 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
168
168
|
() => i.modelValue,
|
|
169
169
|
() => {
|
|
170
170
|
c.value = i.modelValue.filter(
|
|
171
|
-
(s) => i.items.find((
|
|
171
|
+
(s) => i.items.find((o) => o.value === s)
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
),
|
|
174
|
+
), q(() => {
|
|
175
175
|
c.value = i.modelValue.filter(
|
|
176
|
-
(s) => i.items.find((
|
|
176
|
+
(s) => i.items.find((o) => o.value === s)
|
|
177
177
|
);
|
|
178
|
-
}), (s,
|
|
178
|
+
}), (s, o) => {
|
|
179
179
|
const f = S("FmCheckbox"), b = S("FmCard");
|
|
180
|
-
return
|
|
180
|
+
return l(), F(b, {
|
|
181
181
|
variant: "outlined",
|
|
182
182
|
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
183
183
|
}, {
|
|
@@ -189,8 +189,8 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
189
189
|
indeterminate: n(c).length > 0,
|
|
190
190
|
"onUpdate:modelValue": _
|
|
191
191
|
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
192
|
-
a("div",
|
|
193
|
-
(
|
|
192
|
+
a("div", Oe, [
|
|
193
|
+
(l(!0), h(V, null, B(i.items, (g, w) => (l(), F(f, {
|
|
194
194
|
key: w,
|
|
195
195
|
"model-value": n(c),
|
|
196
196
|
label: g.label,
|
|
@@ -203,7 +203,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
203
203
|
});
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
206
|
+
}), Te = { class: "space-y-16" }, Be = { class: "flex items-center" }, Pe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ge = { class: "space-y-[40px]" }, Ie = /* @__PURE__ */ I({
|
|
207
207
|
__name: "LinkCampaign",
|
|
208
208
|
props: {
|
|
209
209
|
modelValue: {
|
|
@@ -217,36 +217,36 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
217
217
|
},
|
|
218
218
|
emits: ["update:model-value"],
|
|
219
219
|
setup(m, { emit: R }) {
|
|
220
|
-
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]) => {
|
|
221
221
|
const b = f.filter(
|
|
222
222
|
(g) => g.label.toLowerCase().includes(i.value.toLowerCase())
|
|
223
223
|
);
|
|
224
|
-
return b.length > 0 && (s[
|
|
224
|
+
return b.length > 0 && (s[o] = b), s;
|
|
225
225
|
}, {}));
|
|
226
|
-
function c(s,
|
|
226
|
+
function c(s, o) {
|
|
227
227
|
u.value = u.value.filter(
|
|
228
|
-
(f) => !
|
|
228
|
+
(f) => !o.map((b) => b.value).includes(f)
|
|
229
229
|
), u.value = [.../* @__PURE__ */ new Set([...u.value, ...s])], r("update:model-value", u.value);
|
|
230
230
|
}
|
|
231
|
-
return
|
|
231
|
+
return q(() => {
|
|
232
232
|
u.value = _.modelValue;
|
|
233
|
-
}), (s,
|
|
233
|
+
}), (s, o) => {
|
|
234
234
|
const f = S("FmTextField");
|
|
235
|
-
return
|
|
236
|
-
p(
|
|
237
|
-
a("div",
|
|
238
|
-
a("div",
|
|
235
|
+
return l(), h(V, null, [
|
|
236
|
+
p(me, { json: m.campaigns }, null, 8, ["json"]),
|
|
237
|
+
a("div", Te, [
|
|
238
|
+
a("div", Be, [
|
|
239
239
|
a("div", Pe, U(n(u).length) + " campaign(s) linked ", 1),
|
|
240
240
|
p(f, {
|
|
241
241
|
modelValue: n(i),
|
|
242
|
-
"onUpdate:modelValue":
|
|
242
|
+
"onUpdate:modelValue": o[0] || (o[0] = (b) => N(i) ? i.value = b : null),
|
|
243
243
|
"prepend-icon": "search",
|
|
244
244
|
placeholder: "Search",
|
|
245
245
|
class: "w-full"
|
|
246
246
|
}, null, 8, ["modelValue"])
|
|
247
247
|
]),
|
|
248
|
-
a("div",
|
|
249
|
-
(
|
|
248
|
+
a("div", Ge, [
|
|
249
|
+
(l(!0), h(V, null, B(n(e), (b, g) => (l(), F(Ee, {
|
|
250
250
|
"model-value": n(u),
|
|
251
251
|
title: g,
|
|
252
252
|
items: b,
|
|
@@ -257,26 +257,26 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
257
257
|
], 64);
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
}),
|
|
260
|
+
}), Le = { class: "flex items-center gap-x-8" }, je = {
|
|
261
261
|
key: 0,
|
|
262
262
|
class: "space-y-16 pr-12"
|
|
263
|
-
},
|
|
263
|
+
}, Me = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1), De = /* @__PURE__ */ a("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1), Ne = { class: "flex items-center gap-x-16" }, qe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, He = { class: "mt-16" }, ze = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ke = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Je = { class: "flex items-center gap-8" }, We = /* @__PURE__ */ I({
|
|
264
264
|
__name: "AnalyticSheet",
|
|
265
265
|
emits: ["success"],
|
|
266
266
|
setup(m, { expose: R, emit: i }) {
|
|
267
|
-
const u = i, _ =
|
|
268
|
-
|
|
267
|
+
const u = i, _ = fe();
|
|
268
|
+
pe();
|
|
269
269
|
const r = C(!1), e = C(!1), c = {
|
|
270
270
|
name: "",
|
|
271
271
|
campaigns: []
|
|
272
|
-
}, s = C(""),
|
|
273
|
-
}), b = C([]), g = C(null), { global: w, minor: v } =
|
|
274
|
-
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);
|
|
275
275
|
return d.success ? [] : d.error.errors;
|
|
276
276
|
});
|
|
277
277
|
function L(d) {
|
|
278
278
|
var t;
|
|
279
|
-
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 });
|
|
280
280
|
}
|
|
281
281
|
function k() {
|
|
282
282
|
r.value = !1, g.value = null;
|
|
@@ -285,7 +285,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
285
285
|
e.value = !0;
|
|
286
286
|
}
|
|
287
287
|
async function $() {
|
|
288
|
-
const d = await
|
|
288
|
+
const d = await P.readAll({
|
|
289
289
|
limit: 1e3,
|
|
290
290
|
skip: 0,
|
|
291
291
|
sortBy: "_id",
|
|
@@ -301,16 +301,16 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
301
301
|
label: A.name,
|
|
302
302
|
value: A._id
|
|
303
303
|
}));
|
|
304
|
-
return
|
|
304
|
+
return ye(
|
|
305
305
|
b.value,
|
|
306
|
-
(y) =>
|
|
306
|
+
(y) => re.formattedType(y.type),
|
|
307
307
|
d
|
|
308
308
|
);
|
|
309
309
|
}), K = G(() => Object.entries(M.value).reduce(
|
|
310
310
|
(d, [t, y]) => {
|
|
311
311
|
const A = y.filter((j) => {
|
|
312
|
-
var
|
|
313
|
-
return (x = (
|
|
312
|
+
var D, x;
|
|
313
|
+
return (x = (D = o.value) == null ? void 0 : D.campaigns) == null ? void 0 : x.includes(j.value);
|
|
314
314
|
}).filter(
|
|
315
315
|
(j) => j.label.toLowerCase().includes(s.value.toLowerCase())
|
|
316
316
|
);
|
|
@@ -320,17 +320,17 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
320
320
|
));
|
|
321
321
|
function J(d) {
|
|
322
322
|
var y, A;
|
|
323
|
-
const t = (y =
|
|
324
|
-
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));
|
|
325
325
|
}
|
|
326
326
|
async function W() {
|
|
327
|
-
f.safeParse(
|
|
327
|
+
f.safeParse(o.value).success && await v(
|
|
328
328
|
async () => {
|
|
329
329
|
var t;
|
|
330
|
-
g.value ? await
|
|
330
|
+
g.value ? await P.updateGroup(
|
|
331
331
|
(t = g.value) == null ? void 0 : t._id,
|
|
332
|
-
|
|
333
|
-
) : await
|
|
332
|
+
o.value
|
|
333
|
+
) : await P.createGroup(o.value), u("success"), k();
|
|
334
334
|
},
|
|
335
335
|
{
|
|
336
336
|
message: "Saving group",
|
|
@@ -342,7 +342,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
342
342
|
await v(
|
|
343
343
|
async () => {
|
|
344
344
|
var d;
|
|
345
|
-
await
|
|
345
|
+
await P.deleteGroup((d = g.value) == null ? void 0 : d._id), u("success"), k();
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
message: "Deleting group",
|
|
@@ -350,24 +350,24 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
350
350
|
}
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
|
-
return
|
|
353
|
+
return q(async () => {
|
|
354
354
|
await $();
|
|
355
355
|
}), R({
|
|
356
356
|
showSheet: L,
|
|
357
357
|
hideSheet: k
|
|
358
358
|
}), (d, t) => {
|
|
359
|
-
const y = S("FmButton"), A = S("FmTextField"), j = S("FmList"),
|
|
360
|
-
return
|
|
359
|
+
const y = S("FmButton"), A = S("FmTextField"), j = S("FmList"), D = S("FmSideSheet");
|
|
360
|
+
return l(), F(D, {
|
|
361
361
|
modelValue: n(r),
|
|
362
|
-
"onUpdate:modelValue": t[7] || (t[7] = (x) =>
|
|
362
|
+
"onUpdate:modelValue": t[7] || (t[7] = (x) => N(r) ? r.value = x : null),
|
|
363
363
|
header: n(g) ? "Edit group" : "Add group",
|
|
364
364
|
"dismiss-away": "",
|
|
365
365
|
"close-button": !0,
|
|
366
366
|
"max-width": 550
|
|
367
367
|
}, Y({
|
|
368
368
|
"side-sheet-footer": O(() => [
|
|
369
|
-
a("div",
|
|
370
|
-
n(e) ? T("", !0) : (
|
|
369
|
+
a("div", Je, [
|
|
370
|
+
n(e) ? T("", !0) : (l(), h(V, { key: 0 }, [
|
|
371
371
|
p(y, {
|
|
372
372
|
label: "Submit",
|
|
373
373
|
onClick: W,
|
|
@@ -378,7 +378,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
378
378
|
onClick: t[4] || (t[4] = (x) => k()),
|
|
379
379
|
variant: "tertiary"
|
|
380
380
|
}),
|
|
381
|
-
n(g) ? (
|
|
381
|
+
n(g) ? (l(), F(y, {
|
|
382
382
|
key: 0,
|
|
383
383
|
label: "Delete",
|
|
384
384
|
variant: "plain",
|
|
@@ -386,7 +386,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
386
386
|
onClick: t[5] || (t[5] = (x) => Z())
|
|
387
387
|
})) : T("", !0)
|
|
388
388
|
], 64)),
|
|
389
|
-
n(e) ? (
|
|
389
|
+
n(e) ? (l(), F(y, {
|
|
390
390
|
key: 1,
|
|
391
391
|
label: "Confirm",
|
|
392
392
|
onClick: t[6] || (t[6] = (x) => e.value = !1)
|
|
@@ -394,20 +394,20 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
394
394
|
])
|
|
395
395
|
]),
|
|
396
396
|
default: O(() => [
|
|
397
|
-
n(e) ? T("", !0) : (
|
|
398
|
-
|
|
399
|
-
p(
|
|
400
|
-
modelValue: n(
|
|
401
|
-
"onUpdate:modelValue": t[1] || (t[1] = (x) => n(
|
|
397
|
+
n(e) ? T("", !0) : (l(), h("div", je, [
|
|
398
|
+
Me,
|
|
399
|
+
p(ue, {
|
|
400
|
+
modelValue: n(o).name,
|
|
401
|
+
"onUpdate:modelValue": t[1] || (t[1] = (x) => n(o).name = x),
|
|
402
402
|
label: "Name",
|
|
403
|
-
schema: n(
|
|
403
|
+
schema: n(de).typeAtPath(n(f), "name")
|
|
404
404
|
}, null, 8, ["modelValue", "schema"]),
|
|
405
405
|
De,
|
|
406
|
-
a("div",
|
|
407
|
-
a("div",
|
|
406
|
+
a("div", Ne, [
|
|
407
|
+
a("div", qe, U(n(o).campaigns.length) + " campaign(s) linked ", 1),
|
|
408
408
|
p(A, {
|
|
409
409
|
modelValue: n(s),
|
|
410
|
-
"onUpdate:modelValue": t[2] || (t[2] = (x) =>
|
|
410
|
+
"onUpdate:modelValue": t[2] || (t[2] = (x) => N(s) ? s.value = x : null),
|
|
411
411
|
"prepend-icon": "search",
|
|
412
412
|
placeholder: "Search",
|
|
413
413
|
class: "w-auto"
|
|
@@ -420,23 +420,23 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
420
420
|
onClick: H
|
|
421
421
|
})
|
|
422
422
|
])),
|
|
423
|
-
n(e) ? (
|
|
423
|
+
n(e) ? (l(), F(Ie, {
|
|
424
424
|
key: 1,
|
|
425
|
-
modelValue: n(
|
|
426
|
-
"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),
|
|
427
427
|
campaigns: n(M)
|
|
428
428
|
}, null, 8, ["modelValue", "campaigns"])) : T("", !0),
|
|
429
|
-
a("div",
|
|
430
|
-
n(e) ? T("", !0) : (
|
|
431
|
-
a("div",
|
|
429
|
+
a("div", He, [
|
|
430
|
+
n(e) ? T("", !0) : (l(!0), h(V, { key: 0 }, B(n(K), (x, Q) => (l(), h("div", null, [
|
|
431
|
+
a("div", ze, U(Q), 1),
|
|
432
432
|
p(j, { separator: !0 }, {
|
|
433
433
|
default: O(() => [
|
|
434
|
-
(
|
|
434
|
+
(l(!0), h(V, null, B(x, (z) => (l(), h("div", Ke, [
|
|
435
435
|
a("div", null, U(z.label), 1),
|
|
436
436
|
a("div", null, [
|
|
437
437
|
p(y, {
|
|
438
438
|
icon: "delete",
|
|
439
|
-
onClick: (
|
|
439
|
+
onClick: (it) => J(z.value),
|
|
440
440
|
variant: "tertiary"
|
|
441
441
|
}, null, 8, ["onClick"])
|
|
442
442
|
])
|
|
@@ -452,7 +452,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
452
452
|
n(e) ? {
|
|
453
453
|
name: "side-sheet-header",
|
|
454
454
|
fn: O(() => [
|
|
455
|
-
a("div",
|
|
455
|
+
a("div", Le, [
|
|
456
456
|
p(y, {
|
|
457
457
|
icon: "arrow_back",
|
|
458
458
|
variant: "tertiary",
|
|
@@ -466,10 +466,10 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
466
466
|
]), 1032, ["modelValue", "header"]);
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
}),
|
|
470
|
-
src:
|
|
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", {
|
|
470
|
+
src: oe,
|
|
471
471
|
class: "w-[150px]"
|
|
472
|
-
}, 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({
|
|
473
473
|
__name: "Analytic",
|
|
474
474
|
setup(m) {
|
|
475
475
|
const R = {
|
|
@@ -477,7 +477,7 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
477
477
|
value: "create",
|
|
478
478
|
isPrimary: !0,
|
|
479
479
|
prependIcon: "add"
|
|
480
|
-
}, i =
|
|
480
|
+
}, i = _e(), u = C(), _ = C([]), r = C(""), e = te({
|
|
481
481
|
totalCampaign: 0,
|
|
482
482
|
totalProgram: 0,
|
|
483
483
|
totalMember: 0
|
|
@@ -495,13 +495,13 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
495
495
|
value: () => e.totalMember
|
|
496
496
|
}
|
|
497
497
|
];
|
|
498
|
-
function
|
|
498
|
+
function o(w) {
|
|
499
499
|
var v;
|
|
500
500
|
c.value = (/* @__PURE__ */ new Date()).toISOString(), (v = u.value) == null || v.showSheet(w);
|
|
501
501
|
}
|
|
502
502
|
async function f() {
|
|
503
503
|
await i.readGroups();
|
|
504
|
-
const w = await
|
|
504
|
+
const w = await P.readAllGrouped({
|
|
505
505
|
limit: 100,
|
|
506
506
|
skip: 0,
|
|
507
507
|
sortBy: "_id",
|
|
@@ -512,13 +512,13 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
512
512
|
}
|
|
513
513
|
async function b() {
|
|
514
514
|
var E, L;
|
|
515
|
-
const w = await
|
|
515
|
+
const w = await ge.read({
|
|
516
516
|
limit: 1,
|
|
517
517
|
skip: 0,
|
|
518
518
|
sortBy: "_id",
|
|
519
519
|
search: "",
|
|
520
520
|
descending: !1
|
|
521
|
-
}), v = await
|
|
521
|
+
}), v = await P.readAll({
|
|
522
522
|
limit: 1e3,
|
|
523
523
|
skip: 0,
|
|
524
524
|
sortBy: "_id",
|
|
@@ -535,23 +535,23 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
535
535
|
var v;
|
|
536
536
|
return w.name.includes(r.value) || ((v = w.pf_campaigns) == null ? void 0 : v.filter((E) => E.name.includes(r.value)).length);
|
|
537
537
|
}));
|
|
538
|
-
return
|
|
538
|
+
return ae(async () => {
|
|
539
539
|
await f(), await b();
|
|
540
540
|
}), (w, v) => {
|
|
541
541
|
const E = S("FmPageHead"), L = S("FmSearch"), k = S("FmCard"), H = S("FmButton");
|
|
542
|
-
return
|
|
542
|
+
return l(), h(V, null, [
|
|
543
543
|
p(E, {
|
|
544
544
|
title: "Analytic",
|
|
545
545
|
actions: n(_).length > 0 ? [R] : [],
|
|
546
|
-
"onClick:action": v[0] || (v[0] = ($) =>
|
|
546
|
+
"onClick:action": v[0] || (v[0] = ($) => o())
|
|
547
547
|
}, null, 8, ["actions"]),
|
|
548
|
-
a("div",
|
|
549
|
-
a("div",
|
|
550
|
-
a("div",
|
|
548
|
+
a("div", Ze, [
|
|
549
|
+
a("div", Qe, [
|
|
550
|
+
a("div", Xe, [
|
|
551
551
|
p(L, {
|
|
552
552
|
class: "xs:hidden",
|
|
553
553
|
modelValue: n(r),
|
|
554
|
-
"onUpdate:modelValue": v[1] || (v[1] = ($) =>
|
|
554
|
+
"onUpdate:modelValue": v[1] || (v[1] = ($) => N(r) ? r.value = $ : null),
|
|
555
555
|
placeholder: "Search Table",
|
|
556
556
|
collapsible: ""
|
|
557
557
|
}, null, 8, ["modelValue"])
|
|
@@ -561,45 +561,45 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
561
561
|
class: "flex flex-col gap-16 p-16"
|
|
562
562
|
}, {
|
|
563
563
|
default: O(() => [
|
|
564
|
-
|
|
565
|
-
a("div",
|
|
566
|
-
(
|
|
564
|
+
Ye,
|
|
565
|
+
a("div", et, [
|
|
566
|
+
(l(), h(V, null, B(s, ($, M) => a("div", {
|
|
567
567
|
key: $.key,
|
|
568
|
-
class:
|
|
568
|
+
class: ne(["px-8", { "xs:!border-r": M % 2 == 0 }])
|
|
569
569
|
}, [
|
|
570
|
-
a("div",
|
|
571
|
-
a("div",
|
|
570
|
+
a("div", tt, U($.key), 1),
|
|
571
|
+
a("div", at, U($.value()), 1)
|
|
572
572
|
], 2)), 64))
|
|
573
573
|
])
|
|
574
574
|
]),
|
|
575
575
|
_: 1
|
|
576
576
|
})
|
|
577
577
|
]),
|
|
578
|
-
n(_).length ? T("", !0) : (
|
|
578
|
+
n(_).length ? T("", !0) : (l(), F(k, {
|
|
579
579
|
key: 0,
|
|
580
580
|
variant: "outlined",
|
|
581
581
|
class: "flex flex-col gap-y-24 items-center p-16"
|
|
582
582
|
}, {
|
|
583
583
|
default: O(() => [
|
|
584
|
-
at,
|
|
585
584
|
nt,
|
|
585
|
+
ot,
|
|
586
586
|
lt,
|
|
587
|
-
a("div",
|
|
587
|
+
a("div", st, [
|
|
588
588
|
p(H, {
|
|
589
589
|
label: "Create group",
|
|
590
590
|
icon: "add",
|
|
591
|
-
onClick: v[2] || (v[2] = ($) =>
|
|
591
|
+
onClick: v[2] || (v[2] = ($) => o())
|
|
592
592
|
})
|
|
593
593
|
])
|
|
594
594
|
]),
|
|
595
595
|
_: 1
|
|
596
596
|
})),
|
|
597
|
-
(
|
|
597
|
+
(l(!0), h(V, null, B(n(g), ($) => (l(), F(Ue, {
|
|
598
598
|
key: $._id.toString(),
|
|
599
599
|
group: $,
|
|
600
|
-
"on-edit":
|
|
600
|
+
"on-edit": o
|
|
601
601
|
}, null, 8, ["group"]))), 128)),
|
|
602
|
-
p(
|
|
602
|
+
p(We, {
|
|
603
603
|
ref_key: "sheetRef",
|
|
604
604
|
ref: u,
|
|
605
605
|
onSuccess: f
|
|
@@ -610,5 +610,5 @@ const ge = { class: "divide-x flex flex-wrap" }, he = { class: "fm-typo-en-body-
|
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
612
|
export {
|
|
613
|
-
|
|
613
|
+
kt as default
|
|
614
614
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
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 o, 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 { a as X } from "./app-
|
|
6
|
-
import { u as Y } from "./campaign-
|
|
7
|
-
import { g as F, b as k } from "./dto-
|
|
4
|
+
import { u as Q, p as W } from "./loading-CTicD3SM.js";
|
|
5
|
+
import { a as X } from "./app-Dvev0uC3.js";
|
|
6
|
+
import { u as Y } from "./campaign-BE3eGawG.js";
|
|
7
|
+
import { g as F, b as k } from "./dto-BQE1JRsC.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-6TgnyUt6.js";
|
|
10
|
+
import { u as te } from "./template-CyjQ7gNz.js";
|
|
11
|
+
import { c as y } from "./index-BPJIa0X2.js";
|
|
12
12
|
const ae = { class: "px-24 flex flex-col gap-y-16" }, oe = { 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", {
|