@feedmepos/mf-connect 0.1.3-prod → 0.1.5-prod
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-CC5xdRtS.js +423 -0
- package/dist/{App-DvtYt9h5.js → App-CFLVGljI.js} +276 -275
- package/dist/Broadcast-B5OnLTNo.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DoH4RX_Y.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B6oleems.js} +8 -8
- package/dist/Card-Cw9Ts0qN.js +824 -0
- package/dist/{Collections-C5-k8WkG.js → Collections-CTEOsTLk.js} +4 -4
- package/dist/Credit-Bt2ntvn6.js +220 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BaOM6fUL.js} +918 -901
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-Dxyv9AzJ.js +345 -0
- package/dist/Experience-CdiCyjUs.js +221 -0
- package/dist/Game-CD07hjmT.js +255 -0
- package/dist/Marketing-CodbC8LJ.js +316 -0
- package/dist/Member-Cr8ki7-7.js +69 -0
- package/dist/{MemberList-CMefeirT.js → MemberList-_-IwGMer.js} +75 -75
- package/dist/{MemberTransactions-B9oYdzjR.js → MemberTransactions-B3LWcATC.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B0T7ze7r.js → MessageInput.vue_vue_type_script_setup_true_lang-DF-PHN1Z.js} +2 -2
- package/dist/Mission-BqR_oPzu.js +261 -0
- package/dist/Point-wI_0oL5d.js +222 -0
- package/dist/Promotion-Dx6CD3_V.js +253 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BGM1doWM.js → RuleGroup.vue_vue_type_script_setup_true_lang-DiaYx2vk.js} +15 -15
- package/dist/Segment-BzM2a7dM.js +565 -0
- package/dist/Setting-C8me75UN.js +1871 -0
- package/dist/Store-CT-y0pJ4.js +1530 -0
- package/dist/StoreRewards-l5qkiIy-.js +400 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-JumDBZLs.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DNyeXIL6.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BtBCggcN.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BYwjePth.js} +1 -1
- package/dist/{Tier-ms8r2E7c.js → Tier-gHTgMsQ3.js} +470 -445
- package/dist/{Title-BBKoBs46.js → Title-DQS7FHaO.js} +298 -282
- package/dist/Transaction-D7nTuNwj.js +39 -0
- package/dist/Voucher-Dr6IxBlt.js +490 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-Jh7OW6Wa.js +141 -0
- package/dist/{app-CGgrMOc_.js → app-BCgzIoKj.js} +1 -1
- package/dist/app-CbpXeslU.js +5639 -0
- package/dist/app.js +4 -3
- package/dist/{business-DeMUnCNX.js → business-DDhQna1e.js} +1 -1
- package/dist/{campaign-CBszI6An.js → campaign-CGa533e7.js} +2 -2
- package/dist/{collection.fn-D4Qgx1aW.js → collection.fn-CalTbTcW.js} +2 -2
- package/dist/dto-i36GeVm3.js +2770 -0
- package/dist/{effect-2p4_SGbQ.js → effect-DdEyoxWE.js} +1 -1
- package/dist/{email-addresses-Bc9od2gA.js → email-addresses-DJkhLbVW.js} +1 -1
- package/dist/{export-BK6FgeQO.js → export-g24Ga1Ru.js} +3 -3
- package/dist/{helper-DUkKW7uc.js → helper-BILtwZxJ.js} +1 -1
- package/dist/{index-Cvbyv9Hx.js → index-61n4HR_9.js} +1 -1
- package/dist/{index-AZ8cKg9n.js → index-BOwZO-JV.js} +1 -1
- package/dist/{index-M1SmasnI.js → index-BzskWtcd.js} +3 -3
- package/dist/{index-CTmiZrHu.js → index-CLA_3YPs.js} +1 -1
- package/dist/{index-B9f-K1No.js → index-Ca1erv2G.js} +2 -2
- package/dist/{index-BWWnWRpt.js → index-DgfFUabi.js} +2 -2
- package/dist/{index-Ci8tkzSn.js → index-GQ4JIFWE.js} +1 -1
- package/dist/{index-BFcrfL4W.js → index-ZcMWfKwl.js} +1 -1
- package/dist/{index-g4L04WYz.js → index-bkuptzmD.js} +91 -86
- package/dist/index-hp-LjMMQ.js +3 -0
- package/dist/{index-DRaETKbn.js → index-lYDskqcR.js} +258 -256
- package/dist/{index-D4HYMbSu.js → index-p3dozIB_.js} +3 -3
- package/dist/{index.esm2017-kvuav0Sd.js → index.esm2017-DeO7Sly1.js} +38 -38
- package/dist/{loading-MNCADfHc.js → loading-CqDGv2I6.js} +11 -11
- package/dist/{membership-CsbTF-DX.js → membership-aP_8YmFK.js} +3 -3
- package/dist/{money-Lo7kavmu.js → money-BmmtBTzl.js} +1 -1
- package/dist/{number-BviV2K5O.js → number-By8HkTkQ.js} +1 -1
- package/dist/{rule-DKrUrnrM.js → rule-CI2g3FmQ.js} +3 -3
- package/dist/{rule-builder-DjPniLk6.js → rule-builder-BCBsbe_y.js} +1 -1
- package/dist/{template-DteMEC9C.js → template-CRNz0-Qj.js} +4 -4
- package/dist/{usePagination-BKTq-UbV.js → usePagination-D4IC9efy.js} +1 -1
- package/dist/vue-i18n-0zlAmAlF.js +2365 -0
- package/package.json +7 -4
- package/dist/Analytic-DiPWt78u.js +0 -423
- package/dist/Broadcast-Dv4XcvBh.js +0 -216
- package/dist/Card-DDvwlZF0.js +0 -823
- package/dist/Credit-BDQIr_FJ.js +0 -214
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BQzgcn4V.js +0 -344
- package/dist/Experience-B9H3tOF0.js +0 -211
- package/dist/Game-cy3_ppLO.js +0 -250
- package/dist/Marketing-CWXV2n5F.js +0 -309
- package/dist/Member-DyTX22Zk.js +0 -92
- package/dist/Mission-DxSO3iES.js +0 -248
- package/dist/Point-C5UtlqkX.js +0 -220
- package/dist/Promotion-DhSGTj-R.js +0 -244
- package/dist/Segment-BzI6Ykxp.js +0 -564
- package/dist/Setting-SRUWwF9w.js +0 -1870
- package/dist/Store-CIrn_7Mh.js +0 -1533
- package/dist/StoreRewards-BYc0vgnr.js +0 -429
- package/dist/Transaction-IZL9-6fe.js +0 -36
- package/dist/Voucher-CIWulmcc.js +0 -485
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
- package/dist/app-BQvluJk_.js +0 -2974
- package/dist/dto-Dtvg93Bz.js +0 -1145
- package/dist/index-UR1Lxi0C.js +0 -11
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { defineComponent as O, ref as k, computed as U, onMounted as A, resolveComponent as i, openBlock as c, createElementBlock as g, Fragment as _, createVNode as r, unref as a, createElementVNode as n, withCtx as h, renderList as D, createBlock as x, resolveDynamicComponent as j, toDisplayString as f, h as M } from "vue";
|
|
2
|
-
import { _ as H } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as q, components as z } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as G, p as J } from "./loading-MNCADfHc.js";
|
|
5
|
-
import { u as Q } from "./business-DeMUnCNX.js";
|
|
6
|
-
import { u as W } from "./campaign-CBszI6An.js";
|
|
7
|
-
import { g as S, a as V } from "./dto-Dtvg93Bz.js";
|
|
8
|
-
import { _ as X } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
9
|
-
import { _ as Y } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCbvlp5V.js";
|
|
10
|
-
import { u as Z } from "./template-DteMEC9C.js";
|
|
11
|
-
import { c as y } from "./index-CTmiZrHu.js";
|
|
12
|
-
const ee = { class: "px-24 flex flex-col gap-y-16" }, te = { class: "flex items-center justify-between w-full" }, oe = { class: "flex gap-8 overflow-x-auto" }, ae = { class: "space-y-8" }, ne = { class: "flex w-full gap-4 items-center" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, re = { class: "space-y-4" }, ie = { class: "fm-typo-en-body-lg-600" }, le = { 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" }, me = /* @__PURE__ */ n("img", {
|
|
13
|
-
src: H,
|
|
14
|
-
class: "aspect-square w-[150px]"
|
|
15
|
-
}, null, -1), de = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
16
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create experience program"),
|
|
17
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Experience help customers gain membership tiers. The more they interact and spend, the higher their membership level, unlocking more rewards and benefits. ")
|
|
18
|
-
], -1), Fe = /* @__PURE__ */ O({
|
|
19
|
-
__name: "Experience",
|
|
20
|
-
setup(pe) {
|
|
21
|
-
const L = {
|
|
22
|
-
label: "Create campaign",
|
|
23
|
-
value: "create",
|
|
24
|
-
isPrimary: !0,
|
|
25
|
-
prependIcon: "add"
|
|
26
|
-
}, P = Z("POINT", q()), I = Q(), l = W(), { global: T, minor: w } = G, s = k({
|
|
27
|
-
searchKey: "",
|
|
28
|
-
location: null
|
|
29
|
-
}), p = U(
|
|
30
|
-
() => l.campaigns.experience.filter(
|
|
31
|
-
(e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
|
|
32
|
-
)
|
|
33
|
-
), B = [
|
|
34
|
-
{
|
|
35
|
-
header: "Program title",
|
|
36
|
-
accessorFn: (e) => e.name
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
header: "Status",
|
|
40
|
-
cell(e) {
|
|
41
|
-
return S(e.row.original);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
header: "Summary",
|
|
46
|
-
accessorFn: (e) => V(e)
|
|
47
|
-
//v.effect,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
header: "Actions",
|
|
51
|
-
cell(e) {
|
|
52
|
-
return M(z.FmButton, {
|
|
53
|
-
variant: "tertiary",
|
|
54
|
-
icon: "delete",
|
|
55
|
-
iconColor: "neutral-gray-400",
|
|
56
|
-
onClick: (o) => {
|
|
57
|
-
o.stopPropagation(), b(e.row.original);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
], v = k();
|
|
63
|
-
async function b(e) {
|
|
64
|
-
await J.remove(`Are you sure you want to remove ${e.name}?`) && await w(
|
|
65
|
-
async () => {
|
|
66
|
-
await y.delete(e._id), await l.read("POINT");
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
message: `Removing ${e.name}`,
|
|
70
|
-
successMessage: `Removed ${e.name} successfully`
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
async function u(e) {
|
|
75
|
-
e ? await o() : P.open(async (m) => {
|
|
76
|
-
await o(m);
|
|
77
|
-
});
|
|
78
|
-
async function o(m) {
|
|
79
|
-
var d;
|
|
80
|
-
(d = v.value) == null || d.showSheet(
|
|
81
|
-
!0,
|
|
82
|
-
"POINT",
|
|
83
|
-
e ? await y.readById(e._id) : void 0,
|
|
84
|
-
m
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
async function $(e) {
|
|
89
|
-
await w(
|
|
90
|
-
async () => {
|
|
91
|
-
e.campaign._id ? await y.update(e.campaign._id, e) : await y.create(e), await l.read("POINT");
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} experience program`,
|
|
95
|
-
successMessage: `Experience program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
return A(async () => {
|
|
100
|
-
await T(async () => {
|
|
101
|
-
await l.read("POINT");
|
|
102
|
-
});
|
|
103
|
-
}), (e, o) => {
|
|
104
|
-
const m = i("FmPageHead"), d = i("FmSearch"), E = i("FmTable"), C = i("FmButton"), K = i("FmListItem"), N = i("FmList"), R = i("FmCard");
|
|
105
|
-
return c(), g(_, null, [
|
|
106
|
-
r(m, {
|
|
107
|
-
title: "Experience",
|
|
108
|
-
actions: a(p).length > 0 ? [L] : [],
|
|
109
|
-
"onClick:action": o[0] || (o[0] = () => u())
|
|
110
|
-
}, null, 8, ["actions"]),
|
|
111
|
-
n("div", ee, [
|
|
112
|
-
r(d, {
|
|
113
|
-
modelValue: a(s).searchKey,
|
|
114
|
-
"onUpdate:modelValue": o[1] || (o[1] = (t) => a(s).searchKey = t),
|
|
115
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
116
|
-
placeholder: "search",
|
|
117
|
-
collapsible: ""
|
|
118
|
-
}, null, 8, ["modelValue"]),
|
|
119
|
-
a(l).campaigns.experience && a(l).campaigns.experience.length > 0 ? (c(), g(_, { key: 0 }, [
|
|
120
|
-
n("div", te, [
|
|
121
|
-
n("div", oe, [
|
|
122
|
-
r(X, {
|
|
123
|
-
modelValue: a(s).location,
|
|
124
|
-
"onUpdate:modelValue": o[2] || (o[2] = (t) => a(s).location = t),
|
|
125
|
-
label: "Location: ",
|
|
126
|
-
"show-item-label": !0,
|
|
127
|
-
icon: "storefront",
|
|
128
|
-
placement: "bottom-start",
|
|
129
|
-
items: a(I).locationItems
|
|
130
|
-
}, null, 8, ["modelValue", "items"])
|
|
131
|
-
]),
|
|
132
|
-
r(d, {
|
|
133
|
-
modelValue: a(s).searchKey,
|
|
134
|
-
"onUpdate:modelValue": o[3] || (o[3] = (t) => a(s).searchKey = t),
|
|
135
|
-
class: "xs:hidden",
|
|
136
|
-
placeholder: "search",
|
|
137
|
-
collapsible: ""
|
|
138
|
-
}, null, 8, ["modelValue"])
|
|
139
|
-
]),
|
|
140
|
-
r(E, {
|
|
141
|
-
class: "xs:hidden",
|
|
142
|
-
"row-data": a(p),
|
|
143
|
-
"column-defs": B,
|
|
144
|
-
"search-value": a(s).searchKey,
|
|
145
|
-
"column-filter": [],
|
|
146
|
-
onRowClick: o[4] || (o[4] = (t) => u(t.original)),
|
|
147
|
-
"hide-footer": a(p).length < 10
|
|
148
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
149
|
-
r(N, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
150
|
-
default: h(() => [
|
|
151
|
-
(c(!0), g(_, null, D(a(p).filter(
|
|
152
|
-
(t) => t.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
|
|
153
|
-
), (t) => (c(), x(K, {
|
|
154
|
-
key: t._id.toString(),
|
|
155
|
-
onClick: (F) => u(t),
|
|
156
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
157
|
-
}, {
|
|
158
|
-
default: h(() => [
|
|
159
|
-
n("div", ae, [
|
|
160
|
-
n("div", ne, [
|
|
161
|
-
(c(), x(j(a(S)(t)))),
|
|
162
|
-
n("div", se, f(t.currentReceive ?? 0) + " used ", 1)
|
|
163
|
-
]),
|
|
164
|
-
n("div", re, [
|
|
165
|
-
n("div", ie, f(t.name), 1),
|
|
166
|
-
n("div", le, f(a(V)(t)), 1)
|
|
167
|
-
]),
|
|
168
|
-
n("div", ce, " Experience received: " + f(t.currentReceive ?? 0), 1)
|
|
169
|
-
]),
|
|
170
|
-
r(C, {
|
|
171
|
-
icon: "delete",
|
|
172
|
-
"icon-color": "neutral-gray-400",
|
|
173
|
-
variant: "tertiary",
|
|
174
|
-
onClick: (F) => (F.stopPropagation(), b(t))
|
|
175
|
-
}, null, 8, ["onClick"])
|
|
176
|
-
]),
|
|
177
|
-
_: 2
|
|
178
|
-
}, 1032, ["onClick"]))), 128))
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
})
|
|
182
|
-
], 64)) : (c(), x(R, {
|
|
183
|
-
key: 1,
|
|
184
|
-
variant: "outlined",
|
|
185
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
186
|
-
}, {
|
|
187
|
-
default: h(() => [
|
|
188
|
-
me,
|
|
189
|
-
de,
|
|
190
|
-
r(C, {
|
|
191
|
-
variant: "primary",
|
|
192
|
-
label: "Create experience program",
|
|
193
|
-
icon: "add",
|
|
194
|
-
onClick: o[5] || (o[5] = (t) => u())
|
|
195
|
-
})
|
|
196
|
-
]),
|
|
197
|
-
_: 1
|
|
198
|
-
})),
|
|
199
|
-
r(Y, {
|
|
200
|
-
ref_key: "sheetRef",
|
|
201
|
-
ref: v,
|
|
202
|
-
"onSubmit:modelValue": $
|
|
203
|
-
}, null, 512)
|
|
204
|
-
])
|
|
205
|
-
], 64);
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
export {
|
|
210
|
-
Fe as default
|
|
211
|
-
};
|
package/dist/Game-cy3_ppLO.js
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as L, computed as D, onMounted as H, resolveComponent as l, openBlock as c, createElementBlock as w, Fragment as x, createVNode as i, unref as a, withCtx as y, createElementVNode as n, renderList as N, createBlock as v, resolveDynamicComponent as q, toDisplayString as _, h as m } from "vue";
|
|
2
|
-
import { _ as z } from "./campaign-CpzFl8Vr.js";
|
|
3
|
-
import { useDialog as J, components as b } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as O, a as Q, p as W } from "./loading-MNCADfHc.js";
|
|
5
|
-
import { u as X } from "./business-DeMUnCNX.js";
|
|
6
|
-
import { u as Y } from "./campaign-CBszI6An.js";
|
|
7
|
-
import { g as A, a as B } from "./dto-Dtvg93Bz.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-DCbvlp5V.js";
|
|
10
|
-
import { u as te } from "./template-DteMEC9C.js";
|
|
11
|
-
import { c as h } from "./index-CTmiZrHu.js";
|
|
12
|
-
const oe = { class: "flex items-center" }, ae = /* @__PURE__ */ n("span", { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, "Game", -1), ne = { 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" }, le = { class: "space-y-8" }, re = { class: "flex w-full gap-4 items-center" }, ce = { 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" }, ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fe = /* @__PURE__ */ n("img", {
|
|
13
|
-
src: z,
|
|
14
|
-
class: "aspect-square w-[150px]"
|
|
15
|
-
}, null, -1), ge = /* @__PURE__ */ n("div", { class: "flex flex-col gap-16 text-center" }, [
|
|
16
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-title-sm-800" }, "Create your game program"),
|
|
17
|
-
/* @__PURE__ */ n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " The game feature adds a fun element to shopping, encouraging customers to engage more. ")
|
|
18
|
-
], -1), Ve = /* @__PURE__ */ j({
|
|
19
|
-
__name: "Game",
|
|
20
|
-
setup(ye) {
|
|
21
|
-
const $ = {
|
|
22
|
-
label: "Create campaign",
|
|
23
|
-
value: "create",
|
|
24
|
-
isPrimary: !0,
|
|
25
|
-
prependIcon: "add"
|
|
26
|
-
}, E = te("GAME", J()), u = X(), r = Y(), { global: G, minor: C } = O, s = L({
|
|
27
|
-
searchKey: "",
|
|
28
|
-
location: null
|
|
29
|
-
}), p = D(
|
|
30
|
-
() => r.campaigns.token.filter(
|
|
31
|
-
(e) => !s.value.location || !e.targetLocation || e.targetLocation.includes(s.value.location)
|
|
32
|
-
)
|
|
33
|
-
), K = [
|
|
34
|
-
{
|
|
35
|
-
header: "Program title",
|
|
36
|
-
accessorKey: "name",
|
|
37
|
-
// accessorFn: (v) => v.name,
|
|
38
|
-
cell(e) {
|
|
39
|
-
return m("div", { class: "flex items-center justify-between gap-4" }, [
|
|
40
|
-
m("div", { class: "flex items-center" }, [
|
|
41
|
-
m(
|
|
42
|
-
b.FmTooltip,
|
|
43
|
-
{
|
|
44
|
-
content: e.row.original._id,
|
|
45
|
-
onClick: (t) => {
|
|
46
|
-
t.stopPropagation(), Q(e.row.original._id);
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
[
|
|
50
|
-
m(b.FmIcon, {
|
|
51
|
-
name: "info",
|
|
52
|
-
outline: !0,
|
|
53
|
-
size: "sm"
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
)
|
|
57
|
-
]),
|
|
58
|
-
m("div", { class: "flex-1" }, e.row.original.name)
|
|
59
|
-
]);
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
header: "Status",
|
|
64
|
-
cell(e) {
|
|
65
|
-
return A(e.row.original);
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
header: "Summary",
|
|
70
|
-
accessorFn: (e) => B(e)
|
|
71
|
-
//v.effect,
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
header: "Token received",
|
|
75
|
-
accessorFn: (e) => {
|
|
76
|
-
var t;
|
|
77
|
-
return ((t = e == null ? void 0 : e.pf_collectible) == null ? void 0 : t.currentReceive) ?? 0;
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
header: "Actions",
|
|
82
|
-
cell(e) {
|
|
83
|
-
return m(b.FmButton, {
|
|
84
|
-
variant: "tertiary",
|
|
85
|
-
icon: "delete",
|
|
86
|
-
iconColor: "neutral-gray-400",
|
|
87
|
-
onClick: (t) => {
|
|
88
|
-
t.stopPropagation(), F(e.row.original);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
], k = L();
|
|
94
|
-
async function F(e) {
|
|
95
|
-
await W.remove(`Are you sure you want to remove ${e.name}?`) && await C(
|
|
96
|
-
async () => {
|
|
97
|
-
await h.delete(e._id), await r.read("GAME");
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
message: `Removing ${e.name}`,
|
|
101
|
-
successMessage: `Removed ${e.name} successfully`
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
async function f(e) {
|
|
106
|
-
e ? await t() : E.open(async (d) => {
|
|
107
|
-
await t(d);
|
|
108
|
-
});
|
|
109
|
-
async function t(d) {
|
|
110
|
-
var g;
|
|
111
|
-
(g = k.value) == null || g.showSheet(
|
|
112
|
-
!0,
|
|
113
|
-
"GAME",
|
|
114
|
-
e ? await h.readById(e._id) : void 0,
|
|
115
|
-
d
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
async function M(e) {
|
|
120
|
-
await C(
|
|
121
|
-
async () => {
|
|
122
|
-
e.campaign._id ? await h.update(e.campaign._id, e) : await h.create(e), await r.read("GAME");
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
126
|
-
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
127
|
-
}
|
|
128
|
-
);
|
|
129
|
-
}
|
|
130
|
-
return H(async () => {
|
|
131
|
-
await G(async () => {
|
|
132
|
-
await r.read("GAME"), await u.readPremium();
|
|
133
|
-
});
|
|
134
|
-
}), (e, t) => {
|
|
135
|
-
const d = l("FmPill"), g = l("FmPageHead"), S = l("FmSearch"), R = l("FmTable"), P = l("FmButton"), T = l("FmListItem"), I = l("FmList"), U = l("FmCard");
|
|
136
|
-
return c(), w(x, null, [
|
|
137
|
-
i(g, {
|
|
138
|
-
actions: a(p).length > 0 && a(u).isPremium ? [$] : [],
|
|
139
|
-
"onClick:action": t[0] || (t[0] = () => f())
|
|
140
|
-
}, {
|
|
141
|
-
title: y(() => [
|
|
142
|
-
n("div", oe, [
|
|
143
|
-
ae,
|
|
144
|
-
i(d, { variant: "premium" })
|
|
145
|
-
])
|
|
146
|
-
]),
|
|
147
|
-
_: 1
|
|
148
|
-
}, 8, ["actions"]),
|
|
149
|
-
n("div", ne, [
|
|
150
|
-
i(S, {
|
|
151
|
-
modelValue: a(s).searchKey,
|
|
152
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) => a(s).searchKey = o),
|
|
153
|
-
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
154
|
-
placeholder: "search",
|
|
155
|
-
collapsible: ""
|
|
156
|
-
}, null, 8, ["modelValue"]),
|
|
157
|
-
a(r).campaigns.token && a(r).campaigns.token.length > 0 ? (c(), w(x, { key: 0 }, [
|
|
158
|
-
n("div", se, [
|
|
159
|
-
n("div", ie, [
|
|
160
|
-
i(Z, {
|
|
161
|
-
modelValue: a(s).location,
|
|
162
|
-
"onUpdate:modelValue": t[2] || (t[2] = (o) => a(s).location = o),
|
|
163
|
-
label: "Location: ",
|
|
164
|
-
"show-item-label": !0,
|
|
165
|
-
icon: "storefront",
|
|
166
|
-
placement: "bottom-start",
|
|
167
|
-
items: a(u).locationItems
|
|
168
|
-
}, null, 8, ["modelValue", "items"])
|
|
169
|
-
]),
|
|
170
|
-
i(S, {
|
|
171
|
-
modelValue: a(s).searchKey,
|
|
172
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) => a(s).searchKey = o),
|
|
173
|
-
class: "xs:hidden",
|
|
174
|
-
placeholder: "search",
|
|
175
|
-
collapsible: ""
|
|
176
|
-
}, null, 8, ["modelValue"])
|
|
177
|
-
]),
|
|
178
|
-
i(R, {
|
|
179
|
-
class: "xs:hidden",
|
|
180
|
-
"row-data": a(p),
|
|
181
|
-
"column-defs": K,
|
|
182
|
-
"search-value": a(s).searchKey,
|
|
183
|
-
"column-filter": [],
|
|
184
|
-
onRowClick: t[4] || (t[4] = (o) => f(o.original)),
|
|
185
|
-
"hide-footer": a(p).length < 10
|
|
186
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
187
|
-
i(I, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
188
|
-
default: y(() => [
|
|
189
|
-
(c(!0), w(x, null, N(a(p).filter(
|
|
190
|
-
(o) => o.name.toLowerCase().includes(a(s).searchKey.toLowerCase())
|
|
191
|
-
), (o) => (c(), v(T, {
|
|
192
|
-
key: o._id.toString(),
|
|
193
|
-
onClick: (V) => f(o),
|
|
194
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
195
|
-
}, {
|
|
196
|
-
default: y(() => [
|
|
197
|
-
n("div", le, [
|
|
198
|
-
n("div", re, [
|
|
199
|
-
(c(), v(q(a(A)(o)))),
|
|
200
|
-
n("div", ce, _(o.currentReceive ?? 0) + " used ", 1)
|
|
201
|
-
]),
|
|
202
|
-
n("div", me, [
|
|
203
|
-
n("div", de, _(o.name), 1),
|
|
204
|
-
n("div", ue, _(a(B)(o)), 1)
|
|
205
|
-
]),
|
|
206
|
-
n("div", pe, " Token received: " + _(o.currentReceive ?? 0), 1)
|
|
207
|
-
]),
|
|
208
|
-
i(P, {
|
|
209
|
-
icon: "delete",
|
|
210
|
-
"icon-color": "neutral-gray-400",
|
|
211
|
-
variant: "tertiary",
|
|
212
|
-
onClick: (V) => (V.stopPropagation(), F(o))
|
|
213
|
-
}, null, 8, ["onClick"])
|
|
214
|
-
]),
|
|
215
|
-
_: 2
|
|
216
|
-
}, 1032, ["onClick"]))), 128))
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
})
|
|
220
|
-
], 64)) : (c(), v(U, {
|
|
221
|
-
key: 1,
|
|
222
|
-
variant: "outlined",
|
|
223
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
224
|
-
}, {
|
|
225
|
-
default: y(() => [
|
|
226
|
-
fe,
|
|
227
|
-
ge,
|
|
228
|
-
i(P, {
|
|
229
|
-
variant: "primary",
|
|
230
|
-
label: "Create game program",
|
|
231
|
-
icon: "add",
|
|
232
|
-
disabled: !a(u).isPremium,
|
|
233
|
-
onClick: t[5] || (t[5] = (o) => f())
|
|
234
|
-
}, null, 8, ["disabled"])
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
})),
|
|
238
|
-
i(ee, {
|
|
239
|
-
ref_key: "sheetRef",
|
|
240
|
-
ref: k,
|
|
241
|
-
"onSubmit:modelValue": M
|
|
242
|
-
}, null, 512)
|
|
243
|
-
])
|
|
244
|
-
], 64);
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
export {
|
|
249
|
-
Ve as default
|
|
250
|
-
};
|