@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
|
@@ -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-Cae25Vr6.js";
|
|
3
|
-
import { u as C } from "./vue-i18n-OdHHHpEE.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-8RETBwYy.js";
|
|
3
|
-
import { i as C, R as e } from "./rule-builder-CZUgrDAw.js";
|
|
4
|
-
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-Ak1R8Y2a.js";
|
|
5
|
-
import { p as N } from "./plugins-CJlgzIv2.js";
|
|
6
|
-
import { u as S } from "./membership-xl9aKOQ_.js";
|
|
7
|
-
import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js";
|
|
8
|
-
import { u as x } from "./vue-i18n-OdHHHpEE.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-D6RuJjNn.js
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as x, computed as ee, h as m, onMounted as oe, resolveComponent as d, openBlock as u, createElementBlock as V, Fragment as S, createVNode as l, unref as t, createElementVNode as c, withCtx as F, renderList as te, createBlock as h, resolveDynamicComponent as ne, toDisplayString as g, createCommentVNode as E } from "vue";
|
|
2
|
-
import { _ as ae } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as re, components as f } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as M } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
5
|
-
import { p as A, a as ce } from "./plugins-CJlgzIv2.js";
|
|
6
|
-
import { useCoreStore as ie } from "@feedmepos/mf-common";
|
|
7
|
-
import { u as se } from "./loading-D5ZAAdUU.js";
|
|
8
|
-
import { u as le } from "./business-gJ9fK_2b.js";
|
|
9
|
-
import { u as me } from "./campaign-BfznfcHc.js";
|
|
10
|
-
import { g as ue, a as O, b as B } from "./campaign-C_Yq-ffV.js";
|
|
11
|
-
import "./index-B57kxqv7.js";
|
|
12
|
-
import { u as de } from "./template-aPJnNGLi.js";
|
|
13
|
-
import { _ as pe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-C2p6_R01.js";
|
|
14
|
-
import { _ as fe } from "./SendVoucherSheet.vue_vue_type_script_setup_true_lang-Czy25PII.js";
|
|
15
|
-
import { u as ye } from "./vue-i18n-OdHHHpEE.js";
|
|
16
|
-
import { T as he } from "./trigger-BfrtcBd-.js";
|
|
17
|
-
import { useRouter as ge } from "vue-router";
|
|
18
|
-
import { c as w } from "./index-Cr_9Bqa1.js";
|
|
19
|
-
import { R as H } from "./app-_rmIFJ8M.js";
|
|
20
|
-
var _e = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "feedme.vip", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", licensePortalUrl: "https://license.feedme.cc/", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
21
|
-
const ve = { class: "px-24 flex flex-col gap-y-16" }, Ce = { class: "flex items-center justify-between w-full" }, we = { class: "flex gap-8 overflow-x-auto" }, be = { class: "space-y-8" }, ke = { class: "flex w-full gap-4 items-center" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "space-y-4" }, Se = { class: "fm-typo-en-body-lg-600" }, Fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = { class: "flex gap-8 items-center" }, Te = { class: "flex flex-col gap-16 text-center" }, Ue = { class: "fm-typo-en-title-sm-800" }, Pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Je = /* @__PURE__ */ Y({
|
|
22
|
-
__name: "Voucher",
|
|
23
|
-
setup(Ie) {
|
|
24
|
-
const { t: a } = ye(), $ = {
|
|
25
|
-
label: a("connect.voucher.createCampaign"),
|
|
26
|
-
value: "create",
|
|
27
|
-
isPrimary: !0,
|
|
28
|
-
prependIcon: "add"
|
|
29
|
-
}, L = re(), K = de("VOUCHER", L), N = le(), p = me(), { global: D, minor: T } = se, U = ge(), i = x({
|
|
30
|
-
searchKey: "",
|
|
31
|
-
location: [],
|
|
32
|
-
triggerType: []
|
|
33
|
-
}), _ = ee(
|
|
34
|
-
() => p.campaigns.voucher.filter(
|
|
35
|
-
(e) => q(e) && G(e)
|
|
36
|
-
)
|
|
37
|
-
), j = he.VOUCHER.map((e) => ({
|
|
38
|
-
label: e.name,
|
|
39
|
-
value: e.value
|
|
40
|
-
}));
|
|
41
|
-
function q(e) {
|
|
42
|
-
const o = i.value.location;
|
|
43
|
-
return !o || o.length === 0 || !e.targetLocation ? !0 : Array.isArray(o) ? o.some(
|
|
44
|
-
(r) => {
|
|
45
|
-
var s;
|
|
46
|
-
return (s = e == null ? void 0 : e.targetLocation) == null ? void 0 : s.includes(r);
|
|
47
|
-
}
|
|
48
|
-
) : e.targetLocation.includes(o);
|
|
49
|
-
}
|
|
50
|
-
function G(e) {
|
|
51
|
-
const o = i.value.triggerType;
|
|
52
|
-
if (!o || o.length === 0) return !0;
|
|
53
|
-
const r = e.event.type;
|
|
54
|
-
return o.includes(r);
|
|
55
|
-
}
|
|
56
|
-
const X = [
|
|
57
|
-
{
|
|
58
|
-
header: a("connect.voucher.voucherTitle"),
|
|
59
|
-
accessorFn: (e) => e.name
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
header: a("connect.voucher.status"),
|
|
63
|
-
accessorFn: (e) => ue(e),
|
|
64
|
-
cell(e) {
|
|
65
|
-
return O(e.row.original);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
header: a("connect.voucher.summary"),
|
|
70
|
-
accessorFn: (e) => B(e)
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
header: a("connect.voucher.quota"),
|
|
74
|
-
accessorFn: (e) => {
|
|
75
|
-
var o;
|
|
76
|
-
return ((o = e.pf_collectible) == null ? void 0 : o.options.maxReceive) ?? "Unlimited";
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
header: a("connect.voucher.claimed"),
|
|
81
|
-
accessorFn: (e) => {
|
|
82
|
-
var o;
|
|
83
|
-
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
header: a("connect.voucher.actions"),
|
|
88
|
-
cell(e) {
|
|
89
|
-
return m("div", { class: "flex items-center justify-end" }, [
|
|
90
|
-
m(f.FmButton, {
|
|
91
|
-
icon: "visibility",
|
|
92
|
-
variant: "tertiary",
|
|
93
|
-
iconColor: "neutral-gray-400",
|
|
94
|
-
onClick: async (o) => {
|
|
95
|
-
o.stopPropagation(), await U.push({
|
|
96
|
-
name: H["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
97
|
-
params: { id: e.row.original._id }
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}),
|
|
101
|
-
m(
|
|
102
|
-
f.FmMenu,
|
|
103
|
-
{
|
|
104
|
-
placement: "bottom-end",
|
|
105
|
-
onClick: (o) => {
|
|
106
|
-
o.stopPropagation();
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"menu-button": () => m(f.FmButton, {
|
|
111
|
-
icon: "more_vert",
|
|
112
|
-
iconColor: "neutral-gray-400",
|
|
113
|
-
variant: "tertiary"
|
|
114
|
-
}),
|
|
115
|
-
default: () => {
|
|
116
|
-
const o = [
|
|
117
|
-
m(
|
|
118
|
-
f.FmMenuItem,
|
|
119
|
-
{
|
|
120
|
-
onClick: async (r) => {
|
|
121
|
-
r.stopPropagation(), I(e.row.original);
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: m(
|
|
126
|
-
"div",
|
|
127
|
-
{
|
|
128
|
-
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
129
|
-
},
|
|
130
|
-
a("connect.voucher.remove")
|
|
131
|
-
)
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
];
|
|
135
|
-
return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
|
|
136
|
-
m(f.FmMenuItem, {
|
|
137
|
-
label: a("connect.voucher.send"),
|
|
138
|
-
onClick: async (r) => {
|
|
139
|
-
var s;
|
|
140
|
-
r.stopPropagation(), (s = b.value) == null || s.showSheet({
|
|
141
|
-
campaignId: e.row.original._id
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
), o.unshift(
|
|
146
|
-
m(f.FmMenuItem, {
|
|
147
|
-
label: a("connect.voucher.share"),
|
|
148
|
-
onClick: async (r) => {
|
|
149
|
-
if (r.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
|
|
150
|
-
return await A.confirm(
|
|
151
|
-
"Cannot share a voucher that is not a simple claim.",
|
|
152
|
-
"Share Voucher",
|
|
153
|
-
"OK"
|
|
154
|
-
);
|
|
155
|
-
await ce(
|
|
156
|
-
`https://${ie().currentBusiness.value._id}.${_e.appUrl}/vouchers/${e.row.original._id}`,
|
|
157
|
-
{
|
|
158
|
-
successMessage: "Voucher link copied to clipboard"
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
})
|
|
163
|
-
)), o;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
)
|
|
167
|
-
]);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
], P = x(), b = x();
|
|
171
|
-
async function I(e) {
|
|
172
|
-
await A.remove(a("connect.voucher.confirmRemove", { name: e.name })) && await T(
|
|
173
|
-
async () => {
|
|
174
|
-
await w.delete(e._id), await p.read("VOUCHER");
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
message: a("connect.voucher.removing", { name: e.name }),
|
|
178
|
-
successMessage: a("connect.voucher.removedSuccessfully", {
|
|
179
|
-
name: e.name
|
|
180
|
-
})
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
async function v(e) {
|
|
185
|
-
e ? await o() : K.open(async (r) => {
|
|
186
|
-
await o(r);
|
|
187
|
-
});
|
|
188
|
-
async function o(r) {
|
|
189
|
-
var s;
|
|
190
|
-
(s = P.value) == null || s.showSheet(
|
|
191
|
-
!0,
|
|
192
|
-
"VOUCHER",
|
|
193
|
-
e ? await w.readById(e._id) : void 0,
|
|
194
|
-
r
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
async function W(e) {
|
|
199
|
-
e.campaign._id && await new Promise((o) => {
|
|
200
|
-
L.open({
|
|
201
|
-
title: "Confirmation",
|
|
202
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
203
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
204
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
205
|
-
}).onPrimary(async () => {
|
|
206
|
-
var r;
|
|
207
|
-
e.updateCollections = !0, (r = window.top) == null || r.postMessage("updateAllVoucher", "*"), o();
|
|
208
|
-
}).onSecondary(async () => {
|
|
209
|
-
o();
|
|
210
|
-
});
|
|
211
|
-
}), await T(
|
|
212
|
-
async () => {
|
|
213
|
-
e.campaign._id ? await w.update(e.campaign._id, e) : await w.create(e), await p.read("VOUCHER");
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
message: a(
|
|
217
|
-
e.campaign._id ? "connect.voucher.updating" : "connect.voucher.creating"
|
|
218
|
-
),
|
|
219
|
-
successMessage: a(
|
|
220
|
-
e.campaign._id ? "connect.voucher.updatedSuccessfully" : "connect.voucher.createdSuccessfully"
|
|
221
|
-
)
|
|
222
|
-
}
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
return oe(async () => {
|
|
226
|
-
await D(async () => {
|
|
227
|
-
await p.read("VOUCHER");
|
|
228
|
-
});
|
|
229
|
-
}), (e, o) => {
|
|
230
|
-
const r = d("FmPageHead"), s = d("FmSearch"), z = d("FmTable"), C = d("FmButton"), Q = d("FmListItem"), Z = d("FmList"), J = d("FmCard");
|
|
231
|
-
return u(), V(S, null, [
|
|
232
|
-
l(r, {
|
|
233
|
-
title: t(a)("connect.voucher.title"),
|
|
234
|
-
actions: t(_).length > 0 ? [$] : [],
|
|
235
|
-
"onClick:action": o[0] || (o[0] = () => v())
|
|
236
|
-
}, null, 8, ["title", "actions"]),
|
|
237
|
-
c("div", ve, [
|
|
238
|
-
l(s, {
|
|
239
|
-
modelValue: t(i).searchKey,
|
|
240
|
-
"onUpdate:modelValue": o[1] || (o[1] = (n) => t(i).searchKey = n),
|
|
241
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
242
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
243
|
-
collapsible: ""
|
|
244
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
245
|
-
t(p).campaigns.voucher && t(p).campaigns.voucher.length > 0 ? (u(), V(S, { key: 0 }, [
|
|
246
|
-
c("div", Ce, [
|
|
247
|
-
c("div", we, [
|
|
248
|
-
l(M, {
|
|
249
|
-
label: `${t(a)("connect.common.location")}: `,
|
|
250
|
-
"right-icon": "keyboard_arrow_down",
|
|
251
|
-
modelValue: t(i).location,
|
|
252
|
-
"onUpdate:modelValue": o[2] || (o[2] = (n) => t(i).location = n),
|
|
253
|
-
icon: "storefront",
|
|
254
|
-
"show-item-label": !0,
|
|
255
|
-
items: t(N).locationOptions
|
|
256
|
-
}, null, 8, ["label", "modelValue", "items"]),
|
|
257
|
-
l(M, {
|
|
258
|
-
label: "Type:",
|
|
259
|
-
"right-icon": "keyboard_arrow_down",
|
|
260
|
-
modelValue: t(i).triggerType,
|
|
261
|
-
"onUpdate:modelValue": o[3] || (o[3] = (n) => t(i).triggerType = n),
|
|
262
|
-
icon: "filter_list",
|
|
263
|
-
"show-item-label": !0,
|
|
264
|
-
items: t(j)
|
|
265
|
-
}, null, 8, ["modelValue", "items"])
|
|
266
|
-
]),
|
|
267
|
-
l(s, {
|
|
268
|
-
modelValue: t(i).searchKey,
|
|
269
|
-
"onUpdate:modelValue": o[4] || (o[4] = (n) => t(i).searchKey = n),
|
|
270
|
-
class: "xs:hidden",
|
|
271
|
-
placeholder: t(a)("connect.voucher.search"),
|
|
272
|
-
collapsible: ""
|
|
273
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
274
|
-
]),
|
|
275
|
-
l(z, {
|
|
276
|
-
class: "xs:hidden",
|
|
277
|
-
"row-data": t(_),
|
|
278
|
-
"column-defs": X,
|
|
279
|
-
"search-value": t(i).searchKey,
|
|
280
|
-
"column-filter": [],
|
|
281
|
-
onRowClick: o[5] || (o[5] = (n) => v(n.original)),
|
|
282
|
-
"hide-footer": t(_).length < 10
|
|
283
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
284
|
-
l(Z, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
285
|
-
default: F(() => [
|
|
286
|
-
(u(!0), V(S, null, te(t(_).filter(
|
|
287
|
-
(n) => n.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
288
|
-
), (n) => (u(), h(Q, {
|
|
289
|
-
key: n._id.toString(),
|
|
290
|
-
onClick: (k) => v(n),
|
|
291
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
292
|
-
}, {
|
|
293
|
-
default: F(() => {
|
|
294
|
-
var k;
|
|
295
|
-
return [
|
|
296
|
-
c("div", be, [
|
|
297
|
-
c("div", ke, [
|
|
298
|
-
(u(), h(ne(t(O)(n)))),
|
|
299
|
-
c("div", xe, g(((k = n.pf_collectible) == null ? void 0 : k.currentReceive) ?? 0) + " claimed ", 1)
|
|
300
|
-
]),
|
|
301
|
-
c("div", Ve, [
|
|
302
|
-
c("div", Se, g(n.name), 1),
|
|
303
|
-
c("div", Fe, g(t(B)(n)), 1)
|
|
304
|
-
])
|
|
305
|
-
]),
|
|
306
|
-
c("div", Le, [
|
|
307
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
308
|
-
key: 0,
|
|
309
|
-
icon: "visibility",
|
|
310
|
-
"icon-color": "neutral-gray-400",
|
|
311
|
-
variant: "tertiary",
|
|
312
|
-
onClick: async (y) => {
|
|
313
|
-
y.stopPropagation(), await t(U).push({
|
|
314
|
-
name: t(H)["$connect-CAMPAIGN_VOUCHER_COLLECTIONS"],
|
|
315
|
-
params: { id: n._id }
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
}, null, 8, ["onClick"])) : E("", !0),
|
|
319
|
-
n.event.type === "SIMPLE_CLAIM" ? (u(), h(C, {
|
|
320
|
-
key: 1,
|
|
321
|
-
icon: "send",
|
|
322
|
-
"icon-color": "neutral-gray-400",
|
|
323
|
-
variant: "tertiary",
|
|
324
|
-
onClick: (y) => {
|
|
325
|
-
var R;
|
|
326
|
-
y.stopPropagation(), (R = t(b)) == null || R.showSheet({
|
|
327
|
-
campaignId: n._id
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
}, null, 8, ["onClick"])) : E("", !0),
|
|
331
|
-
l(C, {
|
|
332
|
-
icon: "delete",
|
|
333
|
-
"icon-color": "neutral-gray-400",
|
|
334
|
-
variant: "tertiary",
|
|
335
|
-
onClick: (y) => (y.stopPropagation(), I(n))
|
|
336
|
-
}, null, 8, ["onClick"])
|
|
337
|
-
])
|
|
338
|
-
];
|
|
339
|
-
}),
|
|
340
|
-
_: 2
|
|
341
|
-
}, 1032, ["onClick"]))), 128))
|
|
342
|
-
]),
|
|
343
|
-
_: 1
|
|
344
|
-
})
|
|
345
|
-
], 64)) : (u(), h(J, {
|
|
346
|
-
key: 1,
|
|
347
|
-
variant: "outlined",
|
|
348
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
349
|
-
}, {
|
|
350
|
-
default: F(() => [
|
|
351
|
-
o[7] || (o[7] = c("img", {
|
|
352
|
-
src: ae,
|
|
353
|
-
class: "aspect-square w-[150px]"
|
|
354
|
-
}, null, -1)),
|
|
355
|
-
c("div", Te, [
|
|
356
|
-
c("div", Ue, g(t(a)("connect.voucher.createVoucherCampaign")), 1),
|
|
357
|
-
c("div", Pe, g(t(a)("connect.voucher.description")), 1)
|
|
358
|
-
]),
|
|
359
|
-
l(C, {
|
|
360
|
-
variant: "primary",
|
|
361
|
-
label: t(a)("connect.voucher.createVoucherCampaign"),
|
|
362
|
-
icon: "add",
|
|
363
|
-
onClick: o[6] || (o[6] = (n) => v())
|
|
364
|
-
}, null, 8, ["label"])
|
|
365
|
-
]),
|
|
366
|
-
_: 1
|
|
367
|
-
})),
|
|
368
|
-
l(pe, {
|
|
369
|
-
ref_key: "sheetRef",
|
|
370
|
-
ref: P,
|
|
371
|
-
"onSubmit:modelValue": W
|
|
372
|
-
}, null, 512),
|
|
373
|
-
l(fe, {
|
|
374
|
-
ref_key: "sendVoucherSheetRef",
|
|
375
|
-
ref: b
|
|
376
|
-
}, null, 512)
|
|
377
|
-
])
|
|
378
|
-
], 64);
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
export {
|
|
383
|
-
Je as default
|
|
384
|
-
};
|