@feedmepos/mf-connect 0.1.38-beta.52 → 0.1.38-beta.53
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 +2 -2
- package/dist/Analytic-BU1mOMoX.js +0 -760
- package/dist/App-fw6iFNxW.js +0 -4638
- package/dist/AuditLogs-CliU8167.js +0 -1887
- package/dist/Bin-C49tzfas.js +0 -166
- package/dist/Broadcast-YZVnZTCD.js +0 -232
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DEwsZags.js +0 -122
- package/dist/Card-DcQQyJl9.js +0 -911
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +0 -97
- package/dist/Collections--8lmoXWR.js +0 -540
- package/dist/Credit-CfkLFMei.js +0 -227
- 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-t6eac8yR.js +0 -3151
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CXVOuiLI.js +0 -347
- package/dist/Experience-BnVVC2-L.js +0 -228
- 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-Dbz4DzY_.js +0 -297
- package/dist/Grab-CCqScmpp.js +0 -300
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-C5irH9v6.js +0 -145
- package/dist/Index-DPsM9D4W.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-CFwxWdJq.js +0 -21761
- package/dist/Member-ZPKbf5Bk.js +0 -281
- package/dist/MemberList-BDs-70nG.js +0 -1607
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MemberTransactions-C-zHpuZF.js +0 -45
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-B2TKmOOK.js +0 -60616
- package/dist/Mission-BHkb1E9m.js +0 -301
- package/dist/Overview-DYlcqNCX.js +0 -1079
- package/dist/Point-BEhNBY2_.js +0 -231
- package/dist/Promotion-DOXRIej4.js +0 -363
- package/dist/Queue-Bwa0LWhf.js +0 -260
- package/dist/Record-BoI8l1Qq.js +0 -341
- package/dist/Reward-BVQaqAYM.js +0 -442
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-BC3dEiWi.js +0 -150
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-HpleMvjm.js +0 -1767
- package/dist/Segment-Cmy7nu27.js +0 -882
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-pab6X2DC.js +0 -181
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BqIh8D8O.js +0 -189
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-CESoNd87.js +0 -147
- package/dist/Setting-DN8j_6Xv.js +0 -1993
- package/dist/SettingAdvertisements-qHdiaa6m.js +0 -264
- package/dist/Store-DfhVYCgX.js +0 -1936
- package/dist/StoreRewards-NYucFLJU.js +0 -535
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BGOcOAXR.js +0 -1036
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DRin8Jzw.js +0 -8093
- package/dist/Tier-Dl0aBuJz.js +0 -970
- package/dist/Title-DvO6Mira.js +0 -568
- package/dist/Transaction-ONVl4UZZ.js +0 -39
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-FyE25D8o.js +0 -130
- package/dist/Voucher-BZ1feYh1.js +0 -399
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-Lilql8J4.js +0 -421
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-C_ZdCOPI.js +0 -56
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-B_RRkjaD.js +0 -42566
- package/dist/app-wDQR6dpb.js +0 -39
- package/dist/app.js +0 -7
- package/dist/business-y5qSMcd-.js +0 -82
- package/dist/campaign-CpzFl8Vr.js +0 -4
- package/dist/campaign-DHgol2Lt.js +0 -219
- package/dist/campaign-Drxe0zPX.js +0 -253
- package/dist/campaign.enum-CwAPVgPe.js +0 -21
- package/dist/campaign.fn-DMx5xsiK.js +0 -776
- package/dist/collectible.enum-Bh4jnUgP.js +0 -19
- package/dist/collection.fn-BpC_YBwG.js +0 -26
- package/dist/dto-DWkf9QOb.js +0 -222
- package/dist/effect-D5ZWGpNS.js +0 -78
- package/dist/email-addresses-DFtVESS8.js +0 -705
- package/dist/export-BtUy3sWU.js +0 -97
- package/dist/feedme.ico +0 -0
- package/dist/helper-DtWMZoWX.js +0 -86
- package/dist/index-7HXC3sH0.js +0 -56
- package/dist/index-BQlhmw75.js +0 -3
- package/dist/index-BdX7CxUg.js +0 -30076
- package/dist/index-BerRe0M3.js +0 -76
- package/dist/index-BrZ3xZzk.js +0 -146
- package/dist/index-CJzBpsBP.js +0 -3412
- package/dist/index-CQiABpeB.js +0 -32456
- package/dist/index-CqIWlGW3.js +0 -38
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-DPCDboPA.js +0 -32
- package/dist/index-DPaH8jaV.js +0 -8884
- package/dist/index-Dkce3JZ_.js +0 -54
- package/dist/index-DrYv_gG4.js +0 -31
- package/dist/index-SfJbKfWl.js +0 -2407
- package/dist/index-vh86FiIQ.js +0 -10
- package/dist/index.esm2017-CbvE5vCC.js +0 -3069
- package/dist/loading-BWGIK17X.js +0 -71
- package/dist/lodash-B5I3zXaY.js +0 -3678
- package/dist/membership-Zy2P6O6X.js +0 -235
- package/dist/moment-D7p2TMB-.js +0 -2583
- package/dist/money-D_fZmBbi.js +0 -15
- package/dist/number-C4DhXkCm.js +0 -12
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectId-dwaoBfJX.js +0 -7
- package/dist/objectid-C6eRcDzI.js +0 -145
- package/dist/plugins-DDAJav2s.js +0 -1817
- package/dist/reward-Dxjvmy7-.js +0 -36
- package/dist/rule-builder-ZkPWAiTl.js +0 -102
- package/dist/rule-sclqeiyk.js +0 -1951
- package/dist/style.css +0 -4
- package/dist/template-CAs0lkTY.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-5t8ki0gE.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-B2fpKTfg.js +0 -213
- 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-ORhbAsqi.js +0 -55
- package/dist/vue-i18n-cyOhW8mW.js +0 -2365
- package/dist/xlsx-4klfjFae.js +0 -15491
- package/dist/zod-BsHmzMQd.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-BGOcOAXR.js";
|
|
3
|
-
import { u as C } from "./vue-i18n-cyOhW8mW.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-DPaH8jaV.js";
|
|
3
|
-
import { i as C, R as e } from "./rule-builder-ZkPWAiTl.js";
|
|
4
|
-
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-HpleMvjm.js";
|
|
5
|
-
import { p as N } from "./plugins-DDAJav2s.js";
|
|
6
|
-
import { u as S } from "./membership-Zy2P6O6X.js";
|
|
7
|
-
import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
|
|
8
|
-
import { u as x } from "./vue-i18n-cyOhW8mW.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-BZ1feYh1.js
DELETED
|
@@ -1,399 +0,0 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as V, computed as te, h as m, onMounted as ne, resolveComponent as d, openBlock as u, createElementBlock as S, Fragment as U, createVNode as l, unref as t, createElementVNode as c, withCtx as T, renderList as ae, createBlock as h, resolveDynamicComponent as re, createCommentVNode as R, toDisplayString as g } from "vue";
|
|
2
|
-
import { _ as ce } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as ie, components as p } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as O } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
5
|
-
import { a as se, p as le } from "./plugins-DDAJav2s.js";
|
|
6
|
-
import { useCoreStore as me } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as ue } from "./loading-BWGIK17X.js";
|
|
8
|
-
import { u as de } from "./business-y5qSMcd-.js";
|
|
9
|
-
import { u as pe, c as b } from "./campaign-DHgol2Lt.js";
|
|
10
|
-
import { a as fe, b as M, c as H } from "./campaign-Drxe0zPX.js";
|
|
11
|
-
import "./index-BQlhmw75.js";
|
|
12
|
-
import { u as he } from "./template-CAs0lkTY.js";
|
|
13
|
-
import { _ as ye } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-t6eac8yR.js";
|
|
14
|
-
import { _ as ge } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-CESoNd87.js";
|
|
15
|
-
import { u as ve } from "./vue-i18n-cyOhW8mW.js";
|
|
16
|
-
import { T as _e } from "./trigger-B2fpKTfg.js";
|
|
17
|
-
import { useRouter as Ce } from "vue-router";
|
|
18
|
-
import { R as $ } from "./app-B_RRkjaD.js";
|
|
19
|
-
var be = { 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/" };
|
|
20
|
-
const we = { class: "px-24 flex flex-col gap-y-16" }, xe = { class: "flex items-center justify-between w-full" }, ke = { class: "flex gap-8 overflow-x-auto" }, Fe = { class: "space-y-8" }, Ve = { class: "flex w-full gap-4 items-center" }, Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = { class: "space-y-4" }, Te = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Pe = { class: "flex flex-col gap-16 text-center" }, Ee = { class: "fm-typo-en-title-sm-800" }, Ie = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, eo = /* @__PURE__ */ oe({
|
|
21
|
-
__name: "Voucher",
|
|
22
|
-
setup(Ae) {
|
|
23
|
-
const { t: a } = ve(), K = {
|
|
24
|
-
label: a("connect.voucher.createCampaign"),
|
|
25
|
-
value: "create",
|
|
26
|
-
isPrimary: !0,
|
|
27
|
-
prependIcon: "add"
|
|
28
|
-
}, L = ie(), N = he("VOUCHER", L), D = de(), f = pe(), { global: j, minor: P } = ue, E = Ce(), i = V({
|
|
29
|
-
searchKey: "",
|
|
30
|
-
location: [],
|
|
31
|
-
triggerType: []
|
|
32
|
-
}), v = te(
|
|
33
|
-
() => f.campaigns.voucher.filter(
|
|
34
|
-
(e) => G(e) && X(e)
|
|
35
|
-
)
|
|
36
|
-
), q = _e.VOUCHER.map((e) => ({
|
|
37
|
-
label: e.name,
|
|
38
|
-
value: e.value
|
|
39
|
-
}));
|
|
40
|
-
function G(e) {
|
|
41
|
-
const o = i.value.location;
|
|
42
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
43
|
-
(r) => {
|
|
44
|
-
var s;
|
|
45
|
-
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
|
|
46
|
-
}
|
|
47
|
-
) : e.targetLocation.includes(o);
|
|
48
|
-
}
|
|
49
|
-
function w(e) {
|
|
50
|
-
return e.hideInApp === !1;
|
|
51
|
-
}
|
|
52
|
-
function x(e) {
|
|
53
|
-
return e.event.type === "SIMPLE_CLAIM" && !w(e);
|
|
54
|
-
}
|
|
55
|
-
function X(e) {
|
|
56
|
-
const o = i.value.triggerType;
|
|
57
|
-
if (!o || o.length === 0) return !0;
|
|
58
|
-
const r = e.event.type;
|
|
59
|
-
return o.includes(r);
|
|
60
|
-
}
|
|
61
|
-
const W = [
|
|
62
|
-
{
|
|
63
|
-
header: a("connect.voucher.voucherTitle"),
|
|
64
|
-
accessorFn: (e) => e.name,
|
|
65
|
-
cell(e) {
|
|
66
|
-
const o = [e.row.original.name];
|
|
67
|
-
return w(e.row.original) && o.push(
|
|
68
|
-
m(p.FmChip, {
|
|
69
|
-
label: "Feedvibe",
|
|
70
|
-
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
71
|
-
compact: !0
|
|
72
|
-
})
|
|
73
|
-
), m("div", { class: "flex items-center gap-4" }, o);
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
header: a("connect.voucher.status"),
|
|
78
|
-
accessorFn: (e) => fe(e),
|
|
79
|
-
cell(e) {
|
|
80
|
-
return M(e.row.original);
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
header: a("connect.voucher.summary"),
|
|
85
|
-
accessorFn: (e) => H(e)
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
header: a("connect.voucher.quota"),
|
|
89
|
-
accessorFn: (e) => {
|
|
90
|
-
var o;
|
|
91
|
-
return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
header: a("connect.voucher.claimed"),
|
|
96
|
-
accessorFn: (e) => {
|
|
97
|
-
var o;
|
|
98
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
header: a("connect.voucher.actions"),
|
|
103
|
-
cell(e) {
|
|
104
|
-
return m("div", { class: "flex items-center justify-end" }, [
|
|
105
|
-
m(p.FmButton, {
|
|
106
|
-
icon: "visibility",
|
|
107
|
-
variant: "tertiary",
|
|
108
|
-
iconColor: "neutral-gray-400",
|
|
109
|
-
onClick: async (o) => {
|
|
110
|
-
o.stopPropagation(), await E.push({
|
|
111
|
-
name: $["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
112
|
-
params: { id: e.row.original._id }
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
}),
|
|
116
|
-
m(
|
|
117
|
-
p.FmMenu,
|
|
118
|
-
{
|
|
119
|
-
placement: "bottom-end",
|
|
120
|
-
onClick: (o) => {
|
|
121
|
-
o.stopPropagation();
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"menu-button": () => m(p.FmButton, {
|
|
126
|
-
icon: "more_vert",
|
|
127
|
-
iconColor: "neutral-gray-400",
|
|
128
|
-
variant: "tertiary"
|
|
129
|
-
}),
|
|
130
|
-
default: () => {
|
|
131
|
-
const o = [
|
|
132
|
-
m(
|
|
133
|
-
p.FmMenuItem,
|
|
134
|
-
{
|
|
135
|
-
onClick: async (r) => {
|
|
136
|
-
r.stopPropagation(), A(e.row.original);
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
label: m(
|
|
141
|
-
"div",
|
|
142
|
-
{
|
|
143
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
144
|
-
},
|
|
145
|
-
a("connect.voucher.remove")
|
|
146
|
-
)
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
];
|
|
150
|
-
return x(e.row.original) && (o.unshift(
|
|
151
|
-
m(p.FmMenuItem, {
|
|
152
|
-
label: a("connect.voucher.send"),
|
|
153
|
-
onClick: async (r) => {
|
|
154
|
-
var s;
|
|
155
|
-
r.stopPropagation(), (s = k.value) == null || s.showSheet({
|
|
156
|
-
campaignId: e.row.original._id
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
})
|
|
160
|
-
), o.unshift(
|
|
161
|
-
m(p.FmMenuItem, {
|
|
162
|
-
label: a("connect.voucher.share"),
|
|
163
|
-
onClick: async (r) => {
|
|
164
|
-
r.stopPropagation(), await se(
|
|
165
|
-
`https://${me().currentBusiness.value._id}.${be.appUrl}/vouchers/${e.row.original._id}`,
|
|
166
|
-
{
|
|
167
|
-
successMessage: "Voucher link copied to clipboard"
|
|
168
|
-
}
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
})
|
|
172
|
-
)), o;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
)
|
|
176
|
-
]);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
], I = V(), k = V();
|
|
180
|
-
async function A(e) {
|
|
181
|
-
await le.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await P(
|
|
182
|
-
async () => {
|
|
183
|
-
await b.delete(e._id), await f.read("VOUCHER");
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
message: a("connect.voucher.removing", { name: e.name }),
|
|
187
|
-
successMessage: a("connect.voucher.removedSuccessfully", {
|
|
188
|
-
name: e.name
|
|
189
|
-
})
|
|
190
|
-
}
|
|
191
|
-
);
|
|
192
|
-
}
|
|
193
|
-
async function _(e) {
|
|
194
|
-
e ? await o() : N.open(async (r) => {
|
|
195
|
-
await o(r);
|
|
196
|
-
});
|
|
197
|
-
async function o(r) {
|
|
198
|
-
var s;
|
|
199
|
-
(s = I.value) == null || s.showSheet(
|
|
200
|
-
!0,
|
|
201
|
-
"VOUCHER",
|
|
202
|
-
e ? await b.readById(e._id) : void 0,
|
|
203
|
-
r
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
async function z(e) {
|
|
208
|
-
e.campaign._id && await new Promise((o) => {
|
|
209
|
-
L.open({
|
|
210
|
-
title: "Confirmation",
|
|
211
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
212
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
213
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
214
|
-
}).onPrimary(async () => {
|
|
215
|
-
var r;
|
|
216
|
-
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
217
|
-
}).onSecondary(async () => {
|
|
218
|
-
o();
|
|
219
|
-
});
|
|
220
|
-
}), await P(
|
|
221
|
-
async () => {
|
|
222
|
-
e.campaign._id ? await b.update(e.campaign._id, e) : await b.create(e), await f.read("VOUCHER");
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
message: a(
|
|
226
|
-
e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
|
|
227
|
-
),
|
|
228
|
-
successMessage: a(
|
|
229
|
-
e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
|
|
230
|
-
)
|
|
231
|
-
}
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
return ne(async () => {
|
|
235
|
-
await j(async () => {
|
|
236
|
-
await f.read("VOUCHER");
|
|
237
|
-
});
|
|
238
|
-
}), (e, o) => {
|
|
239
|
-
const r = d("FmPageHead"), s = d("FmSearch"), Q = d("FmTable"), Z = d("FmChip"), C = d("FmButton"), J = d("FmListItem"), Y = d("FmList"), ee = d("FmCard");
|
|
240
|
-
return u(), S(U, null, [
|
|
241
|
-
l(r, {
|
|
242
|
-
title: t(a)("connect.voucher.title"),
|
|
243
|
-
actions: t(v).length > 0 ? [K] : [],
|
|
244
|
-
"onClick:action": o[0] || (o[0] = () => _())
|
|
245
|
-
}, null, 8, ["title", "actions"]),
|
|
246
|
-
c("div", we, [
|
|
247
|
-
l(s, {
|
|
248
|
-
modelValue: t(i).searchKey,
|
|
249
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
|
|
250
|
-
class: "hidden xs:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
251
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
252
|
-
collapsible: ""
|
|
253
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
254
|
-
t(f).campaigns.voucher && t(f).campaigns.voucher.length > 0 ? (u(), S(U, { key: 0 }, [
|
|
255
|
-
c("div", xe, [
|
|
256
|
-
c("div", ke, [
|
|
257
|
-
l(O, {
|
|
258
|
-
label: `${t(a)("connect.common.location")}: `,
|
|
259
|
-
"right-icon": "keyboard_arrow_down",
|
|
260
|
-
modelValue: t(i).location,
|
|
261
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
|
|
262
|
-
icon: "storefront",
|
|
263
|
-
"show-item-label": !0,
|
|
264
|
-
items: t(D).locationOptions
|
|
265
|
-
}, null, 8, ["label", "modelValue", "items"]),
|
|
266
|
-
l(O, {
|
|
267
|
-
label: "Type:",
|
|
268
|
-
"right-icon": "keyboard_arrow_down",
|
|
269
|
-
modelValue: t(i).triggerType,
|
|
270
|
-
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
|
|
271
|
-
icon: "filter_list",
|
|
272
|
-
"show-item-label": !0,
|
|
273
|
-
items: t(q)
|
|
274
|
-
}, null, 8, ["modelValue", "items"])
|
|
275
|
-
]),
|
|
276
|
-
l(s, {
|
|
277
|
-
modelValue: t(i).searchKey,
|
|
278
|
-
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
|
|
279
|
-
class: "xs:hidden",
|
|
280
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
281
|
-
collapsible: ""
|
|
282
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
283
|
-
]),
|
|
284
|
-
l(Q, {
|
|
285
|
-
class: "xs:hidden",
|
|
286
|
-
"row-data": t(v),
|
|
287
|
-
"column-defs": W,
|
|
288
|
-
"search-value": t(i).searchKey,
|
|
289
|
-
"column-filter": [],
|
|
290
|
-
onRowClick: o[5] || (o[5] = (n) => _(n.original)),
|
|
291
|
-
"hide-footer": t(v).length < 10
|
|
292
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
293
|
-
l(Y, { class: "hidden xs:!flex flex-col mx-[-24px]" }, {
|
|
294
|
-
default: T(() => [
|
|
295
|
-
(u(!0), S(U, null, ae(t(v).filter(
|
|
296
|
-
(n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
297
|
-
), (n) => (u(), h(J, {
|
|
298
|
-
key: n._id.toString(),
|
|
299
|
-
onClick: (F) => _(n),
|
|
300
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
301
|
-
}, {
|
|
302
|
-
default: T(() => {
|
|
303
|
-
var F;
|
|
304
|
-
return [
|
|
305
|
-
c("div", Fe, [
|
|
306
|
-
c("div", Ve, [
|
|
307
|
-
(u(), h(re(t(M)(n)))),
|
|
308
|
-
w(n) ? (u(), h(Z, {
|
|
309
|
-
key: 0,
|
|
310
|
-
label: "Feedvibe",
|
|
311
|
-
class: "text-fm-color-primary bg-fm-color-system-warning-100",
|
|
312
|
-
compact: ""
|
|
313
|
-
})) : R("", !0),
|
|
314
|
-
c("div", Se, g(((F = n.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0) + " claimed ", 1)
|
|
315
|
-
]),
|
|
316
|
-
c("div", Ue, [
|
|
317
|
-
c("div", Te, g(n.name), 1),
|
|
318
|
-
c("div", Re, g(t(H)(n)), 1)
|
|
319
|
-
])
|
|
320
|
-
]),
|
|
321
|
-
c("div", Le, [
|
|
322
|
-
x(n) ? (u(), h(C, {
|
|
323
|
-
key: 0,
|
|
324
|
-
icon: "visibility",
|
|
325
|
-
"icon-color": "neutral-gray-400",
|
|
326
|
-
variant: "tertiary",
|
|
327
|
-
onClick: async (y) => {
|
|
328
|
-
y.stopPropagation(), await t(E).push({
|
|
329
|
-
name: t($)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
330
|
-
params: { id: n._id }
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
}, null, 8, ["onClick"])) : R("", !0),
|
|
334
|
-
x(n) ? (u(), h(C, {
|
|
335
|
-
key: 1,
|
|
336
|
-
icon: "send",
|
|
337
|
-
"icon-color": "neutral-gray-400",
|
|
338
|
-
variant: "tertiary",
|
|
339
|
-
onClick: (y) => {
|
|
340
|
-
var B;
|
|
341
|
-
y.stopPropagation(), (B = t(k)) == null || B.showSheet({
|
|
342
|
-
campaignId: n._id
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
}, null, 8, ["onClick"])) : R("", !0),
|
|
346
|
-
l(C, {
|
|
347
|
-
icon: "delete",
|
|
348
|
-
"icon-color": "neutral-gray-400",
|
|
349
|
-
variant: "tertiary",
|
|
350
|
-
onClick: (y) => (y.stopPropagation(), A(n))
|
|
351
|
-
}, null, 8, ["onClick"])
|
|
352
|
-
])
|
|
353
|
-
];
|
|
354
|
-
}),
|
|
355
|
-
_: 2
|
|
356
|
-
}, 1032, ["onClick"]))), 128))
|
|
357
|
-
]),
|
|
358
|
-
_: 1
|
|
359
|
-
})
|
|
360
|
-
], 64)) : (u(), h(ee, {
|
|
361
|
-
key: 1,
|
|
362
|
-
variant: "outlined",
|
|
363
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
364
|
-
}, {
|
|
365
|
-
default: T(() => [
|
|
366
|
-
o[7] || (o[7] = c("img", {
|
|
367
|
-
src: ce,
|
|
368
|
-
class: "aspect-square w-[150px]"
|
|
369
|
-
}, null, -1)),
|
|
370
|
-
c("div", Pe, [
|
|
371
|
-
c("div", Ee, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
372
|
-
c("div", Ie, g(t(a)("connect.voucher.description")), 1)
|
|
373
|
-
]),
|
|
374
|
-
l(C, {
|
|
375
|
-
variant: "primary",
|
|
376
|
-
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
377
|
-
icon: "add",
|
|
378
|
-
onClick: o[6] || (o[6] = (n) => _())
|
|
379
|
-
}, null, 8, ["label"])
|
|
380
|
-
]),
|
|
381
|
-
_: 1
|
|
382
|
-
})),
|
|
383
|
-
l(ye, {
|
|
384
|
-
ref_key: "sheetRef",
|
|
385
|
-
ref: I,
|
|
386
|
-
"onSubmit:modelValue": z
|
|
387
|
-
}, null, 512),
|
|
388
|
-
l(ge, {
|
|
389
|
-
ref_key: "sendVoucherSheetRef",
|
|
390
|
-
ref: k
|
|
391
|
-
}, null, 512)
|
|
392
|
-
])
|
|
393
|
-
], 64);
|
|
394
|
-
};
|
|
395
|
-
}
|
|
396
|
-
});
|
|
397
|
-
export {
|
|
398
|
-
eo as default
|
|
399
|
-
};
|