@feedmepos/mf-connect 0.0.39-prod → 0.1.0-beta.2
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-DSD9TsKr.js +622 -0
- package/dist/{App-X3fNEBF3.js → App-D8a5eW51.js} +250 -249
- package/dist/Broadcast-C8jgMe6g.js +223 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CRYS_tzZ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-pG8WvV4I.js} +20 -20
- package/dist/Card-C1K7ULPo.js +825 -0
- package/dist/Collections-lMrdPUuM.js +453 -0
- package/dist/Credit-CJfU5tP4.js +220 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BYoaa_-x.js} +1042 -1011
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CzEtOmp0.js +345 -0
- package/dist/Experience-Bp2ki8gU.js +221 -0
- package/dist/Game-BpTf6ebE.js +255 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +144 -0
- package/dist/{MainLayout-DpZC6o3R.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js} +19 -53
- package/dist/MainLayout-B1aJoR95.js +41 -0
- package/dist/Marketing-BiKE2gxA.js +316 -0
- package/dist/Member-BSWyy32a.js +69 -0
- package/dist/MemberList-CHlGREyR.js +1733 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/{MemberTransactions-DueaXBCy.js → MemberTransactions-BzHiXCnp.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-e-zWg08J.js +432 -0
- package/dist/Mission-8IGT3T2C.js +261 -0
- package/dist/Point-CbbJ6ohd.js +222 -0
- package/dist/Promotion-BYXCJa_S.js +247 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-_RX1J0Br.js → RuleGroup.vue_vue_type_script_setup_true_lang-Bruh-umZ.js} +557 -557
- package/dist/Segment-DXDNM0yd.js +437 -0
- package/dist/Setting-CLpvvZTv.js +1901 -0
- package/dist/Store-C6-P6bwc.js +1511 -0
- package/dist/StoreRewards-CUM2irXK.js +401 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js → StoreTransactions.vue_vue_type_script_setup_true_lang-JaRdmqif.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CoMQBL4P.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DEb4OBcX.js} +1 -1
- package/dist/{Tier-CftEoP_R.js → Tier-DZTDxWBo.js} +481 -453
- package/dist/{Title-BsavXbYh.js → Title-C2Dr5ceK.js} +314 -295
- package/dist/Transaction-BL4mS29d.js +39 -0
- package/dist/Voucher-Cx0r2-df.js +490 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-DWuAODUF.js +56 -0
- package/dist/{app-BNmAx3zq.js → app-B_xuZ5HB.js} +1 -1
- package/dist/app-wE5HTF_Y.js +5762 -0
- package/dist/app.js +5 -3
- package/dist/{business-DGL4Ayx0.js → business-DSv8zM8C.js} +1 -1
- package/dist/{campaign-D94sS1kM.js → campaign-7y5qquHZ.js} +5 -3
- package/dist/{collection.fn-BHJ1ISqO.js → collection.fn-BxVZQAx0.js} +2 -2
- package/dist/dto-Ew1QwLci.js +2778 -0
- package/dist/{effect-CFRICzlM.js → effect-BzPh8fRI.js} +9 -9
- package/dist/{export-w2o9NYcy.js → export-C9tDplkA.js} +3 -3
- package/dist/{helper-CUDWQ8vq.js → helper-Sz7oQ0F4.js} +1 -1
- package/dist/{index-BGuLhEym.js → index-BQm0C3Jm.js} +3 -3
- package/dist/{index-BjwyxNSp.js → index-C-SOz7jt.js} +1 -1
- package/dist/{index-BcWJcD9f.js → index-C0lpADCo.js} +1 -1
- package/dist/{index-DIq2KVis.js → index-C3_4GUiI.js} +1 -1
- package/dist/{index-BPEV5Tzg.js → index-D-2nFLsg.js} +59 -47
- package/dist/{index-CFMBSL24.js → index-DBMaUGYI.js} +2 -2
- package/dist/{index-CpwFQFTV.js → index-DH_1nOJ_.js} +3 -3
- package/dist/index-Dy4pmQpt.js +29193 -0
- package/dist/{index-BQ6isIeo.js → index-_3qBsogG.js} +1 -1
- package/dist/index-gIRszcHf.js +3 -0
- package/dist/{index-VjUw31dN.js → index-tv4t0Pnh.js} +1 -1
- package/dist/{index-tZ1aqhks.js → index-z0IfdrZk.js} +319 -281
- package/dist/{index.esm2017-zciuPty-.js → index.esm2017-BnKJDxUo.js} +55 -55
- package/dist/{loading-GuXe5bYG.js → loading-Ds-yFYhc.js} +469 -460
- package/dist/{membership-BHWJVI3e.js → membership-DaiVw9qF.js} +3 -3
- package/dist/money-BHtBdZoz.js +15 -0
- package/dist/number-CZhcB8ef.js +12 -0
- package/dist/{rule-MgNa_8FF.js → rule-Cd2M6Ri2.js} +2 -2
- package/dist/{rule-builder-BsBCWzq_.js → rule-builder-B6og27Q1.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-D6k3lusq.js → template-DouRWBpv.js} +63 -63
- package/dist/{usePagination-JoYaROkV.js → usePagination-BeF5K3M7.js} +85 -85
- package/dist/vue-i18n-BTlOChXs.js +2365 -0
- package/dist/{xlsx-ClrA4KOh.js → xlsx-SahfXQ70.js} +517 -517
- package/dist/zod-Bg2FbC-D.js +90 -0
- package/package.json +7 -4
- package/dist/Analytic-DMFueUju.js +0 -620
- package/dist/Broadcast-YIfWIXeA.js +0 -216
- package/dist/Card-BIxlgQm7.js +0 -824
- package/dist/Collections-M6DaHM2W.js +0 -441
- package/dist/Credit-BtRy-xoY.js +0 -214
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-D5DNTBSQ.js +0 -344
- package/dist/Experience-DGm1lnqj.js +0 -211
- package/dist/Game-B8-lG7qq.js +0 -250
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +0 -144
- package/dist/Marketing-DtG3AIWr.js +0 -309
- package/dist/Member-K443-9Vy.js +0 -92
- package/dist/MemberList-CYXHXFTL.js +0 -1735
- package/dist/MemberOverview-C2n9oJZh.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-Bk2HLVmt.js +0 -203
- package/dist/Mission-CN5umXXA.js +0 -248
- package/dist/Point-XAm6H2p_.js +0 -220
- package/dist/Promotion-DsrA4KiE.js +0 -244
- package/dist/Segment-CZGGHoAu.js +0 -435
- package/dist/Setting-BjfxLKyp.js +0 -1870
- package/dist/Store-D_B-vhh3.js +0 -1513
- package/dist/StoreRewards-BjHffUKj.js +0 -429
- package/dist/Transaction-CdxzoKDG.js +0 -36
- package/dist/Voucher-B_9Nv1Mr.js +0 -485
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +0 -140
- package/dist/app--1Ks5Hms.js +0 -2974
- package/dist/dto-X0Eeujxx.js +0 -1151
- package/dist/index-BPNG8N-w.js +0 -11
- package/dist/index-DWM9MWGj.js +0 -28058
- package/dist/money-CrttVpCp.js +0 -15
- package/dist/number-CIndGU4O.js +0 -12
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { openBlock as m, createElementBlock as p, defineComponent as z, ref as S, onMounted as Y, computed as H, h as J, resolveComponent as c, Fragment as x, createVNode as i, unref as r, createElementVNode as s, withCtx as F, renderList as $, createBlock as B, toDisplayString as f, createCommentVNode as j } from "vue";
|
|
2
|
+
import { _ as q } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { components as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { p as X, u as Q } from "./loading-Ds-yFYhc.js";
|
|
5
|
+
import { defineStore as W } from "pinia";
|
|
6
|
+
import { F as C } from "./index-C0lpADCo.js";
|
|
7
|
+
import { useCoreStore as Z } from "@feedmepos/mf-common";
|
|
8
|
+
import { g as y, S as ee, b as te } from "./index-Dy4pmQpt.js";
|
|
9
|
+
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
import { u as ae } from "./campaign-7y5qquHZ.js";
|
|
11
|
+
import { h as oe } from "./moment-BWErdI6_.js";
|
|
12
|
+
import { u as re } from "./vue-i18n-BTlOChXs.js";
|
|
13
|
+
var se = { authUrl: "https://portal-v2-dev.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedmedev.cc", crmUrl: "crm.feedmedev.cc", paymentPortalUrl: "https://portal.feedmedev.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedmedev.cc" };
|
|
14
|
+
const h = () => {
|
|
15
|
+
const o = ee.getBusinessId();
|
|
16
|
+
if (!o) throw new Error("Invalid business ID");
|
|
17
|
+
return te(`businesses/${o}/marketing-materials/`, {
|
|
18
|
+
url: se.backendUrl,
|
|
19
|
+
noIdRequired: !0
|
|
20
|
+
});
|
|
21
|
+
}, L = {
|
|
22
|
+
async read() {
|
|
23
|
+
return y(await h().get(""));
|
|
24
|
+
},
|
|
25
|
+
async createMarketing(o) {
|
|
26
|
+
return y(await h().post("", o));
|
|
27
|
+
},
|
|
28
|
+
// add id
|
|
29
|
+
async updateMarketing(o, t) {
|
|
30
|
+
return y(
|
|
31
|
+
await h().put(o, t)
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
async deleteMarketing(o) {
|
|
35
|
+
return y(await h().delete(o));
|
|
36
|
+
}
|
|
37
|
+
}, I = W("mf-connect-marketing", {
|
|
38
|
+
state: () => {
|
|
39
|
+
var o, t;
|
|
40
|
+
return {
|
|
41
|
+
marketing: [],
|
|
42
|
+
defaultMarketing: {
|
|
43
|
+
_id: void 0,
|
|
44
|
+
business: ((t = (o = Z().currentBusiness) == null ? void 0 : o.value) == null ? void 0 : t._id) ?? "",
|
|
45
|
+
name: "",
|
|
46
|
+
campaign: null,
|
|
47
|
+
keywords: "",
|
|
48
|
+
image: "",
|
|
49
|
+
headline: {
|
|
50
|
+
content: "",
|
|
51
|
+
key: void 0
|
|
52
|
+
},
|
|
53
|
+
assets: [
|
|
54
|
+
{
|
|
55
|
+
platform: C.enum.FACEBOOK,
|
|
56
|
+
contents: [
|
|
57
|
+
{
|
|
58
|
+
type: "POST",
|
|
59
|
+
size: {
|
|
60
|
+
width: 1920,
|
|
61
|
+
height: 1080
|
|
62
|
+
},
|
|
63
|
+
images: []
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "STORY",
|
|
67
|
+
size: {
|
|
68
|
+
width: 1080,
|
|
69
|
+
height: 1920
|
|
70
|
+
},
|
|
71
|
+
images: []
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
platform: C.enum.INSTAGRAM,
|
|
77
|
+
contents: [
|
|
78
|
+
{
|
|
79
|
+
type: "POST",
|
|
80
|
+
size: {
|
|
81
|
+
width: 1080,
|
|
82
|
+
height: 1080
|
|
83
|
+
},
|
|
84
|
+
images: []
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "STORY",
|
|
88
|
+
size: {
|
|
89
|
+
width: 1080,
|
|
90
|
+
height: 1920
|
|
91
|
+
},
|
|
92
|
+
images: []
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: "REEL",
|
|
96
|
+
size: {
|
|
97
|
+
width: 1080,
|
|
98
|
+
height: 1920
|
|
99
|
+
},
|
|
100
|
+
images: []
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
platform: C.enum.BRAND_APP,
|
|
106
|
+
contents: [
|
|
107
|
+
{
|
|
108
|
+
type: "IMAGE",
|
|
109
|
+
size: {
|
|
110
|
+
width: 1080,
|
|
111
|
+
height: 1920
|
|
112
|
+
},
|
|
113
|
+
images: []
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
captions: [{ language: "en", content: "" }]
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
},
|
|
122
|
+
actions: {
|
|
123
|
+
async readMarketingMaterial() {
|
|
124
|
+
const o = await L.read();
|
|
125
|
+
this.marketing = o;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
getters: {
|
|
129
|
+
state(o) {
|
|
130
|
+
return o;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}), ie = {};
|
|
134
|
+
function le(o, t) {
|
|
135
|
+
return m(), p("div");
|
|
136
|
+
}
|
|
137
|
+
const ce = /* @__PURE__ */ ne(ie, [["render", le]]), me = { class: "px-24 flex flex-col gap-y-16" }, de = { class: "flex items-center justify-between w-full" }, pe = { class: "space-y-8" }, ue = { class: "fm-typo-en-body-lg-600" }, ge = { class: "fm-typo-en-body-lg-600" }, fe = { key: 0 }, ye = { class: "fm-typo-en-title-sm-800" }, he = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, Ve = /* @__PURE__ */ z({
|
|
138
|
+
__name: "Marketing",
|
|
139
|
+
setup(o) {
|
|
140
|
+
const { t } = re(), O = {
|
|
141
|
+
label: t("connect.marketing.create"),
|
|
142
|
+
value: "create",
|
|
143
|
+
isPrimary: !0,
|
|
144
|
+
prependIcon: "add"
|
|
145
|
+
}, k = S(!1), _ = I(), v = ae(), { global: N, minor: U } = Q;
|
|
146
|
+
Y(async () => {
|
|
147
|
+
await N(async () => {
|
|
148
|
+
await v.read(), await _.readMarketingMaterial();
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
const d = H(() => _.marketing.filter(
|
|
152
|
+
(n) => n.name.includes(l.value.searchKey.toLowerCase())
|
|
153
|
+
)), u = S(
|
|
154
|
+
I().defaultMarketing
|
|
155
|
+
), D = [
|
|
156
|
+
{
|
|
157
|
+
header: t("connect.marketing.table.name"),
|
|
158
|
+
accessorFn: (n) => n.name
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
header: t("connect.marketing.table.campaign"),
|
|
162
|
+
accessorFn: (n) => {
|
|
163
|
+
var e;
|
|
164
|
+
return n.campaign === null || n.campaign === void 0 ? "-" : (e = v.campaigns.all.find(
|
|
165
|
+
(b) => b._id === n.campaign
|
|
166
|
+
)) == null ? void 0 : e.name;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
header: t("connect.marketing.table.createdDate"),
|
|
171
|
+
accessorFn: (n) => {
|
|
172
|
+
const e = new Date(
|
|
173
|
+
parseInt(n._id.toString().substring(0, 8), 16) * 1e3
|
|
174
|
+
);
|
|
175
|
+
return oe(e).format("DD MMM YYYY");
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
header: t("connect.marketing.table.actions"),
|
|
180
|
+
cell(n) {
|
|
181
|
+
return J(G.FmButton, {
|
|
182
|
+
variant: "tertiary",
|
|
183
|
+
icon: "delete",
|
|
184
|
+
iconColor: "neutral-gray-400",
|
|
185
|
+
onClick: (e) => {
|
|
186
|
+
e.stopPropagation(), V(n.row.original);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
];
|
|
192
|
+
async function V(n) {
|
|
193
|
+
await X.remove(
|
|
194
|
+
t("marketing.delete.confirm", { name: n.name })
|
|
195
|
+
) && await U(
|
|
196
|
+
async () => {
|
|
197
|
+
await L.deleteMarketing(n._id), await _.readMarketingMaterial();
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
message: t("marketing.delete.removing", { name: n.name }),
|
|
201
|
+
successMessage: t("marketing.delete.success", { name: n.name })
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
async function g(n) {
|
|
206
|
+
n ? u.value = JSON.parse(JSON.stringify(n)) : u.value = JSON.parse(
|
|
207
|
+
JSON.stringify(I().defaultMarketing)
|
|
208
|
+
), k.value = !0;
|
|
209
|
+
}
|
|
210
|
+
const l = S({
|
|
211
|
+
searchKey: ""
|
|
212
|
+
});
|
|
213
|
+
return (n, e) => {
|
|
214
|
+
const b = c("FmPageHead"), P = c("FmSearch"), E = c("FmTable"), T = c("FmButton"), K = c("FmListItem"), A = c("FmList"), R = c("FmCard");
|
|
215
|
+
return m(), p(x, null, [
|
|
216
|
+
i(b, {
|
|
217
|
+
title: r(t)("connect.marketing.title"),
|
|
218
|
+
class: "xs:hidden",
|
|
219
|
+
actions: r(d).length > 0 ? [O] : [],
|
|
220
|
+
"onClick:action": e[0] || (e[0] = () => g())
|
|
221
|
+
}, null, 8, ["title", "actions"]),
|
|
222
|
+
s("div", me, [
|
|
223
|
+
i(P, {
|
|
224
|
+
modelValue: l.value.searchKey,
|
|
225
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => l.value.searchKey = a),
|
|
226
|
+
placeholder: r(t)("connect.marketing.search"),
|
|
227
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
228
|
+
collapsible: ""
|
|
229
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
230
|
+
i(ce, {
|
|
231
|
+
modelValue: u.value,
|
|
232
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => u.value = a),
|
|
233
|
+
"is-open": k.value,
|
|
234
|
+
"onUpdate:isOpen": e[3] || (e[3] = (a) => k.value = a)
|
|
235
|
+
}, null, 8, ["modelValue", "is-open"]),
|
|
236
|
+
r(d).length > 0 ? (m(), p(x, { key: 0 }, [
|
|
237
|
+
s("div", de, [
|
|
238
|
+
i(P, {
|
|
239
|
+
modelValue: l.value.searchKey,
|
|
240
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => l.value.searchKey = a),
|
|
241
|
+
class: "xs:hidden",
|
|
242
|
+
placeholder: r(t)("connect.marketing.search"),
|
|
243
|
+
collapsible: ""
|
|
244
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
245
|
+
]),
|
|
246
|
+
i(E, {
|
|
247
|
+
class: "xs:hidden",
|
|
248
|
+
"row-data": r(d),
|
|
249
|
+
"column-defs": D,
|
|
250
|
+
"search-value": l.value.searchKey,
|
|
251
|
+
"column-filter": [],
|
|
252
|
+
onRowClick: e[5] || (e[5] = (a) => g(a.original)),
|
|
253
|
+
"hide-footer": !0
|
|
254
|
+
}, null, 8, ["row-data", "search-value"]),
|
|
255
|
+
i(A, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
256
|
+
default: F(() => [
|
|
257
|
+
(m(!0), p(x, null, $(r(d).filter(
|
|
258
|
+
(a) => a.name.toLowerCase().includes(l.value.searchKey.toLowerCase())
|
|
259
|
+
), (a) => (m(), B(K, {
|
|
260
|
+
key: a._id.toString(),
|
|
261
|
+
onClick: (w) => g(a),
|
|
262
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
263
|
+
}, {
|
|
264
|
+
default: F(() => {
|
|
265
|
+
var w;
|
|
266
|
+
return [
|
|
267
|
+
s("div", pe, [
|
|
268
|
+
s("div", ue, f(a.name), 1),
|
|
269
|
+
s("div", ge, f(a.campaign === null || a.campaign === void 0 ? "-" : (w = r(v).campaigns.all.find(
|
|
270
|
+
(M) => M._id === a.campaign
|
|
271
|
+
)) == null ? void 0 : w.name), 1)
|
|
272
|
+
]),
|
|
273
|
+
i(T, {
|
|
274
|
+
icon: "delete",
|
|
275
|
+
"icon-color": "neutral-gray-400",
|
|
276
|
+
variant: "tertiary",
|
|
277
|
+
onClick: (M) => (M.stopPropagation(), V(a))
|
|
278
|
+
}, null, 8, ["onClick"])
|
|
279
|
+
];
|
|
280
|
+
}),
|
|
281
|
+
_: 2
|
|
282
|
+
}, 1032, ["onClick"]))), 128))
|
|
283
|
+
]),
|
|
284
|
+
_: 1
|
|
285
|
+
}),
|
|
286
|
+
r(d).length == 0 ? (m(), p("div", fe, e[7] || (e[7] = [
|
|
287
|
+
s("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1)
|
|
288
|
+
]))) : j("", !0)
|
|
289
|
+
], 64)) : (m(), B(R, {
|
|
290
|
+
key: 1,
|
|
291
|
+
variant: "outlined",
|
|
292
|
+
class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
|
|
293
|
+
}, {
|
|
294
|
+
default: F(() => [
|
|
295
|
+
e[8] || (e[8] = s("img", {
|
|
296
|
+
src: q,
|
|
297
|
+
class: "w-[150px]"
|
|
298
|
+
}, null, -1)),
|
|
299
|
+
s("p", ye, f(r(t)("connect.marketing.emptyState.title")), 1),
|
|
300
|
+
s("p", he, f(r(t)("connect.marketing.emptyState.description")), 1),
|
|
301
|
+
i(T, {
|
|
302
|
+
label: r(t)("connect.marketing.emptyState.action"),
|
|
303
|
+
"prepend-icon": "add",
|
|
304
|
+
onClick: e[6] || (e[6] = (a) => g())
|
|
305
|
+
}, null, 8, ["label"])
|
|
306
|
+
]),
|
|
307
|
+
_: 1
|
|
308
|
+
}))
|
|
309
|
+
])
|
|
310
|
+
], 64);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
export {
|
|
315
|
+
Ve as default
|
|
316
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { defineComponent as f, computed as T, ref as d, watch as k, resolveComponent as s, openBlock as _, createElementBlock as B, Fragment as E, createVNode as b, unref as n, createElementVNode as y, createBlock as A, createCommentVNode as L } from "vue";
|
|
2
|
+
import "./index-gIRszcHf.js";
|
|
3
|
+
import { u as M } from "./vue-i18n-BTlOChXs.js";
|
|
4
|
+
import { useRouter as N } from "vue-router";
|
|
5
|
+
import { m as Y } from "./index-tv4t0Pnh.js";
|
|
6
|
+
import { R as i } from "./app-wE5HTF_Y.js";
|
|
7
|
+
const h = { class: "px-24 flex flex-col gap-y-16 pb-24" }, g = /* @__PURE__ */ f({
|
|
8
|
+
__name: "Member",
|
|
9
|
+
setup(w) {
|
|
10
|
+
const e = N(), { t: p } = M(), o = [
|
|
11
|
+
{
|
|
12
|
+
label: p("connect.loyalty.member.tabs.member_list"),
|
|
13
|
+
value: i["$connect-LOYALTY_MEMBER_LIST"],
|
|
14
|
+
actions: []
|
|
15
|
+
}
|
|
16
|
+
], r = T(() => {
|
|
17
|
+
var a, c, m;
|
|
18
|
+
return e.currentRoute.value.name != i["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
19
|
+
title: u.value.label,
|
|
20
|
+
actions: u.value.actions,
|
|
21
|
+
description: void 0
|
|
22
|
+
} : (u.value = o[1], {
|
|
23
|
+
backButton: !0,
|
|
24
|
+
title: p("connect.loyalty.member.title"),
|
|
25
|
+
actions: [],
|
|
26
|
+
description: `${(a = l.value) == null ? void 0 : a.name} (${(c = l.value) == null ? void 0 : c._id}) (${(m = l.value) == null ? void 0 : m.phoneNumber})`,
|
|
27
|
+
onBackButton: async () => {
|
|
28
|
+
await e.push({ name: i["$connect-LOYALTY_MEMBER_LIST"] });
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}), u = d(
|
|
32
|
+
o.find((t) => t.value === e.currentRoute.value.name) ?? o[0]
|
|
33
|
+
), l = d();
|
|
34
|
+
async function v(t) {
|
|
35
|
+
await e.push({ name: t });
|
|
36
|
+
}
|
|
37
|
+
return k(
|
|
38
|
+
() => e.currentRoute.value.name,
|
|
39
|
+
async (t) => {
|
|
40
|
+
u.value = o.find((c) => c.value === t) ?? o[0];
|
|
41
|
+
const a = e.currentRoute.value.params.id;
|
|
42
|
+
a && (l.value = await Y.readById(a)), await e.push({ name: t });
|
|
43
|
+
}
|
|
44
|
+
), (t, a) => {
|
|
45
|
+
const c = s("FmPageHead"), m = s("FmTabs"), R = s("RouterView");
|
|
46
|
+
return _(), B(E, null, [
|
|
47
|
+
b(c, {
|
|
48
|
+
actions: n(r).actions,
|
|
49
|
+
title: n(r).title,
|
|
50
|
+
description: n(r).description,
|
|
51
|
+
"back-button": n(r).backButton,
|
|
52
|
+
"onClick:back": n(r).onBackButton
|
|
53
|
+
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
54
|
+
y("div", h, [
|
|
55
|
+
n(e).currentRoute.value.name != n(i)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (_(), A(m, {
|
|
56
|
+
key: 0,
|
|
57
|
+
"model-value": n(u).value,
|
|
58
|
+
items: o,
|
|
59
|
+
"onUpdate:modelValue": v
|
|
60
|
+
}, null, 8, ["model-value"])) : L("", !0),
|
|
61
|
+
b(R)
|
|
62
|
+
])
|
|
63
|
+
], 64);
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
g as default
|
|
69
|
+
};
|