@feedmepos/mf-connect 0.1.38-beta.71 → 0.1.38-beta.72
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-BY0xqCru.js +0 -761
- package/dist/App-n6-XqhU7.js +0 -4638
- package/dist/AuditLogs-Dml3WjdH.js +0 -1991
- package/dist/Bin-DaPZyWm-.js +0 -166
- package/dist/Broadcast-hLmkBNne.js +0 -267
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BahnNhzD.js +0 -121
- package/dist/Card-C_Fm3E0s.js +0 -909
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections-DAUsUa0c.js +0 -540
- package/dist/Credit-DklbckuQ.js +0 -261
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +0 -128
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js +0 -3167
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-e1ZWGrXS.js +0 -351
- package/dist/Experience-D3Ve8dCI.js +0 -260
- package/dist/FileSaver.min-Bg15HHd0.js +0 -74
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-BJzRdZNg.js +0 -331
- package/dist/GenerateMaterial-pDWgptXt.js +0 -589
- package/dist/Grab-B0D8SpcD.js +0 -301
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DkI3qMHv.js +0 -145
- package/dist/Index-ysSM8-pd.js +0 -259
- package/dist/JsonViewer-v8_C7l5N.js +0 -87
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-C7bEzQ4b.js +0 -18737
- package/dist/MainLayout-Kt1Wiz87.js +0 -41
- package/dist/Marketing-CFS6ff03.js +0 -145
- package/dist/MarketingMaterialEdit-BDYr5Rlw.js +0 -746
- package/dist/Member-Dgb3QBKF.js +0 -280
- package/dist/MemberList-CfcQUvN8.js +0 -1605
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-BVwGdpXo.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Dj3h51yH.js +0 -60798
- package/dist/Mission-B9K8-Wrt.js +0 -335
- package/dist/Overview-DJgKxAvU.js +0 -1078
- package/dist/Point-lev1_Nit.js +0 -263
- package/dist/Promotion-De9e8yPj.js +0 -397
- package/dist/Queue-DH_F0Ekd.js +0 -259
- package/dist/Record-CH2AZqzF.js +0 -341
- package/dist/Reward-BUgOAjd4.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-KTaTLjjw.js +0 -149
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js +0 -1912
- package/dist/Segment-DL6O--Aw.js +0 -881
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-ZUGDMD5J.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIeyrheH.js +0 -188
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js +0 -147
- package/dist/Setting-DOA80XlJ.js +0 -1999
- package/dist/SettingAdvertisements-Dl0eisXq.js +0 -263
- package/dist/Store-fni1Xblz.js +0 -1995
- package/dist/StoreRewards-CLMO-kNi.js +0 -534
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js +0 -1034
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D-jYcuAa.js +0 -7005
- package/dist/Tier-B0_DiVNv.js +0 -969
- package/dist/Title-twptCzpk.js +0 -567
- package/dist/Transaction-CTX5I6gO.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Bp-rIgz4.js +0 -130
- package/dist/Voucher-C7Kxmzjr.js +0 -422
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-lZQTZUUU.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BlBEFfgu.js +0 -56
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-D5GVWKxc.js +0 -59071
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-BvNsRlY4.js +0 -82
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign-DRErhSfb.js +0 -100
- package/dist/campaign-MN_o01w6.js +0 -253
- package/dist/campaign.enum-BtfwwLCf.js +0 -26
- package/dist/campaign.fn-BgSGxLPo.js +0 -776
- package/dist/collectible.enum-CV2tpD2C.js +0 -19
- package/dist/collection.fn-BYjqObg7.js +0 -26
- package/dist/dto-CyhnIGn-.js +0 -222
- package/dist/duplicateCampaign-jOZ1UznM.js +0 -51
- package/dist/effect-NKfquhhR.js +0 -89
- package/dist/email-addresses-EmFJeFmB.js +0 -705
- package/dist/export-B70Bp6s8.js +0 -96
- package/dist/feedme.ico +0 -0
- package/dist/helper-DiSstsUa.js +0 -86
- package/dist/index-5FmmWAib.js +0 -30289
- package/dist/index-B09KKPb4.js +0 -3419
- package/dist/index-BgP5ZHK6.js +0 -31
- package/dist/index-C46EHygk.js +0 -3
- package/dist/index-CD7Ji4Nw.js +0 -56
- package/dist/index-CHXlBh7-.js +0 -32
- package/dist/index-Cr2243n7.js +0 -2423
- package/dist/index-CrDg9PFk.js +0 -8912
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DK45XoFG.js +0 -54
- package/dist/index-Qg_bzaF2.js +0 -76
- package/dist/index-bAmlAkpk.js +0 -124
- package/dist/index-nTpkh7pU.js +0 -28897
- package/dist/index-tvZKdKVU.js +0 -36
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-B8fYlj6l.js +0 -3069
- package/dist/loading-DVr3dbZ1.js +0 -215
- package/dist/lodash-BNr1VEn2.js +0 -3678
- package/dist/membership-LEuPDIbe.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-CogUwiv6.js +0 -15
- package/dist/number-C5wGUTN5.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-DbUENFHd.js +0 -145
- package/dist/plugins-BxKrsjEx.js +0 -1817
- package/dist/remy-D_Deb3ue.js +0 -13
- package/dist/reward-CM4Wx2zA.js +0 -36
- package/dist/rule-CMMr2GMg.js +0 -1969
- package/dist/rule-builder-D5QsmOxi.js +0 -102
- package/dist/style.css +0 -13
- package/dist/template-BDKqBasy.js +0 -188
- 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-DuaWQsQ2.js +0 -1154
- 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-IcyZcRow.js +0 -213
- package/dist/tslib.es6-BCqqvLQ_.js +0 -44
- package/dist/type_drinks-D6jnpvwV.js +0 -4
- package/dist/usePagination-D8OEDsCt.js +0 -223
- package/dist/user-u3blYzG2.js +0 -55
- package/dist/vue-i18n-DfD8ZY6j.js +0 -2365
- package/dist/xlsx-Bgf4_JHr.js +0 -15491
- package/dist/zod-9J33xiFS.js +0 -91
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineComponent as d, ref as f, resolveComponent as s, openBlock as t, createElementBlock as v, Fragment as b, createVNode as r, unref as o, createElementVNode as k, createBlock as l, KeepAlive as x, resolveDynamicComponent as m, createCommentVNode as F } from "vue";
|
|
2
|
-
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BlBovyiT.js";
|
|
3
|
-
import { u as C } from "./vue-i18n-DfD8ZY6j.js";
|
|
4
|
-
const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
|
|
5
|
-
__name: "Transaction",
|
|
6
|
-
setup(V) {
|
|
7
|
-
const { t: n } = C(), a = [
|
|
8
|
-
{
|
|
9
|
-
label: n("connect.transaction.tabs.collection"),
|
|
10
|
-
value: "collection"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
label: n("connect.transaction.tabs.store"),
|
|
14
|
-
value: "store"
|
|
15
|
-
}
|
|
16
|
-
], e = f(a[0]);
|
|
17
|
-
return (B, c) => {
|
|
18
|
-
const i = s("FmPageHead"), u = s("FmTabs");
|
|
19
|
-
return t(), v(b, null, [
|
|
20
|
-
r(i, {
|
|
21
|
-
title: o(n)("connect.transaction.title")
|
|
22
|
-
}, null, 8, ["title"]),
|
|
23
|
-
k("div", T, [
|
|
24
|
-
r(u, {
|
|
25
|
-
"model-value": o(e).value,
|
|
26
|
-
items: a,
|
|
27
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) => e.value = a.find((_) => _.value === p))
|
|
28
|
-
}, null, 8, ["model-value"]),
|
|
29
|
-
(t(), l(x, null, [
|
|
30
|
-
o(e).value == "collection" ? (t(), l(m(g), { key: 0 })) : o(e).value == "store" ? (t(), l(m(y), { key: 1 })) : F("", !0)
|
|
31
|
-
], 1024))
|
|
32
|
-
])
|
|
33
|
-
], 64);
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
export {
|
|
38
|
-
P as default
|
|
39
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, computed as b, openBlock as i, createBlock as R, unref as l, ref as E, watch as k, resolveComponent as h, createElementBlock as g, createElementVNode as B, Fragment as O, renderList as T, createVNode as V, isRef as U, createCommentVNode as v } from "vue";
|
|
2
|
-
import "./index-CrDg9PFk.js";
|
|
3
|
-
import { i as C, R as e } from "./rule-builder-D5QsmOxi.js";
|
|
4
|
-
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-rs5kKp_v.js";
|
|
5
|
-
import { p as N } from "./plugins-BxKrsjEx.js";
|
|
6
|
-
import { u as S } from "./membership-LEuPDIbe.js";
|
|
7
|
-
import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
|
|
8
|
-
import { u as x } from "./vue-i18n-DfD8ZY6j.js";
|
|
9
|
-
const A = /* @__PURE__ */ y({
|
|
10
|
-
__name: "SegmentConfigurator",
|
|
11
|
-
props: {
|
|
12
|
-
modelValue: {
|
|
13
|
-
type: Object,
|
|
14
|
-
required: !0
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:model-value"],
|
|
18
|
-
setup(n, { emit: f }) {
|
|
19
|
-
const o = n, m = b(() => {
|
|
20
|
-
var s;
|
|
21
|
-
const [u] = C(o.modelValue) ? Object.values(((s = o.modelValue) == null ? void 0 : s.rules) ?? {}) : [null];
|
|
22
|
-
return (u ?? e.constructEntry("user.segment", "_hasAny", [])).conditions._hasAny;
|
|
23
|
-
}), r = f;
|
|
24
|
-
return (u, c) => (i(), R(j, {
|
|
25
|
-
multiselect: !0,
|
|
26
|
-
items: l(S)().segmentOptions,
|
|
27
|
-
"model-value": l(m),
|
|
28
|
-
"onUpdate:modelValue": c[0] || (c[0] = (s) => r(
|
|
29
|
-
"update:model-value",
|
|
30
|
-
l(e).setRuleToGroup(
|
|
31
|
-
l(e).scaffoldGroup("g_segment"),
|
|
32
|
-
l(e).constructEntry("user.segment", "_hasAny", s)
|
|
33
|
-
)
|
|
34
|
-
)),
|
|
35
|
-
label: "Select segment(s) to match"
|
|
36
|
-
}, null, 8, ["items", "model-value"]));
|
|
37
|
-
}
|
|
38
|
-
}), F = { class: "space-y-16" }, M = { key: 0 }, z = /* @__PURE__ */ y({
|
|
39
|
-
__name: "UserRuleGroup",
|
|
40
|
-
props: {
|
|
41
|
-
modelValue: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default: () => {
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
emits: ["update:model-value"],
|
|
48
|
-
setup(n, { emit: f }) {
|
|
49
|
-
const { t: o } = x(), m = n, r = f, u = E(
|
|
50
|
-
m.modelValue ? e.getRules(m.modelValue.rules.g_user).length > 0 ? "custom" : e.getRules(m.modelValue.rules.g_segment).length > 0 ? "segment" : "all_users" : "all_users"
|
|
51
|
-
), c = [
|
|
52
|
-
{
|
|
53
|
-
value: "all_users",
|
|
54
|
-
label: o("connect.template.rule.audience.all")
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
value: "segment",
|
|
58
|
-
label: o("connect.template.rule.audience.member_segment")
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
value: "custom",
|
|
62
|
-
label: o("connect.template.rule.audience.custom_audience")
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
return k(u, async (s, t) => {
|
|
66
|
-
var p;
|
|
67
|
-
if (t != "all_users" && t != s && e.getRules(
|
|
68
|
-
(p = m.modelValue) == null ? void 0 : p.rules[t == "custom" ? "g_user" : "g_segment"]
|
|
69
|
-
).length > 0) {
|
|
70
|
-
const d = await N.confirm(
|
|
71
|
-
o("connect.template.rule.audience.confirm_remove"),
|
|
72
|
-
o("connect.common.confirm"),
|
|
73
|
-
o("connect.common.confirm"),
|
|
74
|
-
o("connect.common.cancel")
|
|
75
|
-
);
|
|
76
|
-
d && r(
|
|
77
|
-
"update:model-value",
|
|
78
|
-
e.setRuleToGroup(
|
|
79
|
-
m.modelValue ?? e.scaffoldGroup(),
|
|
80
|
-
e.scaffoldGroup(t == "custom" ? "g_user" : "g_segment")
|
|
81
|
-
)
|
|
82
|
-
), u.value = d ? s : t;
|
|
83
|
-
}
|
|
84
|
-
}), (s, t) => {
|
|
85
|
-
var d, _;
|
|
86
|
-
const p = h("FmRadio");
|
|
87
|
-
return i(), g("div", F, [
|
|
88
|
-
B("div", null, [
|
|
89
|
-
(i(), g(O, null, T(c, (a) => V(p, {
|
|
90
|
-
key: a.value,
|
|
91
|
-
value: a.value,
|
|
92
|
-
label: a.label,
|
|
93
|
-
modelValue: l(u),
|
|
94
|
-
"onUpdate:modelValue": t[0] || (t[0] = (G) => U(u) ? u.value = G : null)
|
|
95
|
-
}, null, 8, ["value", "label", "modelValue"])), 64))
|
|
96
|
-
]),
|
|
97
|
-
l(u) == "segment" ? (i(), g("div", M, [
|
|
98
|
-
V(A, {
|
|
99
|
-
modelValue: ((d = n.modelValue) == null ? void 0 : d.rules.g_segment) ?? l(e).scaffoldGroup("g_segment"),
|
|
100
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => r(
|
|
101
|
-
"update:model-value",
|
|
102
|
-
l(e).setRuleToGroup(
|
|
103
|
-
n.modelValue ?? l(e).scaffoldGroup(),
|
|
104
|
-
a,
|
|
105
|
-
"&&"
|
|
106
|
-
)
|
|
107
|
-
))
|
|
108
|
-
}, null, 8, ["modelValue"])
|
|
109
|
-
])) : v("", !0),
|
|
110
|
-
l(u) == "custom" ? (i(), R(I, {
|
|
111
|
-
key: 1,
|
|
112
|
-
"include-only": "user",
|
|
113
|
-
"trigger-type": "MEMBERSHIP_JOINED",
|
|
114
|
-
"model-value": ((_ = n.modelValue) == null ? void 0 : _.rules.g_user) ?? l(e).scaffoldGroup("g_user"),
|
|
115
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => r(
|
|
116
|
-
"update:model-value",
|
|
117
|
-
l(e).setRuleToGroup(
|
|
118
|
-
n.modelValue ?? l(e).scaffoldGroup(),
|
|
119
|
-
a,
|
|
120
|
-
"&&"
|
|
121
|
-
)
|
|
122
|
-
))
|
|
123
|
-
}, null, 8, ["model-value"])) : v("", !0)
|
|
124
|
-
]);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
export {
|
|
129
|
-
z as _
|
|
130
|
-
};
|
package/dist/Voucher-C7Kxmzjr.js
DELETED
|
@@ -1,422 +0,0 @@
|
|
|
1
|
-
import { defineComponent as te, ref as U, computed as ne, h as m, onMounted as ae, resolveComponent as d, openBlock as u, createElementBlock as T, Fragment as P, createVNode as l, unref as t, createElementVNode as c, withCtx as R, renderList as re, createBlock as h, resolveDynamicComponent as ce, createCommentVNode as L, toDisplayString as v } from "vue";
|
|
2
|
-
import { _ as ie } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as se, components as p } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
5
|
-
import { a as le, p as me } from "./plugins-BxKrsjEx.js";
|
|
6
|
-
import { useCoreStore as ue } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as de } from "./loading-DVr3dbZ1.js";
|
|
8
|
-
import { u as pe } from "./business-BvNsRlY4.js";
|
|
9
|
-
import { u as fe } from "./campaign-DRErhSfb.js";
|
|
10
|
-
import { a as ye, b as $, c as D } from "./campaign-MN_o01w6.js";
|
|
11
|
-
import { c as he, p as ge } from "./duplicateCampaign-jOZ1UznM.js";
|
|
12
|
-
import "./index-C46EHygk.js";
|
|
13
|
-
import { u as ve } from "./template-BDKqBasy.js";
|
|
14
|
-
import { _ as _e } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-vpnaCdLI.js";
|
|
15
|
-
import { _ as Ce } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-BAtXxIjO.js";
|
|
16
|
-
import { u as we } from "./vue-i18n-DfD8ZY6j.js";
|
|
17
|
-
import { T as be } from "./trigger-IcyZcRow.js";
|
|
18
|
-
import { useRouter as ke } from "vue-router";
|
|
19
|
-
import { c as _ } from "./index-bAmlAkpk.js";
|
|
20
|
-
import { R as K } from "./app-D5GVWKxc.js";
|
|
21
|
-
var xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedmedev.vip", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc", voucherAppUrl: "https://voucher.feedmedev.cc/" };
|
|
22
|
-
const Fe = { class: "px-24 flex flex-col gap-y-16" }, Ve = { class: "flex items-center justify-between w-full" }, Se = { class: "flex gap-8 overflow-x-auto" }, Ue = { class: "space-y-8" }, Te = { class: "flex w-full gap-4 items-center" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = { class: "space-y-4" }, Le = { class: "fm-typo-en-body-lg-600" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Be = { class: "flex flex-col gap-16 text-center" }, Oe = { class: "fm-typo-en-title-sm-800" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ro = /* @__PURE__ */ te({
|
|
23
|
-
__name: "Voucher",
|
|
24
|
-
setup(Me) {
|
|
25
|
-
const { t: a } = we(), N = {
|
|
26
|
-
label: a("connect.voucher.createCampaign"),
|
|
27
|
-
value: "create",
|
|
28
|
-
isPrimary: !0,
|
|
29
|
-
prependIcon: "add"
|
|
30
|
-
}, I = se(), j = ve("VOUCHER", I), q = pe(), y = fe(), { global: G, minor: E } = de, B = ke(), s = U({
|
|
31
|
-
searchKey: "",
|
|
32
|
-
location: [],
|
|
33
|
-
triggerType: []
|
|
34
|
-
}), C = ne(
|
|
35
|
-
() => y.campaigns.voucher.filter(
|
|
36
|
-
(e) => W(e) && z(e)
|
|
37
|
-
)
|
|
38
|
-
), X = be.VOUCHER.map((e) => ({
|
|
39
|
-
label: e.name,
|
|
40
|
-
value: e.value
|
|
41
|
-
}));
|
|
42
|
-
function W(e) {
|
|
43
|
-
const o = s.value.location;
|
|
44
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
45
|
-
(r) => {
|
|
46
|
-
var i;
|
|
47
|
-
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(r);
|
|
48
|
-
}
|
|
49
|
-
) : e.targetLocation.includes(o);
|
|
50
|
-
}
|
|
51
|
-
function k(e) {
|
|
52
|
-
return e.hideInApp === !1;
|
|
53
|
-
}
|
|
54
|
-
function x(e) {
|
|
55
|
-
return e.event.type === "SIMPLE_CLAIM" && !k(e);
|
|
56
|
-
}
|
|
57
|
-
function z(e) {
|
|
58
|
-
const o = s.value.triggerType;
|
|
59
|
-
if (!o || o.length === 0) return !0;
|
|
60
|
-
const r = e.event.type;
|
|
61
|
-
return o.includes(r);
|
|
62
|
-
}
|
|
63
|
-
const Q = [
|
|
64
|
-
{
|
|
65
|
-
header: a("connect.voucher.voucherTitle"),
|
|
66
|
-
accessorFn: (e) => e.name,
|
|
67
|
-
cell(e) {
|
|
68
|
-
const o = [e.row.original.name];
|
|
69
|
-
return k(e.row.original) && o.push(
|
|
70
|
-
m(p.FmChip, {
|
|
71
|
-
label: "Feedvibe",
|
|
72
|
-
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
73
|
-
compact: !0
|
|
74
|
-
})
|
|
75
|
-
), m("div", { class: "flex items-center gap-4" }, o);
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
header: a("connect.voucher.status"),
|
|
80
|
-
accessorFn: (e) => ye(e),
|
|
81
|
-
cell(e) {
|
|
82
|
-
return $(e.row.original);
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
header: a("connect.voucher.summary"),
|
|
87
|
-
accessorFn: (e) => D(e)
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
header: a("connect.voucher.quota"),
|
|
91
|
-
accessorFn: (e) => {
|
|
92
|
-
var o;
|
|
93
|
-
return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
header: a("connect.voucher.claimed"),
|
|
98
|
-
accessorFn: (e) => {
|
|
99
|
-
var o;
|
|
100
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
header: a("connect.voucher.actions"),
|
|
105
|
-
cell(e) {
|
|
106
|
-
return m("div", { class: "flex items-center justify-end" }, [
|
|
107
|
-
m(p.FmButton, {
|
|
108
|
-
icon: "visibility",
|
|
109
|
-
variant: "tertiary",
|
|
110
|
-
iconColor: "neutral-gray-400",
|
|
111
|
-
onClick: async (o) => {
|
|
112
|
-
o.stopPropagation(), await B.push({
|
|
113
|
-
name: K["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
114
|
-
params: { id: e.row.original._id }
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
}),
|
|
118
|
-
m(
|
|
119
|
-
p.FmMenu,
|
|
120
|
-
{
|
|
121
|
-
placement: "bottom-end",
|
|
122
|
-
onClick: (o) => {
|
|
123
|
-
o.stopPropagation();
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"menu-button": () => m(p.FmButton, {
|
|
128
|
-
icon: "more_vert",
|
|
129
|
-
iconColor: "neutral-gray-400",
|
|
130
|
-
variant: "tertiary"
|
|
131
|
-
}),
|
|
132
|
-
default: () => {
|
|
133
|
-
const o = [
|
|
134
|
-
m(p.FmMenuItem, {
|
|
135
|
-
label: a("connect.voucher.duplicate"),
|
|
136
|
-
onClick: async (r) => {
|
|
137
|
-
r.stopPropagation(), await A(e.row.original);
|
|
138
|
-
}
|
|
139
|
-
}),
|
|
140
|
-
m(
|
|
141
|
-
p.FmMenuItem,
|
|
142
|
-
{
|
|
143
|
-
onClick: async (r) => {
|
|
144
|
-
r.stopPropagation(), O(e.row.original);
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
label: m(
|
|
149
|
-
"div",
|
|
150
|
-
{
|
|
151
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
152
|
-
},
|
|
153
|
-
a("connect.voucher.remove")
|
|
154
|
-
)
|
|
155
|
-
}
|
|
156
|
-
)
|
|
157
|
-
];
|
|
158
|
-
return x(e.row.original) && (o.unshift(
|
|
159
|
-
m(p.FmMenuItem, {
|
|
160
|
-
label: a("connect.voucher.send"),
|
|
161
|
-
onClick: async (r) => {
|
|
162
|
-
var i;
|
|
163
|
-
r.stopPropagation(), (i = V.value) == null || i.showSheet({
|
|
164
|
-
campaignId: e.row.original._id
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
})
|
|
168
|
-
), o.unshift(
|
|
169
|
-
m(p.FmMenuItem, {
|
|
170
|
-
label: a("connect.voucher.share"),
|
|
171
|
-
onClick: async (r) => {
|
|
172
|
-
r.stopPropagation(), await le(
|
|
173
|
-
`https://${ue().currentBusiness.value._id}.${xe.appUrl}/vouchers/${e.row.original._id}`,
|
|
174
|
-
{
|
|
175
|
-
successMessage: "Voucher link copied to clipboard"
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
}
|
|
179
|
-
})
|
|
180
|
-
)), o;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
)
|
|
184
|
-
]);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
], F = U(), V = U();
|
|
188
|
-
async function O(e) {
|
|
189
|
-
await me.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await E(
|
|
190
|
-
async () => {
|
|
191
|
-
await _.delete(e._id), await y.read("VOUCHER");
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
message: a("connect.voucher.removing", { name: e.name }),
|
|
195
|
-
successMessage: a("connect.voucher.removedSuccessfully", {
|
|
196
|
-
name: e.name
|
|
197
|
-
})
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
async function w(e) {
|
|
202
|
-
e ? await o(await _.readById(e._id)) : j.open(async (r) => {
|
|
203
|
-
await o(void 0, r);
|
|
204
|
-
});
|
|
205
|
-
async function o(r, i) {
|
|
206
|
-
var b;
|
|
207
|
-
(b = F.value) == null || b.showSheet(!0, "VOUCHER", r, i);
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
async function A(e) {
|
|
211
|
-
var i;
|
|
212
|
-
if (!await he(e.name))
|
|
213
|
-
return;
|
|
214
|
-
const o = await _.readById(e._id), r = ge(o);
|
|
215
|
-
(i = F.value) == null || i.showSheet(
|
|
216
|
-
!0,
|
|
217
|
-
"VOUCHER",
|
|
218
|
-
r,
|
|
219
|
-
o.template
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
async function Z(e) {
|
|
223
|
-
e.campaign._id && await new Promise((o) => {
|
|
224
|
-
I.open({
|
|
225
|
-
title: "Confirmation",
|
|
226
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
227
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
228
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
229
|
-
}).onPrimary(async () => {
|
|
230
|
-
var r;
|
|
231
|
-
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
232
|
-
}).onSecondary(async () => {
|
|
233
|
-
o();
|
|
234
|
-
});
|
|
235
|
-
}), await E(
|
|
236
|
-
async () => {
|
|
237
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await y.read("VOUCHER");
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
message: a(
|
|
241
|
-
e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
|
|
242
|
-
),
|
|
243
|
-
successMessage: a(
|
|
244
|
-
e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
|
|
245
|
-
)
|
|
246
|
-
}
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
return ae(async () => {
|
|
250
|
-
await G(async () => {
|
|
251
|
-
await y.read("VOUCHER");
|
|
252
|
-
});
|
|
253
|
-
}), (e, o) => {
|
|
254
|
-
const r = d("FmPageHead"), i = d("FmSearch"), b = d("FmTable"), J = d("FmChip"), g = d("FmButton"), Y = d("FmListItem"), ee = d("FmList"), oe = d("FmCard");
|
|
255
|
-
return u(), T(P, null, [
|
|
256
|
-
l(r, {
|
|
257
|
-
title: t(a)("connect.voucher.title"),
|
|
258
|
-
actions: t(C).length > 0 ? [N] : [],
|
|
259
|
-
"onClick:action": o[0] || (o[0] = () => w())
|
|
260
|
-
}, null, 8, ["title", "actions"]),
|
|
261
|
-
c("div", Fe, [
|
|
262
|
-
l(i, {
|
|
263
|
-
modelValue: t(s).searchKey,
|
|
264
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(s).searchKey = n),
|
|
265
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
266
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
267
|
-
collapsible: ""
|
|
268
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
269
|
-
t(y).campaigns.voucher && t(y).campaigns.voucher.length > 0 ? (u(), T(P, { key: 0 }, [
|
|
270
|
-
c("div", Ve, [
|
|
271
|
-
c("div", Se, [
|
|
272
|
-
l(H, {
|
|
273
|
-
label: `${t(a)("connect.common.location")}: `,
|
|
274
|
-
"right-icon": "keyboard_arrow_down",
|
|
275
|
-
modelValue: t(s).location,
|
|
276
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(s).location = n),
|
|
277
|
-
icon: "storefront",
|
|
278
|
-
"show-item-label": !0,
|
|
279
|
-
items: t(q).locationOptions
|
|
280
|
-
}, null, 8, ["label", "modelValue", "items"]),
|
|
281
|
-
l(H, {
|
|
282
|
-
label: "Type:",
|
|
283
|
-
"right-icon": "keyboard_arrow_down",
|
|
284
|
-
modelValue: t(s).triggerType,
|
|
285
|
-
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(s).triggerType = n),
|
|
286
|
-
icon: "filter_list",
|
|
287
|
-
"show-item-label": !0,
|
|
288
|
-
items: t(X)
|
|
289
|
-
}, null, 8, ["modelValue", "items"])
|
|
290
|
-
]),
|
|
291
|
-
l(i, {
|
|
292
|
-
modelValue: t(s).searchKey,
|
|
293
|
-
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(s).searchKey = n),
|
|
294
|
-
class: "xs:hidden sm:hidden",
|
|
295
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
296
|
-
collapsible: ""
|
|
297
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
298
|
-
]),
|
|
299
|
-
l(b, {
|
|
300
|
-
class: "xs:hidden sm:hidden",
|
|
301
|
-
"row-data": t(C),
|
|
302
|
-
"column-defs": Q,
|
|
303
|
-
"search-value": t(s).searchKey,
|
|
304
|
-
"column-filter": [],
|
|
305
|
-
onRowClick: o[5] || (o[5] = (n) => w(n.original)),
|
|
306
|
-
"hide-footer": t(C).length < 10
|
|
307
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
308
|
-
l(ee, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
309
|
-
default: R(() => [
|
|
310
|
-
(u(!0), T(P, null, re(t(C).filter(
|
|
311
|
-
(n) => n.name.toLowerCase().includes(t(s).searchKey.toLowerCase())
|
|
312
|
-
), (n) => (u(), h(Y, {
|
|
313
|
-
key: n._id.toString(),
|
|
314
|
-
onClick: (S) => w(n),
|
|
315
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
316
|
-
}, {
|
|
317
|
-
default: R(() => {
|
|
318
|
-
var S;
|
|
319
|
-
return [
|
|
320
|
-
c("div", Ue, [
|
|
321
|
-
c("div", Te, [
|
|
322
|
-
(u(), h(ce(t($)(n)))),
|
|
323
|
-
k(n) ? (u(), h(J, {
|
|
324
|
-
key: 0,
|
|
325
|
-
label: "Feedvibe",
|
|
326
|
-
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
327
|
-
compact: ""
|
|
328
|
-
})) : L("", !0),
|
|
329
|
-
c("div", Pe, v(((S = n.pf_collectible) == null ? void 0 : S.currentReceive) ?? 0) + " claimed ", 1)
|
|
330
|
-
]),
|
|
331
|
-
c("div", Re, [
|
|
332
|
-
c("div", Le, v(n.name), 1),
|
|
333
|
-
c("div", Ie, v(t(D)(n)), 1)
|
|
334
|
-
])
|
|
335
|
-
]),
|
|
336
|
-
c("div", Ee, [
|
|
337
|
-
l(g, {
|
|
338
|
-
icon: "content_copy",
|
|
339
|
-
"icon-color": "neutral-gray-400",
|
|
340
|
-
variant: "tertiary",
|
|
341
|
-
onClick: async (f) => {
|
|
342
|
-
f.stopPropagation(), await A(n);
|
|
343
|
-
}
|
|
344
|
-
}, null, 8, ["onClick"]),
|
|
345
|
-
x(n) ? (u(), h(g, {
|
|
346
|
-
key: 0,
|
|
347
|
-
icon: "visibility",
|
|
348
|
-
"icon-color": "neutral-gray-400",
|
|
349
|
-
variant: "tertiary",
|
|
350
|
-
onClick: async (f) => {
|
|
351
|
-
f.stopPropagation(), await t(B).push({
|
|
352
|
-
name: t(K)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
353
|
-
params: { id: n._id }
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}, null, 8, ["onClick"])) : L("", !0),
|
|
357
|
-
x(n) ? (u(), h(g, {
|
|
358
|
-
key: 1,
|
|
359
|
-
icon: "send",
|
|
360
|
-
"icon-color": "neutral-gray-400",
|
|
361
|
-
variant: "tertiary",
|
|
362
|
-
onClick: (f) => {
|
|
363
|
-
var M;
|
|
364
|
-
f.stopPropagation(), (M = t(V)) == null || M.showSheet({
|
|
365
|
-
campaignId: n._id
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
}, null, 8, ["onClick"])) : L("", !0),
|
|
369
|
-
l(g, {
|
|
370
|
-
icon: "delete",
|
|
371
|
-
"icon-color": "neutral-gray-400",
|
|
372
|
-
variant: "tertiary",
|
|
373
|
-
onClick: (f) => (f.stopPropagation(), O(n))
|
|
374
|
-
}, null, 8, ["onClick"])
|
|
375
|
-
])
|
|
376
|
-
];
|
|
377
|
-
}),
|
|
378
|
-
_: 2
|
|
379
|
-
}, 1032, ["onClick"]))), 128))
|
|
380
|
-
]),
|
|
381
|
-
_: 1
|
|
382
|
-
})
|
|
383
|
-
], 64)) : (u(), h(oe, {
|
|
384
|
-
key: 1,
|
|
385
|
-
variant: "outlined",
|
|
386
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
387
|
-
}, {
|
|
388
|
-
default: R(() => [
|
|
389
|
-
o[7] || (o[7] = c("img", {
|
|
390
|
-
src: ie,
|
|
391
|
-
class: "aspect-square w-[150px]"
|
|
392
|
-
}, null, -1)),
|
|
393
|
-
c("div", Be, [
|
|
394
|
-
c("div", Oe, v(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
395
|
-
c("div", Ae, v(t(a)("connect.voucher.description")), 1)
|
|
396
|
-
]),
|
|
397
|
-
l(g, {
|
|
398
|
-
variant: "primary",
|
|
399
|
-
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
400
|
-
icon: "add",
|
|
401
|
-
onClick: o[6] || (o[6] = (n) => w())
|
|
402
|
-
}, null, 8, ["label"])
|
|
403
|
-
]),
|
|
404
|
-
_: 1
|
|
405
|
-
})),
|
|
406
|
-
l(_e, {
|
|
407
|
-
ref_key: "sheetRef",
|
|
408
|
-
ref: F,
|
|
409
|
-
"onSubmit:modelValue": Z
|
|
410
|
-
}, null, 512),
|
|
411
|
-
l(Ce, {
|
|
412
|
-
ref_key: "sendVoucherSheetRef",
|
|
413
|
-
ref: V
|
|
414
|
-
}, null, 512)
|
|
415
|
-
])
|
|
416
|
-
], 64);
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
export {
|
|
421
|
-
ro as default
|
|
422
|
-
};
|