@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.61
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-u9mtlxSv.js +427 -0
- package/dist/{App-C2616cfr.js → App-BwTQE7Ft.js} +445 -420
- package/dist/AuditLogs-BVMRclSw.js +1886 -0
- package/dist/Bin-Cca-XOkz.js +166 -0
- package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DRQgpwdP.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CeUu_T1u.js} +6 -8
- package/dist/Card-CnbB_u31.js +896 -0
- package/dist/Collections-BjlfOSC3.js +459 -0
- package/dist/{Credit-CPcLgnsq.js → Credit-BoElrcx9.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-B3WVwem6.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CGfpziKs.js} +18 -18
- package/dist/{Experience-BoBikt-x.js → Experience-SdGBf4vU.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/{Game-DR8PyYZa.js → Game-ChLHibpB.js} +39 -37
- package/dist/Index-D7Kq6uyf.js +259 -0
- package/dist/Marketing-BDajIqR_.js +20071 -0
- package/dist/Member-BPZryqWL.js +317 -0
- package/dist/MemberList-C52Dop8Z.js +1598 -0
- package/dist/MemberTransactions-DHU78kgS.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-js1F2E4N.js} +83 -71
- package/dist/{Mission-CMpvz9zN.js → Mission-BQR3qjAu.js} +101 -87
- package/dist/Overview-BbLYWXjG.js +1078 -0
- package/dist/{Point-DkZn6p9s.js → Point-DbTcWJbQ.js} +55 -53
- package/dist/{Promotion-B7YzwPc_.js → Promotion-CIrpWBQD.js} +65 -57
- package/dist/Queue-B0Mfq2Vn.js +244 -0
- package/dist/Record-Z6ZrJeLc.js +340 -0
- package/dist/Reward-D6k0QFQA.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-GJ6j_jOh.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-gQxmX9ur.js +1637 -0
- package/dist/Segment-D6MF-EO8.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BWG-pz6F.js +181 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-HgorlHNz.js +147 -0
- package/dist/Setting--OFDS95z.js +1931 -0
- package/dist/Store-BqlRTC-c.js +1751 -0
- package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-BTu0IdDN.js} +33 -32
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BX053DJA.js +943 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BAkuqLwy.js} +1 -1
- package/dist/{Tier-CW-46oJS.js → Tier-CE9LYAEX.js} +327 -318
- package/dist/{Title-CE9rWVdi.js → Title-DOOASUMI.js} +199 -184
- package/dist/{Transaction-B21RrC4M.js → Transaction-DPxUOBP-.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CKwf0F_i.js +130 -0
- package/dist/Voucher-D69DD02z.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CFL0Nsez.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Byh6_EJM.js} +1 -1
- package/dist/app-C2u1t47T.js +7059 -0
- package/dist/app-DgfmbHZe.js +33357 -0
- package/dist/app.js +1 -1
- package/dist/{business-aHhRUXc0.js → business-BqCJB_vA.js} +1 -1
- package/dist/{campaign-DH9NUNf_.js → campaign-CWMPCmmU.js} +2 -2
- package/dist/campaign-D0dTbl5b.js +1810 -0
- package/dist/campaign.enum-DhE8N4pA.js +20 -0
- package/dist/campaign.fn-BpO-RQih.js +758 -0
- package/dist/collectible.enum-rWEc6Tsw.js +19 -0
- package/dist/{collection.fn-CYlsA-kW.js → collection.fn-biX2iFDQ.js} +2 -2
- package/dist/dto-3m7xZwfI.js +214 -0
- package/dist/{effect-LSc9YanX.js → effect-ZMGRxKCZ.js} +9 -9
- package/dist/email-addresses-lgY03bkq.js +705 -0
- package/dist/{export-Cf0-C5Ly.js → export-BOzeYUy8.js} +5 -5
- package/dist/{helper-CiZpeMCM.js → helper-CO29wun4.js} +1 -1
- package/dist/index-B3V7krW_.js +29000 -0
- package/dist/index-BVbiAxW8.js +115 -0
- package/dist/{index-D_83JP2i.js → index-Bvch9tuP.js} +48 -4
- package/dist/index-CYOwwy3h.js +44 -0
- package/dist/{index-D6cEOHP4.js → index-CbYXYVYp.js} +1501 -1480
- package/dist/{index-DtsDOuDx.js → index-ChrOXJDq.js} +24 -21
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-DNGenFnf.js +32 -0
- package/dist/{index-BVb5-Ht8.js → index-Dd22X409.js} +259 -173
- package/dist/{index-kPhrD63q.js → index-LYAWIqjk.js} +1 -1
- package/dist/index-Xh9cW6Y9.js +54 -0
- package/dist/{index-gxwjKu3-.js → index-XhqaicYu.js} +2212 -871
- package/dist/{index-DW3PRjPL.js → index-YsC4VklJ.js} +1 -1
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-CJ1flA6S.js} +121 -121
- package/dist/loading-CUs_CN1k.js +71 -0
- package/dist/{membership-Dw1ylJ9Y.js → membership-D-GVacos.js} +54 -46
- package/dist/money-CMtSALkX.js +15 -0
- package/dist/number-CDwwgAYM.js +12 -0
- package/dist/objectid-Bf9yKD81.js +145 -0
- package/dist/{loading-7yq1tinq.js → plugins-9sQTEyth.js} +3871 -3943
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DblXGhWc.js +36 -0
- package/dist/{rule-C0Q_SHow.js → rule-Cy8cTzuw.js} +180 -177
- package/dist/{rule-builder-iu17XIof.js → rule-builder-Cn5vZgFN.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CyOanTMu.js → template-Cal94dUy.js} +5 -5
- package/dist/trigger-C1nwLSP8.js +144 -0
- package/dist/user-ir4Rn5bP.js +54 -0
- package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-eOHBBaH5.js} +243 -243
- package/dist/{xlsx-BYO_bB9J.js → xlsx-DulnT75_.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-muDf0oMG.js +0 -622
- package/dist/Card-bhLoK0ZV.js +0 -825
- package/dist/Collections-DjtsAiol.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
- package/dist/Marketing-Dny2nMUl.js +0 -316
- package/dist/Member-CP_smyk8.js +0 -69
- package/dist/MemberList-CR3eYI9p.js +0 -1733
- package/dist/MemberTransactions-RTx_lKFb.js +0 -38
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
- package/dist/Segment-Bb4gHt5V.js +0 -437
- package/dist/Setting-Xj0AVzh3.js +0 -1901
- package/dist/Store-BWRHQ6Ie.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
- package/dist/Voucher-KK9fBI0u.js +0 -490
- package/dist/app-CjhXHUQv.js +0 -53428
- package/dist/app-Dvf_JNMf.js +0 -5764
- package/dist/dto-DArfyZAI.js +0 -2770
- package/dist/index-Bi_LGEtY.js +0 -99
- package/dist/index-CiQDG7Cm.js +0 -762
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DQfjSSMF.js +0 -206
- package/dist/index-DcxssxPi.js +0 -29193
- package/dist/index-DqJVH2kv.js +0 -298
- package/dist/money-CPd0XTNv.js +0 -15
- package/dist/number-BgXY4un8.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { defineComponent as O, ref as R, watch as D, resolveComponent as w, openBlock as h, createElementBlock as g, Fragment as B, createElementVNode as x, createVNode as y, unref as r, withCtx as S, renderList as N, createBlock as I, toDisplayString as P, normalizeClass as V, computed as $, createCommentVNode as H } from "vue";
|
|
2
|
+
import "./index-LYAWIqjk.js";
|
|
3
|
+
import { useDialogChild as Y, FmButtonVariant as C, useDialog as q, useSnackbar as G } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as j } from "./vue-i18n-eOHBBaH5.js";
|
|
5
|
+
import { u as A, w as J } from "./xlsx-DulnT75_.js";
|
|
6
|
+
import { c as E } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
7
|
+
import { useRouter as z } from "vue-router";
|
|
8
|
+
import { m as M } from "./index-ChrOXJDq.js";
|
|
9
|
+
import { R as T } from "./app-C2u1t47T.js";
|
|
10
|
+
var U = { exports: {} };
|
|
11
|
+
(function(L, p) {
|
|
12
|
+
(function(v, c) {
|
|
13
|
+
c();
|
|
14
|
+
})(E, function() {
|
|
15
|
+
function v(t, o) {
|
|
16
|
+
return typeof o > "u" ? o = { autoBom: !1 } : typeof o != "object" && (console.warn("Deprecated: Expected third argument to be a object"), o = { autoBom: !o }), o.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob(["\uFEFF", t], { type: t.type }) : t;
|
|
17
|
+
}
|
|
18
|
+
function c(t, o, s) {
|
|
19
|
+
var e = new XMLHttpRequest();
|
|
20
|
+
e.open("GET", t), e.responseType = "blob", e.onload = function() {
|
|
21
|
+
u(e.response, o, s);
|
|
22
|
+
}, e.onerror = function() {
|
|
23
|
+
console.error("could not download file");
|
|
24
|
+
}, e.send();
|
|
25
|
+
}
|
|
26
|
+
function b(t) {
|
|
27
|
+
var o = new XMLHttpRequest();
|
|
28
|
+
o.open("HEAD", t, !1);
|
|
29
|
+
try {
|
|
30
|
+
o.send();
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
return 200 <= o.status && 299 >= o.status;
|
|
34
|
+
}
|
|
35
|
+
function d(t) {
|
|
36
|
+
try {
|
|
37
|
+
t.dispatchEvent(new MouseEvent("click"));
|
|
38
|
+
} catch {
|
|
39
|
+
var o = document.createEvent("MouseEvents");
|
|
40
|
+
o.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), t.dispatchEvent(o);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var a = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof E == "object" && E.global === E ? E : void 0, f = a.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), u = a.saveAs || (typeof window != "object" || window !== a ? function() {
|
|
44
|
+
} : "download" in HTMLAnchorElement.prototype && !f ? function(t, o, s) {
|
|
45
|
+
var e = a.URL || a.webkitURL, n = document.createElement("a");
|
|
46
|
+
o = o || t.name || "download", n.download = o, n.rel = "noopener", typeof t == "string" ? (n.href = t, n.origin === location.origin ? d(n) : b(n.href) ? c(t, o, s) : d(n, n.target = "_blank")) : (n.href = e.createObjectURL(t), setTimeout(function() {
|
|
47
|
+
e.revokeObjectURL(n.href);
|
|
48
|
+
}, 4e4), setTimeout(function() {
|
|
49
|
+
d(n);
|
|
50
|
+
}, 0));
|
|
51
|
+
} : "msSaveOrOpenBlob" in navigator ? function(t, o, s) {
|
|
52
|
+
if (o = o || t.name || "download", typeof t != "string") navigator.msSaveOrOpenBlob(v(t, s), o);
|
|
53
|
+
else if (b(t)) c(t, o, s);
|
|
54
|
+
else {
|
|
55
|
+
var e = document.createElement("a");
|
|
56
|
+
e.href = t, e.target = "_blank", setTimeout(function() {
|
|
57
|
+
d(e);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
} : function(t, o, s, e) {
|
|
61
|
+
if (e = e || open("", "_blank"), e && (e.document.title = e.document.body.innerText = "downloading..."), typeof t == "string") return c(t, o, s);
|
|
62
|
+
var n = t.type === "application/octet-stream", l = /constructor/i.test(a.HTMLElement) || a.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
63
|
+
if ((m || n && l || f) && typeof FileReader < "u") {
|
|
64
|
+
var _ = new FileReader();
|
|
65
|
+
_.onloadend = function() {
|
|
66
|
+
var i = _.result;
|
|
67
|
+
i = m ? i : i.replace(/^data:[^;]*;/, "data:attachment/file;"), e ? e.location.href = i : location = i, e = null;
|
|
68
|
+
}, _.readAsDataURL(t);
|
|
69
|
+
} else {
|
|
70
|
+
var F = a.URL || a.webkitURL, k = F.createObjectURL(t);
|
|
71
|
+
e ? e.location = k : location.href = k, e = null, setTimeout(function() {
|
|
72
|
+
F.revokeObjectURL(k);
|
|
73
|
+
}, 4e4);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
a.saveAs = u.saveAs = u, L.exports = u;
|
|
77
|
+
});
|
|
78
|
+
})(U);
|
|
79
|
+
var W = U.exports;
|
|
80
|
+
const X = { class: "space-y-8 mb-10" }, K = { class: "flex justify-end" }, Q = {
|
|
81
|
+
key: 1,
|
|
82
|
+
class: /* @__PURE__ */ V([
|
|
83
|
+
"flex items-center",
|
|
84
|
+
"border border-fm-color-neutral-gray-300",
|
|
85
|
+
"p-16 space-x-16 rounded-md"
|
|
86
|
+
])
|
|
87
|
+
}, Z = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ee = /* @__PURE__ */ O({
|
|
88
|
+
__name: "ImportMemberDialog",
|
|
89
|
+
setup(L) {
|
|
90
|
+
const { t: p } = j(), { emitData: v } = Y(), c = R(null), b = R(null), d = R({
|
|
91
|
+
resetCollectionExpiryBalance: !0
|
|
92
|
+
}), a = [
|
|
93
|
+
"Id",
|
|
94
|
+
"Name",
|
|
95
|
+
"Phone",
|
|
96
|
+
"Email",
|
|
97
|
+
"Gender",
|
|
98
|
+
"CardNo",
|
|
99
|
+
"Birthday",
|
|
100
|
+
"Credit",
|
|
101
|
+
"CreditExpiryDate",
|
|
102
|
+
"Exp",
|
|
103
|
+
"Point",
|
|
104
|
+
"Tier",
|
|
105
|
+
// 'Titles',
|
|
106
|
+
"TotalTransaction",
|
|
107
|
+
"AvgSpent",
|
|
108
|
+
"TotalSpent",
|
|
109
|
+
"LastVisit",
|
|
110
|
+
"Feedback",
|
|
111
|
+
"LastSeasonTierEarned",
|
|
112
|
+
"LastSeasonPointEarned",
|
|
113
|
+
"JoinedAt",
|
|
114
|
+
"JoinedAtLocation",
|
|
115
|
+
"VisitFrequency"
|
|
116
|
+
], f = [
|
|
117
|
+
{
|
|
118
|
+
label: "CSV",
|
|
119
|
+
icon: "csv",
|
|
120
|
+
value: "csv"
|
|
121
|
+
/* csv */
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "Excel",
|
|
125
|
+
icon: "description",
|
|
126
|
+
value: "xlsx"
|
|
127
|
+
/* xlsx */
|
|
128
|
+
}
|
|
129
|
+
];
|
|
130
|
+
async function u(e) {
|
|
131
|
+
var n, l;
|
|
132
|
+
c.value = ((l = (n = e.target) == null ? void 0 : n.files) == null ? void 0 : l[0]) ?? null;
|
|
133
|
+
}
|
|
134
|
+
async function t(e) {
|
|
135
|
+
switch (e) {
|
|
136
|
+
case "csv":
|
|
137
|
+
o();
|
|
138
|
+
break;
|
|
139
|
+
case "xlsx":
|
|
140
|
+
s();
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function o() {
|
|
145
|
+
const e = new Blob([a.join(",")], {
|
|
146
|
+
type: "text/csv;charset=utf-8;"
|
|
147
|
+
});
|
|
148
|
+
W.saveAs(e, "ImportMemberTemplate.csv");
|
|
149
|
+
}
|
|
150
|
+
function s() {
|
|
151
|
+
const e = A.aoa_to_sheet([a]), n = A.book_new();
|
|
152
|
+
A.book_append_sheet(n, e, "Sheet1"), J(n, "ImportMemberTemplate.xlsx");
|
|
153
|
+
}
|
|
154
|
+
return D(c, () => {
|
|
155
|
+
v({ file: c.value, config: d.value });
|
|
156
|
+
}), (e, n) => {
|
|
157
|
+
const l = w("FmSwitch"), m = w("FmButton"), _ = w("FmMenuItem"), F = w("FmMenu"), k = w("FmDropField");
|
|
158
|
+
return h(), g(B, null, [
|
|
159
|
+
x("div", X, [
|
|
160
|
+
n[3] || (n[3] = x("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
|
|
161
|
+
y(l, {
|
|
162
|
+
"model-value": r(d).resetCollectionExpiryBalance ?? !0,
|
|
163
|
+
"onUpdate:modelValue": n[0] || (n[0] = (i) => r(d).resetCollectionExpiryBalance = i),
|
|
164
|
+
label: "Replace Existing Free Credit",
|
|
165
|
+
sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
|
|
166
|
+
"label-placement": "right"
|
|
167
|
+
}, null, 8, ["model-value"])
|
|
168
|
+
]),
|
|
169
|
+
x("div", K, [
|
|
170
|
+
y(F, null, {
|
|
171
|
+
"menu-button": S(() => [
|
|
172
|
+
y(m, {
|
|
173
|
+
variant: "tertiary",
|
|
174
|
+
icon: "download",
|
|
175
|
+
label: "Download Template"
|
|
176
|
+
})
|
|
177
|
+
]),
|
|
178
|
+
default: S(() => [
|
|
179
|
+
(h(), g(B, null, N(f, (i) => y(_, {
|
|
180
|
+
key: i.value,
|
|
181
|
+
icon: i.icon,
|
|
182
|
+
label: i.label,
|
|
183
|
+
onClick: (ne) => t(i.value),
|
|
184
|
+
selectable: ""
|
|
185
|
+
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
})
|
|
189
|
+
]),
|
|
190
|
+
r(c) ? (h(), g("div", Q, [
|
|
191
|
+
y(m, {
|
|
192
|
+
variant: r(C).Tertiary,
|
|
193
|
+
"prepend-icon": "attach_file"
|
|
194
|
+
}, null, 8, ["variant"]),
|
|
195
|
+
x("p", Z, P(r(c).name), 1),
|
|
196
|
+
x("label", {
|
|
197
|
+
ref_key: "fileLabelRef",
|
|
198
|
+
ref: b,
|
|
199
|
+
htmlFor: "file"
|
|
200
|
+
}, [
|
|
201
|
+
y(m, {
|
|
202
|
+
variant: r(C).Plain,
|
|
203
|
+
label: r(p)("Replace File"),
|
|
204
|
+
onClick: n[2] || (n[2] = () => {
|
|
205
|
+
var i;
|
|
206
|
+
return (i = r(b)) == null ? void 0 : i.click();
|
|
207
|
+
})
|
|
208
|
+
}, null, 8, ["variant", "label"]),
|
|
209
|
+
x("input", {
|
|
210
|
+
id: "file",
|
|
211
|
+
accept: ".csv, .xlsx",
|
|
212
|
+
class: "hidden",
|
|
213
|
+
type: "file",
|
|
214
|
+
multiple: "",
|
|
215
|
+
onChange: u
|
|
216
|
+
}, null, 32)
|
|
217
|
+
], 512)
|
|
218
|
+
])) : (h(), I(k, {
|
|
219
|
+
key: 0,
|
|
220
|
+
onFileUpload: n[1] || (n[1] = (i) => c.value = i),
|
|
221
|
+
accept: ".csv, .xlsx",
|
|
222
|
+
"max-file-size": 2e7
|
|
223
|
+
}))
|
|
224
|
+
], 64);
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
}), te = { class: "px-24 flex flex-col gap-y-16 pb-24" }, me = /* @__PURE__ */ O({
|
|
228
|
+
__name: "Member",
|
|
229
|
+
setup(L) {
|
|
230
|
+
const p = z(), { t: v } = j(), c = q(), b = G(), d = {
|
|
231
|
+
label: v("connect.loyalty.member.import"),
|
|
232
|
+
value: "import",
|
|
233
|
+
isPrimary: !0,
|
|
234
|
+
prependIcon: "download"
|
|
235
|
+
}, a = [
|
|
236
|
+
{
|
|
237
|
+
label: v("connect.loyalty.member.tabs.member_list"),
|
|
238
|
+
value: T["$connect-LOYALTY_MEMBER_LIST"],
|
|
239
|
+
actions: [d]
|
|
240
|
+
}
|
|
241
|
+
], f = $(() => {
|
|
242
|
+
var n, l, m;
|
|
243
|
+
return p.currentRoute.value.name != T["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
244
|
+
title: u.value.label,
|
|
245
|
+
actions: u.value.actions,
|
|
246
|
+
description: void 0
|
|
247
|
+
} : (u.value = a[1], {
|
|
248
|
+
backButton: !0,
|
|
249
|
+
title: v("connect.loyalty.member.title"),
|
|
250
|
+
actions: [],
|
|
251
|
+
description: `${(n = t.value) == null ? void 0 : n.name} (${(l = t.value) == null ? void 0 : l._id}) (${(m = t.value) == null ? void 0 : m.phoneNumber})`,
|
|
252
|
+
onBackButton: async () => {
|
|
253
|
+
await p.push({ name: T["$connect-LOYALTY_MEMBER_LIST"] });
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}), u = R(
|
|
257
|
+
a.find((e) => e.value === p.currentRoute.value.name) ?? a[0]
|
|
258
|
+
), t = R();
|
|
259
|
+
async function o(e) {
|
|
260
|
+
await p.push({ name: e });
|
|
261
|
+
}
|
|
262
|
+
async function s() {
|
|
263
|
+
c.open({
|
|
264
|
+
title: "Upload File",
|
|
265
|
+
closeButton: !0,
|
|
266
|
+
dismissAway: !1,
|
|
267
|
+
contentComponent: ee,
|
|
268
|
+
primaryActions: { text: "Import", close: !1 }
|
|
269
|
+
}).onPrimary(async ({ file: e, config: n }) => {
|
|
270
|
+
if (!e)
|
|
271
|
+
b.open({
|
|
272
|
+
type: "error",
|
|
273
|
+
title: "Please upload a file"
|
|
274
|
+
});
|
|
275
|
+
else {
|
|
276
|
+
const l = new FormData();
|
|
277
|
+
l.append("file", e), l.append("config", JSON.stringify(n)), await M.import(l), b.open({
|
|
278
|
+
type: "info",
|
|
279
|
+
title: "Import begins soon. Check Queue for updates."
|
|
280
|
+
}), c.close();
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
return D(
|
|
285
|
+
() => p.currentRoute.value.name,
|
|
286
|
+
async (e) => {
|
|
287
|
+
u.value = a.find((l) => l.value === e) ?? a[0];
|
|
288
|
+
const n = p.currentRoute.value.params.id;
|
|
289
|
+
n && (t.value = await M.readById(n)), await p.push({ name: e });
|
|
290
|
+
}
|
|
291
|
+
), (e, n) => {
|
|
292
|
+
const l = w("FmPageHead"), m = w("FmTabs"), _ = w("RouterView");
|
|
293
|
+
return h(), g(B, null, [
|
|
294
|
+
y(l, {
|
|
295
|
+
actions: r(f).actions,
|
|
296
|
+
title: r(f).title,
|
|
297
|
+
description: r(f).description,
|
|
298
|
+
"back-button": r(f).backButton,
|
|
299
|
+
"onClick:back": r(f).onBackButton,
|
|
300
|
+
"onClick:action": s
|
|
301
|
+
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
302
|
+
x("div", te, [
|
|
303
|
+
r(p).currentRoute.value.name != r(T)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (h(), I(m, {
|
|
304
|
+
key: 0,
|
|
305
|
+
"model-value": r(u).value,
|
|
306
|
+
items: a,
|
|
307
|
+
"onUpdate:modelValue": o
|
|
308
|
+
}, null, 8, ["model-value"])) : H("", !0),
|
|
309
|
+
y(_)
|
|
310
|
+
])
|
|
311
|
+
], 64);
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
export {
|
|
316
|
+
me as default
|
|
317
|
+
};
|