@feedmepos/mf-connect 0.1.38-beta.61 → 0.1.38-beta.63
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-CM7mh-iO.js → Analytic-99208ZGh.js} +14 -14
- package/dist/{App-CeCzzsDu.js → App-BkTi1rTp.js} +7 -7
- package/dist/{AuditLogs-VWx8DFKA.js → AuditLogs-BqKgDkGp.js} +9 -9
- package/dist/{Bin-vUuol_I9.js → Bin-C_vWkAOc.js} +8 -8
- package/dist/Broadcast-_s9fmcsY.js +267 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CV-zhJ15.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CgDMf3Yl.js} +6 -6
- package/dist/{Card-CeIeGET1.js → Card-RfSe4_GI.js} +17 -17
- package/dist/{Collections-CF_OcAL3.js → Collections-DgWI87e9.js} +7 -7
- package/dist/Credit-DBy_Xcpq.js +261 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-D5T444y0.js} +203 -199
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BZfchHlT.js → EffectSheet.vue_vue_type_style_index_0_lang-BwSXXdG-.js} +6 -6
- package/dist/Experience-DBg5cZxJ.js +260 -0
- package/dist/{FileSaver.min-lgg_oBvT.js → FileSaver.min-Bzi1BTgf.js} +1 -1
- package/dist/Game-CSilatA5.js +331 -0
- package/dist/{GenerateMaterial-B5A7mx2y.js → GenerateMaterial-7DLj60E8.js} +6 -6
- package/dist/{Grab-BgiMqwvj.js → Grab-CM0RcU3-.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DZ8DHrQ_.js → ImageInput.vue_vue_type_script_setup_true_lang-D3lV7JVV.js} +1 -1
- package/dist/{Index-B85ops8K.js → Index-DIpMb8rL.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-B5rIjxYd.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D6L3PiGD.js} +1 -1
- package/dist/{MainLayout-CXGVkD-W.js → MainLayout-C0Bq_pRh.js} +1 -1
- package/dist/{Marketing-Bnijl7lA.js → Marketing-CiOCRSE8.js} +4 -4
- package/dist/{MarketingMaterialEdit-BlUKwSoP.js → MarketingMaterialEdit-BHJPku7e.js} +4 -4
- package/dist/{Member-sT853g51.js → Member-Blcc8M5S.js} +11 -11
- package/dist/{MemberList-DYT5_fSP.js → MemberList--Ua0eKo0.js} +25 -25
- package/dist/{MemberTransactions-Cqce5ebe.js → MemberTransactions-C0_OArai.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Dq0Hswj8.js → MessageInput.vue_vue_type_script_setup_true_lang-CO8MuZju.js} +9834 -9724
- package/dist/Mission-Dp7QTUdu.js +335 -0
- package/dist/{Overview-B0rwrHR1.js → Overview-B-puEtTe.js} +18 -18
- package/dist/Point-BMUeLRXE.js +263 -0
- package/dist/Promotion-CZjW5Eny.js +397 -0
- package/dist/{Queue-SVqRUlD_.js → Queue-CZ8a1tcg.js} +10 -10
- package/dist/{Record-BTjg4ihy.js → Record-BJXOqe51.js} +9 -9
- package/dist/{Reward-DW58VMRO.js → Reward-CYaP48K9.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-s1RI55Rc.js → RewardGroup.vue_vue_type_script_setup_true_lang-Bvq4GrL1.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Os17lXBX.js → RuleGroup.vue_vue_type_script_setup_true_lang-DnfvXZOL.js} +14 -14
- package/dist/{Segment-Dny8pxP1.js → Segment-D4vjzSgr.js} +24 -24
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Czx7rqiq.js → SelectItems.vue_vue_type_script_setup_true_lang-iDaC99DI.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-mkt1o9sO.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CO0fgI3K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-UHTvMbYY.js} +4 -4
- package/dist/{Setting-CjcnxK34.js → Setting-BxTVlSNI.js} +13 -13
- package/dist/{SettingAdvertisements-CIyDF4C8.js → SettingAdvertisements-DvuFXOGs.js} +11 -11
- package/dist/{Store-B8k5YVqU.js → Store-xF8dYQbN.js} +20 -20
- package/dist/{StoreRewards-BW08rwpL.js → StoreRewards-BxW_FxY3.js} +14 -14
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BfFSfE2H.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DvPC3YQN.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CZkKjUNQ.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CDgL0WOA.js} +1 -1
- package/dist/{Tier-DKzu4tYw.js → Tier-C73TRPVo.js} +23 -23
- package/dist/{Title-BK-TXatJ.js → Title-DD4gP_Kc.js} +20 -20
- package/dist/{Transaction-Duayg1jd.js → Transaction-BGheiJ8F.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BAR9h1TV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-ne1fn7b7.js} +6 -6
- package/dist/{Voucher-BEVAkNeJ.js → Voucher-CRatGWk7.js} +164 -142
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DvFy9Z6X.js → VoucherEditor.vue_vue_type_script_setup_true_lang-2_F9hEkK.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CU_Sx2PM.js → ZodTextField.vue_vue_type_script_setup_true_lang-DNEs_60Z.js} +2 -2
- package/dist/{app-IvbII0ql.js → app-UaX9LGGa.js} +7966 -7880
- package/dist/app.js +1 -1
- package/dist/{business-BFIwFfkq.js → business-bUX6raMw.js} +1 -1
- package/dist/{campaign-RuIwxc4y.js → campaign-BwqSJn1x.js} +8 -8
- package/dist/{campaign-w9j4I4jn.js → campaign-DUDuTel5.js} +2 -2
- package/dist/{campaign.enum-IHLsfdik.js → campaign.enum-1k6333ca.js} +1 -1
- package/dist/{campaign.fn-B_P1MkRV.js → campaign.fn-CgJi24jv.js} +31 -31
- package/dist/{collectible.enum-CUgSjO08.js → collectible.enum-DkQ5IEM4.js} +1 -1
- package/dist/{collection.fn-CrfnNb41.js → collection.fn-Cc4UF4PF.js} +2 -2
- package/dist/{dto-jwO_sX9I.js → dto-BauGrz7j.js} +4 -4
- package/dist/duplicateCampaign-C1zAMcB8.js +51 -0
- package/dist/{effect--0g8PNyt.js → effect-BzcguSGr.js} +1 -1
- package/dist/{email-addresses-HtsxvXw9.js → email-addresses-BxvYeGJM.js} +2 -2
- package/dist/{export-CFEwMRmd.js → export-CtEjDYVF.js} +2 -2
- package/dist/{helper-CCfb24PO.js → helper-B9MQjEoz.js} +1 -1
- package/dist/{index-BZEM0T2A.js → index-BhKOx9rm.js} +1 -1
- package/dist/{index-Bflu4Rft.js → index-Bx_lUMxi.js} +3 -3
- package/dist/{index-wzSeRJAd.js → index-CJIGs8yP.js} +1 -1
- package/dist/{index-CkuPY85X.js → index-COST516f.js} +1 -1
- package/dist/{index-BR3UbZ0F.js → index-CR8jJQP8.js} +1 -1
- package/dist/{index-CZPcwcUo.js → index-CRGgyR29.js} +3 -3
- package/dist/{index-DpjYgKTN.js → index-Cr9kGG1v.js} +1 -1
- package/dist/{index-CppLPpqB.js → index-Cvcgqzy5.js} +3 -3
- package/dist/{index-DDYH-IEX.js → index-DJqWLQvn.js} +1 -1
- package/dist/{index-CR3f3BXQ.js → index-DNrDjbLS.js} +1023 -1023
- package/dist/{index-B-AMMFfT.js → index-DYDOXl_b.js} +4 -4
- package/dist/{index-DdZdHioZ.js → index-hOEO4SV6.js} +6 -6
- package/dist/{index-Dic_WcAL.js → index-lbAEZ5CZ.js} +1 -1
- package/dist/{index.esm2017-CUnjzfU-.js → index.esm2017-6u5qxmWE.js} +1 -1
- package/dist/{loading-CivgDw5C.js → loading-Cpe50hSj.js} +2 -2
- package/dist/{lodash-BSbv_9TG.js → lodash-Bdhnyywe.js} +1 -1
- package/dist/{membership-j2w1YUO-.js → membership-C_VLzMwg.js} +3 -3
- package/dist/{money-DL-x8hiT.js → money-C2cELkXt.js} +1 -1
- package/dist/{number-D1yoFGEr.js → number-BFQi0hyw.js} +1 -1
- package/dist/objectid-WFNy_Dkj.js +145 -0
- package/dist/{plugins-P-V4XWmW.js → plugins-CTcRVNU6.js} +3 -3
- package/dist/{reward-BqMlBQRu.js → reward-zY_9dHpb.js} +1 -1
- package/dist/{rule-CztsLdki.js → rule-UZYsfn59.js} +3 -3
- package/dist/{rule-builder-DANv7Rmz.js → rule-builder-BW49BaXF.js} +1 -1
- package/dist/{template-Dbz3FhHK.js → template-CjZH_5cu.js} +6 -6
- package/dist/{timezone-BgVqObBq.js → timezone-CQrMBJum.js} +2 -2
- package/dist/{trigger-CbriUibd.js → trigger-BHqKZjrT.js} +5 -5
- package/dist/{usePagination-DtNK7W0U.js → usePagination-HabuQYCy.js} +1 -1
- package/dist/{user-CVapqHfr.js → user-YZUgk9lA.js} +1 -1
- package/dist/{vue-i18n-tpDAnnmD.js → vue-i18n-C1KlZBjR.js} +252 -252
- package/dist/{xlsx-EewcN2uY.js → xlsx-CMv5r9NR.js} +1 -1
- package/dist/{zod-D-wiCQRJ.js → zod-jH-8jgB1.js} +1 -1
- package/package.json +3 -3
- package/dist/Broadcast-6VXz4-IG.js +0 -233
- package/dist/Credit-BUqGOyp_.js +0 -226
- package/dist/Experience-BxiFH_uV.js +0 -225
- package/dist/Game-BzYW0LfY.js +0 -300
- package/dist/Mission-Q5_sGgrm.js +0 -304
- package/dist/Point-BGYFMvev.js +0 -228
- package/dist/Promotion-0acd63nA.js +0 -364
- package/dist/objectid-CHab6j3r.js +0 -145
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as B, ref as P, onMounted as Q, computed as q, resolveComponent as V, openBlock as d, createElementBlock as F, renderSlot as W, toDisplayString as b, createCommentVNode as f, createBlock as u, unref as e, isRef as G, createVNode as w, normalizeClass as Z, watch as X, withCtx as h, resolveDynamicComponent as R, Fragment as _, createElementVNode as C, createTextVNode as ee } from "vue";
|
|
2
|
-
import { z as te, h as le } from "./app-
|
|
3
|
-
import { Z as m } from "./zod-
|
|
4
|
-
import { g as oe, f as ae } from "./index-
|
|
5
|
-
import { u as T } from "./vue-i18n-
|
|
6
|
-
import { s as O } from "./effect
|
|
7
|
-
import { p as ne } from "./plugins-
|
|
2
|
+
import { z as te, h as le } from "./app-UaX9LGGa.js";
|
|
3
|
+
import { Z as m } from "./zod-jH-8jgB1.js";
|
|
4
|
+
import { g as oe, f as ae } from "./index-Bx_lUMxi.js";
|
|
5
|
+
import { u as T } from "./vue-i18n-C1KlZBjR.js";
|
|
6
|
+
import { s as O } from "./effect-BzcguSGr.js";
|
|
7
|
+
import { p as ne } from "./plugins-CTcRVNU6.js";
|
|
8
8
|
const ie = { class: "flex flex-col gap-8" }, de = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "fm-typo-en-body-lg-600"
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { defineComponent as M, ref as P, computed as H, onMounted as q, resolveComponent as m, openBlock as d, createElementBlock as w, Fragment as C, createVNode as s, unref as o, createElementVNode as n, withCtx as v, renderList as z, createBlock as b, resolveDynamicComponent as G, toDisplayString as _, h as k } from "vue";
|
|
2
|
+
import { _ as J } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as Q, components as B } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as W } from "./plugins-CTcRVNU6.js";
|
|
5
|
+
import { u as X } from "./loading-Cpe50hSj.js";
|
|
6
|
+
import { u as Y } from "./business-bUX6raMw.js";
|
|
7
|
+
import { u as Z } from "./campaign-DUDuTel5.js";
|
|
8
|
+
import { b as I, c as V, a as ee } from "./campaign-BwqSJn1x.js";
|
|
9
|
+
import { c as te, p as oe } from "./duplicateCampaign-C1zAMcB8.js";
|
|
10
|
+
import { u as ae } from "./vue-i18n-C1KlZBjR.js";
|
|
11
|
+
import { _ as ne } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
12
|
+
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D5T444y0.js";
|
|
13
|
+
import { u as ie } from "./template-CjZH_5cu.js";
|
|
14
|
+
import { c as u } from "./index-Cr9kGG1v.js";
|
|
15
|
+
const se = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, le = { class: "flex gap-8 overflow-x-auto" }, me = { class: "space-y-8" }, pe = { class: "flex w-full gap-4 items-center" }, de = { class: "space-y-4" }, ue = { class: "fm-typo-en-body-lg-600" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ge = { class: "flex items-center gap-8" }, ye = { class: "flex flex-col gap-16 text-center" }, _e = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = /* @__PURE__ */ M({
|
|
16
|
+
__name: "Experience",
|
|
17
|
+
setup(xe) {
|
|
18
|
+
const { t: r } = ae(), T = {
|
|
19
|
+
label: r("connect.program.common.actions.create", {
|
|
20
|
+
type: r("connect.program.experience.title").toLowerCase()
|
|
21
|
+
}),
|
|
22
|
+
value: "create",
|
|
23
|
+
isPrimary: !0,
|
|
24
|
+
prependIcon: "add"
|
|
25
|
+
}, N = ie("POINT", Q()), $ = Y(), p = Z(), { global: D, minor: F } = X, c = P({
|
|
26
|
+
searchKey: "",
|
|
27
|
+
location: []
|
|
28
|
+
});
|
|
29
|
+
function K(e) {
|
|
30
|
+
const t = c.value.location;
|
|
31
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
32
|
+
var i;
|
|
33
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(l);
|
|
34
|
+
}) : e.targetLocation.includes(t);
|
|
35
|
+
}
|
|
36
|
+
const f = H(
|
|
37
|
+
() => p.campaigns.experience.filter((e) => K(e))
|
|
38
|
+
), O = [
|
|
39
|
+
{
|
|
40
|
+
header: "Program title",
|
|
41
|
+
accessorFn: (e) => e.name
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
header: "Status",
|
|
45
|
+
accessorFn: (e) => ee(e),
|
|
46
|
+
cell(e) {
|
|
47
|
+
return I(e.row.original);
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
header: "Summary",
|
|
52
|
+
accessorFn: (e) => V(e)
|
|
53
|
+
//v.effect,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
header: "Actions",
|
|
57
|
+
cell(e) {
|
|
58
|
+
return k("div", { class: "flex items-center gap-8 justify-end" }, [
|
|
59
|
+
k(B.FmButton, {
|
|
60
|
+
variant: "tertiary",
|
|
61
|
+
icon: "content_copy",
|
|
62
|
+
iconColor: "neutral-gray-400",
|
|
63
|
+
onClick: async (t) => {
|
|
64
|
+
t.stopPropagation(), await L(e.row.original);
|
|
65
|
+
}
|
|
66
|
+
}),
|
|
67
|
+
k(B.FmButton, {
|
|
68
|
+
variant: "tertiary",
|
|
69
|
+
icon: "delete",
|
|
70
|
+
iconColor: "neutral-gray-400",
|
|
71
|
+
onClick: (t) => {
|
|
72
|
+
t.stopPropagation(), S(e.row.original);
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
]);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
], h = P();
|
|
79
|
+
async function S(e) {
|
|
80
|
+
await W.remove(`Are you sure you want to remove ${e.name}?`) && await F(
|
|
81
|
+
async () => {
|
|
82
|
+
await u.delete(e._id), await p.read("POINT");
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
message: `Removing ${e.name}`,
|
|
86
|
+
successMessage: `Removed ${e.name} successfully`
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
async function g(e) {
|
|
91
|
+
e ? await t() : N.open(async (l) => {
|
|
92
|
+
await t(l);
|
|
93
|
+
});
|
|
94
|
+
async function t(l) {
|
|
95
|
+
var i;
|
|
96
|
+
(i = h.value) == null || i.showSheet(
|
|
97
|
+
!0,
|
|
98
|
+
"POINT",
|
|
99
|
+
e ? await u.readById(e._id) : void 0,
|
|
100
|
+
l
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function L(e) {
|
|
105
|
+
var i;
|
|
106
|
+
if (!await te(e.name))
|
|
107
|
+
return;
|
|
108
|
+
const t = await u.readById(e._id), l = oe(t, {
|
|
109
|
+
keepCollectible: !0
|
|
110
|
+
});
|
|
111
|
+
(i = h.value) == null || i.showSheet(
|
|
112
|
+
!0,
|
|
113
|
+
"POINT",
|
|
114
|
+
l,
|
|
115
|
+
t.template
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
async function A(e) {
|
|
119
|
+
await F(
|
|
120
|
+
async () => {
|
|
121
|
+
e.campaign._id ? await u.update(e.campaign._id, e) : await u.create(e), await p.read("POINT");
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
message: r("connect.program.common.update.updating", {
|
|
125
|
+
type: r("connect.program.experience.title")
|
|
126
|
+
}),
|
|
127
|
+
successMessage: r("connect.program.common.update.success", {
|
|
128
|
+
type: r("connect.program.experience.title"),
|
|
129
|
+
action: e.campaign._id ? "updated" : "created"
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
return q(async () => {
|
|
135
|
+
await D(async () => {
|
|
136
|
+
await p.read("POINT");
|
|
137
|
+
});
|
|
138
|
+
}), (e, t) => {
|
|
139
|
+
const l = m("FmPageHead"), i = m("FmSearch"), R = m("FmTable"), x = m("FmButton"), j = m("FmListItem"), E = m("FmList"), U = m("FmCard");
|
|
140
|
+
return d(), w(C, null, [
|
|
141
|
+
s(l, {
|
|
142
|
+
title: o(r)("connect.program.experience.title"),
|
|
143
|
+
actions: o(f).length > 0 ? [T] : [],
|
|
144
|
+
"onClick:action": t[0] || (t[0] = () => g())
|
|
145
|
+
}, null, 8, ["title", "actions"]),
|
|
146
|
+
n("div", se, [
|
|
147
|
+
s(i, {
|
|
148
|
+
modelValue: o(c).searchKey,
|
|
149
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(c).searchKey = a),
|
|
150
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
151
|
+
placeholder: o(r)("connect.program.common.search"),
|
|
152
|
+
collapsible: ""
|
|
153
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
154
|
+
o(p).campaigns.experience && o(p).campaigns.experience.length > 0 ? (d(), w(C, { key: 0 }, [
|
|
155
|
+
n("div", ce, [
|
|
156
|
+
n("div", le, [
|
|
157
|
+
s(ne, {
|
|
158
|
+
label: `${o(r)("connect.common.location")}: `,
|
|
159
|
+
"right-icon": "keyboard_arrow_down",
|
|
160
|
+
modelValue: o(c).location,
|
|
161
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(c).location = a),
|
|
162
|
+
icon: "storefront",
|
|
163
|
+
"show-item-label": !0,
|
|
164
|
+
items: o($).locationOptions
|
|
165
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
166
|
+
]),
|
|
167
|
+
s(i, {
|
|
168
|
+
modelValue: o(c).searchKey,
|
|
169
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(c).searchKey = a),
|
|
170
|
+
class: "xs:hidden sm:hidden",
|
|
171
|
+
placeholder: "search",
|
|
172
|
+
collapsible: ""
|
|
173
|
+
}, null, 8, ["modelValue"])
|
|
174
|
+
]),
|
|
175
|
+
s(R, {
|
|
176
|
+
class: "xs:hidden sm:hidden",
|
|
177
|
+
"row-data": o(f),
|
|
178
|
+
"column-defs": O,
|
|
179
|
+
"search-value": o(c).searchKey,
|
|
180
|
+
"column-filter": [],
|
|
181
|
+
onRowClick: t[4] || (t[4] = (a) => g(a.original)),
|
|
182
|
+
"hide-footer": o(f).length < 10
|
|
183
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
184
|
+
s(E, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
185
|
+
default: v(() => [
|
|
186
|
+
(d(!0), w(C, null, z(o(f).filter(
|
|
187
|
+
(a) => a.name.toLowerCase().includes(o(c).searchKey.toLowerCase())
|
|
188
|
+
), (a) => (d(), b(j, {
|
|
189
|
+
key: a._id.toString(),
|
|
190
|
+
onClick: (y) => g(a),
|
|
191
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
192
|
+
}, {
|
|
193
|
+
default: v(() => [
|
|
194
|
+
n("div", me, [
|
|
195
|
+
n("div", pe, [
|
|
196
|
+
(d(), b(G(o(I)(a))))
|
|
197
|
+
]),
|
|
198
|
+
n("div", de, [
|
|
199
|
+
n("div", ue, _(a.name), 1),
|
|
200
|
+
n("div", fe, _(o(V)(a)), 1)
|
|
201
|
+
])
|
|
202
|
+
]),
|
|
203
|
+
n("div", ge, [
|
|
204
|
+
s(x, {
|
|
205
|
+
icon: "content_copy",
|
|
206
|
+
"icon-color": "neutral-gray-400",
|
|
207
|
+
variant: "tertiary",
|
|
208
|
+
onClick: async (y) => {
|
|
209
|
+
y.stopPropagation(), await L(a);
|
|
210
|
+
}
|
|
211
|
+
}, null, 8, ["onClick"]),
|
|
212
|
+
s(x, {
|
|
213
|
+
icon: "delete",
|
|
214
|
+
"icon-color": "neutral-gray-400",
|
|
215
|
+
variant: "tertiary",
|
|
216
|
+
onClick: (y) => (y.stopPropagation(), S(a))
|
|
217
|
+
}, null, 8, ["onClick"])
|
|
218
|
+
])
|
|
219
|
+
]),
|
|
220
|
+
_: 2
|
|
221
|
+
}, 1032, ["onClick"]))), 128))
|
|
222
|
+
]),
|
|
223
|
+
_: 1
|
|
224
|
+
})
|
|
225
|
+
], 64)) : (d(), b(U, {
|
|
226
|
+
key: 1,
|
|
227
|
+
variant: "outlined",
|
|
228
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
229
|
+
}, {
|
|
230
|
+
default: v(() => [
|
|
231
|
+
t[6] || (t[6] = n("img", {
|
|
232
|
+
src: J,
|
|
233
|
+
class: "aspect-square w-[150px]"
|
|
234
|
+
}, null, -1)),
|
|
235
|
+
n("div", ye, [
|
|
236
|
+
n("div", _e, _(o(r)("connect.program.experience.empty_state.title")), 1),
|
|
237
|
+
n("div", he, _(o(r)("connect.program.experience.empty_state.description")), 1)
|
|
238
|
+
]),
|
|
239
|
+
s(x, {
|
|
240
|
+
variant: "primary",
|
|
241
|
+
label: "Create experience program",
|
|
242
|
+
icon: "add",
|
|
243
|
+
onClick: t[5] || (t[5] = (a) => g())
|
|
244
|
+
})
|
|
245
|
+
]),
|
|
246
|
+
_: 1
|
|
247
|
+
})),
|
|
248
|
+
s(re, {
|
|
249
|
+
ref_key: "sheetRef",
|
|
250
|
+
ref: h,
|
|
251
|
+
"onSubmit:modelValue": A
|
|
252
|
+
}, null, 512)
|
|
253
|
+
])
|
|
254
|
+
], 64);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
export {
|
|
259
|
+
$e as default
|
|
260
|
+
};
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { defineComponent as W, ref as P, computed as J, onMounted as Q, resolveComponent as m, openBlock as f, createElementBlock as V, Fragment as A, createVNode as r, unref as o, withCtx as x, createElementVNode as n, toDisplayString as g, renderList as X, createBlock as L, resolveDynamicComponent as Y, h as c } from "vue";
|
|
2
|
+
import { _ as Z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as ee, components as y } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as te, p as oe } from "./plugins-CTcRVNU6.js";
|
|
5
|
+
import { u as ae } from "./loading-Cpe50hSj.js";
|
|
6
|
+
import { u as ne } from "./business-bUX6raMw.js";
|
|
7
|
+
import { u as ie } from "./campaign-DUDuTel5.js";
|
|
8
|
+
import { b as D, c as G, a as se } from "./campaign-BwqSJn1x.js";
|
|
9
|
+
import { c as re, p as le } from "./duplicateCampaign-C1zAMcB8.js";
|
|
10
|
+
import { _ as ce } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
+
import { _ as me } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-D5T444y0.js";
|
|
12
|
+
import { u as de } from "./template-CjZH_5cu.js";
|
|
13
|
+
import { u as ue } from "./vue-i18n-C1KlZBjR.js";
|
|
14
|
+
import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-mkt1o9sO.js";
|
|
15
|
+
import { c as _ } from "./index-Cr9kGG1v.js";
|
|
16
|
+
const fe = { class: "flex items-center" }, ge = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, ye = { class: "px-24 flex flex-col gap-y-16" }, _e = { class: "flex items-center justify-between w-full" }, he = { class: "flex gap-8 overflow-x-auto" }, we = { class: "space-y-8" }, Ce = { class: "flex w-full gap-4 items-center" }, xe = { class: "space-y-4" }, ve = { class: "fm-typo-en-body-lg-600" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fe = { class: "flex items-center gap-8" }, Se = { class: "flex flex-col gap-16 text-center" }, Pe = { class: "fm-typo-en-title-sm-800" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Oe = /* @__PURE__ */ W({
|
|
17
|
+
__name: "Game",
|
|
18
|
+
setup(Ae) {
|
|
19
|
+
const { t: d } = ue(), K = {
|
|
20
|
+
label: d("connect.program.common.actions.create", {
|
|
21
|
+
type: d("connect.program.game.title").toLowerCase()
|
|
22
|
+
}),
|
|
23
|
+
value: "create",
|
|
24
|
+
isPrimary: !0,
|
|
25
|
+
prependIcon: "add"
|
|
26
|
+
}, B = ee(), U = de("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
|
|
27
|
+
searchKey: "",
|
|
28
|
+
location: []
|
|
29
|
+
});
|
|
30
|
+
function T(e) {
|
|
31
|
+
const t = l.value.location;
|
|
32
|
+
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((s) => {
|
|
33
|
+
var i;
|
|
34
|
+
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
|
|
35
|
+
}) : e.targetLocation.includes(t);
|
|
36
|
+
}
|
|
37
|
+
const w = J(
|
|
38
|
+
() => u.campaigns.token.filter((e) => T(e))
|
|
39
|
+
), j = [
|
|
40
|
+
{
|
|
41
|
+
header: "Program title",
|
|
42
|
+
accessorKey: "name",
|
|
43
|
+
// accessorFn: (v) => v.name,
|
|
44
|
+
cell(e) {
|
|
45
|
+
return c("div", { class: "flex items-center justify-between gap-4" }, [
|
|
46
|
+
c("div", { class: "flex items-center" }, [
|
|
47
|
+
c(
|
|
48
|
+
y.FmTooltip,
|
|
49
|
+
{
|
|
50
|
+
content: e.row.original._id,
|
|
51
|
+
onClick: (t) => {
|
|
52
|
+
t.stopPropagation(), te(e.row.original._id);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
[
|
|
56
|
+
c(y.FmIcon, {
|
|
57
|
+
name: "info",
|
|
58
|
+
outline: !0,
|
|
59
|
+
size: "sm"
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
]),
|
|
64
|
+
c("div", { class: "flex-1" }, e.row.original.name)
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
header: "Status",
|
|
70
|
+
accessorFn: (e) => se(e),
|
|
71
|
+
cell(e) {
|
|
72
|
+
return D(e.row.original);
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
header: "Summary",
|
|
77
|
+
accessorFn: (e) => G(e)
|
|
78
|
+
//v.effect,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
header: "Token received",
|
|
82
|
+
accessorFn: (e) => {
|
|
83
|
+
var t;
|
|
84
|
+
return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
header: "Actions",
|
|
89
|
+
cell(e) {
|
|
90
|
+
return c("div", { class: "flex items-center gap-8" }, [
|
|
91
|
+
c(y.FmButton, {
|
|
92
|
+
variant: "tertiary",
|
|
93
|
+
icon: "content_copy",
|
|
94
|
+
iconColor: "neutral-gray-400",
|
|
95
|
+
onClick: async (t) => {
|
|
96
|
+
t.stopPropagation(), await M(e.row.original);
|
|
97
|
+
}
|
|
98
|
+
}),
|
|
99
|
+
c(y.FmButton, {
|
|
100
|
+
variant: "tertiary",
|
|
101
|
+
icon: "send",
|
|
102
|
+
iconColor: "neutral-gray-400",
|
|
103
|
+
onClick: (t) => {
|
|
104
|
+
t.stopPropagation(), N(e.row.original);
|
|
105
|
+
}
|
|
106
|
+
}),
|
|
107
|
+
c(y.FmButton, {
|
|
108
|
+
variant: "tertiary",
|
|
109
|
+
icon: "delete",
|
|
110
|
+
iconColor: "neutral-gray-400",
|
|
111
|
+
onClick: (t) => {
|
|
112
|
+
t.stopPropagation(), E(e.row.original);
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
], v = P(), $ = P();
|
|
119
|
+
async function E(e) {
|
|
120
|
+
await oe.remove(`Are you sure you want to remove ${e.name}?`) && await R(
|
|
121
|
+
async () => {
|
|
122
|
+
await _.delete(e._id), await u.read("GAME");
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
message: `Removing ${e.name}`,
|
|
126
|
+
successMessage: `Removed ${e.name} successfully`
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
async function C(e) {
|
|
131
|
+
e ? await t() : U.open(async (s) => {
|
|
132
|
+
await t(s);
|
|
133
|
+
});
|
|
134
|
+
async function t(s) {
|
|
135
|
+
var i;
|
|
136
|
+
(i = v.value) == null || i.showSheet(
|
|
137
|
+
!0,
|
|
138
|
+
"GAME",
|
|
139
|
+
e ? await _.readById(e._id) : void 0,
|
|
140
|
+
s
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
async function M(e) {
|
|
145
|
+
var i;
|
|
146
|
+
if (!await re(e.name))
|
|
147
|
+
return;
|
|
148
|
+
const t = await _.readById(e._id), s = le(t);
|
|
149
|
+
(i = v.value) == null || i.showSheet(
|
|
150
|
+
!0,
|
|
151
|
+
"GAME",
|
|
152
|
+
s,
|
|
153
|
+
t.template
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
async function H(e) {
|
|
157
|
+
var t, s, i;
|
|
158
|
+
e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
|
|
159
|
+
(p) => p.type === "VOUCHER"
|
|
160
|
+
)) && await new Promise((p) => {
|
|
161
|
+
B.open({
|
|
162
|
+
title: "Confirmation",
|
|
163
|
+
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
164
|
+
primaryActions: { text: "Update all", close: !0 },
|
|
165
|
+
secondaryActions: { text: "Update future only", close: !0 }
|
|
166
|
+
}).onPrimary(async () => {
|
|
167
|
+
e.updateCollections = !0, p();
|
|
168
|
+
}).onSecondary(async () => {
|
|
169
|
+
p();
|
|
170
|
+
});
|
|
171
|
+
}), await R(
|
|
172
|
+
async () => {
|
|
173
|
+
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("GAME");
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
177
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
function N(e) {
|
|
182
|
+
var t;
|
|
183
|
+
(t = $.value) == null || t.showSheet({
|
|
184
|
+
campaign: e
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return Q(async () => {
|
|
188
|
+
await I(async () => {
|
|
189
|
+
await u.read("GAME"), await h.readPremium();
|
|
190
|
+
});
|
|
191
|
+
}), (e, t) => {
|
|
192
|
+
const s = m("FmPill"), i = m("FmPageHead"), b = m("FmSearch"), p = m("FmTable"), k = m("FmButton"), O = m("FmListItem"), q = m("FmList"), z = m("FmCard");
|
|
193
|
+
return f(), V(A, null, [
|
|
194
|
+
r(i, {
|
|
195
|
+
actions: o(w).length > 0 && o(h).isPremium ? [K] : [],
|
|
196
|
+
"onClick:action": t[0] || (t[0] = () => C())
|
|
197
|
+
}, {
|
|
198
|
+
title: x(() => [
|
|
199
|
+
n("div", fe, [
|
|
200
|
+
n("span", ge, g(o(d)("connect.program.game.title")), 1),
|
|
201
|
+
r(s, { variant: "premium" })
|
|
202
|
+
])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, ["actions"]),
|
|
206
|
+
n("div", ye, [
|
|
207
|
+
r(b, {
|
|
208
|
+
modelValue: o(l).searchKey,
|
|
209
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
|
|
210
|
+
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
211
|
+
placeholder: "search",
|
|
212
|
+
collapsible: ""
|
|
213
|
+
}, null, 8, ["modelValue"]),
|
|
214
|
+
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
|
|
215
|
+
n("div", _e, [
|
|
216
|
+
n("div", he, [
|
|
217
|
+
r(ce, {
|
|
218
|
+
label: `${o(d)("connect.common.location")}: `,
|
|
219
|
+
"right-icon": "keyboard_arrow_down",
|
|
220
|
+
modelValue: o(l).location,
|
|
221
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
|
|
222
|
+
icon: "storefront",
|
|
223
|
+
"show-item-label": !0,
|
|
224
|
+
items: o(h).locationOptions
|
|
225
|
+
}, null, 8, ["label", "modelValue", "items"])
|
|
226
|
+
]),
|
|
227
|
+
r(b, {
|
|
228
|
+
modelValue: o(l).searchKey,
|
|
229
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
|
|
230
|
+
class: "xs:hidden sm:hidden",
|
|
231
|
+
placeholder: "search",
|
|
232
|
+
collapsible: ""
|
|
233
|
+
}, null, 8, ["modelValue"])
|
|
234
|
+
]),
|
|
235
|
+
r(p, {
|
|
236
|
+
class: "xs:hidden sm:hidden",
|
|
237
|
+
"row-data": o(w),
|
|
238
|
+
"column-defs": j,
|
|
239
|
+
"search-value": o(l).searchKey,
|
|
240
|
+
"column-filter": [],
|
|
241
|
+
onRowClick: t[4] || (t[4] = (a) => C(a.original)),
|
|
242
|
+
"hide-footer": o(w).length < 10
|
|
243
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
244
|
+
r(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
245
|
+
default: x(() => [
|
|
246
|
+
(f(!0), V(A, null, X(o(w).filter(
|
|
247
|
+
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
248
|
+
), (a) => (f(), L(O, {
|
|
249
|
+
key: a._id.toString(),
|
|
250
|
+
onClick: (F) => C(a),
|
|
251
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
252
|
+
}, {
|
|
253
|
+
default: x(() => {
|
|
254
|
+
var F;
|
|
255
|
+
return [
|
|
256
|
+
n("div", we, [
|
|
257
|
+
n("div", Ce, [
|
|
258
|
+
(f(), L(Y(o(D)(a))))
|
|
259
|
+
]),
|
|
260
|
+
n("div", xe, [
|
|
261
|
+
n("div", ve, g(a.name), 1),
|
|
262
|
+
n("div", be, g(o(G)(a)), 1)
|
|
263
|
+
]),
|
|
264
|
+
n("div", ke, g(o(d)("connect.program.game.token_received", {
|
|
265
|
+
count: ((F = a.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0
|
|
266
|
+
})), 1)
|
|
267
|
+
]),
|
|
268
|
+
n("div", Fe, [
|
|
269
|
+
r(k, {
|
|
270
|
+
icon: "content_copy",
|
|
271
|
+
"icon-color": "neutral-gray-400",
|
|
272
|
+
variant: "tertiary",
|
|
273
|
+
onClick: async (S) => {
|
|
274
|
+
S.stopPropagation(), await M(a);
|
|
275
|
+
}
|
|
276
|
+
}, null, 8, ["onClick"]),
|
|
277
|
+
r(k, {
|
|
278
|
+
icon: "delete",
|
|
279
|
+
"icon-color": "neutral-gray-400",
|
|
280
|
+
variant: "tertiary",
|
|
281
|
+
onClick: (S) => (S.stopPropagation(), E(a))
|
|
282
|
+
}, null, 8, ["onClick"])
|
|
283
|
+
])
|
|
284
|
+
];
|
|
285
|
+
}),
|
|
286
|
+
_: 2
|
|
287
|
+
}, 1032, ["onClick"]))), 128))
|
|
288
|
+
]),
|
|
289
|
+
_: 1
|
|
290
|
+
})
|
|
291
|
+
], 64)) : (f(), L(z, {
|
|
292
|
+
key: 1,
|
|
293
|
+
variant: "outlined",
|
|
294
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
295
|
+
}, {
|
|
296
|
+
default: x(() => [
|
|
297
|
+
t[6] || (t[6] = n("img", {
|
|
298
|
+
src: Z,
|
|
299
|
+
class: "aspect-square w-[150px]"
|
|
300
|
+
}, null, -1)),
|
|
301
|
+
n("div", Se, [
|
|
302
|
+
n("div", Pe, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
303
|
+
n("div", Ve, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
304
|
+
]),
|
|
305
|
+
r(k, {
|
|
306
|
+
variant: "primary",
|
|
307
|
+
label: "Create game program",
|
|
308
|
+
icon: "add",
|
|
309
|
+
disabled: !o(h).isPremium,
|
|
310
|
+
onClick: t[5] || (t[5] = (a) => C())
|
|
311
|
+
}, null, 8, ["disabled"])
|
|
312
|
+
]),
|
|
313
|
+
_: 1
|
|
314
|
+
})),
|
|
315
|
+
r(me, {
|
|
316
|
+
ref_key: "sheetRef",
|
|
317
|
+
ref: v,
|
|
318
|
+
"onSubmit:modelValue": H
|
|
319
|
+
}, null, 512),
|
|
320
|
+
r(pe, {
|
|
321
|
+
ref_key: "sendCollectionSheetRef",
|
|
322
|
+
ref: $
|
|
323
|
+
}, null, 512)
|
|
324
|
+
])
|
|
325
|
+
], 64);
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
export {
|
|
330
|
+
Oe as default
|
|
331
|
+
};
|