@feedmepos/mf-connect 0.1.0-beta.4 → 0.1.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-C7iDpCvx.js +426 -0
- package/dist/{App-BnQwjxIr.js → App-rOEspgIk.js} +397 -384
- package/dist/{Broadcast-y1kP18mo.js → Broadcast-CI61-FqI.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dj0JUMOk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BL_KxlIX.js} +6 -8
- package/dist/Card-CUzEZnUC.js +894 -0
- package/dist/{Collections-DPfbZMg1.js → Collections-zYhQfAph.js} +28 -34
- package/dist/{Credit-QleM_b6q.js → Credit-D6G2xUEu.js} +14 -14
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js +2209 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-2hRTF1EJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Drd0ZjdQ.js} +8 -8
- package/dist/{Experience-DGKj8ChY.js → Experience-Cqn6cpA4.js} +8 -8
- package/dist/{Game-BxRdzSma.js → Game-CGrL5xmK.js} +15 -15
- package/dist/Index-CCcuCcmL.js +255 -0
- package/dist/Marketing-DhZHedDV.js +20070 -0
- package/dist/{Member-CteeBDi2.js → Member-CB8o8wLL.js} +4 -4
- package/dist/MemberList-D6zRpcwU.js +1554 -0
- package/dist/MemberTransactions-HCaDl8dN.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ2M8huU.js → MessageInput.vue_vue_type_script_setup_true_lang-CqlGFgwF.js} +2 -2
- package/dist/{Mission-CZgXBa09.js → Mission-CexuwCSV.js} +98 -86
- package/dist/Overview-CZk3IHyA.js +1063 -0
- package/dist/{Point-C2vzEfRP.js → Point-DJ_sLiid.js} +23 -23
- package/dist/{Promotion-337OT0sP.js → Promotion-CWBpjPXQ.js} +53 -47
- package/dist/Record-CwT9Pmjn.js +337 -0
- package/dist/Reward-DhOIXKAB.js +432 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-UP4KtCK2.js +149 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BNw-CED0.js +1637 -0
- package/dist/Segment-BE7Bt2tH.js +566 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CDyT_cSb.js +181 -0
- package/dist/{Setting-DVK2594u.js → Setting-D1k2xVYx.js} +609 -586
- package/dist/Store-BzoJ_ZBZ.js +1743 -0
- package/dist/{StoreRewards-BpEmNueE.js → StoreRewards-OAPmCssF.js} +12 -12
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BIr5Zzij.js +1099 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DT48bSiH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C2fU1byp.js} +1 -1
- package/dist/{Tier-BwvOhyXR.js → Tier-IHJ7dlTI.js} +325 -317
- package/dist/{Title-DRPdKYRO.js → Title-C4KcQWk_.js} +197 -183
- package/dist/{Transaction-BnLvacwW.js → Transaction-B7SWRleT.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-DOXLpM1y.js +130 -0
- package/dist/{Voucher-BQL8J_EA.js → Voucher-Dzh-oh1p.js} +40 -40
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeTWCZF1.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js → ZodTextField.vue_vue_type_script_setup_true_lang-rBa59HC1.js} +1 -1
- package/dist/{app-BVaQwBvq.js → app-BkSGMADw.js} +1 -1
- package/dist/{app-zO552-Dl.js → app-ZePrUEIY.js} +1183 -1154
- package/dist/app.js +1 -1
- package/dist/{business-BSl6NSdS.js → business-CG7GnAu5.js} +1 -1
- package/dist/campaign-BSH9FJHx.js +1810 -0
- package/dist/{campaign-CxN6mq_l.js → campaign-DFvmN5Ky.js} +2 -2
- package/dist/campaign.enum-CBlGXHp0.js +20 -0
- package/dist/campaign.fn-BszsH1EQ.js +758 -0
- package/dist/collectible.enum-Sd3QSyrd.js +19 -0
- package/dist/{collection.fn-C-2dyWp9.js → collection.fn-CIFllkyx.js} +2 -2
- package/dist/dto-DG2Ckvh4.js +214 -0
- package/dist/{effect-D8y0J47O.js → effect-CWSFIfZh.js} +9 -9
- package/dist/email-addresses-BCNsQNXA.js +705 -0
- package/dist/{export-BxTrifKO.js → export-DKe01mG4.js} +3 -3
- package/dist/{helper-bEmZlTwA.js → helper-Et1Q6YUA.js} +1 -1
- package/dist/{index-DHTYWfTs.js → index-Bk281EIF.js} +207 -195
- package/dist/{index-B2qriSSk.js → index-CHAvEqB_.js} +1 -1
- package/dist/index-CMEY40F9.js +32 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-C_WyKCqN.js → index-D4FT-dGm.js} +1 -1
- package/dist/{index-JBp0chol.js → index-D_sLK5cZ.js} +1500 -1479
- package/dist/{index-Dnv999nc.js → index-Dkl_Y2Ir.js} +1 -1
- package/dist/{index-Ckz-D_AP.js → index-Dlv6dpg5.js} +2188 -931
- package/dist/index-DrRQsR1a.js +44 -0
- package/dist/{index-DuYb25dY.js → index-DzZDUZ8E.js} +37 -4
- package/dist/index-F1sEdtX3.js +54 -0
- package/dist/index-RFzgIvoM.js +29000 -0
- package/dist/{index-BFWCbVq2.js → index-RhGXDJ8R.js} +1 -1
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-Tw7KabwI.js → index.esm2017-COLDuQQ-.js} +1 -1
- package/dist/{loading-60xYxow_.js → loading-DxppIZmv.js} +1714 -1720
- package/dist/{membership-43FU3EmV.js → membership-DIBN0bog.js} +52 -44
- package/dist/money-L7YJDctU.js +15 -0
- package/dist/number-BAUL1NQ9.js +12 -0
- package/dist/objectid-BXKVeU2w.js +145 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-Qjelc0jm.js +36 -0
- package/dist/{rule-DlHrKp8K.js → rule-BAqQRjqc.js} +180 -177
- package/dist/{rule-builder-CU8P8b8U.js → rule-builder-D2hQiWL6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-9StyN-b7.js → template-NVFsa0l_.js} +5 -5
- package/dist/trigger-qeiGHLZs.js +114 -0
- package/dist/{xlsx-CrRvm5Vs.js → usePagination-De7j-UtU.js} +3183 -2962
- package/dist/user-CKVD-V1i.js +54 -0
- package/dist/{vue-i18n-UKlvivrG.js → vue-i18n-CTdcKDi0.js} +2 -2
- package/package.json +8 -7
- package/dist/Analytic-BtldByrt.js +0 -622
- package/dist/Card-kW7k8kOl.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js +0 -2813
- package/dist/Marketing-CG4GQdax.js +0 -316
- package/dist/MemberList-CANkPyR0.js +0 -1733
- package/dist/MemberTransactions-CcCa21fY.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js +0 -1753
- package/dist/Segment-Clstp5D-.js +0 -437
- package/dist/Store-PnpBvIoo.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CrDhK2dt.js +0 -890
- package/dist/dto-B20bsdh6.js +0 -2770
- package/dist/index-BUCjM4jq.js +0 -29193
- package/dist/index-Ceu2PcnH.js +0 -206
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-D3DAgTFI.js +0 -762
- package/dist/index-Kjelmo0Y.js +0 -298
- package/dist/money-CmR3-qMz.js +0 -15
- package/dist/number-CZlrO6Sq.js +0 -12
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { u as C } from "./vue-i18n-
|
|
2
|
+
import { _ as g, a as y } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BIr5Zzij.js";
|
|
3
|
+
import { u as C } from "./vue-i18n-CTdcKDi0.js";
|
|
4
4
|
const T = { class: "px-24 flex flex-col gap-y-32 pb-24" }, P = /* @__PURE__ */ d({
|
|
5
5
|
__name: "Transaction",
|
|
6
6
|
setup(V) {
|
|
@@ -0,0 +1,130 @@
|
|
|
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-D_sLK5cZ.js";
|
|
3
|
+
import { i as C, R as e } from "./rule-builder-D2hQiWL6.js";
|
|
4
|
+
import { _ as I } from "./RuleGroup.vue_vue_type_script_setup_true_lang-BNw-CED0.js";
|
|
5
|
+
import { p as N } from "./loading-DxppIZmv.js";
|
|
6
|
+
import { u as S } from "./membership-DIBN0bog.js";
|
|
7
|
+
import { _ as j } from "./CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js";
|
|
8
|
+
import { u as x } from "./vue-i18n-CTdcKDi0.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
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as X, ref as _, watch as N, onMounted as J, resolveComponent as h, openBlock as y, createBlock as k, unref as t, isRef as j, withCtx as M, createElementVNode as l, createVNode as r, toDisplayString as F, computed as oe, h as
|
|
1
|
+
import { defineComponent as X, ref as _, watch as N, onMounted as J, resolveComponent as h, openBlock as y, createBlock as k, unref as t, isRef as j, withCtx as M, createElementVNode as l, createVNode as r, toDisplayString as F, computed as oe, h as b, createElementBlock as $, Fragment as T, renderList as te, resolveDynamicComponent as ae, createCommentVNode as K } from "vue";
|
|
2
2
|
import { _ as ne } from "./campaign-CpzFl8Vr.js";
|
|
3
3
|
import { useDialog as se, components as V } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as W, p as z, a as le } from "./loading-
|
|
4
|
+
import { u as W, p as z, a as le } from "./loading-DxppIZmv.js";
|
|
5
5
|
import { useCoreStore as ce } from "@feedmepos/mf-common";
|
|
6
|
-
import { u as ie } from "./business-
|
|
7
|
-
import { u as re } from "./campaign-
|
|
8
|
-
import { g as D,
|
|
9
|
-
import "./index-
|
|
10
|
-
import { u as ue } from "./template-
|
|
11
|
-
import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { u as ie } from "./business-CG7GnAu5.js";
|
|
7
|
+
import { u as re } from "./campaign-DFvmN5Ky.js";
|
|
8
|
+
import { g as D, a as q } from "./campaign-BSH9FJHx.js";
|
|
9
|
+
import "./index-RhGXDJ8R.js";
|
|
10
|
+
import { u as ue } from "./template-NVFsa0l_.js";
|
|
11
|
+
import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-CxxmBzPu.js";
|
|
12
12
|
import { _ as de } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
13
13
|
import { J as pe } from "./JsonViewer-v8_C7l5N.js";
|
|
14
14
|
import { u as fe } from "./app-wDQR6dpb.js";
|
|
15
15
|
import { l as he } from "./lodash-B5I3zXaY.js";
|
|
16
|
-
import { m as ve } from "./index-
|
|
17
|
-
import { c as L } from "./index-
|
|
18
|
-
import { u as ge } from "./vue-i18n-
|
|
16
|
+
import { m as ve } from "./index-Dkl_Y2Ir.js";
|
|
17
|
+
import { c as L } from "./index-D4FT-dGm.js";
|
|
18
|
+
import { u as ge } from "./vue-i18n-CTdcKDi0.js";
|
|
19
19
|
import { useRouter as ye } from "vue-router";
|
|
20
|
-
import { R as G } from "./app-
|
|
21
|
-
const _e = { class: "space-y-16" },
|
|
20
|
+
import { R as G } from "./app-ZePrUEIY.js";
|
|
21
|
+
const _e = { class: "space-y-16" }, Ce = { class: "fm-typo-en-body-md-600" }, be = { class: "flex items-center justify-end" }, we = { class: "flex items-center gap-8" }, Se = /* @__PURE__ */ X({
|
|
22
22
|
__name: "SendVoucherSheet",
|
|
23
23
|
emits: ["success"],
|
|
24
24
|
setup(Q, { expose: a, emit: A }) {
|
|
25
|
-
const { minor:
|
|
25
|
+
const { minor: P } = W, R = _(""), v = _({}), C = A, g = _(!1), u = _([]);
|
|
26
26
|
function U(c) {
|
|
27
|
-
g.value = !0,
|
|
27
|
+
g.value = !0, R.value = c.campaignId, u.value = [];
|
|
28
28
|
}
|
|
29
29
|
function m() {
|
|
30
30
|
g.value = !1;
|
|
@@ -74,11 +74,11 @@ const _e = { class: "space-y-16" }, be = { class: "fm-typo-en-body-md-600" }, Ce
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
async function x(c) {
|
|
77
|
-
u.value.length < 1 || await
|
|
77
|
+
u.value.length < 1 || await P(
|
|
78
78
|
async () => {
|
|
79
|
-
await L.sendCollection(
|
|
79
|
+
await L.sendCollection(R.value, {
|
|
80
80
|
memberId: u.value
|
|
81
|
-
}), await
|
|
81
|
+
}), await C("success"), m();
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
message: "Sending claim(s)",
|
|
@@ -126,8 +126,8 @@ const _e = { class: "space-y-16" }, be = { class: "fm-typo-en-body-md-600" }, Ce
|
|
|
126
126
|
default: M(() => [
|
|
127
127
|
r(pe, { json: t(u) }, null, 8, ["json"]),
|
|
128
128
|
l("div", _e, [
|
|
129
|
-
l("div",
|
|
130
|
-
l("div",
|
|
129
|
+
l("div", Ce, F(t(u).length) + " members selected ", 1),
|
|
130
|
+
l("div", be, [
|
|
131
131
|
r(o, {
|
|
132
132
|
class: "mt-4",
|
|
133
133
|
modelValue: t(i).searchValue,
|
|
@@ -155,8 +155,8 @@ const _e = { class: "space-y-16" }, be = { class: "fm-typo-en-body-md-600" }, Ce
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
|
-
var xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
159
|
-
const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Fe = { class: "flex gap-8 overflow-x-auto" }, Ie = { class: "space-y-8" }, Le = { class: "flex w-full gap-4 items-center" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
158
|
+
var xe = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", licensePortalUrl: "https://license.feedmedev.cc/", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
159
|
+
const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-center justify-between w-full" }, Fe = { class: "flex gap-8 overflow-x-auto" }, Ie = { class: "space-y-8" }, Le = { class: "flex w-full gap-4 items-center" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "space-y-4" }, Re = { class: "fm-typo-en-body-lg-600" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ee = { class: "flex gap-8 items-center" }, Ae = { class: "flex flex-col gap-16 text-center" }, Be = { class: "fm-typo-en-title-sm-800" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, no = /* @__PURE__ */ X({
|
|
160
160
|
__name: "Voucher",
|
|
161
161
|
setup(Q) {
|
|
162
162
|
const { t: a } = ge(), A = {
|
|
@@ -164,11 +164,11 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
164
164
|
value: "create",
|
|
165
165
|
isPrimary: !0,
|
|
166
166
|
prependIcon: "add"
|
|
167
|
-
},
|
|
167
|
+
}, P = se(), R = ue("VOUCHER", P), v = ie(), C = re(), { global: g, minor: u } = W, U = ye(), m = _({
|
|
168
168
|
searchKey: "",
|
|
169
169
|
location: null
|
|
170
170
|
}), S = oe(
|
|
171
|
-
() =>
|
|
171
|
+
() => C.campaigns.voucher.filter(
|
|
172
172
|
(e) => !m.value.location || !e.targetLocation || e.targetLocation.includes(m.value.location)
|
|
173
173
|
)
|
|
174
174
|
), i = [
|
|
@@ -203,8 +203,8 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
203
203
|
{
|
|
204
204
|
header: a("connect.voucher.actions"),
|
|
205
205
|
cell(e) {
|
|
206
|
-
return
|
|
207
|
-
|
|
206
|
+
return b("div", { class: "flex items-center justify-end" }, [
|
|
207
|
+
b(V.FmButton, {
|
|
208
208
|
icon: "visibility",
|
|
209
209
|
variant: "tertiary",
|
|
210
210
|
iconColor: "neutral-gray-400",
|
|
@@ -215,7 +215,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
217
|
}),
|
|
218
|
-
|
|
218
|
+
b(
|
|
219
219
|
V.FmMenu,
|
|
220
220
|
{
|
|
221
221
|
placement: "bottom-end",
|
|
@@ -224,14 +224,14 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
224
224
|
}
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
|
-
"menu-button": () =>
|
|
227
|
+
"menu-button": () => b(V.FmButton, {
|
|
228
228
|
icon: "more_vert",
|
|
229
229
|
iconColor: "neutral-gray-400",
|
|
230
230
|
variant: "tertiary"
|
|
231
231
|
}),
|
|
232
232
|
default: () => {
|
|
233
233
|
const o = [
|
|
234
|
-
|
|
234
|
+
b(
|
|
235
235
|
V.FmMenuItem,
|
|
236
236
|
{
|
|
237
237
|
onClick: async (s) => {
|
|
@@ -239,7 +239,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
239
239
|
}
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
|
-
label:
|
|
242
|
+
label: b(
|
|
243
243
|
"div",
|
|
244
244
|
{
|
|
245
245
|
class: "text-fm-color-typo-error fm-typo-en-body-md-400"
|
|
@@ -250,7 +250,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
250
250
|
)
|
|
251
251
|
];
|
|
252
252
|
return e.row.original.event.type === "SIMPLE_CLAIM" && (o.unshift(
|
|
253
|
-
|
|
253
|
+
b(V.FmMenuItem, {
|
|
254
254
|
label: a("connect.voucher.send"),
|
|
255
255
|
onClick: async (s) => {
|
|
256
256
|
var d;
|
|
@@ -260,7 +260,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
260
260
|
}
|
|
261
261
|
})
|
|
262
262
|
), o.unshift(
|
|
263
|
-
|
|
263
|
+
b(V.FmMenuItem, {
|
|
264
264
|
label: a("connect.voucher.share"),
|
|
265
265
|
onClick: async (s) => {
|
|
266
266
|
if (s.stopPropagation(), e.row.original.event.type !== "SIMPLE_CLAIM")
|
|
@@ -288,7 +288,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
288
288
|
async function E(e) {
|
|
289
289
|
await z.remove(a("voucher.confirmRemove", { name: e.name })) && await u(
|
|
290
290
|
async () => {
|
|
291
|
-
await L.delete(e._id), await
|
|
291
|
+
await L.delete(e._id), await C.read("VOUCHER");
|
|
292
292
|
},
|
|
293
293
|
{
|
|
294
294
|
message: a("voucher.removing", { name: e.name }),
|
|
@@ -297,7 +297,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
async function x(e) {
|
|
300
|
-
e ? await o() :
|
|
300
|
+
e ? await o() : R.open(async (s) => {
|
|
301
301
|
await o(s);
|
|
302
302
|
});
|
|
303
303
|
async function o(s) {
|
|
@@ -312,7 +312,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
312
312
|
}
|
|
313
313
|
async function c(e) {
|
|
314
314
|
e.campaign._id && await new Promise((o) => {
|
|
315
|
-
|
|
315
|
+
P.open({
|
|
316
316
|
title: "Confirmation",
|
|
317
317
|
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
318
318
|
primaryActions: { text: "Update all", close: !0 },
|
|
@@ -325,7 +325,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
325
325
|
});
|
|
326
326
|
}), await u(
|
|
327
327
|
async () => {
|
|
328
|
-
e.campaign._id ? await L.update(e.campaign._id, e) : await L.create(e), await
|
|
328
|
+
e.campaign._id ? await L.update(e.campaign._id, e) : await L.create(e), await C.read("VOUCHER");
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
message: a(
|
|
@@ -339,7 +339,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
339
339
|
}
|
|
340
340
|
return J(async () => {
|
|
341
341
|
await g(async () => {
|
|
342
|
-
await
|
|
342
|
+
await C.read("VOUCHER");
|
|
343
343
|
});
|
|
344
344
|
}), (e, o) => {
|
|
345
345
|
const s = h("FmPageHead"), d = h("FmSearch"), B = h("FmTable"), p = h("FmButton"), Z = h("FmListItem"), Y = h("FmList"), ee = h("FmCard");
|
|
@@ -357,7 +357,7 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
357
357
|
placeholder: t(a)("connect.voucher.search"),
|
|
358
358
|
collapsible: ""
|
|
359
359
|
}, null, 8, ["modelValue", "placeholder"]),
|
|
360
|
-
t(
|
|
360
|
+
t(C).campaigns.voucher && t(C).campaigns.voucher.length > 0 ? (y(), $(T, { key: 0 }, [
|
|
361
361
|
l("div", ke, [
|
|
362
362
|
l("div", Fe, [
|
|
363
363
|
r(de, {
|
|
@@ -404,8 +404,8 @@ const Ve = { class: "px-24 flex flex-col gap-y-16" }, ke = { class: "flex items-
|
|
|
404
404
|
(y(), k(ae(t(D)(n)))),
|
|
405
405
|
l("div", Me, F(((O = n.pf_collectible) == null ? void 0 : O.currentReceive) ?? 0) + " claimed ", 1)
|
|
406
406
|
]),
|
|
407
|
-
l("div",
|
|
408
|
-
l("div",
|
|
407
|
+
l("div", Pe, [
|
|
408
|
+
l("div", Re, F(n.name), 1),
|
|
409
409
|
l("div", Ue, F(t(q)(n)), 1)
|
|
410
410
|
])
|
|
411
411
|
]),
|