@feedmepos/mf-connect 0.1.0-beta.8 → 0.1.0-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-D1vIDmhJ.js +620 -0
- package/dist/{App-SRz4257n.js → App-DHrfWG8l.js} +249 -250
- package/dist/Broadcast-B2rxZAZi.js +216 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CZXSxA9u.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-D2a9rcXK.js} +20 -20
- package/dist/Card-Dr6pTTM0.js +824 -0
- package/dist/Collections-0tbg0MFt.js +441 -0
- package/dist/Credit-KbB_7Jq-.js +214 -0
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Cuklmxur.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-we7ADwFk.js} +999 -1018
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-VBNyvZCJ.js +344 -0
- package/dist/Experience-C_Q9Iml8.js +211 -0
- package/dist/Game-BwODw7M6.js +250 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-ByhTB9Ie.js +144 -0
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → MainLayout-DpZC6o3R.js} +53 -19
- package/dist/Marketing-QOKTAS_T.js +309 -0
- package/dist/Member-d7RIGRm1.js +92 -0
- package/dist/MemberList-CK9629ew.js +1737 -0
- package/dist/MemberOverview-C2n9oJZh.js +58 -0
- package/dist/{MemberTransactions-BwT3zE2a.js → MemberTransactions-D-pnlXiP.js} +1 -1
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-3VS7JnK6.js +203 -0
- package/dist/Mission-BAKDm4VZ.js +248 -0
- package/dist/Point-Puu0jKz0.js +220 -0
- package/dist/Promotion-DRIaUvJi.js +244 -0
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BkFm7tXq.js → RuleGroup.vue_vue_type_script_setup_true_lang-DTdfYGya.js} +557 -557
- package/dist/Segment-DpBxGuuu.js +435 -0
- package/dist/Setting-DLB2ywCp.js +1870 -0
- package/dist/Store-8DO6ITWc.js +1513 -0
- package/dist/StoreRewards-DZfqUeYR.js +429 -0
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BqpsMcl1.js → StoreTransactions.vue_vue_type_script_setup_true_lang-RTfozD01.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrzmjYmU.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BGI78ycg.js} +1 -1
- package/dist/{Tier-CJ9-d8Zg.js → Tier-BnQRujpX.js} +453 -481
- package/dist/{Title-DZCpvg4q.js → Title-BPf1tUFx.js} +295 -314
- package/dist/Transaction-ese0oNrz.js +36 -0
- package/dist/Voucher--gtOZQx1.js +485 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-3LlSDiq0.js +140 -0
- package/dist/app-Bt59niI-.js +2974 -0
- package/dist/{app-Cg2pTZJK.js → app-DHE61XdR.js} +1 -1
- package/dist/app.js +3 -5
- package/dist/{business-Cw_qGw8y.js → business-BSo7EPan.js} +1 -1
- package/dist/{campaign-winsqufa.js → campaign-CsOje3Ap.js} +3 -5
- package/dist/{collection.fn-CI5Llblg.js → collection.fn-BYQfFJOr.js} +2 -2
- package/dist/dto-CfEXSCq6.js +1145 -0
- package/dist/{effect-CdkrIYgX.js → effect-Bn_ofYS3.js} +9 -9
- package/dist/{export-DGxfief1.js → export-CMR243CF.js} +3 -3
- package/dist/{helper-B8RqcTNu.js → helper-BqOQRtvW.js} +1 -1
- package/dist/index-BLDYTxnc.js +28058 -0
- package/dist/{index-Cw_aXFH6.js → index-BWnFs-Cb.js} +281 -299
- package/dist/{index-wzdbEEcZ.js → index-BaBNmzUb.js} +1 -1
- package/dist/{index-CjVmULNd.js → index-Boo5np6l.js} +1 -1
- package/dist/{index-HZC9LLAX.js → index-CC1GV8OW.js} +1 -1
- package/dist/{index-OzicErwL.js → index-CHO4_zsT.js} +1 -1
- package/dist/{index-DAEmawcj.js → index-DEZsrQ2f.js} +3 -3
- package/dist/{index-9w43_U1v.js → index-D_f2lmK2.js} +1 -1
- package/dist/{index-BaozRfWB.js → index-Da142OER.js} +66 -78
- package/dist/index-DbP04yeg.js +11 -0
- package/dist/{index-A34xEz20.js → index-DtPe-TEm.js} +3 -3
- package/dist/{index-BLACZ3-L.js → index-FvlaxwGB.js} +20 -20
- package/dist/{index.esm2017-CppSMh_U.js → index.esm2017-ePm--Atp.js} +55 -55
- package/dist/{loading-DuEFUCwF.js → loading-KNmEMBUB.js} +460 -469
- package/dist/{membership-nsMtWeTC.js → membership-DKoVIS1a.js} +3 -3
- package/dist/money-CkD3zl5C.js +15 -0
- package/dist/number-BDsGpOXm.js +12 -0
- package/dist/{rule-CPIMqt1h.js → rule-CzamI50_.js} +2 -2
- package/dist/{rule-builder-CSs5XRKP.js → rule-builder-DHf6wfaQ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CJZoYavu.js → template-CFAIPoD7.js} +63 -63
- package/dist/{usePagination-BeF5K3M7.js → usePagination-JoYaROkV.js} +85 -85
- package/dist/{xlsx-BZlnYinX.js → xlsx-BDJMaozs.js} +517 -517
- package/package.json +4 -7
- package/dist/Analytic-5QztrYSp.js +0 -622
- package/dist/Broadcast-DmkrJGp2.js +0 -223
- package/dist/Card-BsjFTVsH.js +0 -825
- package/dist/Collections-7wqZHOax.js +0 -453
- package/dist/Credit-CcNrq9qk.js +0 -220
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BIZDiLns.js +0 -345
- package/dist/Experience-DNsQLzDH.js +0 -221
- package/dist/Game-DlzDerT7.js +0 -255
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js +0 -144
- package/dist/MainLayout-B1aJoR95.js +0 -41
- package/dist/Marketing-BqhpaG4o.js +0 -316
- package/dist/Member-AFgZcdtz.js +0 -69
- package/dist/MemberList-BKgrLz2C.js +0 -1733
- package/dist/MemberOverview-wL_ailso.js +0 -58
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-GCEQCVOt.js +0 -432
- package/dist/Mission-BTAia7AS.js +0 -261
- package/dist/Point-Ck8EG_3k.js +0 -222
- package/dist/Promotion-0v3kvsK3.js +0 -247
- package/dist/Segment-BenLupqV.js +0 -437
- package/dist/Setting-0fpREqpJ.js +0 -1901
- package/dist/Store-BDGwe4ar.js +0 -1511
- package/dist/StoreRewards-TDZt9H1V.js +0 -401
- package/dist/Transaction-DpnTxlbf.js +0 -39
- package/dist/Voucher-DsP_rh8I.js +0 -490
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-SukfoJpU.js +0 -56
- package/dist/app-DzAexOqx.js +0 -5639
- package/dist/dto-ozu1smC3.js +0 -2770
- package/dist/index-CZgQVRsm.js +0 -3
- package/dist/index-Oxr-mU6h.js +0 -29193
- package/dist/money-BGZPFtUc.js +0 -15
- package/dist/number-4J0xvXP9.js +0 -12
- package/dist/vue-i18n-CCyiVzOE.js +0 -2365
- package/dist/zod-Bg2FbC-D.js +0 -90
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { openBlock as c, createElementBlock as u, defineComponent as D, ref as M, onMounted as z, computed as $, resolveComponent as l, Fragment as C, createVNode as r, unref as m, createElementVNode as o, withCtx as x, renderList as Y, createBlock as A, toDisplayString as B, createCommentVNode as H, h as G } from "vue";
|
|
2
|
+
import { _ as J } from "./campaign-CpzFl8Vr.js";
|
|
3
|
+
import { components as j } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as q, p as X } from "./loading-KNmEMBUB.js";
|
|
5
|
+
import { defineStore as Q } from "pinia";
|
|
6
|
+
import { F } from "./index-BaBNmzUb.js";
|
|
7
|
+
import { useCoreStore as W } from "@feedmepos/mf-common";
|
|
8
|
+
import { g as y, S as Z, b as ee } from "./index-BLDYTxnc.js";
|
|
9
|
+
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
+
import { u as ae } from "./campaign-CsOje3Ap.js";
|
|
11
|
+
import { h as ne } from "./moment-BWErdI6_.js";
|
|
12
|
+
var oe = { authUrl: "https://portal-v2.feedmeapi.com/", slackWebhookUrl: "https://hooks.slack.com/services/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", appUrl: "member.feedme.cc", crmUrl: "crm.feedme.cc", paymentPortalUrl: "https://portal.feedme.cc/payment/payout-account", marketingV1Portal: "https://marketing-v1.feedme.cc" };
|
|
13
|
+
const h = () => {
|
|
14
|
+
const n = Z.getBusinessId();
|
|
15
|
+
if (!n) throw new Error("Invalid business ID");
|
|
16
|
+
return ee(`businesses/${n}/marketing-materials/`, {
|
|
17
|
+
url: oe.backendUrl,
|
|
18
|
+
noIdRequired: !0
|
|
19
|
+
});
|
|
20
|
+
}, N = {
|
|
21
|
+
async read() {
|
|
22
|
+
return y(await h().get(""));
|
|
23
|
+
},
|
|
24
|
+
async createMarketing(n) {
|
|
25
|
+
return y(await h().post("", n));
|
|
26
|
+
},
|
|
27
|
+
// add id
|
|
28
|
+
async updateMarketing(n, s) {
|
|
29
|
+
return y(
|
|
30
|
+
await h().put(n, s)
|
|
31
|
+
);
|
|
32
|
+
},
|
|
33
|
+
async deleteMarketing(n) {
|
|
34
|
+
return y(await h().delete(n));
|
|
35
|
+
}
|
|
36
|
+
}, S = Q("mf-connect-marketing", {
|
|
37
|
+
state: () => {
|
|
38
|
+
var n, s;
|
|
39
|
+
return {
|
|
40
|
+
marketing: [],
|
|
41
|
+
defaultMarketing: {
|
|
42
|
+
_id: void 0,
|
|
43
|
+
business: ((s = (n = W().currentBusiness) == null ? void 0 : n.value) == null ? void 0 : s._id) ?? "",
|
|
44
|
+
name: "",
|
|
45
|
+
campaign: null,
|
|
46
|
+
keywords: "",
|
|
47
|
+
image: "",
|
|
48
|
+
headline: {
|
|
49
|
+
content: "",
|
|
50
|
+
key: void 0
|
|
51
|
+
},
|
|
52
|
+
assets: [
|
|
53
|
+
{
|
|
54
|
+
platform: F.enum.FACEBOOK,
|
|
55
|
+
contents: [
|
|
56
|
+
{
|
|
57
|
+
type: "POST",
|
|
58
|
+
size: {
|
|
59
|
+
width: 1920,
|
|
60
|
+
height: 1080
|
|
61
|
+
},
|
|
62
|
+
images: []
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
type: "STORY",
|
|
66
|
+
size: {
|
|
67
|
+
width: 1080,
|
|
68
|
+
height: 1920
|
|
69
|
+
},
|
|
70
|
+
images: []
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
platform: F.enum.INSTAGRAM,
|
|
76
|
+
contents: [
|
|
77
|
+
{
|
|
78
|
+
type: "POST",
|
|
79
|
+
size: {
|
|
80
|
+
width: 1080,
|
|
81
|
+
height: 1080
|
|
82
|
+
},
|
|
83
|
+
images: []
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: "STORY",
|
|
87
|
+
size: {
|
|
88
|
+
width: 1080,
|
|
89
|
+
height: 1920
|
|
90
|
+
},
|
|
91
|
+
images: []
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "REEL",
|
|
95
|
+
size: {
|
|
96
|
+
width: 1080,
|
|
97
|
+
height: 1920
|
|
98
|
+
},
|
|
99
|
+
images: []
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
platform: F.enum.BRAND_APP,
|
|
105
|
+
contents: [
|
|
106
|
+
{
|
|
107
|
+
type: "IMAGE",
|
|
108
|
+
size: {
|
|
109
|
+
width: 1080,
|
|
110
|
+
height: 1920
|
|
111
|
+
},
|
|
112
|
+
images: []
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
captions: [{ language: "en", content: "" }]
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
},
|
|
121
|
+
actions: {
|
|
122
|
+
async readMarketingMaterial() {
|
|
123
|
+
const n = await N.read();
|
|
124
|
+
this.marketing = n;
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
getters: {
|
|
128
|
+
state(n) {
|
|
129
|
+
return n;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}), re = {};
|
|
133
|
+
function se(n, s) {
|
|
134
|
+
return c(), u("div");
|
|
135
|
+
}
|
|
136
|
+
const ie = /* @__PURE__ */ te(re, [["render", se]]), le = { class: "px-24 flex flex-col gap-y-16" }, ce = { class: "flex items-center justify-between w-full" }, me = { class: "space-y-8" }, de = { class: "fm-typo-en-body-lg-600" }, ue = { class: "fm-typo-en-body-lg-600" }, pe = { key: 0 }, ge = /* @__PURE__ */ o("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-md-600" }, " No results found ", -1), fe = [
|
|
137
|
+
ge
|
|
138
|
+
], ye = /* @__PURE__ */ o("img", {
|
|
139
|
+
src: J,
|
|
140
|
+
class: "w-[150px]"
|
|
141
|
+
}, null, -1), he = /* @__PURE__ */ o("p", { class: "fm-typo-en-title-sm-800" }, "Create marketing material", -1), _e = /* @__PURE__ */ o("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary w-4/6 text-center" }, " Boost your marketing efforts effortlessly with our AI-powered tools. Generate stunning images and captivating captions for your desired platform. ", -1), Ve = /* @__PURE__ */ D({
|
|
142
|
+
__name: "Marketing",
|
|
143
|
+
setup(n) {
|
|
144
|
+
const s = {
|
|
145
|
+
label: "Create marketing material",
|
|
146
|
+
value: "create",
|
|
147
|
+
isPrimary: !0,
|
|
148
|
+
prependIcon: "add"
|
|
149
|
+
}, p = M(!1), _ = S(), k = ae(), { global: P, minor: T } = q;
|
|
150
|
+
z(async () => {
|
|
151
|
+
await P(async () => {
|
|
152
|
+
await k.read(), await _.readMarketingMaterial();
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
const d = $(() => _.marketing.filter(
|
|
156
|
+
(t) => t.name.includes(i.value.searchKey.toLowerCase())
|
|
157
|
+
)), g = M(
|
|
158
|
+
S().defaultMarketing
|
|
159
|
+
), L = [
|
|
160
|
+
{
|
|
161
|
+
header: "Name",
|
|
162
|
+
accessorFn: (t) => t.name
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
header: "Campaign",
|
|
166
|
+
accessorFn: (t) => {
|
|
167
|
+
var e;
|
|
168
|
+
return t.campaign === null || t.campaign === void 0 ? "-" : (e = k.campaigns.all.find(
|
|
169
|
+
(v) => v._id === t.campaign
|
|
170
|
+
)) == null ? void 0 : e.name;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
header: "Created date",
|
|
175
|
+
accessorFn: (t) => {
|
|
176
|
+
const e = new Date(parseInt(t._id.toString().substring(0, 8), 16) * 1e3);
|
|
177
|
+
return ne(e).format("DD MMM YYYY");
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
header: "Actions",
|
|
182
|
+
cell(t) {
|
|
183
|
+
return G(j.FmButton, {
|
|
184
|
+
variant: "tertiary",
|
|
185
|
+
icon: "delete",
|
|
186
|
+
iconColor: "neutral-gray-400",
|
|
187
|
+
onClick: (e) => {
|
|
188
|
+
e.stopPropagation(), I(t.row.original);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
];
|
|
194
|
+
async function I(t) {
|
|
195
|
+
await X.remove(`Are you sure you want to remove ${t.name}?`) && await T(
|
|
196
|
+
async () => {
|
|
197
|
+
await N.deleteMarketing(t._id), await _.readMarketingMaterial();
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
message: `Removing ${t.name}`,
|
|
201
|
+
successMessage: `Removed ${t.name} successfully`
|
|
202
|
+
}
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
async function f(t) {
|
|
206
|
+
t ? g.value = JSON.parse(JSON.stringify(t)) : g.value = JSON.parse(JSON.stringify(S().defaultMarketing)), p.value = !0;
|
|
207
|
+
}
|
|
208
|
+
const i = M({
|
|
209
|
+
searchKey: ""
|
|
210
|
+
});
|
|
211
|
+
return (t, e) => {
|
|
212
|
+
const v = l("FmPageHead"), O = l("FmSearch"), R = l("FmTable"), V = l("FmButton"), U = l("FmListItem"), E = l("FmList"), K = l("FmCard");
|
|
213
|
+
return c(), u(C, null, [
|
|
214
|
+
r(v, {
|
|
215
|
+
title: "Marketing material",
|
|
216
|
+
class: "xs:hidden",
|
|
217
|
+
actions: m(d).length > 0 ? [s] : [],
|
|
218
|
+
"onClick:action": e[0] || (e[0] = () => f())
|
|
219
|
+
}, null, 8, ["actions"]),
|
|
220
|
+
o("div", le, [
|
|
221
|
+
r(O, {
|
|
222
|
+
modelValue: i.value.searchKey,
|
|
223
|
+
"onUpdate:modelValue": e[1] || (e[1] = (a) => i.value.searchKey = a),
|
|
224
|
+
class: "hidden xs:block border-b-2 border-fm-color-neutral-gray-100",
|
|
225
|
+
placeholder: "search",
|
|
226
|
+
collapsible: ""
|
|
227
|
+
}, null, 8, ["modelValue"]),
|
|
228
|
+
r(ie, {
|
|
229
|
+
modelValue: g.value,
|
|
230
|
+
"onUpdate:modelValue": e[2] || (e[2] = (a) => g.value = a),
|
|
231
|
+
"is-open": p.value,
|
|
232
|
+
"onUpdate:isOpen": e[3] || (e[3] = (a) => p.value = a)
|
|
233
|
+
}, null, 8, ["modelValue", "is-open"]),
|
|
234
|
+
m(d).length > 0 ? (c(), u(C, { key: 0 }, [
|
|
235
|
+
o("div", ce, [
|
|
236
|
+
r(O, {
|
|
237
|
+
modelValue: i.value.searchKey,
|
|
238
|
+
"onUpdate:modelValue": e[4] || (e[4] = (a) => i.value.searchKey = a),
|
|
239
|
+
class: "xs:hidden",
|
|
240
|
+
placeholder: "search",
|
|
241
|
+
collapsible: ""
|
|
242
|
+
}, null, 8, ["modelValue"])
|
|
243
|
+
]),
|
|
244
|
+
r(R, {
|
|
245
|
+
class: "xs:hidden",
|
|
246
|
+
"row-data": m(d),
|
|
247
|
+
"column-defs": L,
|
|
248
|
+
"search-value": i.value.searchKey,
|
|
249
|
+
"column-filter": [],
|
|
250
|
+
onRowClick: e[5] || (e[5] = (a) => f(a.original)),
|
|
251
|
+
"hide-footer": !0
|
|
252
|
+
}, null, 8, ["row-data", "search-value"]),
|
|
253
|
+
r(E, { class: "hidden xs:flex flex-col mx-[-24px]" }, {
|
|
254
|
+
default: x(() => [
|
|
255
|
+
(c(!0), u(C, null, Y(m(d).filter(
|
|
256
|
+
(a) => a.name.toLowerCase().includes(i.value.searchKey.toLowerCase())
|
|
257
|
+
), (a) => (c(), A(U, {
|
|
258
|
+
key: a._id.toString(),
|
|
259
|
+
onClick: (w) => f(a),
|
|
260
|
+
class: "py-12 px-16 flex items-center justify-between border-b border-fm-color-neutral-gray-100"
|
|
261
|
+
}, {
|
|
262
|
+
default: x(() => {
|
|
263
|
+
var w;
|
|
264
|
+
return [
|
|
265
|
+
o("div", me, [
|
|
266
|
+
o("div", de, B(a.name), 1),
|
|
267
|
+
o("div", ue, B(a.campaign === null || a.campaign === void 0 ? "-" : (w = m(k).campaigns.all.find(
|
|
268
|
+
(b) => b._id === a.campaign
|
|
269
|
+
)) == null ? void 0 : w.name), 1)
|
|
270
|
+
]),
|
|
271
|
+
r(V, {
|
|
272
|
+
icon: "delete",
|
|
273
|
+
"icon-color": "neutral-gray-400",
|
|
274
|
+
variant: "tertiary",
|
|
275
|
+
onClick: (b) => (b.stopPropagation(), I(a))
|
|
276
|
+
}, null, 8, ["onClick"])
|
|
277
|
+
];
|
|
278
|
+
}),
|
|
279
|
+
_: 2
|
|
280
|
+
}, 1032, ["onClick"]))), 128))
|
|
281
|
+
]),
|
|
282
|
+
_: 1
|
|
283
|
+
}),
|
|
284
|
+
m(d).length == 0 ? (c(), u("div", pe, fe)) : H("", !0)
|
|
285
|
+
], 64)) : (c(), A(K, {
|
|
286
|
+
key: 1,
|
|
287
|
+
variant: "outlined",
|
|
288
|
+
class: "w-full justify-center items-center flex flex-col p-[24px] gap-[24px]"
|
|
289
|
+
}, {
|
|
290
|
+
default: x(() => [
|
|
291
|
+
ye,
|
|
292
|
+
he,
|
|
293
|
+
_e,
|
|
294
|
+
r(V, {
|
|
295
|
+
label: "Add material",
|
|
296
|
+
"prepend-icon": "add",
|
|
297
|
+
onClick: e[6] || (e[6] = (a) => f())
|
|
298
|
+
})
|
|
299
|
+
]),
|
|
300
|
+
_: 1
|
|
301
|
+
}))
|
|
302
|
+
])
|
|
303
|
+
], 64);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
export {
|
|
308
|
+
Ve as default
|
|
309
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { defineComponent as R, computed as f, ref as p, watch as T, resolveComponent as m, openBlock as d, createElementBlock as k, Fragment as B, createVNode as _, unref as n, createElementVNode as E, createBlock as M, createCommentVNode as A } from "vue";
|
|
2
|
+
import "./index-DbP04yeg.js";
|
|
3
|
+
import { useRouter as L } from "vue-router";
|
|
4
|
+
import { m as N } from "./index-CHO4_zsT.js";
|
|
5
|
+
import { R as s } from "./app-Bt59niI-.js";
|
|
6
|
+
const Y = { class: "px-24 flex flex-col gap-y-16 pb-24" }, y = /* @__PURE__ */ R({
|
|
7
|
+
__name: "Member",
|
|
8
|
+
setup(h) {
|
|
9
|
+
const e = L(), o = [
|
|
10
|
+
// {
|
|
11
|
+
// label: 'Overview',
|
|
12
|
+
// value: ROUTE_NAME['$connect-LOYALTY_MEMBER_OVERVIEW'],
|
|
13
|
+
// actions: [
|
|
14
|
+
// // {
|
|
15
|
+
// // label: 'Add member',
|
|
16
|
+
// // value: 'add_member',
|
|
17
|
+
// // isPrimary: true,
|
|
18
|
+
// // prependIcon: 'add',
|
|
19
|
+
// // },
|
|
20
|
+
// ],
|
|
21
|
+
// },
|
|
22
|
+
{
|
|
23
|
+
label: "Member list",
|
|
24
|
+
value: s["$connect-LOYALTY_MEMBER_LIST"],
|
|
25
|
+
actions: [
|
|
26
|
+
// {
|
|
27
|
+
// label: 'Import member',
|
|
28
|
+
// value: 'import_member',
|
|
29
|
+
// isPrimary: false,
|
|
30
|
+
// },
|
|
31
|
+
// {
|
|
32
|
+
// label: 'Add member',
|
|
33
|
+
// value: 'add_member',
|
|
34
|
+
// isPrimary: true,
|
|
35
|
+
// prependIcon: 'add',
|
|
36
|
+
// },
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
], r = f(() => {
|
|
40
|
+
var a, c, i;
|
|
41
|
+
return e.currentRoute.value.name != s["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
42
|
+
title: u.value.label,
|
|
43
|
+
actions: u.value.actions,
|
|
44
|
+
description: void 0
|
|
45
|
+
} : (u.value = o[1], {
|
|
46
|
+
backButton: !0,
|
|
47
|
+
title: "Member's transactions",
|
|
48
|
+
actions: [],
|
|
49
|
+
description: `${(a = l.value) == null ? void 0 : a.name} (${(c = l.value) == null ? void 0 : c._id}) (${(i = l.value) == null ? void 0 : i.phoneNumber})`,
|
|
50
|
+
onBackButton: async () => {
|
|
51
|
+
await e.push({ name: s["$connect-LOYALTY_MEMBER_LIST"] });
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}), u = p(
|
|
55
|
+
o.find((t) => t.value === e.currentRoute.value.name) ?? o[0]
|
|
56
|
+
), l = p();
|
|
57
|
+
async function b(t) {
|
|
58
|
+
await e.push({ name: t });
|
|
59
|
+
}
|
|
60
|
+
return T(
|
|
61
|
+
() => e.currentRoute.value.name,
|
|
62
|
+
async (t) => {
|
|
63
|
+
u.value = o.find((c) => c.value === t) ?? o[0];
|
|
64
|
+
const a = e.currentRoute.value.params.id;
|
|
65
|
+
a && (l.value = await N.readById(a)), await e.push({ name: t });
|
|
66
|
+
}
|
|
67
|
+
), (t, a) => {
|
|
68
|
+
const c = m("FmPageHead"), i = m("FmTabs"), v = m("RouterView");
|
|
69
|
+
return d(), k(B, null, [
|
|
70
|
+
_(c, {
|
|
71
|
+
actions: n(r).actions,
|
|
72
|
+
title: n(r).title,
|
|
73
|
+
description: n(r).description,
|
|
74
|
+
"back-button": n(r).backButton,
|
|
75
|
+
"onClick:back": n(r).onBackButton
|
|
76
|
+
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
77
|
+
E("div", Y, [
|
|
78
|
+
n(e).currentRoute.value.name != n(s)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (d(), M(i, {
|
|
79
|
+
key: 0,
|
|
80
|
+
"model-value": n(u).value,
|
|
81
|
+
items: o,
|
|
82
|
+
"onUpdate:modelValue": b
|
|
83
|
+
}, null, 8, ["model-value"])) : A("", !0),
|
|
84
|
+
_(v)
|
|
85
|
+
])
|
|
86
|
+
], 64);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
export {
|
|
91
|
+
y as default
|
|
92
|
+
};
|