@feedmepos/mf-connect 0.1.56-prod → 0.1.58-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/package.json +1 -1
- package/dist/Analytic-XUI4rZyP.js +0 -427
- package/dist/App-vv5J1Ebe.js +0 -4630
- package/dist/Bin-D4V36uXK.js +0 -166
- package/dist/Broadcast-BvW27G77.js +0 -233
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2MC6Gy1.js +0 -121
- package/dist/Card-C7xLv1Fb.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-BKfS-bGL.js +0 -458
- package/dist/Credit-CGmWQq0t.js +0 -228
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js +0 -2194
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BGlaqjWp.js +0 -348
- package/dist/Experience-CT7Yab3W.js +0 -229
- package/dist/FileSaver.min-NlMItPOc.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-DtW4rtYQ.js +0 -284
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-D1KQpDGg.js +0 -144
- package/dist/Index-Bs5ob9Km.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js +0 -18737
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-tA350rTd.js +0 -319
- package/dist/Member-CZoTXgKz.js +0 -279
- package/dist/MemberList-ChwyPtmW.js +0 -1607
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-Cchtvxm9.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bo0EnHBx.js +0 -60553
- package/dist/Mission-DDpelLqN.js +0 -302
- package/dist/Overview-Da3ewBat.js +0 -1079
- package/dist/Point-CggE8VUk.js +0 -232
- package/dist/Promotion-DxvbZhgQ.js +0 -289
- package/dist/Queue-fIxlHrMd.js +0 -260
- package/dist/Record-Bv90_VUG.js +0 -341
- package/dist/Reward-BWYLk7aC.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CjYEtENe.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ak1R8Y2a.js +0 -1763
- package/dist/Segment-_VGdBy3a.js +0 -882
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-Dm4hF1n1.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-DWDMhmNr.js +0 -188
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Czy25PII.js +0 -147
- package/dist/Setting-7fTz1dJa.js +0 -1936
- package/dist/Store-TQHKR__B.js +0 -1842
- package/dist/StoreRewards-DZy1ZwiI.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Cae25Vr6.js +0 -995
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-BVVEzpyP.js +0 -139
- package/dist/Tier-CK53vdbl.js +0 -895
- package/dist/Title-CGWPq_FF.js +0 -566
- package/dist/Transaction-DjJ03PfX.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DNSdyxrF.js +0 -130
- package/dist/Voucher-D6RuJjNn.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-D4iCOq3V.js +0 -419
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js +0 -56
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-BLlAxdVk.js +0 -57962
- package/dist/app-_rmIFJ8M.js +0 -7057
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -6
- package/dist/business-gJ9fK_2b.js +0 -82
- package/dist/campaign-BfznfcHc.js +0 -94
- package/dist/campaign-C_Yq-ffV.js +0 -1810
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign.enum-Dsbpz7BO.js +0 -20
- package/dist/campaign.fn-C6vKb-lp.js +0 -758
- package/dist/collectible.enum-DNpj_oyC.js +0 -19
- package/dist/collection.fn-Cgo0sPL2.js +0 -26
- package/dist/dto-CaSQ4Pp9.js +0 -216
- package/dist/effect-DuH74x-N.js +0 -78
- package/dist/email-addresses-DXr-Qqt9.js +0 -705
- package/dist/export-tMPFlVV0.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/helper-CJTseW10.js +0 -71
- package/dist/index-8RETBwYy.js +0 -8861
- package/dist/index-B57kxqv7.js +0 -3
- package/dist/index-BNUuy_4R.js +0 -44
- package/dist/index-BSJ-4JYy.js +0 -146
- package/dist/index-BTpBLMHl.js +0 -3070
- package/dist/index-C6Iyn1Q6.js +0 -54
- package/dist/index-CWI06v9e.js +0 -31
- package/dist/index-CdnKwJuz.js +0 -30076
- package/dist/index-Cr_9Bqa1.js +0 -121
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DTyfvK3U.js +0 -2130
- package/dist/index-Dn0gJspN.js +0 -32269
- package/dist/index-IHKkNyxb.js +0 -38
- package/dist/index-J3TDCX-5.js +0 -76
- package/dist/index-V9kRRAB1.js +0 -32
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-P2nmohVw.js +0 -3069
- package/dist/loading-D5ZAAdUU.js +0 -71
- package/dist/lodash-B5I3zXaY.js +0 -3678
- package/dist/membership-xl9aKOQ_.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-CIHN3jJZ.js +0 -15
- package/dist/number-BN4-Jdog.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-Dh6RD0Tk.js +0 -145
- package/dist/plugins-CJlgzIv2.js +0 -208
- package/dist/reward-C8mezXzs.js +0 -36
- package/dist/rule-9VRIJFHZ.js +0 -1951
- package/dist/rule-builder-CZUgrDAw.js +0 -102
- package/dist/style.css +0 -4
- package/dist/template-aPJnNGLi.js +0 -190
- package/dist/tier-BJDhpH6X.js +0 -4
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-CpvXaiqq.js +0 -1151
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-BfrtcBd-.js +0 -144
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/usePagination-Ds-cuHop.js +0 -223
- package/dist/user-Bt1C0yV5.js +0 -54
- package/dist/vue-i18n-OdHHHpEE.js +0 -2365
- package/dist/xlsx-BgB0dYfE.js +0 -15491
- package/dist/zod-Bg2FbC-D.js +0 -90
package/package.json
CHANGED
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as y, watch as X, onMounted as I, resolveComponent as x, openBlock as d, createBlock as A, withCtx as L, createVNode as h, unref as t, createElementVNode as i, createElementBlock as k, Fragment as $, renderList as D, computed as G, toDisplayString as O, isRef as T, createSlots as Y, createCommentVNode as V, createTextVNode as ee, reactive as te, onBeforeMount as ae } from "vue";
|
|
2
|
-
import { _ as le } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import "./index-CdnKwJuz.js";
|
|
4
|
-
import "./campaign-C_Yq-ffV.js";
|
|
5
|
-
import { useRouter as ne } from "vue-router";
|
|
6
|
-
import { c as R } from "./index-Cr_9Bqa1.js";
|
|
7
|
-
import { _ as oe } from "./ZodTextField.vue_vue_type_script_setup_true_lang-BFz8RvY_.js";
|
|
8
|
-
import { Z as se } from "./zod-Bg2FbC-D.js";
|
|
9
|
-
import { F as re } from "./dto-CaSQ4Pp9.js";
|
|
10
|
-
import { J as ie } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
-
import "./index-Dn0gJspN.js";
|
|
12
|
-
import { useSnackbar as ue } from "@feedmepos/ui-library";
|
|
13
|
-
import { u as ce } from "./app-wDQR6dpb.js";
|
|
14
|
-
import { u as me } from "./loading-D5ZAAdUU.js";
|
|
15
|
-
import { C as de } from "./campaign.fn-C6vKb-lp.js";
|
|
16
|
-
import { g as pe } from "./object-qECH92oz.js";
|
|
17
|
-
import { u as ve } from "./campaign-BfznfcHc.js";
|
|
18
|
-
import { u as fe } from "./membership-xl9aKOQ_.js";
|
|
19
|
-
import { u as ye } from "./vue-i18n-OdHHHpEE.js";
|
|
20
|
-
const ge = { class: "ml-32 flex flex-col" }, _e = /* @__PURE__ */ j({
|
|
21
|
-
__name: "CampaignCard",
|
|
22
|
-
props: {
|
|
23
|
-
title: {},
|
|
24
|
-
items: {},
|
|
25
|
-
modelValue: {}
|
|
26
|
-
},
|
|
27
|
-
emits: ["update:model-value"],
|
|
28
|
-
setup(U, { emit: b }) {
|
|
29
|
-
const c = U, v = b, S = (o) => {
|
|
30
|
-
o ? p.value = c.items.map((a) => a.value) : p.value = [], r.value = o, v("update:model-value", p.value);
|
|
31
|
-
}, g = (o) => {
|
|
32
|
-
p.value = o, r.value = o.length === c.items.length, v("update:model-value", o);
|
|
33
|
-
}, r = y(!1), p = y([]);
|
|
34
|
-
return X(
|
|
35
|
-
() => c.modelValue,
|
|
36
|
-
() => {
|
|
37
|
-
p.value = c.modelValue.filter(
|
|
38
|
-
(o) => c.items.find((a) => a.value === o)
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
), I(() => {
|
|
42
|
-
p.value = c.modelValue.filter(
|
|
43
|
-
(o) => c.items.find((a) => a.value === o)
|
|
44
|
-
);
|
|
45
|
-
}), (o, a) => {
|
|
46
|
-
const _ = x("FmCheckbox"), n = x("FmCard");
|
|
47
|
-
return d(), A(n, {
|
|
48
|
-
variant: "outlined",
|
|
49
|
-
class: "p-16 space-y-8 h-full cursor-pointer select-none xs:col-span-3"
|
|
50
|
-
}, {
|
|
51
|
-
default: L(() => [
|
|
52
|
-
h(_, {
|
|
53
|
-
"model-value": t(r),
|
|
54
|
-
value: "1",
|
|
55
|
-
label: c.title,
|
|
56
|
-
indeterminate: t(p).length > 0,
|
|
57
|
-
"onUpdate:modelValue": S
|
|
58
|
-
}, null, 8, ["model-value", "label", "indeterminate"]),
|
|
59
|
-
i("div", ge, [
|
|
60
|
-
(d(!0), k($, null, D(c.items, (l, u) => (d(), A(_, {
|
|
61
|
-
key: u,
|
|
62
|
-
"model-value": t(p),
|
|
63
|
-
label: l.label,
|
|
64
|
-
value: l.value,
|
|
65
|
-
"onUpdate:modelValue": g
|
|
66
|
-
}, null, 8, ["model-value", "label", "value"]))), 128))
|
|
67
|
-
])
|
|
68
|
-
]),
|
|
69
|
-
_: 1
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}), he = { class: "space-y-16" }, be = { class: "flex items-center" }, xe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary w-[300px]" }, Ce = { class: "space-y-[40px]" }, ke = /* @__PURE__ */ j({
|
|
74
|
-
__name: "LinkCampaign",
|
|
75
|
-
props: {
|
|
76
|
-
modelValue: {
|
|
77
|
-
type: Array,
|
|
78
|
-
required: !0
|
|
79
|
-
},
|
|
80
|
-
campaigns: {
|
|
81
|
-
type: Object,
|
|
82
|
-
required: !0
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
emits: ["update:model-value"],
|
|
86
|
-
setup(U, { emit: b }) {
|
|
87
|
-
const c = y(""), v = y([]), S = U, g = b, r = G(() => Object.entries(S.campaigns).reduce((o, [a, _]) => {
|
|
88
|
-
const n = _.filter(
|
|
89
|
-
(l) => l.label.toLowerCase().includes(c.value.toLowerCase())
|
|
90
|
-
);
|
|
91
|
-
return n.length > 0 && (o[a] = n), o;
|
|
92
|
-
}, {}));
|
|
93
|
-
function p(o, a) {
|
|
94
|
-
v.value = v.value.filter(
|
|
95
|
-
(_) => !a.map((n) => n.value).includes(_)
|
|
96
|
-
), v.value = [.../* @__PURE__ */ new Set([...v.value, ...o])], g("update:model-value", v.value);
|
|
97
|
-
}
|
|
98
|
-
return I(() => {
|
|
99
|
-
v.value = S.modelValue;
|
|
100
|
-
}), (o, a) => {
|
|
101
|
-
const _ = x("FmTextField");
|
|
102
|
-
return d(), k($, null, [
|
|
103
|
-
h(ie, { json: U.campaigns }, null, 8, ["json"]),
|
|
104
|
-
i("div", he, [
|
|
105
|
-
i("div", be, [
|
|
106
|
-
i("div", xe, O(t(v).length) + " campaign(s) linked ", 1),
|
|
107
|
-
h(_, {
|
|
108
|
-
modelValue: t(c),
|
|
109
|
-
"onUpdate:modelValue": a[0] || (a[0] = (n) => T(c) ? c.value = n : null),
|
|
110
|
-
"prepend-icon": "search",
|
|
111
|
-
placeholder: "Search",
|
|
112
|
-
class: "w-full"
|
|
113
|
-
}, null, 8, ["modelValue"])
|
|
114
|
-
]),
|
|
115
|
-
i("div", Ce, [
|
|
116
|
-
(d(!0), k($, null, D(t(r), (n, l) => (d(), A(_e, {
|
|
117
|
-
"model-value": t(v),
|
|
118
|
-
title: l,
|
|
119
|
-
items: n,
|
|
120
|
-
"onUpdate:modelValue": (u) => p(u, n)
|
|
121
|
-
}, null, 8, ["model-value", "title", "items", "onUpdate:modelValue"]))), 256))
|
|
122
|
-
])
|
|
123
|
-
])
|
|
124
|
-
], 64);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
}), Ve = { class: "flex items-center gap-x-8" }, Se = {
|
|
128
|
-
key: 0,
|
|
129
|
-
class: "space-y-16 pr-12"
|
|
130
|
-
}, we = { class: "flex items-center gap-x-16" }, Fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Ae = { class: "mt-16" }, $e = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600 py-8 px-16 bg-gray-100" }, Ue = { class: "flex justify-between items-center py-8 px-16 border-b-1" }, Pe = { class: "flex items-center gap-8" }, Le = /* @__PURE__ */ j({
|
|
131
|
-
__name: "AnalyticSheet",
|
|
132
|
-
emits: ["success"],
|
|
133
|
-
setup(U, { expose: b, emit: c }) {
|
|
134
|
-
const v = c, S = ce();
|
|
135
|
-
ue();
|
|
136
|
-
const g = y(!1), r = y(!1), p = {
|
|
137
|
-
name: "",
|
|
138
|
-
campaigns: []
|
|
139
|
-
}, o = y(""), a = y({ ...p }), _ = re.superRefine((s, e) => {
|
|
140
|
-
}), n = y([]), l = y(null), { global: u, minor: w } = me, P = G(() => {
|
|
141
|
-
const s = _.safeParse(a.value);
|
|
142
|
-
return s.success ? [] : s.error.errors;
|
|
143
|
-
});
|
|
144
|
-
function M(s) {
|
|
145
|
-
var e;
|
|
146
|
-
g.value = !0, s ? (l.value = { ...s }, a.value = { ...s, campaigns: (e = s.pf_campaigns) == null ? void 0 : e.map((m) => m._id) }) : (l.value = null, a.value = { ...p });
|
|
147
|
-
}
|
|
148
|
-
function F() {
|
|
149
|
-
g.value = !1, l.value = null;
|
|
150
|
-
}
|
|
151
|
-
function K() {
|
|
152
|
-
r.value = !0;
|
|
153
|
-
}
|
|
154
|
-
async function W() {
|
|
155
|
-
const s = await R.readAll({
|
|
156
|
-
limit: 1e3,
|
|
157
|
-
skip: 0,
|
|
158
|
-
sortBy: "_id",
|
|
159
|
-
search: "",
|
|
160
|
-
descending: !0
|
|
161
|
-
});
|
|
162
|
-
n.value = s.resources.filter(
|
|
163
|
-
(e) => !["MEMBERSHIP", "REWARD_POOL"].includes(e.type) && !["ISSUE_REWARD"].includes("event" in e ? e == null ? void 0 : e.event.type : "")
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
const N = G(() => {
|
|
167
|
-
const s = (m) => m.map((C) => ({
|
|
168
|
-
label: C.name,
|
|
169
|
-
value: C._id
|
|
170
|
-
}));
|
|
171
|
-
return pe(
|
|
172
|
-
n.value,
|
|
173
|
-
(m) => de.formattedType(m.type),
|
|
174
|
-
s
|
|
175
|
-
);
|
|
176
|
-
}), q = G(() => Object.entries(N.value).reduce(
|
|
177
|
-
(s, [e, m]) => {
|
|
178
|
-
const C = m.filter((B) => {
|
|
179
|
-
var E, f;
|
|
180
|
-
return (f = (E = a.value) == null ? void 0 : E.campaigns) == null ? void 0 : f.includes(B.value);
|
|
181
|
-
}).filter(
|
|
182
|
-
(B) => B.label.toLowerCase().includes(o.value.toLowerCase())
|
|
183
|
-
);
|
|
184
|
-
return C.length > 0 && (s[e] = C), s;
|
|
185
|
-
},
|
|
186
|
-
{}
|
|
187
|
-
));
|
|
188
|
-
function J(s) {
|
|
189
|
-
var m, C;
|
|
190
|
-
const e = (m = a.value.campaigns) == null ? void 0 : m.indexOf(s);
|
|
191
|
-
e != null && e > -1 && ((C = a.value.campaigns) == null || C.splice(e, 1));
|
|
192
|
-
}
|
|
193
|
-
async function Z() {
|
|
194
|
-
_.safeParse(a.value).success && await w(
|
|
195
|
-
async () => {
|
|
196
|
-
var e;
|
|
197
|
-
l.value ? await R.updateGroup(
|
|
198
|
-
(e = l.value) == null ? void 0 : e._id,
|
|
199
|
-
a.value
|
|
200
|
-
) : await R.createGroup(a.value), v("success"), F();
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
message: "Saving group",
|
|
204
|
-
successMessage: "Group saved"
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
async function z() {
|
|
209
|
-
await w(
|
|
210
|
-
async () => {
|
|
211
|
-
var s;
|
|
212
|
-
await R.deleteGroup((s = l.value) == null ? void 0 : s._id), v("success"), F();
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
message: "Deleting group",
|
|
216
|
-
successMessage: "Group deleted"
|
|
217
|
-
}
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
return I(async () => {
|
|
221
|
-
await W();
|
|
222
|
-
}), b({
|
|
223
|
-
showSheet: M,
|
|
224
|
-
hideSheet: F
|
|
225
|
-
}), (s, e) => {
|
|
226
|
-
const m = x("FmButton"), C = x("FmTextField"), B = x("FmList"), E = x("FmSideSheet");
|
|
227
|
-
return d(), A(E, {
|
|
228
|
-
modelValue: t(g),
|
|
229
|
-
"onUpdate:modelValue": e[7] || (e[7] = (f) => T(g) ? g.value = f : null),
|
|
230
|
-
header: t(l) ? "Edit group" : "Add group",
|
|
231
|
-
"dismiss-away": "",
|
|
232
|
-
"close-button": !0,
|
|
233
|
-
"max-width": 550
|
|
234
|
-
}, Y({
|
|
235
|
-
"side-sheet-footer": L(() => [
|
|
236
|
-
i("div", Pe, [
|
|
237
|
-
t(r) ? V("", !0) : (d(), k($, { key: 0 }, [
|
|
238
|
-
h(m, {
|
|
239
|
-
label: "Submit",
|
|
240
|
-
onClick: Z,
|
|
241
|
-
disabled: t(P).length > 0 || t(S).isLoading
|
|
242
|
-
}, null, 8, ["disabled"]),
|
|
243
|
-
h(m, {
|
|
244
|
-
label: "Cancel",
|
|
245
|
-
onClick: e[4] || (e[4] = (f) => F()),
|
|
246
|
-
variant: "tertiary"
|
|
247
|
-
}),
|
|
248
|
-
t(l) ? (d(), A(m, {
|
|
249
|
-
key: 0,
|
|
250
|
-
label: "Delete",
|
|
251
|
-
variant: "plain",
|
|
252
|
-
class: "ml-auto fm-color-system-error-300",
|
|
253
|
-
onClick: e[5] || (e[5] = (f) => z())
|
|
254
|
-
})) : V("", !0)
|
|
255
|
-
], 64)),
|
|
256
|
-
t(r) ? (d(), A(m, {
|
|
257
|
-
key: 1,
|
|
258
|
-
label: "Confirm",
|
|
259
|
-
onClick: e[6] || (e[6] = (f) => r.value = !1)
|
|
260
|
-
})) : V("", !0)
|
|
261
|
-
])
|
|
262
|
-
]),
|
|
263
|
-
default: L(() => [
|
|
264
|
-
t(r) ? V("", !0) : (d(), k("div", Se, [
|
|
265
|
-
e[9] || (e[9] = i("div", { class: "fm-typo-en-title-sm-800" }, "Group detail", -1)),
|
|
266
|
-
h(oe, {
|
|
267
|
-
modelValue: t(a).name,
|
|
268
|
-
"onUpdate:modelValue": e[1] || (e[1] = (f) => t(a).name = f),
|
|
269
|
-
label: "Name",
|
|
270
|
-
schema: t(se).typeAtPath(t(_), "name")
|
|
271
|
-
}, null, 8, ["modelValue", "schema"]),
|
|
272
|
-
e[10] || (e[10] = i("div", { class: "fm-typo-en-title-sm-800" }, "Link campaign", -1)),
|
|
273
|
-
i("div", we, [
|
|
274
|
-
i("div", Fe, O(t(a).campaigns.length) + " campaign(s) linked ", 1),
|
|
275
|
-
h(C, {
|
|
276
|
-
modelValue: t(o),
|
|
277
|
-
"onUpdate:modelValue": e[2] || (e[2] = (f) => T(o) ? o.value = f : null),
|
|
278
|
-
"prepend-icon": "search",
|
|
279
|
-
placeholder: "Search",
|
|
280
|
-
class: "w-auto"
|
|
281
|
-
}, null, 8, ["modelValue"])
|
|
282
|
-
]),
|
|
283
|
-
h(m, {
|
|
284
|
-
variant: "plain",
|
|
285
|
-
icon: "link",
|
|
286
|
-
label: "Link Campaign",
|
|
287
|
-
onClick: K
|
|
288
|
-
})
|
|
289
|
-
])),
|
|
290
|
-
t(r) ? (d(), A(ke, {
|
|
291
|
-
key: 1,
|
|
292
|
-
modelValue: t(a).campaigns,
|
|
293
|
-
"onUpdate:modelValue": e[3] || (e[3] = (f) => t(a).campaigns = f),
|
|
294
|
-
campaigns: t(N)
|
|
295
|
-
}, null, 8, ["modelValue", "campaigns"])) : V("", !0),
|
|
296
|
-
i("div", Ae, [
|
|
297
|
-
t(r) ? V("", !0) : (d(!0), k($, { key: 0 }, D(t(q), (f, Q) => (d(), k("div", null, [
|
|
298
|
-
i("div", $e, O(Q), 1),
|
|
299
|
-
h(B, { separator: !0 }, {
|
|
300
|
-
default: L(() => [
|
|
301
|
-
(d(!0), k($, null, D(f, (H) => (d(), k("div", Ue, [
|
|
302
|
-
i("div", null, O(H.label), 1),
|
|
303
|
-
i("div", null, [
|
|
304
|
-
h(m, {
|
|
305
|
-
icon: "delete",
|
|
306
|
-
onClick: (Re) => J(H.value),
|
|
307
|
-
variant: "tertiary"
|
|
308
|
-
}, null, 8, ["onClick"])
|
|
309
|
-
])
|
|
310
|
-
]))), 256))
|
|
311
|
-
]),
|
|
312
|
-
_: 2
|
|
313
|
-
}, 1024)
|
|
314
|
-
]))), 256))
|
|
315
|
-
])
|
|
316
|
-
]),
|
|
317
|
-
_: 2
|
|
318
|
-
}, [
|
|
319
|
-
t(r) ? {
|
|
320
|
-
name: "side-sheet-header",
|
|
321
|
-
fn: L(() => [
|
|
322
|
-
i("div", Ve, [
|
|
323
|
-
h(m, {
|
|
324
|
-
icon: "arrow_back",
|
|
325
|
-
variant: "tertiary",
|
|
326
|
-
onClick: e[0] || (e[0] = (f) => r.value = !1)
|
|
327
|
-
}),
|
|
328
|
-
e[8] || (e[8] = ee("Link campaign ", -1))
|
|
329
|
-
])
|
|
330
|
-
]),
|
|
331
|
-
key: "0"
|
|
332
|
-
} : void 0
|
|
333
|
-
]), 1032, ["modelValue", "header"]);
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
}), Ge = { class: "px-24 flex flex-col gap-y-32 pb-24" }, Me = { class: "space-y-16" }, Be = { class: "flex items-center justify-end" }, at = /* @__PURE__ */ j({
|
|
337
|
-
__name: "Analytic",
|
|
338
|
-
setup(U) {
|
|
339
|
-
const { t: b } = ye(), c = {
|
|
340
|
-
label: b("connect.analytic.addGroup"),
|
|
341
|
-
value: "create",
|
|
342
|
-
isPrimary: !0,
|
|
343
|
-
prependIcon: "add"
|
|
344
|
-
}, v = ve(), S = y(), g = y([]), r = y(""), p = te({
|
|
345
|
-
totalCampaign: 0,
|
|
346
|
-
totalProgram: 0,
|
|
347
|
-
totalMember: 0
|
|
348
|
-
}), o = y("1");
|
|
349
|
-
b("connect.analytic.summary.totalCampaign"), b("connect.analytic.summary.totalProgram"), b("connect.analytic.summary.totalMember");
|
|
350
|
-
function a(l) {
|
|
351
|
-
var u;
|
|
352
|
-
o.value = (/* @__PURE__ */ new Date()).toISOString(), (u = S.value) == null || u.showSheet(l);
|
|
353
|
-
}
|
|
354
|
-
async function _() {
|
|
355
|
-
await v.readGroups();
|
|
356
|
-
const l = await R.readAllGrouped({
|
|
357
|
-
limit: 100,
|
|
358
|
-
skip: 0,
|
|
359
|
-
sortBy: "_id",
|
|
360
|
-
search: "",
|
|
361
|
-
descending: !0
|
|
362
|
-
});
|
|
363
|
-
g.value = l.resources;
|
|
364
|
-
}
|
|
365
|
-
G(() => g.value.filter((l) => {
|
|
366
|
-
var u;
|
|
367
|
-
return l.name.includes(r.value) || ((u = l.pf_campaigns) == null ? void 0 : u.filter((w) => w.name.includes(r.value)).length);
|
|
368
|
-
}));
|
|
369
|
-
const n = fe();
|
|
370
|
-
return ne(), y(!0), G(() => {
|
|
371
|
-
var l, u, w, P;
|
|
372
|
-
return !n.storeOption || !n.storeOption.company ? -1 : !n.payoutAccount || !n.payoutAccount.enable || n.payoutAccount.status != "APPROVED" ? 0 : (u = (l = n.store) == null ? void 0 : l.categories) != null && u.length ? (P = (w = n.store) == null ? void 0 : w.categories) != null && P.some(
|
|
373
|
-
(M) => M.bundles.some((F) => F.isFeedvibe)
|
|
374
|
-
) ? 3 : 2 : 1;
|
|
375
|
-
}), ae(async () => {
|
|
376
|
-
await n.readMemberStore(), await n.readMembership(), await n.readPayoutAccount();
|
|
377
|
-
}), (l, u) => {
|
|
378
|
-
const w = x("FmPageHead"), P = x("FmSearch"), M = x("FmCard");
|
|
379
|
-
return x("FmButton"), x("FmIcon"), d(), k($, null, [
|
|
380
|
-
h(w, {
|
|
381
|
-
title: t(b)("connect.analytic.title"),
|
|
382
|
-
actions: t(g).length > 0 ? [c] : [],
|
|
383
|
-
"onClick:action": u[0] || (u[0] = (F) => a())
|
|
384
|
-
}, null, 8, ["title", "actions"]),
|
|
385
|
-
i("div", Ge, [
|
|
386
|
-
i("div", Me, [
|
|
387
|
-
i("div", Be, [
|
|
388
|
-
h(P, {
|
|
389
|
-
class: "xs:hidden",
|
|
390
|
-
modelValue: t(r),
|
|
391
|
-
"onUpdate:modelValue": u[1] || (u[1] = (F) => T(r) ? r.value = F : null),
|
|
392
|
-
placeholder: t(b)("connect.analytic.search"),
|
|
393
|
-
collapsible: ""
|
|
394
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
395
|
-
]),
|
|
396
|
-
V("", !0)
|
|
397
|
-
]),
|
|
398
|
-
V("", !0),
|
|
399
|
-
t(g).length ? V("", !0) : (d(), A(M, {
|
|
400
|
-
key: 1,
|
|
401
|
-
variant: "outlined",
|
|
402
|
-
class: "flex flex-col gap-y-24 items-center p-16"
|
|
403
|
-
}, {
|
|
404
|
-
default: L(() => [...u[7] || (u[7] = [
|
|
405
|
-
i("img", {
|
|
406
|
-
src: le,
|
|
407
|
-
class: "w-[150px]"
|
|
408
|
-
}, null, -1),
|
|
409
|
-
i("div", { class: "fm-typo-en-title-sm-800 text-center" }, " Analytics Dashboard Temporarily Unavailable ", -1),
|
|
410
|
-
i("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)
|
|
411
|
-
])]),
|
|
412
|
-
_: 1
|
|
413
|
-
})),
|
|
414
|
-
V("", !0),
|
|
415
|
-
h(Le, {
|
|
416
|
-
ref_key: "sheetRef",
|
|
417
|
-
ref: S,
|
|
418
|
-
onSuccess: _
|
|
419
|
-
}, null, 512)
|
|
420
|
-
])
|
|
421
|
-
], 64);
|
|
422
|
-
};
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
|
-
export {
|
|
426
|
-
at as default
|
|
427
|
-
};
|