@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.71
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-CnF_WeRZ.js +427 -0
- package/dist/{App-DalxIjTu.js → App-DJwSTuRa.js} +445 -420
- package/dist/AuditLogs-RarW2PHL.js +1886 -0
- package/dist/Bin-BaixTvHW.js +166 -0
- package/dist/{Broadcast-uMAvsC--.js → Broadcast-8DEAMhyM.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DPXoOupI.js} +6 -8
- package/dist/Card-DRwLZ-Mn.js +896 -0
- package/dist/Collections-WsPM9v03.js +459 -0
- package/dist/{Credit-QlnatflM.js → Credit-DMxRdTzt.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bcj6o4Xi.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-CuJ8curT.js} +49 -49
- package/dist/{Experience-Czy41ifp.js → Experience-B0BV4Tc_.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-Bu6kJJHx.js +278 -0
- package/dist/Index-CX-aPFQt.js +259 -0
- package/dist/Marketing-CiVFwl6S.js +20071 -0
- package/dist/Member-DZfTtt13.js +333 -0
- package/dist/MemberList-CscwsZnv.js +1598 -0
- package/dist/MemberTransactions-BWNs6bUm.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-BrbRudIU.js} +134 -122
- package/dist/Mission-CyJ-9Qfl.js +296 -0
- package/dist/Overview-DLyt6VId.js +1078 -0
- package/dist/{Point-By6ogYy_.js → Point-Cc_0-RKm.js} +55 -53
- package/dist/Promotion-KqA8nev2.js +289 -0
- package/dist/Queue-i8--zps9.js +249 -0
- package/dist/Record-CLUO1JVc.js +340 -0
- package/dist/Reward-BEdUKQ3M.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-B8zw1TmO.js +1727 -0
- package/dist/Segment-B8sYajZG.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-CmmI5Vwl.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js +186 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-DY3FMuIf.js +147 -0
- package/dist/Setting-DT8dRb2A.js +1931 -0
- package/dist/Store-BhsPWRkR.js +1841 -0
- package/dist/StoreRewards-Cx2WDZ3p.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Byb7GOoh.js +1028 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Cb-FGTO9.js} +1 -1
- package/dist/{Tier-DvAs0-yx.js → Tier-kQy1vGwo.js} +327 -318
- package/dist/{Title-B_Trr39o.js → Title-DKv8FqpX.js} +224 -209
- package/dist/{Transaction-DCJw-b3H.js → Transaction-CSLllOgl.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CvpBdNBn.js +130 -0
- package/dist/Voucher-BP6fmSwu.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CxQEg_HW.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-aurdXO2X.js} +1 -1
- package/dist/app-B3qgrQOd.js +7079 -0
- package/dist/app-s3iL79De.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/business-DG2w8U-i.js +79 -0
- package/dist/campaign-BP6Rz-AH.js +1810 -0
- package/dist/{campaign--0_yMbMV.js → campaign-WPRZ4BRF.js} +2 -2
- package/dist/campaign.enum-CoqrWNTZ.js +20 -0
- package/dist/campaign.fn-BRPigTOA.js +758 -0
- package/dist/collectible.enum-Dy4sxF43.js +19 -0
- package/dist/{collection.fn-3TwPe7aF.js → collection.fn-DGnLyYgV.js} +2 -2
- package/dist/dto-xZ9I6-Jr.js +214 -0
- package/dist/{effect-BeR0LK61.js → effect-C0XoYTus.js} +33 -16
- package/dist/email-addresses-CJ87c7W1.js +705 -0
- package/dist/{export-xeLLhqvh.js → export-qlV-AbEl.js} +5 -5
- package/dist/{helper-B5iqfKh8.js → helper-DzYe8aNx.js} +1 -1
- package/dist/{index-BOdtpNkP.js → index-4vdSri7m.js} +266 -173
- package/dist/{index-CU_d8jjU.js → index-BfSj7cUl.js} +1 -1
- package/dist/index-Bj0ULpXi.js +29556 -0
- package/dist/index-BnZ4yaMH.js +115 -0
- package/dist/index-Bo5DJXxs.js +54 -0
- package/dist/{index-Ct_wR519.js → index-BuvJH6SU.js} +24 -21
- package/dist/index-C2GEs8di.js +32 -0
- package/dist/{index-CyKZ-SsN.js → index-CJuOTcCE.js} +1 -1
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-DP-dGMJC.js → index-DReysUPw.js} +2230 -871
- package/dist/{index-CAn5heDe.js → index-DgCjRb3o.js} +48 -4
- package/dist/index-IwITtvVu.js +56 -0
- package/dist/{index-Bh-uaaBG.js → index-n3wiQlbk.js} +1506 -1480
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CkJhTmme.js} +154 -154
- package/dist/loading-DwJdwl4G.js +71 -0
- package/dist/{membership-D0nqqWNZ.js → membership-DvPK3h8f.js} +54 -46
- package/dist/money-C_WIbr_x.js +15 -0
- package/dist/number-ZeVoGhzP.js +12 -0
- package/dist/objectid-8lkX6otO.js +145 -0
- package/dist/{loading-C-JDVajU.js → plugins-D20keyDW.js} +2990 -3062
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-CqnMEq_w.js +36 -0
- package/dist/{rule-Dn_GgBCe.js → rule-D7htGgWz.js} +185 -178
- package/dist/{rule-builder-BXt29Es4.js → rule-builder-BbJpYQ0n.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-D2Oi3dxP.js → template-BWQCVHm7.js} +5 -5
- package/dist/trigger-DMuv0_O7.js +144 -0
- package/dist/user-C_v2C0qN.js +54 -0
- package/dist/vue-i18n-N8_TEEd0.js +2365 -0
- package/dist/{xlsx-CCRCidY2.js → xlsx-CsPDNSTo.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-BMpS6jWb.js +0 -622
- package/dist/Card-DV8-g69L.js +0 -825
- package/dist/Collections-DRafEHT1.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
- package/dist/Game-CD3zSitz.js +0 -255
- package/dist/Marketing-NNes8z6Q.js +0 -316
- package/dist/Member-CTqBgYuV.js +0 -69
- package/dist/MemberList-B99tS5ce.js +0 -1733
- package/dist/MemberTransactions-D1YCXPOg.js +0 -38
- package/dist/Mission-XbBVKBiE.js +0 -261
- package/dist/Promotion-DKcBr-RI.js +0 -247
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
- package/dist/Segment-B8cszL-F.js +0 -437
- package/dist/Setting-aZYABlMW.js +0 -1901
- package/dist/Store-Bx2tyJwe.js +0 -1511
- package/dist/StoreRewards-DTp9G6gw.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
- package/dist/Voucher-jqv3ji90.js +0 -490
- package/dist/app-WlcUVbFb.js +0 -5764
- package/dist/app-_w0hjM7u.js +0 -53428
- package/dist/business-BC4-i1cU.js +0 -78
- package/dist/dto-Ns2dLn1B.js +0 -2770
- package/dist/index-BWb9vRCi.js +0 -29193
- package/dist/index-CpU9aqyW.js +0 -206
- package/dist/index-CqO_ZvtD.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DsNsA2uX.js +0 -298
- package/dist/index-WAMr3npT.js +0 -762
- package/dist/money-hdbrblud.js +0 -15
- package/dist/number-CRWGOZaW.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
- package/dist/vue-i18n-Dud8fvmw.js +0 -2365
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { defineComponent as N, ref as v, computed as q, onMounted as z, resolveComponent as r, openBlock as p, createElementBlock as C, Fragment as b, createVNode as s, unref as o, withCtx as h, createElementVNode as n, toDisplayString as c, renderList as J, createBlock as k, resolveDynamicComponent as O, h as l } from "vue";
|
|
2
|
+
import { _ as Q } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { useDialog as W, components as w } from "@feedmepos/ui-library";
|
|
4
|
+
import { a as X, p as Y } from "./plugins-D20keyDW.js";
|
|
5
|
+
import { u as Z } from "./loading-DwJdwl4G.js";
|
|
6
|
+
import { u as ee } from "./business-DG2w8U-i.js";
|
|
7
|
+
import { u as te } from "./campaign-WPRZ4BRF.js";
|
|
8
|
+
import { a as $, b as A, g as oe } from "./campaign-BP6Rz-AH.js";
|
|
9
|
+
import { _ as ae } from "./ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js";
|
|
10
|
+
import { _ as ne } from "./EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bcj6o4Xi.js";
|
|
11
|
+
import { u as se } from "./template-BWQCVHm7.js";
|
|
12
|
+
import { u as ie } from "./vue-i18n-N8_TEEd0.js";
|
|
13
|
+
import { _ as re } from "./SendCollectionSheet.vue_vue_type_script_setup_true_lang-CIcXjbJG.js";
|
|
14
|
+
import { c as x } from "./index-BnZ4yaMH.js";
|
|
15
|
+
const le = { class: "flex items-center" }, ce = { class: "fm-typo-en-title-md-600 fm-step-title line-clamp-2 mr-8" }, me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "flex gap-8 overflow-x-auto" }, ue = { class: "space-y-8" }, fe = { class: "flex w-full gap-4 items-center" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "space-y-4" }, _e = { class: "fm-typo-en-body-lg-600" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xe = { class: "flex flex-col gap-16 text-center" }, ve = { class: "fm-typo-en-title-sm-800" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ N({
|
|
16
|
+
__name: "Game",
|
|
17
|
+
setup(be) {
|
|
18
|
+
const { t: m } = ie(), E = {
|
|
19
|
+
label: m("connect.program.common.actions.create", {
|
|
20
|
+
type: m("connect.program.game.title").toLowerCase()
|
|
21
|
+
}),
|
|
22
|
+
value: "create",
|
|
23
|
+
isPrimary: !0,
|
|
24
|
+
prependIcon: "add"
|
|
25
|
+
}, K = se("GAME", W()), f = ee(), d = te(), { global: M, minor: F } = Z, i = v({
|
|
26
|
+
searchKey: "",
|
|
27
|
+
location: null
|
|
28
|
+
}), g = q(
|
|
29
|
+
() => d.campaigns.token.filter(
|
|
30
|
+
(e) => !i.value.location || !e.targetLocation || e.targetLocation.includes(i.value.location)
|
|
31
|
+
)
|
|
32
|
+
), G = [
|
|
33
|
+
{
|
|
34
|
+
header: "Program title",
|
|
35
|
+
accessorKey: "name",
|
|
36
|
+
// accessorFn: (v) => v.name,
|
|
37
|
+
cell(e) {
|
|
38
|
+
return l("div", { class: "flex items-center justify-between gap-4" }, [
|
|
39
|
+
l("div", { class: "flex items-center" }, [
|
|
40
|
+
l(
|
|
41
|
+
w.FmTooltip,
|
|
42
|
+
{
|
|
43
|
+
content: e.row.original._id,
|
|
44
|
+
onClick: (t) => {
|
|
45
|
+
t.stopPropagation(), X(e.row.original._id);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
[
|
|
49
|
+
l(w.FmIcon, {
|
|
50
|
+
name: "info",
|
|
51
|
+
outline: !0,
|
|
52
|
+
size: "sm"
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
)
|
|
56
|
+
]),
|
|
57
|
+
l("div", { class: "flex-1" }, e.row.original.name)
|
|
58
|
+
]);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
header: "Status",
|
|
63
|
+
accessorFn: (e) => oe(e),
|
|
64
|
+
cell(e) {
|
|
65
|
+
return $(e.row.original);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
header: "Summary",
|
|
70
|
+
accessorFn: (e) => A(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 l("div", { class: "flex items-center gap-8" }, [
|
|
84
|
+
l(w.FmButton, {
|
|
85
|
+
variant: "tertiary",
|
|
86
|
+
icon: "send",
|
|
87
|
+
iconColor: "neutral-gray-400",
|
|
88
|
+
onClick: (t) => {
|
|
89
|
+
t.stopPropagation(), T(e.row.original);
|
|
90
|
+
}
|
|
91
|
+
}),
|
|
92
|
+
l(w.FmButton, {
|
|
93
|
+
variant: "tertiary",
|
|
94
|
+
icon: "delete",
|
|
95
|
+
iconColor: "neutral-gray-400",
|
|
96
|
+
onClick: (t) => {
|
|
97
|
+
t.stopPropagation(), L(e.row.original);
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
], S = v(), P = v();
|
|
104
|
+
async function L(e) {
|
|
105
|
+
await Y.remove(`Are you sure you want to remove ${e.name}?`) && await F(
|
|
106
|
+
async () => {
|
|
107
|
+
await x.delete(e._id), await d.read("GAME");
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
message: `Removing ${e.name}`,
|
|
111
|
+
successMessage: `Removed ${e.name} successfully`
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
async function y(e) {
|
|
116
|
+
e ? await t() : K.open(async (u) => {
|
|
117
|
+
await t(u);
|
|
118
|
+
});
|
|
119
|
+
async function t(u) {
|
|
120
|
+
var _;
|
|
121
|
+
(_ = S.value) == null || _.showSheet(
|
|
122
|
+
!0,
|
|
123
|
+
"GAME",
|
|
124
|
+
e ? await x.readById(e._id) : void 0,
|
|
125
|
+
u
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async function I(e) {
|
|
130
|
+
await F(
|
|
131
|
+
async () => {
|
|
132
|
+
e.campaign._id ? await x.update(e.campaign._id, e) : await x.create(e), await d.read("GAME");
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
message: `${e.campaign._id ? "Updating" : "Creating"} game program`,
|
|
136
|
+
successMessage: `Game program ${e.campaign._id ? "updated" : "created"} successfully`
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
function T(e) {
|
|
141
|
+
var t;
|
|
142
|
+
(t = P.value) == null || t.showSheet({
|
|
143
|
+
campaign: e
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
return z(async () => {
|
|
147
|
+
await M(async () => {
|
|
148
|
+
await d.read("GAME"), await f.readPremium();
|
|
149
|
+
});
|
|
150
|
+
}), (e, t) => {
|
|
151
|
+
const u = r("FmPill"), _ = r("FmPageHead"), V = r("FmSearch"), U = r("FmTable"), B = r("FmButton"), j = r("FmListItem"), D = r("FmList"), H = r("FmCard");
|
|
152
|
+
return p(), C(b, null, [
|
|
153
|
+
s(_, {
|
|
154
|
+
actions: o(g).length > 0 && o(f).isPremium ? [E] : [],
|
|
155
|
+
"onClick:action": t[0] || (t[0] = () => y())
|
|
156
|
+
}, {
|
|
157
|
+
title: h(() => [
|
|
158
|
+
n("div", le, [
|
|
159
|
+
n("span", ce, c(o(m)("connect.program.game.title")), 1),
|
|
160
|
+
s(u, { variant: "premium" })
|
|
161
|
+
])
|
|
162
|
+
]),
|
|
163
|
+
_: 1
|
|
164
|
+
}, 8, ["actions"]),
|
|
165
|
+
n("div", me, [
|
|
166
|
+
s(V, {
|
|
167
|
+
modelValue: o(i).searchKey,
|
|
168
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => o(i).searchKey = a),
|
|
169
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
170
|
+
placeholder: "search",
|
|
171
|
+
collapsible: ""
|
|
172
|
+
}, null, 8, ["modelValue"]),
|
|
173
|
+
o(d).campaigns.token && o(d).campaigns.token.length > 0 ? (p(), C(b, { key: 0 }, [
|
|
174
|
+
n("div", de, [
|
|
175
|
+
n("div", pe, [
|
|
176
|
+
s(ae, {
|
|
177
|
+
modelValue: o(i).location,
|
|
178
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => o(i).location = a),
|
|
179
|
+
label: "Location: ",
|
|
180
|
+
"show-item-label": !0,
|
|
181
|
+
icon: "storefront",
|
|
182
|
+
placement: "bottom-start",
|
|
183
|
+
items: o(f).locationItems
|
|
184
|
+
}, null, 8, ["modelValue", "items"])
|
|
185
|
+
]),
|
|
186
|
+
s(V, {
|
|
187
|
+
modelValue: o(i).searchKey,
|
|
188
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => o(i).searchKey = a),
|
|
189
|
+
class: "xs:hidden",
|
|
190
|
+
placeholder: "search",
|
|
191
|
+
collapsible: ""
|
|
192
|
+
}, null, 8, ["modelValue"])
|
|
193
|
+
]),
|
|
194
|
+
s(U, {
|
|
195
|
+
class: "xs:hidden",
|
|
196
|
+
"row-data": o(g),
|
|
197
|
+
"column-defs": G,
|
|
198
|
+
"search-value": o(i).searchKey,
|
|
199
|
+
"column-filter": [],
|
|
200
|
+
onRowClick: t[4] || (t[4] = (a) => y(a.original)),
|
|
201
|
+
"hide-footer": o(g).length < 10
|
|
202
|
+
}, null, 8, ["row-data", "search-value", "hide-footer"]),
|
|
203
|
+
s(D, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
204
|
+
default: h(() => [
|
|
205
|
+
(p(!0), C(b, null, J(o(g).filter(
|
|
206
|
+
(a) => a.name.toLowerCase().includes(o(i).searchKey.toLowerCase())
|
|
207
|
+
), (a) => (p(), k(j, {
|
|
208
|
+
key: a._id.toString(),
|
|
209
|
+
onClick: (R) => y(a),
|
|
210
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
211
|
+
}, {
|
|
212
|
+
default: h(() => [
|
|
213
|
+
n("div", ue, [
|
|
214
|
+
n("div", fe, [
|
|
215
|
+
(p(), k(O(o($)(a)))),
|
|
216
|
+
n("div", ge, c(a.currentReceive ?? 0) + " used ", 1)
|
|
217
|
+
]),
|
|
218
|
+
n("div", ye, [
|
|
219
|
+
n("div", _e, c(a.name), 1),
|
|
220
|
+
n("div", he, c(o(A)(a)), 1)
|
|
221
|
+
]),
|
|
222
|
+
n("div", we, c(o(m)("program.game.token_received", {
|
|
223
|
+
count: a.currentReceive ?? 0
|
|
224
|
+
})), 1)
|
|
225
|
+
]),
|
|
226
|
+
s(B, {
|
|
227
|
+
icon: "delete",
|
|
228
|
+
"icon-color": "neutral-gray-400",
|
|
229
|
+
variant: "tertiary",
|
|
230
|
+
onClick: (R) => (R.stopPropagation(), L(a))
|
|
231
|
+
}, null, 8, ["onClick"])
|
|
232
|
+
]),
|
|
233
|
+
_: 2
|
|
234
|
+
}, 1032, ["onClick"]))), 128))
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
})
|
|
238
|
+
], 64)) : (p(), k(H, {
|
|
239
|
+
key: 1,
|
|
240
|
+
variant: "outlined",
|
|
241
|
+
class: "w-full flex flex-col items-center justify-center gap-y-24 p-24"
|
|
242
|
+
}, {
|
|
243
|
+
default: h(() => [
|
|
244
|
+
t[6] || (t[6] = n("img", {
|
|
245
|
+
src: Q,
|
|
246
|
+
class: "aspect-square w-[150px]"
|
|
247
|
+
}, null, -1)),
|
|
248
|
+
n("div", xe, [
|
|
249
|
+
n("div", ve, c(o(m)("connect.program.game.empty_state.title")), 1),
|
|
250
|
+
n("div", Ce, c(o(m)("connect.program.game.empty_state.description")), 1)
|
|
251
|
+
]),
|
|
252
|
+
s(B, {
|
|
253
|
+
variant: "primary",
|
|
254
|
+
label: "Create game program",
|
|
255
|
+
icon: "add",
|
|
256
|
+
disabled: !o(f).isPremium,
|
|
257
|
+
onClick: t[5] || (t[5] = (a) => y())
|
|
258
|
+
}, null, 8, ["disabled"])
|
|
259
|
+
]),
|
|
260
|
+
_: 1
|
|
261
|
+
})),
|
|
262
|
+
s(ne, {
|
|
263
|
+
ref_key: "sheetRef",
|
|
264
|
+
ref: S,
|
|
265
|
+
"onSubmit:modelValue": I
|
|
266
|
+
}, null, 512),
|
|
267
|
+
s(re, {
|
|
268
|
+
ref_key: "sendCollectionSheetRef",
|
|
269
|
+
ref: P
|
|
270
|
+
}, null, 512)
|
|
271
|
+
])
|
|
272
|
+
], 64);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
export {
|
|
277
|
+
Ie as default
|
|
278
|
+
};
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { defineComponent as U, ref as g, watch as O, onMounted as I, resolveComponent as m, openBlock as b, createBlock as j, withCtx as P, createTextVNode as z, toDisplayString as $, createElementVNode as c, createVNode as o, unref as e, createElementBlock as F, createCommentVNode as W, normalizeClass as G, computed as L, Fragment as q, isRef as J } from "vue";
|
|
2
|
+
import { u as H } from "./vue-i18n-N8_TEEd0.js";
|
|
3
|
+
import "./index-CJuOTcCE.js";
|
|
4
|
+
import { useRouter as K } from "vue-router";
|
|
5
|
+
import { u as Q } from "./loading-DwJdwl4G.js";
|
|
6
|
+
import { f as V, p as X } from "./plugins-D20keyDW.js";
|
|
7
|
+
import { u as Y, _ as Z } from "./RewardGroup.vue_vue_type_script_setup_true_lang-B9vnSbWj.js";
|
|
8
|
+
import { useDialog as ee, useSnackbar as ne, FmButtonVariant as p } from "@feedmepos/ui-library";
|
|
9
|
+
import { r as N } from "./index-C2GEs8di.js";
|
|
10
|
+
import { u as ae } from "./reward-CqnMEq_w.js";
|
|
11
|
+
import { u as oe } from "./business-DG2w8U-i.js";
|
|
12
|
+
import { u as te } from "./membership-DvPK3h8f.js";
|
|
13
|
+
import { R as S } from "./app-B3qgrQOd.js";
|
|
14
|
+
const re = { class: "space-y-24" }, le = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: /* @__PURE__ */ G([
|
|
17
|
+
"p-16 pl-24 space-x-8",
|
|
18
|
+
"bg-fm-color-primary-oats rounded-lg",
|
|
19
|
+
"flex items-center",
|
|
20
|
+
"justify-between"
|
|
21
|
+
])
|
|
22
|
+
}, ie = { key: 1 }, se = {
|
|
23
|
+
key: 2,
|
|
24
|
+
class: /* @__PURE__ */ G([
|
|
25
|
+
"flex items-center",
|
|
26
|
+
"border border-fm-color-neutral-gray-300",
|
|
27
|
+
"p-16 space-x-16 rounded-md"
|
|
28
|
+
])
|
|
29
|
+
}, ce = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, me = { class: "flex justify-end space-x-8 w-full" }, de = /* @__PURE__ */ U({
|
|
30
|
+
__name: "TermAndConditionDialog",
|
|
31
|
+
props: {
|
|
32
|
+
modelValue: { type: Boolean }
|
|
33
|
+
},
|
|
34
|
+
emits: ["update:modelValue"],
|
|
35
|
+
setup(B, { emit: k }) {
|
|
36
|
+
const y = B;
|
|
37
|
+
ee();
|
|
38
|
+
const s = ne(), { t } = H(), i = Y(), { minor: _ } = Q, d = g(!1), T = k, r = g(null), w = g(null);
|
|
39
|
+
async function h() {
|
|
40
|
+
if (!r.value) {
|
|
41
|
+
s.open({
|
|
42
|
+
type: "error",
|
|
43
|
+
title: "Please upload a file"
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
_(
|
|
48
|
+
async () => {
|
|
49
|
+
d.value = !0;
|
|
50
|
+
const n = await V.update(
|
|
51
|
+
V.referralTermAndConditionPath(),
|
|
52
|
+
r.value
|
|
53
|
+
), a = i.referralProgram;
|
|
54
|
+
a.term_and_condition = n, await N.update(a), d.value = !1, v();
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
successMessage: "Term and Condition uploaded successfully"
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
async function x() {
|
|
62
|
+
await X.confirm(
|
|
63
|
+
t("connect.referral.term_and_condition.confirm_remove"),
|
|
64
|
+
t("connect.common.confirm"),
|
|
65
|
+
t("connect.common.confirm"),
|
|
66
|
+
t("connect.common.cancel")
|
|
67
|
+
) && _(
|
|
68
|
+
async () => {
|
|
69
|
+
d.value = !0, await V.delete(
|
|
70
|
+
V.referralTermAndConditionPath()
|
|
71
|
+
);
|
|
72
|
+
const a = i.referralProgram;
|
|
73
|
+
a.term_and_condition = void 0, await N.update(a), d.value = !1, v();
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
successMessage: "Term and Condition removed successfully"
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function v() {
|
|
81
|
+
r.value = null, T("update:modelValue", !1);
|
|
82
|
+
}
|
|
83
|
+
function l() {
|
|
84
|
+
var n;
|
|
85
|
+
window.open((n = i.referralProgram) == null ? void 0 : n.term_and_condition, "_blank");
|
|
86
|
+
}
|
|
87
|
+
return O(
|
|
88
|
+
() => y.modelValue,
|
|
89
|
+
(n) => {
|
|
90
|
+
r.value = null;
|
|
91
|
+
}
|
|
92
|
+
), I(() => {
|
|
93
|
+
}), (n, a) => {
|
|
94
|
+
const R = m("FmButton"), E = m("FmDropField"), u = m("fm-button"), A = m("fm-dialog");
|
|
95
|
+
return b(), j(A, {
|
|
96
|
+
"model-value": n.modelValue,
|
|
97
|
+
"onUpdate:modelValue": a[3] || (a[3] = (C) => n.$emit("update:modelValue", C)),
|
|
98
|
+
"dismiss-away": ""
|
|
99
|
+
}, {
|
|
100
|
+
"dialog-header": P(() => [
|
|
101
|
+
z($(n.$t("connect.referral.actions.terms")), 1)
|
|
102
|
+
]),
|
|
103
|
+
"dialog-footer": P(() => [
|
|
104
|
+
c("div", me, [
|
|
105
|
+
o(u, {
|
|
106
|
+
variant: e(p).Tertiary,
|
|
107
|
+
label: e(t)("connect.common.cancel"),
|
|
108
|
+
onClick: v
|
|
109
|
+
}, null, 8, ["variant", "label"]),
|
|
110
|
+
o(u, {
|
|
111
|
+
variant: e(p).Primary,
|
|
112
|
+
class: "ml-auto mr-8",
|
|
113
|
+
label: e(t)("connect.common.save"),
|
|
114
|
+
loading: e(d),
|
|
115
|
+
onClick: h
|
|
116
|
+
}, null, 8, ["variant", "label", "loading"])
|
|
117
|
+
])
|
|
118
|
+
]),
|
|
119
|
+
default: P(() => {
|
|
120
|
+
var C;
|
|
121
|
+
return [
|
|
122
|
+
c("div", re, [
|
|
123
|
+
(C = e(i).referralProgram) != null && C.term_and_condition ? (b(), F("div", le, [
|
|
124
|
+
o(R, {
|
|
125
|
+
label: e(t)("View uploaded file"),
|
|
126
|
+
variant: e(p).Plain,
|
|
127
|
+
icon: "file_present",
|
|
128
|
+
onClick: l
|
|
129
|
+
}, null, 8, ["label", "variant"]),
|
|
130
|
+
o(R, {
|
|
131
|
+
variant: e(p).Plain,
|
|
132
|
+
icon: "delete",
|
|
133
|
+
onClick: x
|
|
134
|
+
}, null, 8, ["variant"])
|
|
135
|
+
])) : W("", !0),
|
|
136
|
+
e(r) ? (b(), F("div", se, [
|
|
137
|
+
o(u, {
|
|
138
|
+
variant: e(p).Tertiary,
|
|
139
|
+
"prepend-icon": "attach_file"
|
|
140
|
+
}, null, 8, ["variant"]),
|
|
141
|
+
c("p", ce, $(e(r).name), 1),
|
|
142
|
+
c("label", {
|
|
143
|
+
ref_key: "fileLabelRef",
|
|
144
|
+
ref: w,
|
|
145
|
+
htmlFor: "file"
|
|
146
|
+
}, [
|
|
147
|
+
o(u, {
|
|
148
|
+
variant: e(p).Plain,
|
|
149
|
+
label: e(t)("Replace File"),
|
|
150
|
+
onClick: a[1] || (a[1] = () => {
|
|
151
|
+
var f;
|
|
152
|
+
return (f = e(w)) == null ? void 0 : f.click();
|
|
153
|
+
})
|
|
154
|
+
}, null, 8, ["variant", "label"]),
|
|
155
|
+
c("input", {
|
|
156
|
+
id: "file",
|
|
157
|
+
accept: ".pdf",
|
|
158
|
+
class: "hidden",
|
|
159
|
+
type: "file",
|
|
160
|
+
onChange: a[2] || (a[2] = (f) => {
|
|
161
|
+
var D, M;
|
|
162
|
+
return r.value = ((M = (D = f.target) == null ? void 0 : D.files) == null ? void 0 : M[0]) ?? null;
|
|
163
|
+
})
|
|
164
|
+
}, null, 32)
|
|
165
|
+
], 512)
|
|
166
|
+
])) : (b(), F("div", ie, [
|
|
167
|
+
o(E, {
|
|
168
|
+
onFileUpload: a[0] || (a[0] = (f) => r.value = f),
|
|
169
|
+
accept: ".pdf",
|
|
170
|
+
"max-file-size": 8e6
|
|
171
|
+
})
|
|
172
|
+
]))
|
|
173
|
+
])
|
|
174
|
+
];
|
|
175
|
+
}),
|
|
176
|
+
_: 1
|
|
177
|
+
}, 8, ["model-value"]);
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
}), ue = { class: "flex items-center" }, fe = { 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 pb-24" }, he = /* @__PURE__ */ U({
|
|
181
|
+
__name: "Index",
|
|
182
|
+
setup(B) {
|
|
183
|
+
const k = ae(), y = g(null), { t: s } = H(), t = K(), i = g(!1), _ = oe(), d = te(), T = L(() => _.isPremium ? [
|
|
184
|
+
{
|
|
185
|
+
label: s("connect.referral.actions.terms"),
|
|
186
|
+
value: "term_and_condition"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: s("connect.referral.actions.manage_reward"),
|
|
190
|
+
value: "manage_reward"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
label: s("connect.referral.actions.add_referral_tier"),
|
|
194
|
+
value: "add_referral_tier",
|
|
195
|
+
prependIcon: "add",
|
|
196
|
+
isPrimary: !0
|
|
197
|
+
}
|
|
198
|
+
] : []), r = [
|
|
199
|
+
{
|
|
200
|
+
label: s("connect.referral.tabs.overview"),
|
|
201
|
+
value: S["$connect-REFERRAL_OVERVIEW"],
|
|
202
|
+
actions: []
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: s("connect.referral.tabs.record"),
|
|
206
|
+
value: S["$connect-REFERRAL_RECORD"],
|
|
207
|
+
actions: []
|
|
208
|
+
}
|
|
209
|
+
], w = L(() => r.find((l) => l.value === t.currentRoute.value.name) ?? r[0]);
|
|
210
|
+
async function h(l) {
|
|
211
|
+
await t.push({ name: l });
|
|
212
|
+
}
|
|
213
|
+
async function x(l) {
|
|
214
|
+
var n;
|
|
215
|
+
l === "add_referral_tier" && ((n = y.value) == null || n.onManageRewardGroup(-1)), l === "manage_reward" && await t.push({ name: S["$connect-REWARD_TEMPLATE"] }), l === "term_and_condition" && v();
|
|
216
|
+
}
|
|
217
|
+
async function v() {
|
|
218
|
+
i.value = !0;
|
|
219
|
+
}
|
|
220
|
+
return I(async () => {
|
|
221
|
+
await k.readRewards(), await _.readPremium(), await d.readSegments();
|
|
222
|
+
}), (l, n) => {
|
|
223
|
+
const a = m("FmPill"), R = m("FmPageHead"), E = m("FmTabs"), u = m("RouterView");
|
|
224
|
+
return b(), F(q, null, [
|
|
225
|
+
o(R, {
|
|
226
|
+
actions: e(T),
|
|
227
|
+
"onClick:action": x
|
|
228
|
+
}, {
|
|
229
|
+
title: P(() => [
|
|
230
|
+
c("div", ue, [
|
|
231
|
+
c("span", fe, $(e(s)("connect.referral.title")), 1),
|
|
232
|
+
o(a, { variant: "premium" })
|
|
233
|
+
])
|
|
234
|
+
]),
|
|
235
|
+
_: 1
|
|
236
|
+
}, 8, ["actions"]),
|
|
237
|
+
c("div", pe, [
|
|
238
|
+
o(E, {
|
|
239
|
+
"model-value": e(w).value,
|
|
240
|
+
items: r,
|
|
241
|
+
"onUpdate:modelValue": h
|
|
242
|
+
}, null, 8, ["model-value"]),
|
|
243
|
+
o(u)
|
|
244
|
+
]),
|
|
245
|
+
o(de, {
|
|
246
|
+
modelValue: e(i),
|
|
247
|
+
"onUpdate:modelValue": n[0] || (n[0] = (A) => J(i) ? i.value = A : null)
|
|
248
|
+
}, null, 8, ["modelValue"]),
|
|
249
|
+
o(Z, {
|
|
250
|
+
ref_key: "rewardGroupRef",
|
|
251
|
+
ref: y
|
|
252
|
+
}, null, 512)
|
|
253
|
+
], 64);
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
export {
|
|
258
|
+
he as default
|
|
259
|
+
};
|