@feedmepos/mf-connect 0.1.0-beta.73 → 0.1.0-beta.75
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-DuF55WBS.js → Analytic-BjvuYiVe.js} +11 -11
- package/dist/{App-CeGsq1NM.js → App-B59UFFR_.js} +6 -6
- package/dist/{AuditLogs-B34wZMVU.js → AuditLogs-CtA8tyqv.js} +9 -9
- package/dist/{Bin-DLoneNTA.js → Bin-CxqyxMxm.js} +8 -8
- package/dist/{Broadcast-CoOqhL7m.js → Broadcast-BwO_p-C6.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CE20HRMJ.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DyxpFPoX.js} +6 -6
- package/dist/{Card-BpvNfVGg.js → Card-DffYD6aP.js} +225 -217
- package/dist/{Collections-CQHKFHzT.js → Collections-BQy1iuLr.js} +12 -12
- package/dist/{Credit-CU9Rq52D.js → Credit-DaIwPkW2.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-thu_Lazd.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CN3WDlGf.js} +29 -29
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BV3itQrT.js → EffectSheet.vue_vue_type_style_index_0_lang-B01mfS0B.js} +6 -6
- package/dist/{Experience-ClcvzpZh.js → Experience-Bz_pHAWN.js} +9 -9
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/{Game-B-3gd3F2.js → Game-D5edK798.js} +10 -10
- package/dist/{Index-BUgF1mCN.js → Index-IstFiAHJ.js} +10 -10
- package/dist/{Marketing-BmaJH7Sb.js → Marketing-CQkuEJpz.js} +6 -6
- package/dist/Member-DivzZ91c.js +287 -0
- package/dist/{MemberList-BzKysKUq.js → MemberList-C4VS9NUh.js} +30 -25
- package/dist/{MemberTransactions-CXGW_Cb5.js → MemberTransactions-UqNAwlMQ.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Cz8rnRI5.js → MessageInput.vue_vue_type_script_setup_true_lang-CLjPB5Fx.js} +8 -8
- package/dist/{Mission-DjJFBLUZ.js → Mission-BIU1n3Kq.js} +10 -10
- package/dist/{Overview-DY0s8qOT.js → Overview-UX39Gyg_.js} +53 -53
- package/dist/{Point-Ci76W501.js → Point-CDwTZVUM.js} +9 -9
- package/dist/{Promotion-_GsyimeM.js → Promotion-BjLLnek1.js} +10 -10
- package/dist/{Queue-yUE7VTjr.js → Queue-NMym8jKY.js} +13 -13
- package/dist/{Record-BWE8pJwB.js → Record-CO396riY.js} +8 -8
- package/dist/{Reward-CLjRxvkB.js → Reward-Dz_pXOtZ.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-NhHHUjBT.js → RewardGroup.vue_vue_type_script_setup_true_lang-ZN5mwP8O.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-mHzVjK4_.js → RuleGroup.vue_vue_type_script_setup_true_lang-Fk8N3r8K.js} +13 -13
- package/dist/Segment--uEU_t9R.js +837 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-Et0B0kkB.js → SelectItems.vue_vue_type_script_setup_true_lang-DqruveTr.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CTuiaF91.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Cf8kL4wK.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-h0OGy6PZ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CZ_RNT8I.js} +3 -3
- package/dist/{Setting-DKNukqej.js → Setting-Bh7mlr2i.js} +38 -38
- package/dist/{Store-pVnRDIWv.js → Store-80fnSDSi.js} +19 -19
- package/dist/{StoreRewards-Dta8iaG3.js → StoreRewards-CDo3kQvj.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-C4FK2Hhc.js → StoreTransactions.vue_vue_type_script_setup_true_lang-BvDQULQ_.js} +19 -19
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-D5tEPJlH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C9oPzMCz.js} +1 -1
- package/dist/{Tier-b3qzb85f.js → Tier-CnChpbAP.js} +20 -20
- package/dist/{Title-BEPkkALw.js → Title-DPEnOWJ4.js} +19 -19
- package/dist/{Transaction-CX5bz-8R.js → Transaction-Cmbvmc91.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-J7JgL3ZE.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BIk7daH2.js} +6 -6
- package/dist/{Voucher-B9WhyNoJ.js → Voucher-Ksr4yCA9.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CpdJV-JH.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DVhNNGM4.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Byy8iIcw.js → ZodTextField.vue_vue_type_script_setup_true_lang-CnOZAoED.js} +1 -1
- package/dist/{app-spXNxwIy.js → app-Bm2EB0kn.js} +430 -426
- package/dist/{app-BwuFlP4U.js → app-DMZJB6n5.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DL7Au5Jd.js → business-RCVpOGhZ.js} +1 -1
- package/dist/{campaign-CdAByh1F.js → campaign-2xFhapQA.js} +2 -2
- package/dist/{campaign-BNZ7-HOT.js → campaign-CQe4sZi3.js} +9 -9
- package/dist/{campaign.enum-BUoLAvv9.js → campaign.enum-BFW4DlQi.js} +1 -1
- package/dist/{campaign.fn-Vhk4colm.js → campaign.fn-jn5byV7K.js} +54 -54
- package/dist/{collectible.enum-Bj9M_woV.js → collectible.enum-36NDAm6r.js} +1 -1
- package/dist/{collection.fn-Cd5Ot0j-.js → collection.fn-Tm-glYmK.js} +2 -2
- package/dist/{dto-ClbqdGxX.js → dto-CkgQyqvh.js} +12 -12
- package/dist/{effect-DIJB9gNc.js → effect-9xJwRyTT.js} +1 -1
- package/dist/{email-addresses-Ct53VAK9.js → email-addresses-BSevcd1s.js} +1 -1
- package/dist/{export-CoufQpmw.js → export-C6NNy3VD.js} +3 -3
- package/dist/{helper-BiWgv5uK.js → helper-C6jcyBxj.js} +1 -1
- package/dist/{index-1xiBe8hf.js → index-B1WcRD2p.js} +189 -187
- package/dist/{index-DVH42wjJ.js → index-BGDXeXr8.js} +1 -1
- package/dist/{index-CC4x--Wj.js → index-BdvjEImc.js} +1 -1
- package/dist/{index-bJ5pwQkB.js → index-BmhqYexg.js} +2 -2
- package/dist/{index-D7FRiYhm.js → index-BwaxudDP.js} +6 -6
- package/dist/{index-Ccxk7UeG.js → index-C-co08N1.js} +3 -3
- package/dist/{index-LFo6ZYQL.js → index-CO-OulIR.js} +1 -1
- package/dist/{index-DfRmJZgk.js → index-CwNmmnDD.js} +3 -3
- package/dist/{index-qjlKvnh6.js → index-DLrnBs0d.js} +3 -3
- package/dist/{index-DmakIEWL.js → index-DayAM5ca.js} +1 -1
- package/dist/{index-CyLEADUO.js → index-REJVA8tS.js} +1 -1
- package/dist/{index-CGC8OuAU.js → index-tV74UysB.js} +1 -1
- package/dist/{index-DovTEaDP.js → index-uY4KbIOv.js} +1 -1
- package/dist/{index.esm2017-CRGDx_au.js → index.esm2017-BqFEBS5T.js} +1 -1
- package/dist/{loading-YDhYfc7H.js → loading-CEMhV8o1.js} +1 -1
- package/dist/{membership-BGin-J4X.js → membership-BQmk2NO_.js} +3 -3
- package/dist/{money-Dy3hgkcf.js → money-C-MUHPgR.js} +1 -1
- package/dist/{number-BAIUanJl.js → number-ZqYa2VPD.js} +1 -1
- package/dist/{objectid-Cw3dF6mj.js → objectid-m5eVUTKS.js} +10 -10
- package/dist/{plugins-D9TQFKpf.js → plugins-CPTqOd-U.js} +2 -2
- package/dist/{reward-DB1n0glJ.js → reward-BQ67vXz7.js} +1 -1
- package/dist/{rule-BrRyZfJJ.js → rule-GLbI8tc9.js} +3 -3
- package/dist/{rule-builder-CC08hDgq.js → rule-builder-Kv000bdR.js} +1 -1
- package/dist/{template-DJlxZIjZ.js → template-JSYful0r.js} +4 -4
- package/dist/{trigger-Dz5Fd0Hc.js → trigger-DsWgM26r.js} +4 -4
- package/dist/{user-BAE-TiCB.js → user-kPXx7B0k.js} +1 -1
- package/dist/{vue-i18n-DpoLveH2.js → vue-i18n-CTzFvJGR.js} +99 -99
- package/dist/{xlsx-3tdJPiTp.js → xlsx-BeEGdbvi.js} +166 -166
- package/package.json +1 -1
- package/dist/Member-Bx61ZEO0.js +0 -357
- package/dist/Segment-B5X395PR.js +0 -794
package/package.json
CHANGED
package/dist/Member-Bx61ZEO0.js
DELETED
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { defineComponent as D, ref as A, watch as P, resolveComponent as h, openBlock as F, createElementBlock as B, Fragment as S, createElementVNode as x, createVNode as E, unref as r, withCtx as L, renderList as H, createBlock as j, toDisplayString as q, normalizeClass as Y, computed as G, createCommentVNode as J } from "vue";
|
|
2
|
-
import "./index-DovTEaDP.js";
|
|
3
|
-
import { useDialogChild as Q, FmButtonVariant as O, useDialog as z, useSnackbar as W } from "@feedmepos/ui-library";
|
|
4
|
-
import { u as N } from "./vue-i18n-DpoLveH2.js";
|
|
5
|
-
import "./index-D7FRiYhm.js";
|
|
6
|
-
import { c as I } from "./index-1xiBe8hf.js";
|
|
7
|
-
import "./index-bJ5pwQkB.js";
|
|
8
|
-
import "./index-CyLEADUO.js";
|
|
9
|
-
import "./index-Ccxk7UeG.js";
|
|
10
|
-
import { u as M, w as X } from "./xlsx-3tdJPiTp.js";
|
|
11
|
-
import { c as g } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
12
|
-
import { useCoreStore as K } from "@feedmepos/mf-common";
|
|
13
|
-
import { useRouter as Z } from "vue-router";
|
|
14
|
-
import { m as U } from "./index-DVH42wjJ.js";
|
|
15
|
-
import { R as T } from "./app-spXNxwIy.js";
|
|
16
|
-
var V = { exports: {} };
|
|
17
|
-
(function(C, u) {
|
|
18
|
-
(function(d, c) {
|
|
19
|
-
c();
|
|
20
|
-
})(g, function() {
|
|
21
|
-
function d(e, t) {
|
|
22
|
-
return typeof t > "u" ? t = { autoBom: !1 } : typeof t != "object" && (console.warn("Deprecated: Expected third argument to be a object"), t = { autoBom: !t }), t.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
23
|
-
}
|
|
24
|
-
function c(e, t, l) {
|
|
25
|
-
var n = new XMLHttpRequest();
|
|
26
|
-
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
27
|
-
p(n.response, t, l);
|
|
28
|
-
}, n.onerror = function() {
|
|
29
|
-
console.error("could not download file");
|
|
30
|
-
}, n.send();
|
|
31
|
-
}
|
|
32
|
-
function f(e) {
|
|
33
|
-
var t = new XMLHttpRequest();
|
|
34
|
-
t.open("HEAD", e, !1);
|
|
35
|
-
try {
|
|
36
|
-
t.send();
|
|
37
|
-
} catch {
|
|
38
|
-
}
|
|
39
|
-
return 200 <= t.status && 299 >= t.status;
|
|
40
|
-
}
|
|
41
|
-
function m(e) {
|
|
42
|
-
try {
|
|
43
|
-
e.dispatchEvent(new MouseEvent("click"));
|
|
44
|
-
} catch {
|
|
45
|
-
var t = document.createEvent("MouseEvents");
|
|
46
|
-
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
var s = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof g == "object" && g.global === g ? g : void 0, R = s.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), p = s.saveAs || (typeof window != "object" || window !== s ? function() {
|
|
50
|
-
} : "download" in HTMLAnchorElement.prototype && !R ? function(e, t, l) {
|
|
51
|
-
var n = s.URL || s.webkitURL, o = document.createElement("a");
|
|
52
|
-
t = t || e.name || "download", o.download = t, o.rel = "noopener", typeof e == "string" ? (o.href = e, o.origin === location.origin ? m(o) : f(o.href) ? c(e, t, l) : m(o, o.target = "_blank")) : (o.href = n.createObjectURL(e), setTimeout(function() {
|
|
53
|
-
n.revokeObjectURL(o.href);
|
|
54
|
-
}, 4e4), setTimeout(function() {
|
|
55
|
-
m(o);
|
|
56
|
-
}, 0));
|
|
57
|
-
} : "msSaveOrOpenBlob" in navigator ? function(e, t, l) {
|
|
58
|
-
if (t = t || e.name || "download", typeof e != "string") navigator.msSaveOrOpenBlob(d(e, l), t);
|
|
59
|
-
else if (f(e)) c(e, t, l);
|
|
60
|
-
else {
|
|
61
|
-
var n = document.createElement("a");
|
|
62
|
-
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
63
|
-
m(n);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
} : function(e, t, l, n) {
|
|
67
|
-
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string") return c(e, t, l);
|
|
68
|
-
var o = e.type === "application/octet-stream", y = /constructor/i.test(s.HTMLElement) || s.safari, v = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
69
|
-
if ((v || o && y || R) && typeof FileReader < "u") {
|
|
70
|
-
var _ = new FileReader();
|
|
71
|
-
_.onloadend = function() {
|
|
72
|
-
var a = _.result;
|
|
73
|
-
a = v ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location = a, n = null;
|
|
74
|
-
}, _.readAsDataURL(e);
|
|
75
|
-
} else {
|
|
76
|
-
var k = s.URL || s.webkitURL, i = k.createObjectURL(e);
|
|
77
|
-
n ? n.location = i : location.href = i, n = null, setTimeout(function() {
|
|
78
|
-
k.revokeObjectURL(i);
|
|
79
|
-
}, 4e4);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
s.saveAs = p.saveAs = p, C.exports = p;
|
|
83
|
-
});
|
|
84
|
-
})(V);
|
|
85
|
-
var ee = V.exports;
|
|
86
|
-
const te = { class: "space-y-8 mb-10" }, ne = { class: "flex justify-end" }, oe = {
|
|
87
|
-
key: 1,
|
|
88
|
-
class: /* @__PURE__ */ Y([
|
|
89
|
-
"flex items-center",
|
|
90
|
-
"border border-fm-color-neutral-gray-300",
|
|
91
|
-
"p-16 space-x-16 rounded-md"
|
|
92
|
-
])
|
|
93
|
-
}, ae = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ie = /* @__PURE__ */ D({
|
|
94
|
-
__name: "ImportMemberDialog",
|
|
95
|
-
setup(C) {
|
|
96
|
-
const { t: u } = N(), { emitData: d } = Q(), c = A(null), f = A(null), m = A({
|
|
97
|
-
resetCollectionExpiryBalance: !0
|
|
98
|
-
}), s = [
|
|
99
|
-
"Id",
|
|
100
|
-
"Name",
|
|
101
|
-
"Phone",
|
|
102
|
-
"Email",
|
|
103
|
-
"Gender",
|
|
104
|
-
"CardNo",
|
|
105
|
-
"Birthday",
|
|
106
|
-
"Credit",
|
|
107
|
-
"CreditExpiryDate",
|
|
108
|
-
"Exp",
|
|
109
|
-
"Point",
|
|
110
|
-
"Tier",
|
|
111
|
-
// 'Titles',
|
|
112
|
-
"TotalTransaction",
|
|
113
|
-
"AvgSpent",
|
|
114
|
-
"TotalSpent",
|
|
115
|
-
"LastVisit",
|
|
116
|
-
"Feedback",
|
|
117
|
-
"LastSeasonTierEarned",
|
|
118
|
-
"LastSeasonPointEarned",
|
|
119
|
-
"JoinedAt",
|
|
120
|
-
"JoinedAtLocation",
|
|
121
|
-
"VisitFrequency"
|
|
122
|
-
], R = [
|
|
123
|
-
{
|
|
124
|
-
label: "CSV",
|
|
125
|
-
icon: "csv",
|
|
126
|
-
value: "csv"
|
|
127
|
-
/* csv */
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
label: "Excel",
|
|
131
|
-
icon: "description",
|
|
132
|
-
value: "xlsx"
|
|
133
|
-
/* xlsx */
|
|
134
|
-
}
|
|
135
|
-
];
|
|
136
|
-
async function p(n) {
|
|
137
|
-
var o, y;
|
|
138
|
-
c.value = ((y = (o = n.target) == null ? void 0 : o.files) == null ? void 0 : y[0]) ?? null;
|
|
139
|
-
}
|
|
140
|
-
async function e(n) {
|
|
141
|
-
switch (n) {
|
|
142
|
-
case "csv":
|
|
143
|
-
t();
|
|
144
|
-
break;
|
|
145
|
-
case "xlsx":
|
|
146
|
-
l();
|
|
147
|
-
break;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function t() {
|
|
151
|
-
const n = new Blob([s.join(",")], {
|
|
152
|
-
type: "text/csv;charset=utf-8;"
|
|
153
|
-
});
|
|
154
|
-
ee.saveAs(n, "ImportMemberTemplate.csv");
|
|
155
|
-
}
|
|
156
|
-
function l() {
|
|
157
|
-
const n = M.aoa_to_sheet([s]), o = M.book_new();
|
|
158
|
-
M.book_append_sheet(o, n, "Sheet1"), X(o, "ImportMemberTemplate.xlsx");
|
|
159
|
-
}
|
|
160
|
-
return P(c, () => {
|
|
161
|
-
d({ file: c.value, config: m.value });
|
|
162
|
-
}), (n, o) => {
|
|
163
|
-
const y = h("FmSwitch"), v = h("FmButton"), _ = h("FmMenuItem"), k = h("FmMenu"), i = h("FmDropField");
|
|
164
|
-
return F(), B(S, null, [
|
|
165
|
-
x("div", te, [
|
|
166
|
-
o[3] || (o[3] = x("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1)),
|
|
167
|
-
E(y, {
|
|
168
|
-
"model-value": r(m).resetCollectionExpiryBalance ?? !0,
|
|
169
|
-
"onUpdate:modelValue": o[0] || (o[0] = (a) => r(m).resetCollectionExpiryBalance = a),
|
|
170
|
-
label: "Replace Existing Free Credit",
|
|
171
|
-
sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
|
|
172
|
-
"label-placement": "right"
|
|
173
|
-
}, null, 8, ["model-value"])
|
|
174
|
-
]),
|
|
175
|
-
x("div", ne, [
|
|
176
|
-
E(k, null, {
|
|
177
|
-
"menu-button": L(() => [
|
|
178
|
-
E(v, {
|
|
179
|
-
variant: "tertiary",
|
|
180
|
-
icon: "download",
|
|
181
|
-
label: "Download Template"
|
|
182
|
-
})
|
|
183
|
-
]),
|
|
184
|
-
default: L(() => [
|
|
185
|
-
(F(), B(S, null, H(R, (a) => E(_, {
|
|
186
|
-
key: a.value,
|
|
187
|
-
icon: a.icon,
|
|
188
|
-
label: a.label,
|
|
189
|
-
onClick: (b) => e(a.value),
|
|
190
|
-
selectable: ""
|
|
191
|
-
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
192
|
-
]),
|
|
193
|
-
_: 1
|
|
194
|
-
})
|
|
195
|
-
]),
|
|
196
|
-
r(c) ? (F(), B("div", oe, [
|
|
197
|
-
E(v, {
|
|
198
|
-
variant: r(O).Tertiary,
|
|
199
|
-
"prepend-icon": "attach_file"
|
|
200
|
-
}, null, 8, ["variant"]),
|
|
201
|
-
x("p", ae, q(r(c).name), 1),
|
|
202
|
-
x("label", {
|
|
203
|
-
ref_key: "fileLabelRef",
|
|
204
|
-
ref: f,
|
|
205
|
-
htmlFor: "file"
|
|
206
|
-
}, [
|
|
207
|
-
E(v, {
|
|
208
|
-
variant: r(O).Plain,
|
|
209
|
-
label: r(u)("Replace File"),
|
|
210
|
-
onClick: o[2] || (o[2] = () => {
|
|
211
|
-
var a;
|
|
212
|
-
return (a = r(f)) == null ? void 0 : a.click();
|
|
213
|
-
})
|
|
214
|
-
}, null, 8, ["variant", "label"]),
|
|
215
|
-
x("input", {
|
|
216
|
-
id: "file",
|
|
217
|
-
accept: ".csv, .xlsx",
|
|
218
|
-
class: "hidden",
|
|
219
|
-
type: "file",
|
|
220
|
-
multiple: "",
|
|
221
|
-
onChange: p
|
|
222
|
-
}, null, 32)
|
|
223
|
-
], 512)
|
|
224
|
-
])) : (F(), j(i, {
|
|
225
|
-
key: 0,
|
|
226
|
-
onFileUpload: o[1] || (o[1] = (a) => c.value = a),
|
|
227
|
-
accept: ".csv, .xlsx",
|
|
228
|
-
"max-file-size": 5e6
|
|
229
|
-
}))
|
|
230
|
-
], 64);
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
}), le = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ke = /* @__PURE__ */ D({
|
|
234
|
-
__name: "Member",
|
|
235
|
-
setup(C) {
|
|
236
|
-
var v, _, k;
|
|
237
|
-
const u = Z(), { t: d } = N(), c = z(), f = W(), m = K(), s = {
|
|
238
|
-
label: d("connect.loyalty.member.import"),
|
|
239
|
-
value: "import",
|
|
240
|
-
isPrimary: !0,
|
|
241
|
-
prependIcon: "download"
|
|
242
|
-
}, R = {
|
|
243
|
-
label: d("connect.navigation.queue"),
|
|
244
|
-
value: "queue",
|
|
245
|
-
isPrimary: !1,
|
|
246
|
-
prependIcon: "work_history"
|
|
247
|
-
}, p = [
|
|
248
|
-
{
|
|
249
|
-
label: d("connect.loyalty.member.tabs.member_list"),
|
|
250
|
-
value: T["$connect-LOYALTY_MEMBER_LIST"],
|
|
251
|
-
actions: (k = (_ = (v = m.sessionUser) == null ? void 0 : v.value) == null ? void 0 : _.role) != null && k.isAdmin ? [R, s] : []
|
|
252
|
-
}
|
|
253
|
-
], e = G(() => {
|
|
254
|
-
var a, b, w;
|
|
255
|
-
return u.currentRoute.value.name != T["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
256
|
-
title: t.value.label,
|
|
257
|
-
actions: t.value.actions,
|
|
258
|
-
description: void 0
|
|
259
|
-
} : (t.value = p[1], {
|
|
260
|
-
backButton: !0,
|
|
261
|
-
title: d("connect.loyalty.member.title"),
|
|
262
|
-
actions: [],
|
|
263
|
-
description: `${(a = l.value) == null ? void 0 : a.name} (${(b = l.value) == null ? void 0 : b._id}) (${(w = l.value) == null ? void 0 : w.phoneNumber})`,
|
|
264
|
-
onBackButton: async () => {
|
|
265
|
-
await u.push({ name: T["$connect-LOYALTY_MEMBER_LIST"] });
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
}), t = A(
|
|
269
|
-
p.find((i) => i.value === u.currentRoute.value.name) ?? p[0]
|
|
270
|
-
), l = A();
|
|
271
|
-
async function n(i) {
|
|
272
|
-
await u.push({ name: i });
|
|
273
|
-
}
|
|
274
|
-
async function o() {
|
|
275
|
-
c.open({
|
|
276
|
-
title: "Upload File",
|
|
277
|
-
closeButton: !0,
|
|
278
|
-
dismissAway: !1,
|
|
279
|
-
contentComponent: ie,
|
|
280
|
-
primaryActions: { text: "Import", close: !1 }
|
|
281
|
-
}).onPrimary(async (i) => {
|
|
282
|
-
if (!i) {
|
|
283
|
-
f.open({
|
|
284
|
-
type: "error",
|
|
285
|
-
title: "Please upload a file"
|
|
286
|
-
});
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
const { file: a, config: b } = i;
|
|
290
|
-
if (!a)
|
|
291
|
-
f.open({
|
|
292
|
-
type: "error",
|
|
293
|
-
title: "Please upload a file"
|
|
294
|
-
});
|
|
295
|
-
else {
|
|
296
|
-
const w = new FormData();
|
|
297
|
-
w.append("file", a), w.append("config", JSON.stringify(b)), await U.import(w), f.open({
|
|
298
|
-
type: "info",
|
|
299
|
-
title: "Import begins soon. Check Queue for updates.",
|
|
300
|
-
action: "View",
|
|
301
|
-
onAction: async () => {
|
|
302
|
-
await u.push({
|
|
303
|
-
name: T["$connect-QUEUE"],
|
|
304
|
-
query: { type: [I.enum.MEMBER_IMPORTED] }
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
}), c.close();
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function y(i) {
|
|
312
|
-
switch (i) {
|
|
313
|
-
case "import":
|
|
314
|
-
o();
|
|
315
|
-
break;
|
|
316
|
-
case "queue":
|
|
317
|
-
u.push({
|
|
318
|
-
name: T["$connect-QUEUE"],
|
|
319
|
-
query: { type: [I.enum.MEMBER_IMPORTED] }
|
|
320
|
-
});
|
|
321
|
-
break;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
return P(
|
|
325
|
-
() => u.currentRoute.value.name,
|
|
326
|
-
async (i) => {
|
|
327
|
-
t.value = p.find((b) => b.value === i) ?? p[0];
|
|
328
|
-
const a = u.currentRoute.value.params.id;
|
|
329
|
-
a && (l.value = await U.readById(a)), await u.push({ name: i });
|
|
330
|
-
}
|
|
331
|
-
), (i, a) => {
|
|
332
|
-
const b = h("FmPageHead"), w = h("FmTabs"), $ = h("RouterView");
|
|
333
|
-
return F(), B(S, null, [
|
|
334
|
-
E(b, {
|
|
335
|
-
actions: r(e).actions,
|
|
336
|
-
title: r(e).title,
|
|
337
|
-
description: r(e).description,
|
|
338
|
-
"back-button": r(e).backButton,
|
|
339
|
-
"onClick:back": r(e).onBackButton,
|
|
340
|
-
"onClick:action": y
|
|
341
|
-
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
342
|
-
x("div", le, [
|
|
343
|
-
r(u).currentRoute.value.name != r(T)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (F(), j(w, {
|
|
344
|
-
key: 0,
|
|
345
|
-
"model-value": r(t).value,
|
|
346
|
-
items: p,
|
|
347
|
-
"onUpdate:modelValue": n
|
|
348
|
-
}, null, 8, ["model-value"])) : J("", !0),
|
|
349
|
-
E($)
|
|
350
|
-
])
|
|
351
|
-
], 64);
|
|
352
|
-
};
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
export {
|
|
356
|
-
ke as default
|
|
357
|
-
};
|