@feedmepos/mf-connect 0.1.103-prod → 0.1.105-beta.1
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/{App-WQh18XPc.js → App-CsGCNHBx.js} +44 -43
- package/dist/{Bin-IbjpWo35.js → Bin-CEzJQ2fp.js} +8 -8
- package/dist/{Broadcast-BijdkG1f.js → Broadcast-DinQIuUI.js} +11 -11
- package/dist/CampaignAnalytic-B9ecowKf.js +1826 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D_YHOQWW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfVohrMN.js} +6 -6
- package/dist/{Card-Bp8BecBk.js → Card-y413-t0y.js} +19 -19
- package/dist/{Collections-QlS-tKVT.js → Collections-BryT5ufr.js} +21 -21
- package/dist/{Credit-D77lPO5s.js → Credit-BVqcBVPd.js} +118 -93
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-B9XP8UeF.js +53 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DA6dCw8Y.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DenseCvA.js} +815 -609
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DLSOD5uV.js → EffectSheet.vue_vue_type_style_index_0_lang-CzDCUJ51.js} +12 -12
- package/dist/{Experience-DzbJiEkB.js → Experience-BIf25_au.js} +109 -84
- package/dist/{FileSaver.min-DMdx33O6.js → FileSaver.min-DcDxTlEv.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
- package/dist/Game-CPFwbnwg.js +355 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-B8sYzU76.js → ImageInput.vue_vue_type_script_setup_true_lang-D1_02khe.js} +1 -1
- package/dist/{Index-BrH7zJgF.js → Index-9d6DE1WI.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BdnOZYPt.js → LocationPicker.vue_vue_type_script_setup_true_lang-DVqpfwuC.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Zm2-QRhl.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CY7T4ZrE.js} +1 -1
- package/dist/LoyaltyDashboard-L-dd3bBX.js +2865 -0
- package/dist/{MainLayout-D0w3tXfh.js → MainLayout-B0hVJj0s.js} +3 -3
- package/dist/{Marketing-Bj4eecVJ.js → Marketing-CzQOE5-T.js} +4 -4
- package/dist/{MarketingMaterialEdit-BwrUAQ5g.js → MarketingMaterialEdit-CpnMbm4V.js} +6 -6
- package/dist/Member-BPXOBKnT.js +649 -0
- package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-W-sQlF8i.js +1286 -0
- package/dist/MemberImportHistory-l5sPRJhS.js +187 -0
- package/dist/MemberList-BaFdqz1y.js +336 -0
- package/dist/{MemberTransactions-B1vwo1rI.js → MemberTransactions-BnzHspeV.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-l8vxv1iA.js → MessageInput.vue_vue_type_script_setup_true_lang-Tn7i0ON5.js} +13 -13
- package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Dk5jBNjr.js +40 -0
- package/dist/Mission-DwnJVGqw.js +359 -0
- package/dist/{Overview-CB0ZUJrT.js → Overview-Bkk6uY8w.js} +5 -5
- package/dist/{Overview-Dmga8twr.js → Overview-DxxN2iR6.js} +54 -54
- package/dist/Point-CF3bo1z2.js +287 -0
- package/dist/Promotion-BK_vpI2V.js +417 -0
- package/dist/{Queue-C3YE5GyB.js → Queue-BV3LRLDX.js} +47 -47
- package/dist/{Record-BmOaeVjS.js → Record-BsPu-3k0.js} +10 -10
- package/dist/{Review-BxkuBAsN.js → Review-Dbx2GIDF.js} +2 -2
- package/dist/{ReviewFacebookCallback-Cea69Y-B.js → ReviewFacebookCallback-4XmFbOgX.js} +5 -5
- package/dist/{ReviewGoogleCallback-BYb4WfJu.js → ReviewGoogleCallback-D8ZHqblT.js} +5 -5
- package/dist/{Reward-Dtrl4mTA.js → Reward-L350gxt_.js} +17 -17
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-sF1tR7Xt.js → RewardGroup.vue_vue_type_script_setup_true_lang-C83AonvA.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-cVQnjaRr.js → RuleGroup.vue_vue_type_script_setup_true_lang-C1ZmO0v3.js} +279 -286
- package/dist/{Segment-Cp-6-rVY.js → Segment-BYiiwMUQ.js} +71 -71
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4LpGMJI.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-UcQB3IId.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-24LPf74Z.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DekalcJe.js} +4 -4
- package/dist/{Setting-BJ8tKVyJ.js → Setting-eSozeH-1.js} +59 -59
- package/dist/{SettingAdvertisements-CVN2-ow-.js → SettingAdvertisements-kpV1JOcA.js} +13 -13
- package/dist/{Settings-C1cZ4Ul9.js → Settings-I0ImYOOQ.js} +5 -5
- package/dist/{Store-CPOnmTss.js → Store-C8QSVLw_.js} +24 -24
- package/dist/{StoreRewards-v5eeYGVK.js → StoreRewards-C70avm1_.js} +16 -16
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BeeUp_g7.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CSPdPLsO.js} +327 -386
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-KpT7bdu4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-WYa8H6Cw.js} +2 -2
- package/dist/{Tier-I99UH0xV.js → Tier-CZZDn7iP.js} +23 -23
- package/dist/{Title-CMRp4pX_.js → Title-BvljZZSL.js} +22 -22
- package/dist/{Transaction-B8qt8Ye0.js → Transaction-DXLXu8I9.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-QeAi2nrG.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Dwge_i6h.js} +6 -6
- package/dist/{Voucher-BOHAMVZe.js → Voucher-DIdx7Ot3.js} +153 -131
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BmPhkmd-.js → VoucherEditor.vue_vue_type_script_setup_true_lang-D_UeSwP6.js} +115 -121
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-ZCpWiXGk.js → ZodTextField.vue_vue_type_script_setup_true_lang-DY6VnVJA.js} +2 -2
- package/dist/{app-CGvP2lXl.js → app-DIqUapcm.js} +27807 -25649
- package/dist/app.js +1 -1
- package/dist/{business-BzmZPBOG.js → business-xP99MCox.js} +5 -5
- package/dist/{campaign-CJZlkuiR.js → campaign-C4MOBm91.js} +49 -48
- package/dist/{campaign-BmwtMiFP.js → campaign-PkzGqdYO.js} +2 -2
- package/dist/{campaign.enum-DumeHZOS.js → campaign.enum-BUclGILF.js} +1 -1
- package/dist/{campaign.fn-D0CbtE4k.js → campaign.fn-DJVXo9cD.js} +81 -81
- package/dist/{collectible.enum-nrHykvO1.js → collectible.enum-B_YepKWT.js} +1 -1
- package/dist/{collection.fn-DiyFyUl7.js → collection.fn-DAkP3LJ8.js} +2 -2
- package/dist/{effect-BnIGzzLo.js → effect-DrJYnZ16.js} +1 -1
- package/dist/{email-addresses-tjXJdzCY.js → email-addresses-DYXMxvqS.js} +2 -2
- package/dist/{export-Ck8ycGxw.js → export-0Jq4Vo5Y.js} +3 -3
- package/dist/{helper-BHgAkmrz.js → helper-CG763cr5.js} +1 -1
- package/dist/{index-cnFHwNFy.js → index-5Ms90cPU.js} +1 -1
- package/dist/{index-dVfpSXT7.js → index-8e6lLivz.js} +3 -3
- package/dist/{index-qIrN5YA8.js → index-BA3CoioK.js} +10 -10
- package/dist/{index-VJrNyZUx.js → index-BFuyvvVh.js} +1 -1
- package/dist/{index-BBU2_kd6.js → index-BHEZDY8s.js} +3 -3
- package/dist/{index-4PxwTlfE.js → index-BQdlKlsg.js} +9 -9
- package/dist/{index-W-l8HyOk.js → index-ByvnSHRv.js} +18 -2
- package/dist/{index-B-yKEua7.js → index-CB1OaNpY.js} +5 -5
- package/dist/{index-Cnkr1PfZ.js → index-CFRM165i.js} +6 -6
- package/dist/{index-CMGtT4mp.js → index-CU3Wrg9t.js} +1 -1
- package/dist/index-CuVAmjYs.js +137 -0
- package/dist/{index-BwZ8iuRW.js → index-D5zLX78G.js} +1 -1
- package/dist/{index-DHCiP2WT.js → index-DJRR8jk8.js} +1 -1
- package/dist/{index-mF4DrbA_.js → index-JPLeqrlu.js} +680 -680
- package/dist/{index-BozgrjRA.js → index-VZk5ArC3.js} +10 -9
- package/dist/{timezone-xffU-pT6.js → index-tPhZ8CGt.js} +105 -122
- package/dist/{index.esm2017-BbfP9mo3.js → index.esm2017-DuXfdRdC.js} +130 -130
- package/dist/{loading-B89df4lM.js → loading-DwS6f7JW.js} +1 -1
- package/dist/{lodash-CNIdP6dH.js → lodash-Bqpt7DBE.js} +1 -1
- package/dist/member-import-BaHtDv3F.js +187 -0
- package/dist/{membership-xRz6MrAl.js → membership-AYipXBeR.js} +3 -3
- package/dist/{money-CrfU06vj.js → money-BtRy4sUv.js} +1 -1
- package/dist/{number-DAcFWa0g.js → number-KwWSNC_F.js} +1 -1
- package/dist/object-BYyQ0PZp.js +18 -0
- package/dist/objectid-D6VZ6WZS.js +145 -0
- package/dist/{plugins-BAOJz-5e.js → plugins-B9HEUuta.js} +87 -87
- package/dist/{reward-DV1PXPKT.js → reward-ktfRKJP7.js} +1 -1
- package/dist/{rule-BZBeYy7D.js → rule-Bm4V-BxA.js} +3 -3
- package/dist/{rule-builder-BuBh_voP.js → rule-builder-KkxzK5K-.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-D_4yac6N.js → template-Z0h3NgI8.js} +7 -7
- package/dist/timezone-BxeR2L3i.js +20 -0
- package/dist/transaction.fn-rwxZJxCB.js +64 -0
- package/dist/{trigger-De4OtE_Z.js → trigger-woxMK7-q.js} +5 -5
- package/dist/{useMarketingMaterialActions-CR-3UVH-.js → useMarketingMaterialActions-BCckL9jC.js} +3 -3
- package/dist/{usePagination-Cz1z0Cox.js → usePagination-ChnknACA.js} +1 -1
- package/dist/{user-83vF8U4p.js → user-C-uStXdl.js} +1 -1
- package/dist/{vue-i18n-miVa3rNb.js → vue-i18n-DMRuXVEL.js} +307 -307
- package/dist/{xlsx-Cs6dDN_G.js → xlsx-DIVka-fb.js} +224 -224
- package/dist/{zod-BgYRWcOQ.js → zod-hoW-zibE.js} +1 -1
- package/package.json +4 -3
- package/dist/Analytic-Dcw2QZ7k.js +0 -427
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
- package/dist/Game-tQP4LYyf.js +0 -330
- package/dist/Member-D75eeIZY.js +0 -280
- package/dist/MemberList-BeZ9rqzr.js +0 -1602
- package/dist/Mission-J6_fYNS7.js +0 -334
- package/dist/Point-DWZ9xDIG.js +0 -262
- package/dist/Promotion-Ql-Dn2Uc.js +0 -392
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BhdPS29D.js +0 -181
- package/dist/dto-CBpbRIlX.js +0 -216
- package/dist/index-D-Fz1BGi.js +0 -85
- package/dist/object-qECH92oz.js +0 -26
- package/dist/objectid-D0AHYrGl.js +0 -145
package/dist/Game-tQP4LYyf.js
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
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 { c as te, p as oe } from "./plugins-BAOJz-5e.js";
|
|
5
|
-
import { u as ae } from "./loading-B89df4lM.js";
|
|
6
|
-
import { u as ne } from "./business-BzmZPBOG.js";
|
|
7
|
-
import { u as ie } from "./campaign-BmwtMiFP.js";
|
|
8
|
-
import { a as D, b as G, g as se } from "./campaign-CJZlkuiR.js";
|
|
9
|
-
import { c as re, p as le, u as ce } from "./template-D_4yac6N.js";
|
|
10
|
-
import { _ as me } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
11
|
-
import { _ as de } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-DA6dCw8Y.js";
|
|
12
|
-
import { u as ue } from "./vue-i18n-miVa3rNb.js";
|
|
13
|
-
import { _ as pe } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-D4LpGMJI.js";
|
|
14
|
-
import { c as _ } from "./index-W-l8HyOk.js";
|
|
15
|
-
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" }, Ne = /* @__PURE__ */ W({
|
|
16
|
-
__name: "Game",
|
|
17
|
-
setup(Ae) {
|
|
18
|
-
const { t: d } = ue(), K = {
|
|
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
|
-
}, B = ee(), U = ce("GAME", B), h = ne(), u = ie(), { global: I, minor: R } = ae, l = P({
|
|
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((s) => {
|
|
32
|
-
var i;
|
|
33
|
-
return (i = e == null ? void 0 : e.targetLocation) == null ? void 0 : i.includes(s);
|
|
34
|
-
}) : e.targetLocation.includes(t);
|
|
35
|
-
}
|
|
36
|
-
const w = J(
|
|
37
|
-
() => u.campaigns.token.filter((e) => T(e))
|
|
38
|
-
), j = [
|
|
39
|
-
{
|
|
40
|
-
header: "Program title",
|
|
41
|
-
accessorKey: "name",
|
|
42
|
-
// accessorFn: (v) => v.name,
|
|
43
|
-
cell(e) {
|
|
44
|
-
return c("div", { class: "flex items-center justify-between gap-4" }, [
|
|
45
|
-
c("div", { class: "flex items-center" }, [
|
|
46
|
-
c(
|
|
47
|
-
y.FmTooltip,
|
|
48
|
-
{
|
|
49
|
-
content: e.row.original._id,
|
|
50
|
-
onClick: (t) => {
|
|
51
|
-
t.stopPropagation(), te(e.row.original._id);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
[
|
|
55
|
-
c(y.FmIcon, {
|
|
56
|
-
name: "info",
|
|
57
|
-
outline: !0,
|
|
58
|
-
size: "sm"
|
|
59
|
-
})
|
|
60
|
-
]
|
|
61
|
-
)
|
|
62
|
-
]),
|
|
63
|
-
c("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 D(e.row.original);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
header: "Summary",
|
|
76
|
-
accessorFn: (e) => G(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 c("div", { class: "flex items-center gap-8" }, [
|
|
90
|
-
c(y.FmButton, {
|
|
91
|
-
variant: "tertiary",
|
|
92
|
-
icon: "content_copy",
|
|
93
|
-
iconColor: "neutral-gray-400",
|
|
94
|
-
onClick: async (t) => {
|
|
95
|
-
t.stopPropagation(), await M(e.row.original);
|
|
96
|
-
}
|
|
97
|
-
}),
|
|
98
|
-
c(y.FmButton, {
|
|
99
|
-
variant: "tertiary",
|
|
100
|
-
icon: "send",
|
|
101
|
-
iconColor: "neutral-gray-400",
|
|
102
|
-
onClick: (t) => {
|
|
103
|
-
t.stopPropagation(), N(e.row.original);
|
|
104
|
-
}
|
|
105
|
-
}),
|
|
106
|
-
c(y.FmButton, {
|
|
107
|
-
variant: "tertiary",
|
|
108
|
-
icon: "delete",
|
|
109
|
-
iconColor: "neutral-gray-400",
|
|
110
|
-
onClick: (t) => {
|
|
111
|
-
t.stopPropagation(), E(e.row.original);
|
|
112
|
-
}
|
|
113
|
-
})
|
|
114
|
-
]);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
], v = P(), $ = P();
|
|
118
|
-
async function E(e) {
|
|
119
|
-
await oe.remove(`Are you sure you want to remove ${e.name}?`) && await R(
|
|
120
|
-
async () => {
|
|
121
|
-
await _.delete(e._id), await u.read("GAME");
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
message: `Removing ${e.name}`,
|
|
125
|
-
successMessage: `Removed ${e.name} successfully`
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
async function C(e) {
|
|
130
|
-
e ? await t() : U.open(async (s) => {
|
|
131
|
-
await t(s);
|
|
132
|
-
});
|
|
133
|
-
async function t(s) {
|
|
134
|
-
var i;
|
|
135
|
-
(i = v.value) == null || i.showSheet(
|
|
136
|
-
!0,
|
|
137
|
-
"GAME",
|
|
138
|
-
e ? await _.readById(e._id) : void 0,
|
|
139
|
-
s
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async function M(e) {
|
|
144
|
-
var i;
|
|
145
|
-
if (!await re(e.name))
|
|
146
|
-
return;
|
|
147
|
-
const t = await _.readById(e._id), s = le(t);
|
|
148
|
-
(i = v.value) == null || i.showSheet(
|
|
149
|
-
!0,
|
|
150
|
-
"GAME",
|
|
151
|
-
s,
|
|
152
|
-
t.template
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
async function H(e) {
|
|
156
|
-
var t, s, i;
|
|
157
|
-
e.campaign._id && ((i = (s = (t = e.campaign) == null ? void 0 : t.game) == null ? void 0 : s.rewards) != null && i.some(
|
|
158
|
-
(p) => p.type === "VOUCHER"
|
|
159
|
-
)) && await new Promise((p) => {
|
|
160
|
-
B.open({
|
|
161
|
-
title: "Confirmation",
|
|
162
|
-
message: "This will change all future vouchers? Would you like to update previous claimed vouchers expiry date and discount?",
|
|
163
|
-
primaryActions: { text: "Update all", close: !0 },
|
|
164
|
-
secondaryActions: { text: "Update future only", close: !0 }
|
|
165
|
-
}).onPrimary(async () => {
|
|
166
|
-
e.updateCollections = !0, p();
|
|
167
|
-
}).onSecondary(async () => {
|
|
168
|
-
p();
|
|
169
|
-
});
|
|
170
|
-
}), await R(
|
|
171
|
-
async () => {
|
|
172
|
-
e.campaign._id ? await _.update(e.campaign._id, e) : await _.create(e), await u.read("GAME");
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
176
|
-
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
177
|
-
}
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
function N(e) {
|
|
181
|
-
var t;
|
|
182
|
-
(t = $.value) == null || t.showSheet({
|
|
183
|
-
campaign: e
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
return Q(async () => {
|
|
187
|
-
await I(async () => {
|
|
188
|
-
await u.read("GAME"), await h.readPremium();
|
|
189
|
-
});
|
|
190
|
-
}), (e, t) => {
|
|
191
|
-
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");
|
|
192
|
-
return f(), V(A, null, [
|
|
193
|
-
r(i, {
|
|
194
|
-
actions: o(w).length > 0 && o(h).isPremium ? [K] : [],
|
|
195
|
-
"onClick:action": t[0] || (t[0] = () => C())
|
|
196
|
-
}, {
|
|
197
|
-
title: x(() => [
|
|
198
|
-
n("div", fe, [
|
|
199
|
-
n("span", ge, g(o(d)("connect.program.game.title")), 1),
|
|
200
|
-
r(s, { variant: "premium" })
|
|
201
|
-
])
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
}, 8, ["actions"]),
|
|
205
|
-
n("div", ye, [
|
|
206
|
-
r(b, {
|
|
207
|
-
modelValue: o(l).searchKey,
|
|
208
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(l).searchKey = a),
|
|
209
|
-
class: "hidden xs:!block sm:!block border-b-2 border-fm-color-neutral-gray-100",
|
|
210
|
-
placeholder: "search",
|
|
211
|
-
collapsible: ""
|
|
212
|
-
}, null, 8, ["modelValue"]),
|
|
213
|
-
o(u).campaigns.token && o(u).campaigns.token.length > 0 ? (f(), V(A, { key: 0 }, [
|
|
214
|
-
n("div", _e, [
|
|
215
|
-
n("div", he, [
|
|
216
|
-
r(me, {
|
|
217
|
-
label: `${o(d)("connect.common.location")}: `,
|
|
218
|
-
"right-icon": "keyboard_arrow_down",
|
|
219
|
-
modelValue: o(l).location,
|
|
220
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(l).location = a),
|
|
221
|
-
icon: "storefront",
|
|
222
|
-
"show-item-label": !0,
|
|
223
|
-
items: o(h).locationOptions
|
|
224
|
-
}, null, 8, ["label", "modelValue", "items"])
|
|
225
|
-
]),
|
|
226
|
-
r(b, {
|
|
227
|
-
modelValue: o(l).searchKey,
|
|
228
|
-
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(l).searchKey = a),
|
|
229
|
-
class: "xs:hidden sm:hidden",
|
|
230
|
-
placeholder: "search",
|
|
231
|
-
collapsible: ""
|
|
232
|
-
}, null, 8, ["modelValue"])
|
|
233
|
-
]),
|
|
234
|
-
r(p, {
|
|
235
|
-
class: "xs:hidden sm:hidden",
|
|
236
|
-
"row-data": o(w),
|
|
237
|
-
"column-defs": j,
|
|
238
|
-
"search-value": o(l).searchKey,
|
|
239
|
-
"column-filter": [],
|
|
240
|
-
onRowClick: t[4] || (t[4] = (a) => C(a.original)),
|
|
241
|
-
"hide-footer": o(w).length < 10
|
|
242
|
-
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
243
|
-
r(q, { class: "hidden xs:!flex sm:!flex flex-col mx-[-24px]" }, {
|
|
244
|
-
default: x(() => [
|
|
245
|
-
(f(!0), V(A, null, X(o(w).filter(
|
|
246
|
-
(a) => a.name.toLowerCase().includes(o(l).searchKey.toLowerCase())
|
|
247
|
-
), (a) => (f(), L(O, {
|
|
248
|
-
key: a._id.toString(),
|
|
249
|
-
onClick: (F) => C(a),
|
|
250
|
-
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
251
|
-
}, {
|
|
252
|
-
default: x(() => {
|
|
253
|
-
var F;
|
|
254
|
-
return [
|
|
255
|
-
n("div", we, [
|
|
256
|
-
n("div", Ce, [
|
|
257
|
-
(f(), L(Y(o(D)(a))))
|
|
258
|
-
]),
|
|
259
|
-
n("div", xe, [
|
|
260
|
-
n("div", ve, g(a.name), 1),
|
|
261
|
-
n("div", be, g(o(G)(a)), 1)
|
|
262
|
-
]),
|
|
263
|
-
n("div", ke, g(o(d)("connect.program.game.token_received", {
|
|
264
|
-
count: ((F = a.pf_collectible) == null ? void 0 : F.currentReceive) ?? 0
|
|
265
|
-
})), 1)
|
|
266
|
-
]),
|
|
267
|
-
n("div", Fe, [
|
|
268
|
-
r(k, {
|
|
269
|
-
icon: "content_copy",
|
|
270
|
-
"icon-color": "neutral-gray-400",
|
|
271
|
-
variant: "tertiary",
|
|
272
|
-
onClick: async (S) => {
|
|
273
|
-
S.stopPropagation(), await M(a);
|
|
274
|
-
}
|
|
275
|
-
}, null, 8, ["onClick"]),
|
|
276
|
-
r(k, {
|
|
277
|
-
icon: "delete",
|
|
278
|
-
"icon-color": "neutral-gray-400",
|
|
279
|
-
variant: "tertiary",
|
|
280
|
-
onClick: (S) => (S.stopPropagation(), E(a))
|
|
281
|
-
}, null, 8, ["onClick"])
|
|
282
|
-
])
|
|
283
|
-
];
|
|
284
|
-
}),
|
|
285
|
-
_: 2
|
|
286
|
-
}, 1032, ["onClick"]))), 128))
|
|
287
|
-
]),
|
|
288
|
-
_: 1
|
|
289
|
-
})
|
|
290
|
-
], 64)) : (f(), L(z, {
|
|
291
|
-
key: 1,
|
|
292
|
-
variant: "outlined",
|
|
293
|
-
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
294
|
-
}, {
|
|
295
|
-
default: x(() => [
|
|
296
|
-
t[6] || (t[6] = n("img", {
|
|
297
|
-
src: Z,
|
|
298
|
-
class: "aspect-square w-[150px]"
|
|
299
|
-
}, null, -1)),
|
|
300
|
-
n("div", Se, [
|
|
301
|
-
n("div", Pe, g(o(d)("connect.program.game.empty_state.title")), 1),
|
|
302
|
-
n("div", Ve, g(o(d)("connect.program.game.empty_state.description")), 1)
|
|
303
|
-
]),
|
|
304
|
-
r(k, {
|
|
305
|
-
variant: "primary",
|
|
306
|
-
label: "Create game program",
|
|
307
|
-
icon: "add",
|
|
308
|
-
disabled: !o(h).isPremium,
|
|
309
|
-
onClick: t[5] || (t[5] = (a) => C())
|
|
310
|
-
}, null, 8, ["disabled"])
|
|
311
|
-
]),
|
|
312
|
-
_: 1
|
|
313
|
-
})),
|
|
314
|
-
r(de, {
|
|
315
|
-
ref_key: "sheetRef",
|
|
316
|
-
ref: v,
|
|
317
|
-
"onSubmit:modelValue": H
|
|
318
|
-
}, null, 512),
|
|
319
|
-
r(pe, {
|
|
320
|
-
ref_key: "sendCollectionSheetRef",
|
|
321
|
-
ref: $
|
|
322
|
-
}, null, 512)
|
|
323
|
-
])
|
|
324
|
-
], 64);
|
|
325
|
-
};
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
export {
|
|
329
|
-
Ne as default
|
|
330
|
-
};
|
package/dist/Member-D75eeIZY.js
DELETED
|
@@ -1,280 +0,0 @@
|
|
|
1
|
-
import { defineComponent as L, ref as F, watch as P, resolveComponent as m, openBlock as x, createElementBlock as C, Fragment as R, createElementVNode as b, createVNode as u, unref as n, withCtx as M, renderList as $, createBlock as D, toDisplayString as O, normalizeClass as U, computed as Y, createCommentVNode as q } from "vue";
|
|
2
|
-
import "./index-DHCiP2WT.js";
|
|
3
|
-
import { useDialogChild as H, FmButtonVariant as S, useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as N } from "./vue-i18n-miVa3rNb.js";
|
|
5
|
-
import { c as A } from "./index-mF4DrbA_.js";
|
|
6
|
-
import "./index-4PxwTlfE.js";
|
|
7
|
-
import "./index-B-yKEua7.js";
|
|
8
|
-
import "./index-qIrN5YA8.js";
|
|
9
|
-
import "./index-dVfpSXT7.js";
|
|
10
|
-
import { u as g, w as j } from "./xlsx-Cs6dDN_G.js";
|
|
11
|
-
import { F as z } from "./FileSaver.min-DMdx33O6.js";
|
|
12
|
-
import { useCoreStore as G } from "@feedmepos/mf-common";
|
|
13
|
-
import { useRouter as W } from "vue-router";
|
|
14
|
-
import { m as I } from "./index-D-Fz1BGi.js";
|
|
15
|
-
import { R as E } from "./app-CGvP2lXl.js";
|
|
16
|
-
const K = { class: "space-y-8 mb-10" }, X = { class: "flex justify-end" }, Z = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: /* @__PURE__ */ U([
|
|
19
|
-
"flex items-center",
|
|
20
|
-
"border border-fm-color-neutral-gray-300",
|
|
21
|
-
"p-16 space-x-16 rounded-md"
|
|
22
|
-
])
|
|
23
|
-
}, ee = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, te = /* @__PURE__ */ L({
|
|
24
|
-
__name: "ImportMemberDialog",
|
|
25
|
-
setup(V) {
|
|
26
|
-
const { t: a } = N(), { emitData: v } = H(), c = F(null), _ = F(null), w = F({
|
|
27
|
-
resetCollectionExpiryBalance: !0
|
|
28
|
-
}), s = [
|
|
29
|
-
"Id",
|
|
30
|
-
"Name",
|
|
31
|
-
"Phone",
|
|
32
|
-
"Email",
|
|
33
|
-
"Gender",
|
|
34
|
-
"CardNo",
|
|
35
|
-
"Birthday",
|
|
36
|
-
"Credit",
|
|
37
|
-
"CreditExpiryDate",
|
|
38
|
-
"Exp",
|
|
39
|
-
"Point",
|
|
40
|
-
"Tier",
|
|
41
|
-
// 'Titles',
|
|
42
|
-
"TotalTransaction",
|
|
43
|
-
"AvgSpent",
|
|
44
|
-
"TotalSpent",
|
|
45
|
-
"LastVisit",
|
|
46
|
-
"Feedback",
|
|
47
|
-
"LastSeasonTierEarned",
|
|
48
|
-
"LastSeasonPointEarned",
|
|
49
|
-
"JoinedAt",
|
|
50
|
-
"JoinedAtLocation",
|
|
51
|
-
"VisitFrequency"
|
|
52
|
-
], p = [
|
|
53
|
-
{
|
|
54
|
-
label: "CSV",
|
|
55
|
-
icon: "csv",
|
|
56
|
-
value: "csv"
|
|
57
|
-
/* csv */
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: "Excel",
|
|
61
|
-
icon: "description",
|
|
62
|
-
value: "xlsx"
|
|
63
|
-
/* xlsx */
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
async function d(i) {
|
|
67
|
-
var t, f;
|
|
68
|
-
c.value = ((f = (t = i.target) == null ? void 0 : t.files) == null ? void 0 : f[0]) ?? null;
|
|
69
|
-
}
|
|
70
|
-
async function y(i) {
|
|
71
|
-
switch (i) {
|
|
72
|
-
case "csv":
|
|
73
|
-
h();
|
|
74
|
-
break;
|
|
75
|
-
case "xlsx":
|
|
76
|
-
T();
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function h() {
|
|
81
|
-
const i = new Blob([s.join(",")], {
|
|
82
|
-
type: "text/csv;charset=utf-8;"
|
|
83
|
-
});
|
|
84
|
-
z.saveAs(i, "ImportMemberTemplate.csv");
|
|
85
|
-
}
|
|
86
|
-
function T() {
|
|
87
|
-
const i = g.aoa_to_sheet([s]), t = g.book_new();
|
|
88
|
-
g.book_append_sheet(t, i, "Sheet1"), j(t, "ImportMemberTemplate.xlsx");
|
|
89
|
-
}
|
|
90
|
-
return P(c, () => {
|
|
91
|
-
v({ file: c.value, config: w.value });
|
|
92
|
-
}), (i, t) => {
|
|
93
|
-
const f = m("FmSwitch"), k = m("FmButton"), o = m("FmMenuItem"), l = m("FmMenu"), r = m("FmDropField");
|
|
94
|
-
return x(), C(R, null, [
|
|
95
|
-
b("div", K, [
|
|
96
|
-
t[3] || (t[3] = b("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
|
|
97
|
-
u(f, {
|
|
98
|
-
"model-value": n(w).resetCollectionExpiryBalance ?? !0,
|
|
99
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => n(w).resetCollectionExpiryBalance = e),
|
|
100
|
-
label: "Replace Existing Free Credit",
|
|
101
|
-
sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
|
|
102
|
-
"label-placement": "right"
|
|
103
|
-
}, null, 8, ["model-value"])
|
|
104
|
-
]),
|
|
105
|
-
b("div", X, [
|
|
106
|
-
u(l, null, {
|
|
107
|
-
"menu-button": M(() => [
|
|
108
|
-
u(k, {
|
|
109
|
-
variant: "tertiary",
|
|
110
|
-
icon: "download",
|
|
111
|
-
label: "Download Template"
|
|
112
|
-
})
|
|
113
|
-
]),
|
|
114
|
-
default: M(() => [
|
|
115
|
-
(x(), C(R, null, $(p, (e) => u(o, {
|
|
116
|
-
key: e.value,
|
|
117
|
-
icon: e.icon,
|
|
118
|
-
label: e.label,
|
|
119
|
-
onClick: (B) => y(e.value),
|
|
120
|
-
selectable: ""
|
|
121
|
-
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
})
|
|
125
|
-
]),
|
|
126
|
-
n(c) ? (x(), C("div", Z, [
|
|
127
|
-
u(k, {
|
|
128
|
-
variant: n(S).Tertiary,
|
|
129
|
-
"prepend-icon": "attach_file"
|
|
130
|
-
}, null, 8, ["variant"]),
|
|
131
|
-
b("p", ee, O(n(c).name), 1),
|
|
132
|
-
b("label", {
|
|
133
|
-
ref_key: "fileLabelRef",
|
|
134
|
-
ref: _,
|
|
135
|
-
htmlFor: "file"
|
|
136
|
-
}, [
|
|
137
|
-
u(k, {
|
|
138
|
-
variant: n(S).Plain,
|
|
139
|
-
label: n(a)("Replace File"),
|
|
140
|
-
onClick: t[2] || (t[2] = () => {
|
|
141
|
-
var e;
|
|
142
|
-
return (e = n(_)) == null ? void 0 : e.click();
|
|
143
|
-
})
|
|
144
|
-
}, null, 8, ["variant", "label"]),
|
|
145
|
-
b("input", {
|
|
146
|
-
id: "file",
|
|
147
|
-
accept: ".csv, .xlsx",
|
|
148
|
-
class: "hidden",
|
|
149
|
-
type: "file",
|
|
150
|
-
multiple: "",
|
|
151
|
-
onChange: d
|
|
152
|
-
}, null, 32)
|
|
153
|
-
], 512)
|
|
154
|
-
])) : (x(), D(r, {
|
|
155
|
-
key: 0,
|
|
156
|
-
onFileUpload: t[1] || (t[1] = (e) => c.value = e),
|
|
157
|
-
accept: ".csv, .xlsx",
|
|
158
|
-
"max-file-size": 5e6
|
|
159
|
-
}))
|
|
160
|
-
], 64);
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}), ne = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ye = /* @__PURE__ */ L({
|
|
164
|
-
__name: "Member",
|
|
165
|
-
setup(V) {
|
|
166
|
-
var t, f, k;
|
|
167
|
-
const a = W(), { t: v } = N(), c = J(), _ = Q(), w = G();
|
|
168
|
-
v("connect.loyalty.member.import"), v("connect.navigation.queue");
|
|
169
|
-
const s = [
|
|
170
|
-
{
|
|
171
|
-
label: v("connect.loyalty.member.tabs.member_list"),
|
|
172
|
-
value: E["$connect-LOYALTY_MEMBER_LIST"],
|
|
173
|
-
actions: (k = (f = (t = w.sessionUser) == null ? void 0 : t.value) == null ? void 0 : f.role) != null && k.isAdmin ? [] : []
|
|
174
|
-
}
|
|
175
|
-
], p = Y(() => {
|
|
176
|
-
var l, r, e;
|
|
177
|
-
return a.currentRoute.value.name != E["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
178
|
-
title: d.value.label,
|
|
179
|
-
actions: d.value.actions,
|
|
180
|
-
description: void 0
|
|
181
|
-
} : (d.value = s[1], {
|
|
182
|
-
backButton: !0,
|
|
183
|
-
title: v("connect.loyalty.member.title"),
|
|
184
|
-
actions: [],
|
|
185
|
-
description: `${(l = y.value) == null ? void 0 : l.name} (${(r = y.value) == null ? void 0 : r._id}) (${(e = y.value) == null ? void 0 : e.phoneNumber})`,
|
|
186
|
-
onBackButton: async () => {
|
|
187
|
-
await a.push({ name: E["$connect-LOYALTY_MEMBER_LIST"] });
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}), d = F(
|
|
191
|
-
s.find((o) => o.value === a.currentRoute.value.name) ?? s[0]
|
|
192
|
-
), y = F();
|
|
193
|
-
async function h(o) {
|
|
194
|
-
await a.push({ name: o });
|
|
195
|
-
}
|
|
196
|
-
async function T() {
|
|
197
|
-
c.open({
|
|
198
|
-
title: "Upload File",
|
|
199
|
-
closeButton: !0,
|
|
200
|
-
dismissAway: !1,
|
|
201
|
-
contentComponent: te,
|
|
202
|
-
primaryActions: { text: "Import", close: !1 }
|
|
203
|
-
}).onPrimary(async (o) => {
|
|
204
|
-
if (!o) {
|
|
205
|
-
_.open({
|
|
206
|
-
type: "error",
|
|
207
|
-
title: "Please upload a file"
|
|
208
|
-
});
|
|
209
|
-
return;
|
|
210
|
-
}
|
|
211
|
-
const { file: l, config: r } = o;
|
|
212
|
-
if (!l)
|
|
213
|
-
_.open({
|
|
214
|
-
type: "error",
|
|
215
|
-
title: "Please upload a file"
|
|
216
|
-
});
|
|
217
|
-
else {
|
|
218
|
-
const e = new FormData();
|
|
219
|
-
e.append("file", l), e.append("config", JSON.stringify(r)), await I.import(e), _.open({
|
|
220
|
-
type: "info",
|
|
221
|
-
title: "Import begins soon. Check Queue for updates.",
|
|
222
|
-
action: "View",
|
|
223
|
-
onAction: async () => {
|
|
224
|
-
await a.push({
|
|
225
|
-
name: E["$connect-QUEUE"],
|
|
226
|
-
query: { type: [A.enum.MEMBER_IMPORTED] }
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
}), c.close();
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function i(o) {
|
|
234
|
-
switch (o) {
|
|
235
|
-
case "import":
|
|
236
|
-
T();
|
|
237
|
-
break;
|
|
238
|
-
case "queue":
|
|
239
|
-
a.push({
|
|
240
|
-
name: E["$connect-QUEUE"],
|
|
241
|
-
query: { type: [A.enum.MEMBER_IMPORTED] }
|
|
242
|
-
});
|
|
243
|
-
break;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
return P(
|
|
247
|
-
() => a.currentRoute.value.name,
|
|
248
|
-
async (o) => {
|
|
249
|
-
d.value = s.find((r) => r.value === o) ?? s[0];
|
|
250
|
-
const l = a.currentRoute.value.params.id;
|
|
251
|
-
l && (y.value = await I.readById(l));
|
|
252
|
-
},
|
|
253
|
-
{ immediate: !0 }
|
|
254
|
-
), (o, l) => {
|
|
255
|
-
const r = m("FmPageHead"), e = m("FmTabs"), B = m("RouterView");
|
|
256
|
-
return x(), C(R, null, [
|
|
257
|
-
u(r, {
|
|
258
|
-
actions: n(p).actions,
|
|
259
|
-
title: n(p).title,
|
|
260
|
-
description: n(p).description,
|
|
261
|
-
"back-button": n(p).backButton,
|
|
262
|
-
"onClick:back": n(p).onBackButton,
|
|
263
|
-
"onClick:action": i
|
|
264
|
-
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
265
|
-
b("div", ne, [
|
|
266
|
-
n(a).currentRoute.value.name != n(E)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (x(), D(e, {
|
|
267
|
-
key: 0,
|
|
268
|
-
"model-value": n(d).value,
|
|
269
|
-
items: s,
|
|
270
|
-
"onUpdate:modelValue": h
|
|
271
|
-
}, null, 8, ["model-value"])) : q("", !0),
|
|
272
|
-
u(B)
|
|
273
|
-
])
|
|
274
|
-
], 64);
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
export {
|
|
279
|
-
ye as default
|
|
280
|
-
};
|