@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,225 +0,0 @@
|
|
|
1
|
-
import { defineComponent as E, ref as S, computed as U, onMounted as j, resolveComponent as m, openBlock as p, createElementBlock as _, Fragment as h, createVNode as i, unref as o, createElementVNode as n, withCtx as x, renderList as M, createBlock as w, resolveDynamicComponent as H, toDisplayString as g, h as q } from "vue";
|
|
2
|
-
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as G, components as J } from "@feedmepos/ui-library";
|
|
4
|
-
import { p as Q } from "./plugins-P-V4XWmW.js";
|
|
5
|
-
import { u as W } from "./loading-CivgDw5C.js";
|
|
6
|
-
import { u as X } from "./business-BFIwFfkq.js";
|
|
7
|
-
import { u as Y } from "./campaign-w9j4I4jn.js";
|
|
8
|
-
import { b as L, c as V, a as Z } from "./campaign-RuIwxc4y.js";
|
|
9
|
-
import { u as ee } from "./vue-i18n-tpDAnnmD.js";
|
|
10
|
-
import { _ as te } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
-
import { _ as oe } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
|
|
12
|
-
import { u as ae } from "./template-Dbz3FhHK.js";
|
|
13
|
-
import { c as y } from "./index-DpjYgKTN.js";
|
|
14
|
-
const ne = { class: "px-24 flex flex-col gap-y-16" }, re = { class: "flex items-center justify-between w-full" }, se = { class: "flex gap-8 overflow-x-auto" }, ie = { class: "space-y-8" }, ce = { class: "flex w-full gap-4 items-center" }, le = { class: "space-y-4" }, me = { class: "fm-typo-en-body-lg-600" }, de = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "flex flex-col gap-16 text-center" }, ue = { class: "fm-typo-en-title-sm-800" }, fe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = /* @__PURE__ */ E({
|
|
15
|
-
__name: "Experience",
|
|
16
|
-
setup(ge) {
|
|
17
|
-
const { t: r } = ee(), P = {
|
|
18
|
-
label: r("connect.program.common.actions.create", {
|
|
19
|
-
type: r("connect.program.experience.title").toLowerCase()
|
|
20
|
-
}),
|
|
21
|
-
value: "create",
|
|
22
|
-
isPrimary: !0,
|
|
23
|
-
prependIcon: "add"
|
|
24
|
-
}, B = ae("POINT", G()), I = X(), d = Y(), { global: T, minor: b } = W, s = S({
|
|
25
|
-
searchKey: "",
|
|
26
|
-
location: []
|
|
27
|
-
});
|
|
28
|
-
function $(e) {
|
|
29
|
-
const t = s.value.location;
|
|
30
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((l) => {
|
|
31
|
-
var c;
|
|
32
|
-
return (c = e == null ? void 0 : e.targetLocation) == null ? void 0 : c.includes(l);
|
|
33
|
-
}) : e.targetLocation.includes(t);
|
|
34
|
-
}
|
|
35
|
-
const u = U(
|
|
36
|
-
() => d.campaigns.experience.filter((e) => $(e))
|
|
37
|
-
), K = [
|
|
38
|
-
{
|
|
39
|
-
header: "Program title",
|
|
40
|
-
accessorFn: (e) => e.name
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
header: "Status",
|
|
44
|
-
accessorFn: (e) => Z(e),
|
|
45
|
-
cell(e) {
|
|
46
|
-
return L(e.row.original);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: "Summary",
|
|
51
|
-
accessorFn: (e) => V(e)
|
|
52
|
-
//v.effect,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
header: "Actions",
|
|
56
|
-
cell(e) {
|
|
57
|
-
return q(J.FmButton, {
|
|
58
|
-
variant: "tertiary",
|
|
59
|
-
icon: "delete",
|
|
60
|
-
iconColor: "neutral-gray-400",
|
|
61
|
-
onClick: (t) => {
|
|
62
|
-
t.stopPropagation(), v(e.row.original);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
], C = S();
|
|
68
|
-
async function v(e) {
|
|
69
|
-
await Q.remove(`Are you sure you want to remove ${e.name}?`) && await b(
|
|
70
|
-
async () => {
|
|
71
|
-
await y.delete(e._id), await d.read("POINT");
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
message: `Removing ${e.name}`,
|
|
75
|
-
successMessage: `Removed ${e.name} successfully`
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
async function f(e) {
|
|
80
|
-
e ? await t() : B.open(async (l) => {
|
|
81
|
-
await t(l);
|
|
82
|
-
});
|
|
83
|
-
async function t(l) {
|
|
84
|
-
var c;
|
|
85
|
-
(c = C.value) == null || c.showSheet(
|
|
86
|
-
!0,
|
|
87
|
-
"POINT",
|
|
88
|
-
e ? await y.readById(e._id) : void 0,
|
|
89
|
-
l
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
async function N(e) {
|
|
94
|
-
await b(
|
|
95
|
-
async () => {
|
|
96
|
-
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await d.read("POINT");
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
message: r("connect.program.common.update.updating", {
|
|
100
|
-
type: r("connect.program.experience.title")
|
|
101
|
-
}),
|
|
102
|
-
successMessage: r("connect.program.common.update.success", {
|
|
103
|
-
type: r("connect.program.experience.title"),
|
|
104
|
-
action: e.campaign._id ? "updated" : "created"
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
return j(async () => {
|
|
110
|
-
await T(async () => {
|
|
111
|
-
await d.read("POINT");
|
|
112
|
-
});
|
|
113
|
-
}), (e, t) => {
|
|
114
|
-
const l = m("FmPageHead"), c = m("FmSearch"), A = m("FmTable"), F = m("FmButton"), O = m("FmListItem"), R = m("FmList"), D = m("FmCard");
|
|
115
|
-
return p(), _(h, null, [
|
|
116
|
-
i(l, {
|
|
117
|
-
title: o(r)("connect.program.experience.title"),
|
|
118
|
-
actions: o(u).length > 0 ? [P] : [],
|
|
119
|
-
"onClick:action": t[0] || (t[0] = () => f())
|
|
120
|
-
}, null, 8, ["title", "actions"]),
|
|
121
|
-
n("div", ne, [
|
|
122
|
-
i(c, {
|
|
123
|
-
modelValue: o(s).searchKey,
|
|
124
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(s).searchKey = a),
|
|
125
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
126
|
-
placeholder: o(r)("connect.program.common.search"),
|
|
127
|
-
collapsible: ""
|
|
128
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
129
|
-
o(d).campaigns.experience && o(d).campaigns.experience.length > 0 ? (p(), _(h, { key: 0 }, [
|
|
130
|
-
n("div", re, [
|
|
131
|
-
n("div", se, [
|
|
132
|
-
i(te, {
|
|
133
|
-
label: `${o(r)("connect.common.location")}: `,
|
|
134
|
-
"right-icon": "keyboard_arrow_down",
|
|
135
|
-
modelValue: o(s).location,
|
|
136
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(s).location = a),
|
|
137
|
-
icon: "storefront",
|
|
138
|
-
"show-item-label": !0,
|
|
139
|
-
items: o(I).locationOptions
|
|
140
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
141
|
-
]),
|
|
142
|
-
i(c, {
|
|
143
|
-
modelValue: o(s).searchKey,
|
|
144
|
-
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(s).searchKey = a),
|
|
145
|
-
class: "xs:hidden sm:hidden",
|
|
146
|
-
placeholder: "search",
|
|
147
|
-
collapsible: ""
|
|
148
|
-
}, null, 8, ["modelValue"])
|
|
149
|
-
]),
|
|
150
|
-
i(A, {
|
|
151
|
-
class: "xs:hidden sm:hidden",
|
|
152
|
-
"row-data": o(u),
|
|
153
|
-
"column-defs": K,
|
|
154
|
-
"search-value": o(s).searchKey,
|
|
155
|
-
"column-filter": [],
|
|
156
|
-
onRowClick: t[4] || (t[4] = (a) => f(a.original)),
|
|
157
|
-
"hide-footer": o(u).length < 10
|
|
158
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
159
|
-
i(R, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
160
|
-
default: x(() => [
|
|
161
|
-
(p(!0), _(h, null, M(o(u).filter(
|
|
162
|
-
(a) => a.name.toLowerCase().includes(o(s).searchKey.toLowerCase())
|
|
163
|
-
), (a) => (p(), w(O, {
|
|
164
|
-
key: a._id.toString(),
|
|
165
|
-
onClick: (k) => f(a),
|
|
166
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
167
|
-
}, {
|
|
168
|
-
default: x(() => [
|
|
169
|
-
n("div", ie, [
|
|
170
|
-
n("div", ce, [
|
|
171
|
-
(p(), w(H(o(L)(a))))
|
|
172
|
-
]),
|
|
173
|
-
n("div", le, [
|
|
174
|
-
n("div", me, g(a.name), 1),
|
|
175
|
-
n("div", de, g(o(V)(a)), 1)
|
|
176
|
-
])
|
|
177
|
-
]),
|
|
178
|
-
i(F, {
|
|
179
|
-
icon: "delete",
|
|
180
|
-
"icon-color": "neutral-gray-400",
|
|
181
|
-
variant: "tertiary",
|
|
182
|
-
onClick: (k) => (k.stopPropagation(), v(a))
|
|
183
|
-
}, null, 8, ["onClick"])
|
|
184
|
-
]),
|
|
185
|
-
_: 2
|
|
186
|
-
}, 1032, ["onClick"]))), 128))
|
|
187
|
-
]),
|
|
188
|
-
_: 1
|
|
189
|
-
})
|
|
190
|
-
], 64)) : (p(), w(D, {
|
|
191
|
-
key: 1,
|
|
192
|
-
variant: "outlined",
|
|
193
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
194
|
-
}, {
|
|
195
|
-
default: x(() => [
|
|
196
|
-
t[6] || (t[6] = n("img", {
|
|
197
|
-
src: z,
|
|
198
|
-
class: "aspect-square w-[150px]"
|
|
199
|
-
}, null, -1)),
|
|
200
|
-
n("div", pe, [
|
|
201
|
-
n("div", ue, g(o(r)("connect.program.experience.empty_state.title")), 1),
|
|
202
|
-
n("div", fe, g(o(r)("connect.program.experience.empty_state.description")), 1)
|
|
203
|
-
]),
|
|
204
|
-
i(F, {
|
|
205
|
-
variant: "primary",
|
|
206
|
-
label: "Create experience program",
|
|
207
|
-
icon: "add",
|
|
208
|
-
onClick: t[5] || (t[5] = (a) => f())
|
|
209
|
-
})
|
|
210
|
-
]),
|
|
211
|
-
_: 1
|
|
212
|
-
})),
|
|
213
|
-
i(oe, {
|
|
214
|
-
ref_key: "sheetRef",
|
|
215
|
-
ref: C,
|
|
216
|
-
"onSubmit:modelValue": N
|
|
217
|
-
}, null, 512)
|
|
218
|
-
])
|
|
219
|
-
], 64);
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
export {
|
|
224
|
-
Pe as default
|
|
225
|
-
};
|
package/dist/Game-BzYW0LfY.js
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, ref as k, computed as W, onMounted as J, resolveComponent as c, openBlock as f, createElementBlock as F, Fragment as S, createVNode as s, unref as o, withCtx as w, createElementVNode as n, toDisplayString as g, renderList as Q, createBlock as P, resolveDynamicComponent as X, h as m } from "vue";
|
|
2
|
-
import { _ as Y } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as Z, components as x } from "@feedmepos/ui-library";
|
|
4
|
-
import { a as ee, p as te } from "./plugins-P-V4XWmW.js";
|
|
5
|
-
import { u as oe } from "./loading-CivgDw5C.js";
|
|
6
|
-
import { u as ae } from "./business-BFIwFfkq.js";
|
|
7
|
-
import { u as ne } from "./campaign-w9j4I4jn.js";
|
|
8
|
-
import { b as E, c as K, a as se } from "./campaign-RuIwxc4y.js";
|
|
9
|
-
import { _ as ie } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
10
|
-
import { _ as re } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-0DMFuBoG.js";
|
|
11
|
-
import { u as le } from "./template-Dbz3FhHK.js";
|
|
12
|
-
import { u as ce } from "./vue-i18n-tpDAnnmD.js";
|
|
13
|
-
import { _ as me } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-EgVxUG_N.js";
|
|
14
|
-
import { c as C } from "./index-DpjYgKTN.js";
|
|
15
|
-
const de = { class: "flex items-center" }, ue = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, pe = { class: "px-24 flex flex-col gap-y-16" }, fe = { class: "flex items-center justify-between w-full" }, ge = { class: "flex gap-8 overflow-x-auto" }, ye = { class: "space-y-8" }, _e = { class: "flex w-full gap-4 items-center" }, he = { class: "space-y-4" }, we = { class: "fm-typo-en-body-lg-600" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ve = { class: "flex flex-col gap-16 text-center" }, be = { class: "fm-typo-en-title-sm-800" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ z({
|
|
16
|
-
__name: "Game",
|
|
17
|
-
setup(Fe) {
|
|
18
|
-
const { t: d } = ce(), M = {
|
|
19
|
-
label: d("connect.program.common.actions.create", {
|
|
20
|
-
type: d("connect.program.game.title").toLowerCase()
|
|
21
|
-
}),
|
|
22
|
-
value: "create",
|
|
23
|
-
isPrimary: !0,
|
|
24
|
-
prependIcon: "add"
|
|
25
|
-
}, V = Z(), U = le("GAME", V), y = ae(), u = ne(), { global: G, minor: L } = oe, l = k({
|
|
26
|
-
searchKey: "",
|
|
27
|
-
location: []
|
|
28
|
-
});
|
|
29
|
-
function T(e) {
|
|
30
|
-
const t = l.value.location;
|
|
31
|
-
return !t || t.length === 0 || !e.targetLocation ? !0 : Array.isArray(t) ? t.some((i) => {
|
|
32
|
-
var r;
|
|
33
|
-
return (r = e == null ? void 0 : e.targetLocation) == null ? void 0 : r.includes(i);
|
|
34
|
-
}) : e.targetLocation.includes(t);
|
|
35
|
-
}
|
|
36
|
-
const _ = W(
|
|
37
|
-
() => u.campaigns.token.filter((e) => T(e))
|
|
38
|
-
), I = [
|
|
39
|
-
{
|
|
40
|
-
header: "Program title",
|
|
41
|
-
accessorKey: "name",
|
|
42
|
-
// accessorFn: (v) => v.name,
|
|
43
|
-
cell(e) {
|
|
44
|
-
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
-
m("div", { class: "flex items-center" }, [
|
|
46
|
-
m(
|
|
47
|
-
x.FmTooltip,
|
|
48
|
-
{
|
|
49
|
-
content: e.row.original._id,
|
|
50
|
-
onClick: (t) => {
|
|
51
|
-
t.stopPropagation(), ee(e.row.original._id);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
[
|
|
55
|
-
m(x.FmIcon, {
|
|
56
|
-
name: "info",
|
|
57
|
-
outline: !0,
|
|
58
|
-
size: "sm"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
)
|
|
62
|
-
]),
|
|
63
|
-
m("div", { class: "flex-1" }, e.row.original.name)
|
|
64
|
-
]);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
header: "Status",
|
|
69
|
-
accessorFn: (e) => se(e),
|
|
70
|
-
cell(e) {
|
|
71
|
-
return E(e.row.original);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
header: "Summary",
|
|
76
|
-
accessorFn: (e) => K(e)
|
|
77
|
-
//v.effect,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
header: "Token received",
|
|
81
|
-
accessorFn: (e) => {
|
|
82
|
-
var t;
|
|
83
|
-
return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
header: "Actions",
|
|
88
|
-
cell(e) {
|
|
89
|
-
return m("div", { class: "flex items-center gap-8" }, [
|
|
90
|
-
m(x.FmButton, {
|
|
91
|
-
variant: "tertiary",
|
|
92
|
-
icon: "send",
|
|
93
|
-
iconColor: "neutral-gray-400",
|
|
94
|
-
onClick: (t) => {
|
|
95
|
-
t.stopPropagation(), j(e.row.original);
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
m(x.FmButton, {
|
|
99
|
-
variant: "tertiary",
|
|
100
|
-
icon: "delete",
|
|
101
|
-
iconColor: "neutral-gray-400",
|
|
102
|
-
onClick: (t) => {
|
|
103
|
-
t.stopPropagation(), B(e.row.original);
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
]);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
], A = k(), R = k();
|
|
110
|
-
async function B(e) {
|
|
111
|
-
await te.remove(`Are you sure you want to remove ${e.name}?`) && await L(
|
|
112
|
-
async () => {
|
|
113
|
-
await C.delete(e._id), await u.read("GAME");
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
message: `Removing ${e.name}`,
|
|
117
|
-
successMessage: `Removed ${e.name} successfully`
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
async function h(e) {
|
|
122
|
-
e ? await t() : U.open(async (i) => {
|
|
123
|
-
await t(i);
|
|
124
|
-
});
|
|
125
|
-
async function t(i) {
|
|
126
|
-
var r;
|
|
127
|
-
(r = A.value) == null || r.showSheet(
|
|
128
|
-
!0,
|
|
129
|
-
"GAME",
|
|
130
|
-
e ? await C.readById(e._id) : void 0,
|
|
131
|
-
i
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
async function D(e) {
|
|
136
|
-
var t, i, r;
|
|
137
|
-
e.campaign._id && ((r = (i = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : i.rewards) != null && r.some(
|
|
138
|
-
(p) => p.type === "VOUCHER"
|
|
139
|
-
)) && await new Promise((p) => {
|
|
140
|
-
V.open({
|
|
141
|
-
title: "Confirmation",
|
|
142
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
143
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
144
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
145
|
-
}).onPrimary(async () => {
|
|
146
|
-
e.updateCollections = !0, p();
|
|
147
|
-
}).onSecondary(async () => {
|
|
148
|
-
p();
|
|
149
|
-
});
|
|
150
|
-
}), await L(
|
|
151
|
-
async () => {
|
|
152
|
-
e.campaign._id ? await C.update(e.campaign._id, e) : await C.create(e), await u.read("GAME");
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
156
|
-
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
157
|
-
}
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
function j(e) {
|
|
161
|
-
var t;
|
|
162
|
-
(t = R.value) == null || t.showSheet({
|
|
163
|
-
campaign: e
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
return J(async () => {
|
|
167
|
-
await G(async () => {
|
|
168
|
-
await u.read("GAME"), await y.readPremium();
|
|
169
|
-
});
|
|
170
|
-
}), (e, t) => {
|
|
171
|
-
const i = c("FmPill"), r = c("FmPageHead"), v = c("FmSearch"), p = c("FmTable"), $ = c("FmButton"), H = c("FmListItem"), N = c("FmList"), O = c("FmCard");
|
|
172
|
-
return f(), F(S, null, [
|
|
173
|
-
s(r, {
|
|
174
|
-
actions: o(_).length > 0 && o(y).isPremium ? [M] : [],
|
|
175
|
-
"onClick:action": t[0] || (t[0] = () => h())
|
|
176
|
-
}, {
|
|
177
|
-
title: w(() => [
|
|
178
|
-
n("div", de, [
|
|
179
|
-
n("span", ue, g(o(d)("connect.program.game.title")), 1),
|
|
180
|
-
s(i, { variant: "premium" })
|
|
181
|
-
])
|
|
182
|
-
]),
|
|
183
|
-
_: 1
|
|
184
|
-
}, 8, ["actions"]),
|
|
185
|
-
n("div", pe, [
|
|
186
|
-
s(v, {
|
|
187
|
-
modelValue: o(l).searchKey,
|
|
188
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
|
|
189
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
190
|
-
placeholder: "search",
|
|
191
|
-
collapsible: ""
|
|
192
|
-
}, null, 8, ["modelValue"]),
|
|
193
|
-
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), F(S, { key: 0 }, [
|
|
194
|
-
n("div", fe, [
|
|
195
|
-
n("div", ge, [
|
|
196
|
-
s(ie, {
|
|
197
|
-
label: `${o(d)("connect.common.location")}: `,
|
|
198
|
-
"right-icon": "keyboard_arrow_down",
|
|
199
|
-
modelValue: o(l).location,
|
|
200
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
|
|
201
|
-
icon: "storefront",
|
|
202
|
-
"show-item-label": !0,
|
|
203
|
-
items: o(y).locationOptions
|
|
204
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
205
|
-
]),
|
|
206
|
-
s(v, {
|
|
207
|
-
modelValue: o(l).searchKey,
|
|
208
|
-
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
|
|
209
|
-
class: "xs:hidden sm:hidden",
|
|
210
|
-
placeholder: "search",
|
|
211
|
-
collapsible: ""
|
|
212
|
-
}, null, 8, ["modelValue"])
|
|
213
|
-
]),
|
|
214
|
-
s(p, {
|
|
215
|
-
class: "xs:hidden sm:hidden",
|
|
216
|
-
"row-data": o(_),
|
|
217
|
-
"column-defs": I,
|
|
218
|
-
"search-value": o(l).searchKey,
|
|
219
|
-
"column-filter": [],
|
|
220
|
-
onRowClick: t[4] || (t[4] = (a) => h(a.original)),
|
|
221
|
-
"hide-footer": o(_).length < 10
|
|
222
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
223
|
-
s(N, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
224
|
-
default: w(() => [
|
|
225
|
-
(f(!0), F(S, null, Q(o(_).filter(
|
|
226
|
-
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
227
|
-
), (a) => (f(), P(H, {
|
|
228
|
-
key: a._id.toString(),
|
|
229
|
-
onClick: (b) => h(a),
|
|
230
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
231
|
-
}, {
|
|
232
|
-
default: w(() => {
|
|
233
|
-
var b;
|
|
234
|
-
return [
|
|
235
|
-
n("div", ye, [
|
|
236
|
-
n("div", _e, [
|
|
237
|
-
(f(), P(X(o(E)(a))))
|
|
238
|
-
]),
|
|
239
|
-
n("div", he, [
|
|
240
|
-
n("div", we, g(a.name), 1),
|
|
241
|
-
n("div", xe, g(o(K)(a)), 1)
|
|
242
|
-
]),
|
|
243
|
-
n("div", Ce, g(o(d)("connect.program.game.token_received", {
|
|
244
|
-
count: ((b = e.pf_collectible) == null ? void 0 : b.currentReceive) ?? 0
|
|
245
|
-
})), 1)
|
|
246
|
-
]),
|
|
247
|
-
s($, {
|
|
248
|
-
icon: "delete",
|
|
249
|
-
"icon-color": "neutral-gray-400",
|
|
250
|
-
variant: "tertiary",
|
|
251
|
-
onClick: (q) => (q.stopPropagation(), B(a))
|
|
252
|
-
}, null, 8, ["onClick"])
|
|
253
|
-
];
|
|
254
|
-
}),
|
|
255
|
-
_: 2
|
|
256
|
-
}, 1032, ["onClick"]))), 128))
|
|
257
|
-
]),
|
|
258
|
-
_: 1
|
|
259
|
-
})
|
|
260
|
-
], 64)) : (f(), P(O, {
|
|
261
|
-
key: 1,
|
|
262
|
-
variant: "outlined",
|
|
263
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
264
|
-
}, {
|
|
265
|
-
default: w(() => [
|
|
266
|
-
t[6] || (t[6] = n("img", {
|
|
267
|
-
src: Y,
|
|
268
|
-
class: "aspect-square w-[150px]"
|
|
269
|
-
}, null, -1)),
|
|
270
|
-
n("div", ve, [
|
|
271
|
-
n("div", be, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
272
|
-
n("div", ke, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
273
|
-
]),
|
|
274
|
-
s($, {
|
|
275
|
-
variant: "primary",
|
|
276
|
-
label: "Create game program",
|
|
277
|
-
icon: "add",
|
|
278
|
-
disabled: !o(y).isPremium,
|
|
279
|
-
onClick: t[5] || (t[5] = (a) => h())
|
|
280
|
-
}, null, 8, ["disabled"])
|
|
281
|
-
]),
|
|
282
|
-
_: 1
|
|
283
|
-
})),
|
|
284
|
-
s(re, {
|
|
285
|
-
ref_key: "sheetRef",
|
|
286
|
-
ref: A,
|
|
287
|
-
"onSubmit:modelValue": D
|
|
288
|
-
}, null, 512),
|
|
289
|
-
s(me, {
|
|
290
|
-
ref_key: "sendCollectionSheetRef",
|
|
291
|
-
ref: R
|
|
292
|
-
}, null, 512)
|
|
293
|
-
])
|
|
294
|
-
], 64);
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
export {
|
|
299
|
-
Ie as default
|
|
300
|
-
};
|