@feedmepos/mf-connect 0.0.16-beta.1 → 0.0.16-beta.11
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-C-zZmF5N.js → Analytic-Gq7PoNer.js} +368 -365
- package/dist/App-Cikl5jnp.js +177 -0
- package/dist/Broadcast-DU3JnBwZ.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-VWLBlxy1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D0I8IZIR.js} +20 -20
- package/dist/Card-hIeQ5XUH.js +825 -0
- package/dist/Collections-B1SC1rr7.js +453 -0
- package/dist/Credit-BgwI8DR3.js +216 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bz6TSmbW.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js} +1026 -1022
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-AhWnHG02.js → EffectSheet.vue_vue_type_style_index_0_lang-DPgu45MD.js} +29 -29
- package/dist/Experience-C2Q-zqV6.js +221 -0
- package/dist/Game-DU2pZDGk.js +255 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DykNOOFD.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +1 -1
- package/dist/{MainLayout-D0AoA1tk.js → MainLayout-B1aJoR95.js} +2 -2
- package/dist/Marketing-DWiTQp9I.js +316 -0
- package/dist/Member-BEXKBFry.js +69 -0
- package/dist/MemberList-DzMdajIf.js +1733 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-CTAx5jIV.js → MemberTransactions-Bciankuu.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-C-BtHxSc.js → MessageInput.vue_vue_type_script_setup_true_lang-DH25Hfk3.js} +46 -46
- package/dist/Mission-KzwRlaA5.js +259 -0
- package/dist/Point-CSKvZXHc.js +222 -0
- package/dist/Promotion-IiwPhx8p.js +221 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CrpJySSp.js → RuleGroup.vue_vue_type_script_setup_true_lang-4zIO3oCr.js} +545 -544
- package/dist/Segment-2Q0PonBb.js +447 -0
- package/dist/{Setting-Zrj5P_4m.js → Setting-Df5vVRt4.js} +600 -598
- package/dist/Store-C0WXCKs6.js +1503 -0
- package/dist/StoreRewards-eSSIO0nk.js +401 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DS4APaHw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js} +106 -108
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-ZYjWlDJ1.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b0xTcoEp.js} +1 -1
- package/dist/{Tier-DVWJyQ9S.js → Tier-v-1FkRU-.js} +464 -449
- package/dist/{Title-B5kX64vs.js → Title-CQ2JWqBW.js} +315 -299
- package/dist/Transaction-0OouN_6s.js +39 -0
- package/dist/Voucher-CL0cgogx.js +488 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-Bd19eW7X.js +5381 -0
- package/dist/app-CfS25Z66.js +34797 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +5 -3
- package/dist/business-dQh3AEot.js +78 -0
- package/dist/{campaign-BZJuknWK.js → campaign-BOl8AgKA.js} +12 -12
- package/dist/{collection.fn-DoCkZ6z4.js → collection.fn-B_YsXmrP.js} +2 -2
- package/dist/dto-B8NfyVPG.js +1169 -0
- package/dist/{effect-B8kmnKvY.js → effect-C2jCStXO.js} +1 -1
- package/dist/{export-Dm6LYnWo.js → export-BtZc3Yzh.js} +3 -3
- package/dist/{helper-DR4XK3nv.js → helper-8oGsrM56.js} +1 -1
- package/dist/{index-DcUrk07Q.js → index-6FkKY3q0.js} +3 -3
- package/dist/{index-Bu4_26qI.js → index-C7oeXRUl.js} +1 -1
- package/dist/{index-CuL5-ORK.js → index-CZKYIefW.js} +6 -7
- package/dist/{index-yxJMhfxj.js → index-C_0IFnwi.js} +5 -5
- package/dist/{index-BryrRq8O.js → index-DCixRRvz.js} +36 -30
- package/dist/{index-CkiYkbXb.js → index-DFgt4-VW.js} +1 -1
- package/dist/{index-CWf0mh3a.js → index-DYDhH9bi.js} +177 -168
- package/dist/{index-boor8e80.js → index-Di-kWSmf.js} +3 -3
- package/dist/{app-DkI7dYRN.js → index-Dn0jdj0o.js} +9665 -13024
- package/dist/index-DwKqFNF6.js +3 -0
- package/dist/{index-BobRgQrE.js → index-HoacsZDk.js} +2 -2
- package/dist/{index-BxkxVtgm.js → index-UTQHDUdW.js} +1 -1
- package/dist/{loading-BzV5acUX.js → loading-D_AN6p24.js} +6807 -6805
- package/dist/{lodash-mg4435Qq.js → lodash-B5I3zXaY.js} +1 -1
- package/dist/{membership-CqbsLHqx.js → membership-Ccrx9R6r.js} +3 -3
- package/dist/{money-DA_gtp3q.js → money-waD-f-Zz.js} +1 -1
- package/dist/{number-C388eyOu.js → number-CwTGGsh9.js} +1 -1
- package/dist/{rule-Clmr5y4j.js → rule-DJ07h3Gh.js} +2 -2
- package/dist/{rule-builder-BgqNbM-P.js → rule-builder-DJ-acvVD.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/template-clxvNnbF.js +190 -0
- package/dist/{usePagination-o5fgsZwU.js → usePagination-BeF5K3M7.js} +86 -86
- package/dist/vue-i18n-BxwiXSkp.js +2365 -0
- package/dist/{xlsx-BRdh9e2p.js → xlsx-BB366cdN.js} +1945 -1945
- package/package.json +9 -5
- package/dist/Broadcast-X69Mtv3b.js +0 -216
- package/dist/Card-D0X3v1UF.js +0 -822
- package/dist/Collections-umR6Ehqf.js +0 -452
- package/dist/Credit-C1EWF7R0.js +0 -214
- package/dist/Experience-CqL8wyPm.js +0 -211
- package/dist/Game--kYe64EV.js +0 -250
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-BjOJ3XSL.js +0 -144
- package/dist/Marketing-CTCQ5ZmZ.js +0 -308
- package/dist/Member-DCduX7zP.js +0 -91
- package/dist/MemberList-B0EkXZJu.js +0 -1729
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/Mission-CVr9rS_D.js +0 -248
- package/dist/Point-BnZ6M74y.js +0 -220
- package/dist/Promotion-B0PUve5S.js +0 -218
- package/dist/Segment-B-XpkyM5.js +0 -445
- package/dist/Store-B2gywCt2.js +0 -1503
- package/dist/StoreRewards-D8410Q_-.js +0 -434
- package/dist/Transaction-CZBO4v4d.js +0 -36
- package/dist/Voucher-se-4JF9B.js +0 -481
- package/dist/app-B2ImSO3V.js +0 -53382
- package/dist/dto-BWpvRpK2.js +0 -1151
- package/dist/template-Dwp7heBA.js +0 -190
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { defineComponent as M, ref as p, h as d, watch as N, resolveComponent as S, openBlock as g, createBlock as O, unref as l, computed as C, onMounted as B, createElementBlock as P, Fragment as G, createCommentVNode as $, createVNode as L, createElementVNode as w, nextTick as F } from "vue";
|
|
2
|
+
import { useRouter as V, useRoute as k, RouterView as Y } from "vue-router";
|
|
3
|
+
import { useCoreStore as E } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as U } from "./app-wDQR6dpb.js";
|
|
5
|
+
import { u as H } from "./business-dQh3AEot.js";
|
|
6
|
+
import "./index-DwKqFNF6.js";
|
|
7
|
+
import { components as v, useSnackbar as x, useDialog as D } from "@feedmepos/ui-library";
|
|
8
|
+
import { u as X } from "./vue-i18n-BxwiXSkp.js";
|
|
9
|
+
import { R as n } from "./app-Bd19eW7X.js";
|
|
10
|
+
import { J as q } from "./JsonViewer-v8_C7l5N.js";
|
|
11
|
+
import { S as y } from "./index-Dn0jdj0o.js";
|
|
12
|
+
const j = /* @__PURE__ */ M({
|
|
13
|
+
__name: "NavigationTab",
|
|
14
|
+
setup(I) {
|
|
15
|
+
const { t: e } = X(), m = p(), s = [
|
|
16
|
+
{
|
|
17
|
+
label: e("connect.navigation.analytic"),
|
|
18
|
+
value: n["$connect-ANALYTIC"]
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: e("connect.navigation.campaign"),
|
|
22
|
+
value: n["$connect-CAMPAIGN"],
|
|
23
|
+
children: [
|
|
24
|
+
{
|
|
25
|
+
label: e("connect.navigation.promotion"),
|
|
26
|
+
value: n["$connect-CAMPAIGN_PROMOTION"]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: e("connect.navigation.voucher"),
|
|
30
|
+
value: n["$connect-CAMPAIGN_VOUCHER"]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: e("connect.navigation.broadcast"),
|
|
34
|
+
value: n["$connect-CAMPAIGN_BROADCAST"]
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: e("connect.navigation.program"),
|
|
40
|
+
value: n["$connect-PROGRAM"],
|
|
41
|
+
children: [
|
|
42
|
+
{
|
|
43
|
+
label: e("connect.navigation.tier"),
|
|
44
|
+
value: n["$connect-PROGRAM_TIER"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: e("connect.navigation.title"),
|
|
48
|
+
value: n["$connect-PROGRAM_TITLE"]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: e("connect.navigation.experience"),
|
|
52
|
+
value: n["$connect-PROGRAM_EXPERIENCE"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: e("connect.navigation.point"),
|
|
56
|
+
value: n["$connect-PROGRAM_POINT"],
|
|
57
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: e("connect.navigation.credit"),
|
|
61
|
+
value: n["$connect-PROGRAM_CREDIT"]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
label: e("connect.navigation.game"),
|
|
65
|
+
value: n["$connect-PROGRAM_GAME"],
|
|
66
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Mission",
|
|
70
|
+
value: n["$connect-PROGRAM_MISSION"]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: e("connect.navigation.loyalty"),
|
|
76
|
+
value: n["$connect-LOYALTY"],
|
|
77
|
+
children: [
|
|
78
|
+
{
|
|
79
|
+
label: e("connect.navigation.member"),
|
|
80
|
+
value: n["$connect-LOYALTY_MEMBER_LIST"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: e("connect.navigation.segments"),
|
|
84
|
+
value: n["$connect-LOYALTY_SEGMENT"],
|
|
85
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: e("connect.navigation.card"),
|
|
89
|
+
value: n["$connect-LOYALTY_CARD"],
|
|
90
|
+
badge: () => d(v.FmPill, { variant: "premium" })
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: e("connect.navigation.store"),
|
|
96
|
+
value: n["$connect-STORE"]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: e("connect.navigation.transaction"),
|
|
100
|
+
value: n["$connect-TRANSACTION"]
|
|
101
|
+
},
|
|
102
|
+
// {
|
|
103
|
+
// label: 'Marketing material',
|
|
104
|
+
// value: ROUTE_NAME['$connect-MARKETING'],
|
|
105
|
+
// },
|
|
106
|
+
{
|
|
107
|
+
label: e("connect.navigation.setting"),
|
|
108
|
+
value: n["$connect-SETTING"]
|
|
109
|
+
}
|
|
110
|
+
], b = V(), f = k(), _ = s.reduce((a, o) => [...(o.children ?? []).map((t) => t.value), ...a, o.value], []);
|
|
111
|
+
N(
|
|
112
|
+
() => f,
|
|
113
|
+
(a) => {
|
|
114
|
+
const o = a.matched.map((t) => t.name).reverse();
|
|
115
|
+
m.value = o.find((t) => _.includes(t));
|
|
116
|
+
},
|
|
117
|
+
{ immediate: !0 }
|
|
118
|
+
);
|
|
119
|
+
async function R(a) {
|
|
120
|
+
await b.push({ name: a });
|
|
121
|
+
}
|
|
122
|
+
return (a, o) => {
|
|
123
|
+
var r;
|
|
124
|
+
const t = S("FmCollapsibleTabs");
|
|
125
|
+
return g(), O(t, {
|
|
126
|
+
class: "border-fm-color-neutral-gray-100 border-r py-16 px-4",
|
|
127
|
+
"model-value": (r = l(m)) == null ? void 0 : r.toString(),
|
|
128
|
+
items: s,
|
|
129
|
+
"onUpdate:modelValue": R
|
|
130
|
+
}, null, 8, ["model-value"]);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
var J = { 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" };
|
|
135
|
+
const z = {
|
|
136
|
+
key: 1,
|
|
137
|
+
class: "h-full w-full"
|
|
138
|
+
}, K = ["src"], ie = /* @__PURE__ */ M({
|
|
139
|
+
__name: "App",
|
|
140
|
+
setup(I) {
|
|
141
|
+
const e = E(), m = U(), s = H(), b = x(), f = D(), _ = k(), R = p(_.query.showHeader !== "false"), a = p(!1), { currentBusiness: o } = E(), t = p(!1), r = C(() => s.version), h = C(() => {
|
|
142
|
+
const c = e.currentCountry.value || "MY", i = y.getIdToken(), u = o.value._id;
|
|
143
|
+
return `${J.marketingV1Portal}/b/${u}/marketing/overview?showHeader=false&country=${c}&token=${i}`;
|
|
144
|
+
}), A = async () => {
|
|
145
|
+
t.value = !1, await F(), console.log("forceRerender"), y.setBusinessId(o.value._id), await s.readPremium(), !a.value && r.value === "v2" ? e.registerSidebarComponent(j) : e.hideSidebarToggle(!0), a.value = !0, t.value = !0;
|
|
146
|
+
};
|
|
147
|
+
return B(() => {
|
|
148
|
+
if (m.initProvider(b, f), !R.value) {
|
|
149
|
+
const c = document.getElementsByClassName("app-header")[0], i = document.getElementsByClassName("app-sidebar")[0], u = document.getElementsByClassName("app-container")[0], T = document.getElementsByTagName("main")[0];
|
|
150
|
+
c == null || c.classList.add("!hidden"), i == null || i.classList.add("!pt-0"), u == null || u.classList.add("!pt-0"), T == null || T.classList.add("!pt-0"), e.hideSidebarToggle(!0);
|
|
151
|
+
}
|
|
152
|
+
o.value != null && A();
|
|
153
|
+
}), N(
|
|
154
|
+
() => e.currentBusiness.value,
|
|
155
|
+
async (c) => {
|
|
156
|
+
c != null && A();
|
|
157
|
+
}
|
|
158
|
+
), (c, i) => (g(), P(G, null, [
|
|
159
|
+
l(t) && l(r) === "v2" ? (g(), O(l(Y), { key: 0 })) : $("", !0),
|
|
160
|
+
l(t) && l(r) !== "v2" ? (g(), P("div", z, [
|
|
161
|
+
L(q, {
|
|
162
|
+
json: { url: l(h) }
|
|
163
|
+
}, null, 8, ["json"]),
|
|
164
|
+
w("iframe", {
|
|
165
|
+
allow: "clipboard-read; clipboard-write",
|
|
166
|
+
frameBorder: "0",
|
|
167
|
+
height: "100%",
|
|
168
|
+
width: "100%",
|
|
169
|
+
src: l(h)
|
|
170
|
+
}, null, 8, K)
|
|
171
|
+
])) : $("", !0)
|
|
172
|
+
], 64));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
export {
|
|
176
|
+
ie as default
|
|
177
|
+
};
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { defineComponent as N, ref as h, computed as U, onMounted as j, resolveComponent as r, openBlock as l, createElementBlock as y, Fragment as b, createVNode as i, unref as t, createElementVNode as n, withCtx as v, renderList as E, createBlock as w, resolveDynamicComponent as H, toDisplayString as d, createCommentVNode as q, h as z } from "vue";
|
|
2
|
+
import { _ as G } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as J, components as Q } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as W, p as X } from "./loading-D_AN6p24.js";
|
|
5
|
+
import { u as Y } from "./business-dQh3AEot.js";
|
|
6
|
+
import { u as Z } from "./campaign-BOl8AgKA.js";
|
|
7
|
+
import { g as B, b as A } from "./dto-B8NfyVPG.js";
|
|
8
|
+
import { u as ee } from "./vue-i18n-BxwiXSkp.js";
|
|
9
|
+
import { _ as te } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
+
import { _ as ae } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js";
|
|
11
|
+
import { u as oe } from "./template-clxvNnbF.js";
|
|
12
|
+
import { c as _ } from "./index-UTQHDUdW.js";
|
|
13
|
+
const ne = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ce = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, me = { class: "space-y-4" }, de = { class: "fm-typo-en-body-lg-600" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ue = { key: 0 }, fe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, ge = { class: "flex flex-col gap-16 text-center" }, ye = { class: "fm-typo-en-title-sm-800" }, _e = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Re = /* @__PURE__ */ N({
|
|
14
|
+
__name: "Broadcast",
|
|
15
|
+
setup(he) {
|
|
16
|
+
const { t: s } = ee(), V = {
|
|
17
|
+
label: s("connect.campaign.common.createCampaign"),
|
|
18
|
+
value: "create",
|
|
19
|
+
isPrimary: !0,
|
|
20
|
+
prependIcon: "add"
|
|
21
|
+
}, D = oe("BROADCAST", J()), R = Y(), m = Z(), { global: L, minor: x } = W, T = h((/* @__PURE__ */ new Date()).toISOString()), c = h({
|
|
22
|
+
searchKey: "",
|
|
23
|
+
location: null
|
|
24
|
+
}), f = U(
|
|
25
|
+
() => m.campaigns.broadcast.filter(
|
|
26
|
+
(e) => !c.value.location || !e.targetLocation || e.targetLocation.includes(c.value.location)
|
|
27
|
+
)
|
|
28
|
+
), I = [
|
|
29
|
+
{
|
|
30
|
+
header: "Broadcast title",
|
|
31
|
+
accessorFn: (e) => e.name
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
header: "Status",
|
|
35
|
+
cell(e) {
|
|
36
|
+
return B(e.row.original);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
header: "Summary",
|
|
41
|
+
accessorFn: (e) => A(e)
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
header: "Message sent",
|
|
45
|
+
accessorFn: (e) => e.currentReceive ?? "N/A"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
header: "Actions",
|
|
49
|
+
cell(e) {
|
|
50
|
+
return z(Q.FmButton, {
|
|
51
|
+
variant: "tertiary",
|
|
52
|
+
icon: "delete",
|
|
53
|
+
iconColor: "neutral-gray-400",
|
|
54
|
+
onClick: (a) => {
|
|
55
|
+
a.stopPropagation(), S(e.row.original);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
], C = h();
|
|
61
|
+
async function S(e) {
|
|
62
|
+
await X.remove(
|
|
63
|
+
s("campaign.common.remove.confirm", { name: e.name })
|
|
64
|
+
) && await x(
|
|
65
|
+
async () => {
|
|
66
|
+
await _.delete(e._id), await m.read("BROADCAST");
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
message: s("campaign.common.remove.removing", { name: e.name }),
|
|
70
|
+
successMessage: s("campaign.common.remove.removed", { name: e.name })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
async function g(e) {
|
|
75
|
+
T.value = (/* @__PURE__ */ new Date()).toISOString(), e ? await a() : D.open(async (p) => {
|
|
76
|
+
await a(p);
|
|
77
|
+
});
|
|
78
|
+
async function a(p) {
|
|
79
|
+
var u;
|
|
80
|
+
(u = C.value) == null || u.showSheet(
|
|
81
|
+
!0,
|
|
82
|
+
"BROADCAST",
|
|
83
|
+
e ? await _.readById(e._id) : void 0,
|
|
84
|
+
p
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function K(e) {
|
|
89
|
+
await x(
|
|
90
|
+
async () => {
|
|
91
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await m.read("BROADCAST");
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
message: s(
|
|
95
|
+
`campaign.broadcast.update.${e.campaign._id ? "updating" : "creating"}`
|
|
96
|
+
),
|
|
97
|
+
successMessage: s("campaign.broadcast.update.success", {
|
|
98
|
+
action: e.campaign._id ? "updated" : "created"
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return j(async () => {
|
|
104
|
+
await L(async () => {
|
|
105
|
+
await m.read("BROADCAST");
|
|
106
|
+
});
|
|
107
|
+
}), (e, a) => {
|
|
108
|
+
const p = r("FmPageHead"), u = r("FmSearch"), O = r("FmTable"), F = r("FmButton"), $ = r("FmListItem"), P = r("FmList"), M = r("FmCard");
|
|
109
|
+
return l(), y(b, null, [
|
|
110
|
+
i(p, {
|
|
111
|
+
title: t(s)("connect.campaign.broadcast.title"),
|
|
112
|
+
actions: t(f).length > 0 ? [V] : [],
|
|
113
|
+
"onClick:action": a[0] || (a[0] = () => g())
|
|
114
|
+
}, null, 8, ["title", "actions"]),
|
|
115
|
+
n("div", ne, [
|
|
116
|
+
i(u, {
|
|
117
|
+
modelValue: t(c).searchKey,
|
|
118
|
+
"onUpdate:modelValue": a[1] || (a[1] = (o) => t(c).searchKey = o),
|
|
119
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
120
|
+
placeholder: t(s)("connect.campaign.common.search"),
|
|
121
|
+
collapsible: ""
|
|
122
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
123
|
+
t(m).campaigns.broadcast && t(m).campaigns.broadcast.length > 0 ? (l(), y(b, { key: 0 }, [
|
|
124
|
+
n("div", se, [
|
|
125
|
+
n("div", ce, [
|
|
126
|
+
i(te, {
|
|
127
|
+
modelValue: t(c).location,
|
|
128
|
+
"onUpdate:modelValue": a[2] || (a[2] = (o) => t(c).location = o),
|
|
129
|
+
label: `${t(s)("connect.campaign.common.location")}: `,
|
|
130
|
+
"show-item-label": !0,
|
|
131
|
+
icon: "storefront",
|
|
132
|
+
placement: "bottom-start",
|
|
133
|
+
items: t(R).locationItems
|
|
134
|
+
}, null, 8, ["modelValue", "label", "items"])
|
|
135
|
+
]),
|
|
136
|
+
i(u, {
|
|
137
|
+
modelValue: t(c).searchKey,
|
|
138
|
+
"onUpdate:modelValue": a[3] || (a[3] = (o) => t(c).searchKey = o),
|
|
139
|
+
class: "xs:hidden",
|
|
140
|
+
placeholder: "search",
|
|
141
|
+
collapsible: ""
|
|
142
|
+
}, null, 8, ["modelValue"])
|
|
143
|
+
]),
|
|
144
|
+
i(O, {
|
|
145
|
+
class: "xs:hidden",
|
|
146
|
+
"row-data": t(f),
|
|
147
|
+
"column-defs": I,
|
|
148
|
+
"search-value": t(c).searchKey,
|
|
149
|
+
"column-filter": [],
|
|
150
|
+
onRowClick: a[4] || (a[4] = (o) => g(o.original)),
|
|
151
|
+
"hide-footer": !0
|
|
152
|
+
}, null, 8, ["row-data", "search-value"]),
|
|
153
|
+
i(P, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
154
|
+
default: v(() => [
|
|
155
|
+
(l(!0), y(b, null, E(t(f).filter(
|
|
156
|
+
(o) => o.name.toLowerCase().includes(t(c).searchKey.toLowerCase())
|
|
157
|
+
), (o) => (l(), w($, {
|
|
158
|
+
key: o._id.toString(),
|
|
159
|
+
onClick: (k) => g(o),
|
|
160
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
161
|
+
}, {
|
|
162
|
+
default: v(() => [
|
|
163
|
+
n("div", ie, [
|
|
164
|
+
n("div", re, [
|
|
165
|
+
(l(), w(H(t(B)(o)))),
|
|
166
|
+
n("div", le, d(o.currentReceive ?? 0) + " sent ", 1)
|
|
167
|
+
]),
|
|
168
|
+
n("div", me, [
|
|
169
|
+
n("div", de, d(o.name), 1),
|
|
170
|
+
n("div", pe, d(t(A)(o)), 1)
|
|
171
|
+
])
|
|
172
|
+
]),
|
|
173
|
+
i(F, {
|
|
174
|
+
icon: "delete",
|
|
175
|
+
"icon-color": "neutral-gray-400",
|
|
176
|
+
variant: "tertiary",
|
|
177
|
+
onClick: (k) => (k.stopPropagation(), S(o))
|
|
178
|
+
}, null, 8, ["onClick"])
|
|
179
|
+
]),
|
|
180
|
+
_: 2
|
|
181
|
+
}, 1032, ["onClick"]))), 128))
|
|
182
|
+
]),
|
|
183
|
+
_: 1
|
|
184
|
+
}),
|
|
185
|
+
t(f).length == 0 ? (l(), y("div", ue, [
|
|
186
|
+
n("div", fe, d(t(s)("connect.campaign.common.noResults")), 1)
|
|
187
|
+
])) : q("", !0)
|
|
188
|
+
], 64)) : (l(), w(M, {
|
|
189
|
+
key: 1,
|
|
190
|
+
variant: "outlined",
|
|
191
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
192
|
+
}, {
|
|
193
|
+
default: v(() => [
|
|
194
|
+
a[6] || (a[6] = n("img", {
|
|
195
|
+
src: G,
|
|
196
|
+
class: "aspect-square w-[150px]"
|
|
197
|
+
}, null, -1)),
|
|
198
|
+
n("div", ge, [
|
|
199
|
+
n("div", ye, d(t(s)("connect.campaign.broadcast.create.title")), 1),
|
|
200
|
+
n("div", _e, d(t(s)("connect.campaign.broadcast.create.description")), 1)
|
|
201
|
+
]),
|
|
202
|
+
i(F, {
|
|
203
|
+
variant: "primary",
|
|
204
|
+
label: t(s)("connect.campaign.broadcast.create.button"),
|
|
205
|
+
icon: "add",
|
|
206
|
+
onClick: a[5] || (a[5] = (o) => g())
|
|
207
|
+
}, null, 8, ["label"])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
})),
|
|
211
|
+
i(ae, {
|
|
212
|
+
ref_key: "sheetRef",
|
|
213
|
+
ref: C,
|
|
214
|
+
"onSubmit:modelValue": K
|
|
215
|
+
}, null, 512)
|
|
216
|
+
])
|
|
217
|
+
], 64);
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
export {
|
|
222
|
+
Re as default
|
|
223
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { R as RuleOperator, _ } from "./index-
|
|
2
|
-
import { i as isRuleGroup } from "./rule-builder-
|
|
1
|
+
import { R as RuleOperator, _ } from "./index-DYDhH9bi.js";
|
|
2
|
+
import { i as isRuleGroup } from "./rule-builder-DJ-acvVD.js";
|
|
3
3
|
import { defineComponent, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createElementBlock, Fragment, renderList, createVNode, toDisplayString } from "vue";
|
|
4
4
|
import { useDialog } from "@feedmepos/ui-library";
|
|
5
|
-
import "./index-
|
|
6
|
-
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./index-
|
|
5
|
+
import "./index-CZKYIefW.js";
|
|
6
|
+
import { a as F_RUNNABLE_CAMPAIGN_TYPE } from "./index-DCixRRvz.js";
|
|
7
|
+
import "./index-Di-kWSmf.js";
|
|
8
|
+
import "./index-C_0IFnwi.js";
|
|
9
|
+
import "./index-HoacsZDk.js";
|
|
10
|
+
import "./index-DFgt4-VW.js";
|
|
11
11
|
function validateRule(data, r, date) {
|
|
12
12
|
const rules = new RuleOperator(date ?? /* @__PURE__ */ new Date());
|
|
13
13
|
function meetConditions(e) {
|
|
@@ -39,10 +39,7 @@ function validateRule(data, r, date) {
|
|
|
39
39
|
}
|
|
40
40
|
return isRuleGroup(r) ? evaluateRuleResult(getRuleResults(r), r.logic) : meetConditions(r);
|
|
41
41
|
}
|
|
42
|
-
const _hoisted_1 =
|
|
43
|
-
/* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
|
|
44
|
-
/* @__PURE__ */ createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
|
|
45
|
-
], -1), _hoisted_2 = { class: "flex flex-col h-full space-y-24" }, _hoisted_3 = { class: "fm-typo-en-title-sm-600" }, _hoisted_4 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
|
+
const _hoisted_1 = { class: "flex flex-col h-full space-y-24" }, _hoisted_2 = { class: "fm-typo-en-title-sm-600" }, _hoisted_3 = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, _sfc_main = /* @__PURE__ */ defineComponent({
|
|
46
43
|
__name: "CampaignTypeDialog",
|
|
47
44
|
props: {
|
|
48
45
|
onSelect: {
|
|
@@ -86,21 +83,24 @@ const _hoisted_1 = /* @__PURE__ */ createElementVNode("div", { class: "" }, [
|
|
|
86
83
|
function l(i) {
|
|
87
84
|
n.close(), o.onSelect(i);
|
|
88
85
|
}
|
|
89
|
-
return (i,
|
|
90
|
-
const
|
|
91
|
-
return openBlock(), createBlock(
|
|
86
|
+
return (i, a) => {
|
|
87
|
+
const c = resolveComponent("FmCard");
|
|
88
|
+
return openBlock(), createBlock(c, { class: "p-24 space-y-16" }, {
|
|
92
89
|
default: withCtx(() => [
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
(
|
|
90
|
+
a[0] || (a[0] = createElementVNode("div", { class: "" }, [
|
|
91
|
+
createElementVNode("div", { class: "fm-typo-en-title-sm-800" }, "Add benefit"),
|
|
92
|
+
createElementVNode("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " Select the benefit type that you want to reward the selected tier. ")
|
|
93
|
+
], -1)),
|
|
94
|
+
createElementVNode("div", _hoisted_1, [
|
|
95
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(t, (s) => createVNode(c, {
|
|
96
96
|
variant: "outlined",
|
|
97
97
|
key: s.value,
|
|
98
98
|
onClick: (u) => l(s.value),
|
|
99
99
|
class: "p-16 space-y-8 cursor-pointer"
|
|
100
100
|
}, {
|
|
101
101
|
default: withCtx(() => [
|
|
102
|
-
createElementVNode("div",
|
|
103
|
-
createElementVNode("div",
|
|
102
|
+
createElementVNode("div", _hoisted_2, toDisplayString(s.title), 1),
|
|
103
|
+
createElementVNode("div", _hoisted_3, toDisplayString(s.description), 1)
|
|
104
104
|
]),
|
|
105
105
|
_: 2
|
|
106
106
|
}, 1032, ["onClick"])), 64))
|