@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,58 @@
|
|
|
1
|
+
import { defineComponent as c, resolveComponent as r, openBlock as s, createElementBlock as n, Fragment as a, createElementVNode as e, createVNode as v, withCtx as p, renderList as u, normalizeClass as y, toDisplayString as l, createCommentVNode as _ } from "vue";
|
|
2
|
+
const b = { class: "bg-gradient-to-r from-orange-200 p-24 to-blue-200 via-pink-100 mx-[-24px]" }, g = { class: "grid grid-cols-6 xs:grid-cols-2 gap-4 divide-x xs:divide-x-0" }, x = { class: "fm-typo-body-md-400 fm-typo-en-body-md-400 mb-2 text-fm-color-typo-secondary" }, f = { class: "fm-typo-en-title-sm-800" }, w = /* @__PURE__ */ c({
|
|
3
|
+
__name: "MemberOverview",
|
|
4
|
+
setup(k) {
|
|
5
|
+
const m = [
|
|
6
|
+
{
|
|
7
|
+
key: "Total member",
|
|
8
|
+
value: 4
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
key: "New member",
|
|
12
|
+
value: 2
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
key: "Member average spend",
|
|
16
|
+
value: 100
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
key: "Average visit time",
|
|
20
|
+
value: 567
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: "Member growth",
|
|
24
|
+
value: "100%"
|
|
25
|
+
},
|
|
26
|
+
{ key: "Inactive member", value: 0 }
|
|
27
|
+
];
|
|
28
|
+
return (C, o) => {
|
|
29
|
+
const i = r("FmCard");
|
|
30
|
+
return r("FmButton"), s(), n(a, null, [
|
|
31
|
+
e("div", b, [
|
|
32
|
+
v(i, {
|
|
33
|
+
variant: "outlined",
|
|
34
|
+
class: "flex flex-col gap-16 p-16"
|
|
35
|
+
}, {
|
|
36
|
+
default: p(() => [
|
|
37
|
+
o[0] || (o[0] = e("div", { class: "fm-typo-en-body-lg-600" }, "Member overview", -1)),
|
|
38
|
+
e("div", g, [
|
|
39
|
+
(s(), n(a, null, u(m, (t, d) => e("div", {
|
|
40
|
+
key: t.key,
|
|
41
|
+
class: y(["px-8", { "xs:!border-r": d % 2 == 0 }])
|
|
42
|
+
}, [
|
|
43
|
+
e("div", x, l(t.key), 1),
|
|
44
|
+
e("div", f, l(t.value), 1)
|
|
45
|
+
], 2)), 64))
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
_: 1
|
|
49
|
+
})
|
|
50
|
+
]),
|
|
51
|
+
_("", !0)
|
|
52
|
+
], 64);
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
w as default
|
|
58
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as i, ref as p, resolveComponent as _, openBlock as l, createElementBlock as d, createVNode as f, unref as e, createBlock as r, createCommentVNode as v } from "vue";
|
|
2
|
-
import { _ as b, a as k } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as b, a as k } from "./StoreTransactions.vue_vue_type_script_setup_true_lang-BjnCRKGX.js";
|
|
3
3
|
import { useRouter as x } from "vue-router";
|
|
4
4
|
const C = { class: "flex flex-col gap-y-32 pb-24" }, N = /* @__PURE__ */ i({
|
|
5
5
|
__name: "MemberTransactions",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as
|
|
2
|
-
import { p as K } from "./loading-
|
|
3
|
-
import { r as W } from "./index-
|
|
4
|
-
import { _ as Z } from "./
|
|
5
|
-
import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as M, shallowRef as R, openBlock as p, createElementBlock as _, normalizeStyle as O, ref as V, resolveComponent as g, createBlock as E, unref as s, isRef as N, withCtx as x, createVNode as h, createElementVNode as v, createCommentVNode as B, withDirectives as D, vShow as A, computed as q, onMounted as J, Fragment as U, createTextVNode as P, toDisplayString as z, renderList as G } from "vue";
|
|
2
|
+
import { p as K } from "./loading-D_AN6p24.js";
|
|
3
|
+
import { r as W } from "./index-DCixRRvz.js";
|
|
4
|
+
import { _ as Z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
import { _ as Q, S as X } from "./LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js";
|
|
6
6
|
import { c as Y } from "./object-qECH92oz.js";
|
|
7
7
|
const ee = {
|
|
8
8
|
"user.name": {
|
|
@@ -40,8 +40,8 @@ let H = !1;
|
|
|
40
40
|
const ne = (e) => {
|
|
41
41
|
const n = document.querySelectorAll("script");
|
|
42
42
|
let a = !1;
|
|
43
|
-
return n.forEach((
|
|
44
|
-
|
|
43
|
+
return n.forEach((u) => {
|
|
44
|
+
u.src.includes(e) && (a = !0);
|
|
45
45
|
}), a;
|
|
46
46
|
}, ae = (e) => {
|
|
47
47
|
T.push(e);
|
|
@@ -136,14 +136,14 @@ const le = M({
|
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
}), se = ["id"];
|
|
139
|
-
function re(e, n, a,
|
|
140
|
-
return p(),
|
|
139
|
+
function re(e, n, a, u, y, r) {
|
|
140
|
+
return p(), _("div", {
|
|
141
141
|
id: e.id,
|
|
142
142
|
class: "unlayer-editor",
|
|
143
143
|
style: O({ minHeight: e.minHeight })
|
|
144
144
|
}, null, 12, se);
|
|
145
145
|
}
|
|
146
|
-
const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94"]]),
|
|
146
|
+
const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94"]]), ue = { class: "h-full flex flex-col" }, ce = { class: "flex items-center gap-8" }, me = /* @__PURE__ */ M({
|
|
147
147
|
__name: "EmailEditorSheet",
|
|
148
148
|
props: {
|
|
149
149
|
design: {
|
|
@@ -157,13 +157,13 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
157
157
|
},
|
|
158
158
|
emits: ["update:design"],
|
|
159
159
|
setup(e, { expose: n, emit: a }) {
|
|
160
|
-
const
|
|
160
|
+
const u = V(!1), y = V(null), r = V(!1), b = e, f = V({
|
|
161
161
|
html: "",
|
|
162
162
|
design: b.design,
|
|
163
163
|
title: b.title || ""
|
|
164
164
|
});
|
|
165
165
|
function o(l) {
|
|
166
|
-
|
|
166
|
+
u.value = l;
|
|
167
167
|
}
|
|
168
168
|
const t = a;
|
|
169
169
|
function m() {
|
|
@@ -178,22 +178,22 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
178
178
|
return n({
|
|
179
179
|
showSheet: o
|
|
180
180
|
}), (l, i) => {
|
|
181
|
-
const S = g("FmButton"), j = g("FmTextField"),
|
|
182
|
-
return p(), E(
|
|
183
|
-
modelValue: s(
|
|
184
|
-
"onUpdate:modelValue": i[4] || (i[4] = (d) => N(
|
|
181
|
+
const S = g("FmButton"), j = g("FmTextField"), w = g("FmSideSheet");
|
|
182
|
+
return p(), E(w, {
|
|
183
|
+
modelValue: s(u),
|
|
184
|
+
"onUpdate:modelValue": i[4] || (i[4] = (d) => N(u) ? u.value = d : null),
|
|
185
185
|
header: "Email editor",
|
|
186
186
|
"max-width": 1280
|
|
187
187
|
}, {
|
|
188
|
-
"side-sheet-button":
|
|
188
|
+
"side-sheet-button": x(() => [
|
|
189
189
|
h(S, {
|
|
190
190
|
label: "Edit email",
|
|
191
191
|
variant: "tertiary",
|
|
192
192
|
icon: "edit"
|
|
193
193
|
})
|
|
194
194
|
]),
|
|
195
|
-
default:
|
|
196
|
-
|
|
195
|
+
default: x(() => [
|
|
196
|
+
v("div", ue, [
|
|
197
197
|
s(r) ? B("", !0) : (p(), E(Q, {
|
|
198
198
|
key: 0,
|
|
199
199
|
class: "flex-1",
|
|
@@ -222,8 +222,8 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
222
222
|
])
|
|
223
223
|
])
|
|
224
224
|
]),
|
|
225
|
-
"side-sheet-footer":
|
|
226
|
-
|
|
225
|
+
"side-sheet-footer": x(() => [
|
|
226
|
+
v("div", ce, [
|
|
227
227
|
h(S, {
|
|
228
228
|
variant: "primary",
|
|
229
229
|
label: "Confirm",
|
|
@@ -240,7 +240,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
240
240
|
}, 8, ["modelValue"]);
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
}), pe = { class: "space-y-4" }, he = { class: "flex items-center gap-8 justify-between" }, fe =
|
|
243
|
+
}), pe = { class: "space-y-4" }, he = { class: "flex items-center gap-8 justify-between" }, fe = { class: "relative" }, ge = { class: "absolute bottom-[24px] right-[4px]" }, we = /* @__PURE__ */ M({
|
|
244
244
|
__name: "MessageInput",
|
|
245
245
|
props: {
|
|
246
246
|
allowEmail: {
|
|
@@ -281,7 +281,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
281
281
|
},
|
|
282
282
|
emits: ["update:model-value"],
|
|
283
283
|
setup(e, { emit: n }) {
|
|
284
|
-
const a = e,
|
|
284
|
+
const a = e, u = n;
|
|
285
285
|
function y() {
|
|
286
286
|
var m;
|
|
287
287
|
const o = {
|
|
@@ -306,7 +306,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
306
306
|
K.confirm(t, "Preview message", "OK");
|
|
307
307
|
}
|
|
308
308
|
function r(o, t = "SMS") {
|
|
309
|
-
|
|
309
|
+
u("update:model-value", {
|
|
310
310
|
channel: t,
|
|
311
311
|
content: t == "SMS" ? o : o.html,
|
|
312
312
|
design: t == "EMAIL" ? o.design : void 0,
|
|
@@ -349,30 +349,30 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
349
349
|
return `Character used: ${t} ≈ ${Math.ceil(t / 160)} SMS (Every 160 characters will be sent as 1 SMS)`;
|
|
350
350
|
});
|
|
351
351
|
return J(() => {
|
|
352
|
-
|
|
352
|
+
u("update:model-value", {
|
|
353
353
|
...a.modelValue,
|
|
354
354
|
variables: a.variables
|
|
355
355
|
}), a.modelValue || r("");
|
|
356
356
|
}), (o, t) => {
|
|
357
|
-
var
|
|
357
|
+
var w, d, F, $, k;
|
|
358
358
|
const m = g("FmButtonGroup"), l = g("FmButton"), i = g("FmTextarea"), S = g("FmMenuItem"), j = g("FmMenu");
|
|
359
|
-
return p(),
|
|
359
|
+
return p(), _("div", pe, [
|
|
360
360
|
e.allowEmail ? (p(), E(m, {
|
|
361
361
|
key: 0,
|
|
362
362
|
items: [{ label: "SMS" }, { label: "EMAIL" }],
|
|
363
|
-
"model-value": { label: (
|
|
364
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
363
|
+
"model-value": { label: (w = e.modelValue) == null ? void 0 : w.channel },
|
|
364
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => r("", c.label))
|
|
365
365
|
}, null, 8, ["model-value"])) : B("", !0),
|
|
366
366
|
((d = e.modelValue) == null ? void 0 : d.channel) == "EMAIL" ? (p(), E(me, {
|
|
367
367
|
key: 1,
|
|
368
368
|
design: (F = e.modelValue) == null ? void 0 : F.design,
|
|
369
369
|
title: (($ = e.modelValue) == null ? void 0 : $.title) || void 0,
|
|
370
|
-
"onUpdate:design": t[1] || (t[1] = (
|
|
371
|
-
r(
|
|
370
|
+
"onUpdate:design": t[1] || (t[1] = (c) => {
|
|
371
|
+
r(c, "EMAIL");
|
|
372
372
|
})
|
|
373
|
-
}, null, 8, ["design", "title"])) : (p(),
|
|
374
|
-
|
|
375
|
-
|
|
373
|
+
}, null, 8, ["design", "title"])) : (p(), _(U, { key: 2 }, [
|
|
374
|
+
v("div", he, [
|
|
375
|
+
t[2] || (t[2] = v("div", { class: "fm-typo-en-body-lg-400" }, "Add message", -1)),
|
|
376
376
|
h(l, {
|
|
377
377
|
icon: "visibility",
|
|
378
378
|
label: "Preview message",
|
|
@@ -380,7 +380,7 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
380
380
|
onClick: y
|
|
381
381
|
})
|
|
382
382
|
]),
|
|
383
|
-
|
|
383
|
+
v("div", fe, [
|
|
384
384
|
h(i, {
|
|
385
385
|
"model-value": (k = e.modelValue) == null ? void 0 : k.content,
|
|
386
386
|
"onUpdate:modelValue": r,
|
|
@@ -389,31 +389,31 @@ const de = /* @__PURE__ */ Z(le, [["render", re], ["__scopeId", "data-v-a9a2bb94
|
|
|
389
389
|
"helper-state": s(b) || "none",
|
|
390
390
|
"helper-text": s(f)
|
|
391
391
|
}, {
|
|
392
|
-
"helper-text":
|
|
392
|
+
"helper-text": x(() => [
|
|
393
393
|
P(z(s(f)), 1)
|
|
394
394
|
]),
|
|
395
395
|
_: 1
|
|
396
396
|
}, 8, ["model-value", "placeholder", "helper-state", "helper-text"]),
|
|
397
|
-
|
|
397
|
+
v("div", ge, [
|
|
398
398
|
h(j, { placement: "left-end" }, {
|
|
399
|
-
"menu-button":
|
|
399
|
+
"menu-button": x(() => [
|
|
400
400
|
h(l, {
|
|
401
401
|
icon: "add",
|
|
402
402
|
variant: "tertiary",
|
|
403
403
|
size: "md"
|
|
404
404
|
})
|
|
405
405
|
]),
|
|
406
|
-
default:
|
|
407
|
-
(p(!0),
|
|
408
|
-
(
|
|
409
|
-
), (
|
|
406
|
+
default: x(() => [
|
|
407
|
+
(p(!0), _(U, null, G(e.variables.filter(
|
|
408
|
+
(c) => e.triggerType == "SCHEDULE" ? !c.startsWith("transaction.") : !0
|
|
409
|
+
), (c) => {
|
|
410
410
|
var C;
|
|
411
411
|
return p(), E(S, {
|
|
412
|
-
key:
|
|
413
|
-
label: ((C = s(ee)[
|
|
414
|
-
onClick: (
|
|
412
|
+
key: c,
|
|
413
|
+
label: ((C = s(ee)[c]) == null ? void 0 : C.name) || c,
|
|
414
|
+
onClick: (ye) => {
|
|
415
415
|
var I;
|
|
416
|
-
return r(((I = e.modelValue) == null ? void 0 : I.content) + `{{${
|
|
416
|
+
return r(((I = e.modelValue) == null ? void 0 : I.content) + `{{${c}}}`);
|
|
417
417
|
}
|
|
418
418
|
}, null, 8, ["label", "onClick"]);
|
|
419
419
|
}), 128))
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { defineComponent as $, ref as L, computed as E, h as m, onMounted as A, resolveComponent as c, openBlock as d, createElementBlock as h, Fragment as w, createVNode as r, unref as t, createElementVNode as s, withCtx as b, renderList as H, createBlock as x, resolveDynamicComponent as q, toDisplayString as p } from "vue";
|
|
2
|
+
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as G, components as v } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as J, p as Q, u as W } from "./loading-D_AN6p24.js";
|
|
5
|
+
import { u as X } from "./business-dQh3AEot.js";
|
|
6
|
+
import { u as Y } from "./campaign-BOl8AgKA.js";
|
|
7
|
+
import { g as V, b as M } from "./dto-B8NfyVPG.js";
|
|
8
|
+
import { _ as Z } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
+
import { _ as ee } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D9VR3P2d.js";
|
|
10
|
+
import { u as oe } from "./template-clxvNnbF.js";
|
|
11
|
+
import { s as te } from "./index-CuvNtC_M.js";
|
|
12
|
+
import { u as ne } from "./vue-i18n-BxwiXSkp.js";
|
|
13
|
+
import { c as _ } from "./index-UTQHDUdW.js";
|
|
14
|
+
const ae = { class: "px-24 flex flex-col gap-y-16" }, se = { class: "flex items-center justify-between w-full" }, ie = { class: "flex gap-8 overflow-x-auto" }, re = { class: "space-y-8" }, ce = { 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 = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex flex-col gap-16 text-center" }, fe = { class: "fm-typo-en-title-sm-800" }, ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Be = /* @__PURE__ */ $({
|
|
15
|
+
__name: "Mission",
|
|
16
|
+
setup(_e) {
|
|
17
|
+
const { t: n } = ne(), B = {
|
|
18
|
+
label: n("connect.program.common.actions.create", {
|
|
19
|
+
type: n("connect.program.mission.title").toLowerCase()
|
|
20
|
+
}),
|
|
21
|
+
value: "create",
|
|
22
|
+
isPrimary: !0,
|
|
23
|
+
prependIcon: "add"
|
|
24
|
+
}, K = oe("MISSION", G()), N = X(), l = Y(), { global: P, minor: C } = W, i = L({
|
|
25
|
+
searchKey: "",
|
|
26
|
+
location: null
|
|
27
|
+
}), u = E(
|
|
28
|
+
() => l.campaigns.mission.filter(
|
|
29
|
+
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
30
|
+
)
|
|
31
|
+
), R = [
|
|
32
|
+
{
|
|
33
|
+
header: n("connect.program.common.table.title"),
|
|
34
|
+
accessorKey: "name",
|
|
35
|
+
// accessorFn: (v) => v.name,
|
|
36
|
+
cell(e) {
|
|
37
|
+
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
38
|
+
m("div", { class: "flex items-center" }, [
|
|
39
|
+
m(
|
|
40
|
+
v.FmTooltip,
|
|
41
|
+
{
|
|
42
|
+
content: e.row.original._id,
|
|
43
|
+
onClick: (o) => {
|
|
44
|
+
o.stopPropagation(), J(e.row.original._id);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[
|
|
48
|
+
m(v.FmIcon, {
|
|
49
|
+
name: "info",
|
|
50
|
+
outline: !0,
|
|
51
|
+
size: "sm"
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
)
|
|
55
|
+
]),
|
|
56
|
+
m("div", { class: "flex-1" }, e.row.original.name)
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
header: n("connect.campaign.mission.type"),
|
|
62
|
+
accessorFn: (e) => te(e.mission.type)
|
|
63
|
+
//v.effect,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
header: n("connect.program.common.table.status"),
|
|
67
|
+
cell(e) {
|
|
68
|
+
return V(e.row.original);
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
header: n("connect.program.common.table.summary"),
|
|
73
|
+
accessorFn: (e) => M(e)
|
|
74
|
+
//v.effect,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
header: n("connect.campaign.mission.received"),
|
|
78
|
+
accessorFn: (e) => {
|
|
79
|
+
var o;
|
|
80
|
+
return ((o = e == null ? void 0 : e.pf_collectible) == null ? void 0 : o.currentReceive) ?? 0;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
header: n("connect.program.common.table.actions"),
|
|
85
|
+
cell(e) {
|
|
86
|
+
return m(v.FmButton, {
|
|
87
|
+
variant: "tertiary",
|
|
88
|
+
icon: "delete",
|
|
89
|
+
iconColor: "neutral-gray-400",
|
|
90
|
+
onClick: (o) => {
|
|
91
|
+
o.stopPropagation(), F(e.row.original);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
], S = L();
|
|
97
|
+
async function F(e) {
|
|
98
|
+
await Q.remove(n("program.common.remove.confirm", { name: e.name })) && await C(
|
|
99
|
+
async () => {
|
|
100
|
+
await _.delete(e._id), await l.read("MISSION");
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
message: n("program.common.remove.removing", { name: e.name }),
|
|
104
|
+
successMessage: n("program.common.remove.removed", { name: e.name })
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
async function y(e) {
|
|
109
|
+
e ? await o() : K.open(async (g) => {
|
|
110
|
+
await o(g);
|
|
111
|
+
});
|
|
112
|
+
async function o(g) {
|
|
113
|
+
var f;
|
|
114
|
+
(f = S.value) == null || f.showSheet(
|
|
115
|
+
!0,
|
|
116
|
+
"MISSION",
|
|
117
|
+
e ? await _.readById(e._id) : void 0,
|
|
118
|
+
g
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async function T(e) {
|
|
123
|
+
await C(
|
|
124
|
+
async () => {
|
|
125
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await l.read("MISSION");
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
message: n(
|
|
129
|
+
e.campaign._id ? "program.common.update.updating" : "program.common.update.creating",
|
|
130
|
+
{ type: "Mission" }
|
|
131
|
+
),
|
|
132
|
+
successMessage: n("program.common.update.success", {
|
|
133
|
+
type: "Mission",
|
|
134
|
+
action: e.campaign._id ? "updated" : "created"
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
return A(async () => {
|
|
140
|
+
await P(async () => {
|
|
141
|
+
await l.read("MISSION"), console.log(u);
|
|
142
|
+
});
|
|
143
|
+
}), (e, o) => {
|
|
144
|
+
const g = c("FmPageHead"), f = c("FmSearch"), O = c("FmTable"), k = c("FmButton"), j = c("FmListItem"), D = c("FmList"), U = c("FmCard");
|
|
145
|
+
return d(), h(w, null, [
|
|
146
|
+
r(g, {
|
|
147
|
+
title: t(n)("connect.campaign.mission.title"),
|
|
148
|
+
actions: t(u).length > 0 ? [B] : [],
|
|
149
|
+
"onClick:action": o[0] || (o[0] = () => y())
|
|
150
|
+
}, null, 8, ["title", "actions"]),
|
|
151
|
+
s("div", ae, [
|
|
152
|
+
r(f, {
|
|
153
|
+
modelValue: t(i).searchKey,
|
|
154
|
+
"onUpdate:modelValue": o[1] || (o[1] = (a) => t(i).searchKey = a),
|
|
155
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
156
|
+
placeholder: t(n)("connect.program.common.search"),
|
|
157
|
+
collapsible: ""
|
|
158
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
159
|
+
t(l).campaigns.mission && t(l).campaigns.mission.length > 0 ? (d(), h(w, { key: 0 }, [
|
|
160
|
+
s("div", se, [
|
|
161
|
+
s("div", ie, [
|
|
162
|
+
r(Z, {
|
|
163
|
+
modelValue: t(i).location,
|
|
164
|
+
"onUpdate:modelValue": o[2] || (o[2] = (a) => t(i).location = a),
|
|
165
|
+
label: t(n)("connect.program.common.location"),
|
|
166
|
+
"show-item-label": !0,
|
|
167
|
+
icon: "storefront",
|
|
168
|
+
placement: "bottom-start",
|
|
169
|
+
items: t(N).locationItems
|
|
170
|
+
}, null, 8, ["modelValue", "label", "items"])
|
|
171
|
+
]),
|
|
172
|
+
r(f, {
|
|
173
|
+
modelValue: t(i).searchKey,
|
|
174
|
+
"onUpdate:modelValue": o[3] || (o[3] = (a) => t(i).searchKey = a),
|
|
175
|
+
class: "xs:hidden",
|
|
176
|
+
placeholder: "search",
|
|
177
|
+
collapsible: ""
|
|
178
|
+
}, null, 8, ["modelValue"])
|
|
179
|
+
]),
|
|
180
|
+
r(O, {
|
|
181
|
+
class: "xs:hidden",
|
|
182
|
+
"row-data": t(u),
|
|
183
|
+
"column-defs": R,
|
|
184
|
+
"search-value": t(i).searchKey,
|
|
185
|
+
"column-filter": [],
|
|
186
|
+
onRowClick: o[4] || (o[4] = (a) => y(a.original)),
|
|
187
|
+
"hide-footer": t(u).length < 10
|
|
188
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
189
|
+
r(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
190
|
+
default: b(() => [
|
|
191
|
+
(d(!0), h(w, null, H(t(u).filter(
|
|
192
|
+
(a) => a.name.toLowerCase().includes(t(i).searchKey.toLowerCase())
|
|
193
|
+
), (a) => (d(), x(j, {
|
|
194
|
+
key: a._id.toString(),
|
|
195
|
+
onClick: (I) => y(a),
|
|
196
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
197
|
+
}, {
|
|
198
|
+
default: b(() => [
|
|
199
|
+
s("div", re, [
|
|
200
|
+
s("div", ce, [
|
|
201
|
+
(d(), x(q(t(V)(a)))),
|
|
202
|
+
s("div", le, p(a.currentReceive ?? 0) + " used ", 1)
|
|
203
|
+
]),
|
|
204
|
+
s("div", me, [
|
|
205
|
+
s("div", de, p(a.name), 1),
|
|
206
|
+
s("div", pe, p(t(M)(a)), 1)
|
|
207
|
+
]),
|
|
208
|
+
s("div", ue, " Token received: " + p(a.currentReceive ?? 0), 1)
|
|
209
|
+
]),
|
|
210
|
+
r(k, {
|
|
211
|
+
icon: "delete",
|
|
212
|
+
"icon-color": "neutral-gray-400",
|
|
213
|
+
variant: "tertiary",
|
|
214
|
+
onClick: (I) => (I.stopPropagation(), F(a))
|
|
215
|
+
}, null, 8, ["onClick"])
|
|
216
|
+
]),
|
|
217
|
+
_: 2
|
|
218
|
+
}, 1032, ["onClick"]))), 128))
|
|
219
|
+
]),
|
|
220
|
+
_: 1
|
|
221
|
+
})
|
|
222
|
+
], 64)) : (d(), x(U, {
|
|
223
|
+
key: 1,
|
|
224
|
+
variant: "outlined",
|
|
225
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
226
|
+
}, {
|
|
227
|
+
default: b(() => [
|
|
228
|
+
o[6] || (o[6] = s("img", {
|
|
229
|
+
src: z,
|
|
230
|
+
class: "aspect-square w-[150px]"
|
|
231
|
+
}, null, -1)),
|
|
232
|
+
s("div", ge, [
|
|
233
|
+
s("div", fe, p(t(n)("connect.campaign.mission.createProgram")), 1),
|
|
234
|
+
s("div", ye, p(t(n)("connect.campaign.mission.description")), 1)
|
|
235
|
+
]),
|
|
236
|
+
r(k, {
|
|
237
|
+
variant: "primary",
|
|
238
|
+
label: t(n)("connect.program.common.actions.create", {
|
|
239
|
+
type: t(n)("connect.program.mission.title").toLowerCase()
|
|
240
|
+
}),
|
|
241
|
+
icon: "add",
|
|
242
|
+
onClick: o[5] || (o[5] = (a) => y())
|
|
243
|
+
}, null, 8, ["label"])
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
})),
|
|
247
|
+
r(ee, {
|
|
248
|
+
ref_key: "sheetRef",
|
|
249
|
+
ref: S,
|
|
250
|
+
"onSubmit:modelValue": T
|
|
251
|
+
}, null, 512)
|
|
252
|
+
])
|
|
253
|
+
], 64);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
export {
|
|
258
|
+
Be as default
|
|
259
|
+
};
|