@feedmepos/mf-connect 0.1.23-prod → 0.1.25-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-DfTQmuSa.js → Analytic-DmQ3d3sr.js} +18 -17
- package/dist/{App-C5AMrBM2.js → App-BK6DtUuH.js} +6 -6
- package/dist/{Bin-nZv2ZrAD.js → Bin-B7F2tXkP.js} +19 -18
- package/dist/{Broadcast-1ViZILw6.js → Broadcast-6n2TGBgu.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Nuj7G5E1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-_hoK2zXW.js} +14 -8
- package/dist/{Card-CUAfRl0P.js → Card-D6AU_9dV.js} +57 -55
- package/dist/{Collections-DNlV8CiV.js → Collections-CMbKkYFL.js} +13 -11
- package/dist/{Credit-C8WVgeKO.js → Credit-CqLwf2JA.js} +35 -34
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CZmd7K3H.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CRK5WI7g.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Crakwwgo.js → EffectSheet.vue_vue_type_style_index_0_lang-CaSqYPQ2.js} +6 -6
- package/dist/{Experience-C0ZrJ-rU.js → Experience-OoJ1ODiZ.js} +13 -12
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-IAfjkExX.js +278 -0
- package/dist/{Index-C_mvHa_E.js → Index-DqHXbokQ.js} +14 -13
- package/dist/{Marketing-7lvR6gR_.js → Marketing-DIVehK5x.js} +8 -7
- package/dist/Member-BMT7m7s9.js +348 -0
- package/dist/{MemberList-BDsVY1bB.js → MemberList-C3JMhLW6.js} +270 -269
- package/dist/{MemberTransactions-DXgJ8Tua.js → MemberTransactions-lQLljdGi.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BbiWEoQQ.js → MessageInput.vue_vue_type_script_setup_true_lang-DFPEfDUk.js} +15 -18
- package/dist/{Mission-CJnySjh4.js → Mission-BJsuCVHj.js} +118 -96
- package/dist/{Overview-ZENHKQhC.js → Overview-D1AMq951.js} +63 -62
- package/dist/{Point-DvYLQNmg.js → Point-DGffwTWG.js} +11 -10
- package/dist/{Promotion-CE6Mqev4.js → Promotion-Cdu7wiGv.js} +12 -11
- package/dist/Queue-Cm4ekHlP.js +249 -0
- package/dist/{Record-Cl4o08E4.js → Record-B0JjTQ3K.js} +21 -19
- package/dist/{Reward-C1hZ9c6y.js → Reward-U0gEl1no.js} +19 -18
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Co1mzeQA.js → RewardGroup.vue_vue_type_script_setup_true_lang-CiQHPhkN.js} +13 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CDEiSeqW.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgKlwCAG.js} +12 -12
- package/dist/{Segment-1RH6jUyt.js → Segment-BsXsG6Ga.js} +19 -17
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CJTZZ4EH.js → SelectItems.vue_vue_type_script_setup_true_lang-hPQP_srV.js} +2 -2
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLPLYvOq.js +188 -0
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DL2A84oN.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-rL9NYAk0.js} +3 -3
- package/dist/{Setting-DK9lsogh.js → Setting-DJxzwVSf.js} +20 -19
- package/dist/{Store-DSeXriUy.js → Store-sTvnMjPJ.js} +24 -23
- package/dist/{StoreRewards-DFUg0n5g.js → StoreRewards-CffMLGzL.js} +15 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CUPPeZj5.js +994 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-hR4OBTrC.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DwhQONu8.js} +1 -1
- package/dist/{Tier-Yq3BNKGq.js → Tier-BbfX13Ns.js} +25 -24
- package/dist/{Title-CwWan9gL.js → Title-Bf4fC78d.js} +28 -27
- package/dist/{Transaction-BgO5EYZB.js → Transaction-Ef6ee3WD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CyUXbl30.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-w66fAQPQ.js} +6 -6
- package/dist/{Voucher-C2w8z86e.js → Voucher-CCH10Wrp.js} +38 -37
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-dEgiWiLL.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C31OGqSE.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BME260O1.js → ZodTextField.vue_vue_type_script_setup_true_lang-BqzMSTXs.js} +1 -1
- package/dist/{app-BVIgk6aa.js → app-D2t3_10I.js} +1 -1
- package/dist/{app-BVsQcG_m.js → app-F5UOtzJ-.js} +235 -166
- package/dist/app.js +1 -1
- package/dist/{business-CdvE-WIp.js → business-NXwwmhbL.js} +1 -1
- package/dist/{campaign-WGLWFuCK.js → campaign-BWkn-fFd.js} +9 -9
- package/dist/{campaign-gunNEZhU.js → campaign-Iww5PvJV.js} +2 -2
- package/dist/{campaign.enum-O82qvpU2.js → campaign.enum--kHpbveJ.js} +1 -1
- package/dist/{campaign.fn-Bzr9Jc5X.js → campaign.fn-D0wKIDQf.js} +123 -123
- package/dist/{collectible.enum-CzUCHExj.js → collectible.enum-BpsFdy57.js} +1 -1
- package/dist/{collection.fn-Czs8Mpdz.js → collection.fn-B-_j1A52.js} +2 -2
- package/dist/{dto-Czd638gm.js → dto-CjOlAnWp.js} +4 -4
- package/dist/{effect-D8Km5OHX.js → effect-BMe9xjgR.js} +1 -1
- package/dist/{email-addresses-2-RgQal8.js → email-addresses-BwGoUD7O.js} +1 -1
- package/dist/{export--jJWZuJy.js → export-Bsk4-mYp.js} +3 -3
- package/dist/{helper-BOwvTpT_.js → helper-CiybWTiD.js} +1 -1
- package/dist/{index-Bg8Lqk3s.js → index-7QyaWVGn.js} +1 -1
- package/dist/{index-DGi6aLjD.js → index-BAW03Ygy.js} +24 -21
- package/dist/{index-C6j2uVRJ.js → index-BG_-ksol.js} +1 -1
- package/dist/{index-FBWWEOV0.js → index-COTHSMx7.js} +1 -1
- package/dist/{index-DExfBo0i.js → index-CRa7QWQZ.js} +3 -3
- package/dist/{index-DllRE4Xv.js → index-Cs0QJDgH.js} +1 -1
- package/dist/{index-BMPlc7it.js → index-Cu28MWwC.js} +1162 -1129
- package/dist/{index-CpsX7fKq.js → index-CvKxhzaQ.js} +1 -1
- package/dist/{index-7SYnV8B2.js → index-D7AjQ5_0.js} +1273 -1273
- package/dist/{index-CKSGfZ62.js → index-OLChRkvG.js} +2 -2
- package/dist/{index-DRVIuG-G.js → index-WxOdPYZc.js} +1 -1
- package/dist/{index-CFxA9VYh.js → index-eJ4ofwfd.js} +10 -10
- package/dist/{index.esm2017-CkIJgInI.js → index.esm2017-DMXNt25X.js} +137 -137
- package/dist/loading-CScT_lmc.js +71 -0
- package/dist/{membership-ByveC1Cs.js → membership-DenkPJ5U.js} +3 -3
- package/dist/{money-C_wAhRJ4.js → money-B5hybQjS.js} +1 -1
- package/dist/{number-B1OxEx_j.js → number-anjTvmBi.js} +1 -1
- package/dist/objectid-BHmtsFsO.js +145 -0
- package/dist/{loading-C-HOw2p9.js → plugins-VONaCeWn.js} +1535 -1601
- package/dist/{reward-BOA1fyrM.js → reward-FwctH8OP.js} +1 -1
- package/dist/{rule-CfePtJap.js → rule-BqLIsoB6.js} +3 -3
- package/dist/{rule-builder-B7wNFPfi.js → rule-builder-EwN0tKLd.js} +1 -1
- package/dist/{template-CvIL9Pex.js → template-bVlMDuHk.js} +4 -4
- package/dist/{trigger-D7uzmrxE.js → trigger-Bh7yq_a0.js} +11 -11
- package/dist/usePagination-JoYaROkV.js +223 -0
- package/dist/{user-NlenrMEw.js → user-z65INcT0.js} +1 -1
- package/dist/vue-i18n-59FFzX8P.js +2365 -0
- package/dist/{usePagination-BFzJ3YC7.js → xlsx-D9VDeVL9.js} +2979 -3200
- package/package.json +3 -1
- package/dist/Game-KiwAxjQX.js +0 -256
- package/dist/Member-DR406GTr.js +0 -69
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D_F7zaEl.js +0 -1105
- package/dist/objectid-CtnWn6lG.js +0 -145
- package/dist/vue-i18n-BjInRP6b.js +0 -2365
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { defineComponent as I, ref as A, watch as D, resolveComponent as k, openBlock as g, createElementBlock as C, Fragment as B, createElementVNode as x, createVNode as h, unref as r, withCtx as M, renderList as $, createBlock as j, toDisplayString as H, normalizeClass as Y, computed as q, createCommentVNode as G } from "vue";
|
|
2
|
+
import "./index-BG_-ksol.js";
|
|
3
|
+
import { useDialogChild as J, FmButtonVariant as U, useDialog as Q, useSnackbar as z } from "@feedmepos/ui-library";
|
|
4
|
+
import { u as P } from "./vue-i18n-59FFzX8P.js";
|
|
5
|
+
import { u as L, w as W } from "./xlsx-D9VDeVL9.js";
|
|
6
|
+
import { c as T } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
7
|
+
import { useCoreStore as X } from "@feedmepos/mf-common";
|
|
8
|
+
import { useRouter as K } from "vue-router";
|
|
9
|
+
import { m as O } from "./index-BAW03Ygy.js";
|
|
10
|
+
import { R as F } from "./app-F5UOtzJ-.js";
|
|
11
|
+
var N = { exports: {} };
|
|
12
|
+
(function(S, u) {
|
|
13
|
+
(function(d, c) {
|
|
14
|
+
c();
|
|
15
|
+
})(T, function() {
|
|
16
|
+
function d(e, t) {
|
|
17
|
+
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;
|
|
18
|
+
}
|
|
19
|
+
function c(e, t, l) {
|
|
20
|
+
var n = new XMLHttpRequest();
|
|
21
|
+
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
22
|
+
p(n.response, t, l);
|
|
23
|
+
}, n.onerror = function() {
|
|
24
|
+
console.error("could not download file");
|
|
25
|
+
}, n.send();
|
|
26
|
+
}
|
|
27
|
+
function f(e) {
|
|
28
|
+
var t = new XMLHttpRequest();
|
|
29
|
+
t.open("HEAD", e, !1);
|
|
30
|
+
try {
|
|
31
|
+
t.send();
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
return 200 <= t.status && 299 >= t.status;
|
|
35
|
+
}
|
|
36
|
+
function m(e) {
|
|
37
|
+
try {
|
|
38
|
+
e.dispatchEvent(new MouseEvent("click"));
|
|
39
|
+
} catch {
|
|
40
|
+
var t = document.createEvent("MouseEvents");
|
|
41
|
+
t.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(t);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var s = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof T == "object" && T.global === T ? T : 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() {
|
|
45
|
+
} : "download" in HTMLAnchorElement.prototype && !R ? function(e, t, l) {
|
|
46
|
+
var n = s.URL || s.webkitURL, o = document.createElement("a");
|
|
47
|
+
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() {
|
|
48
|
+
n.revokeObjectURL(o.href);
|
|
49
|
+
}, 4e4), setTimeout(function() {
|
|
50
|
+
m(o);
|
|
51
|
+
}, 0));
|
|
52
|
+
} : "msSaveOrOpenBlob" in navigator ? function(e, t, l) {
|
|
53
|
+
if (t = t || e.name || "download", typeof e != "string") navigator.msSaveOrOpenBlob(d(e, l), t);
|
|
54
|
+
else if (f(e)) c(e, t, l);
|
|
55
|
+
else {
|
|
56
|
+
var n = document.createElement("a");
|
|
57
|
+
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
58
|
+
m(n);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
} : function(e, t, l, n) {
|
|
62
|
+
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string") return c(e, t, l);
|
|
63
|
+
var o = e.type === "application/octet-stream", y = /constructor/i.test(s.HTMLElement) || s.safari, v = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
64
|
+
if ((v || o && y || R) && typeof FileReader < "u") {
|
|
65
|
+
var _ = new FileReader();
|
|
66
|
+
_.onloadend = function() {
|
|
67
|
+
var a = _.result;
|
|
68
|
+
a = v ? a : a.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = a : location = a, n = null;
|
|
69
|
+
}, _.readAsDataURL(e);
|
|
70
|
+
} else {
|
|
71
|
+
var E = s.URL || s.webkitURL, i = E.createObjectURL(e);
|
|
72
|
+
n ? n.location = i : location.href = i, n = null, setTimeout(function() {
|
|
73
|
+
E.revokeObjectURL(i);
|
|
74
|
+
}, 4e4);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
s.saveAs = p.saveAs = p, S.exports = p;
|
|
78
|
+
});
|
|
79
|
+
})(N);
|
|
80
|
+
var Z = N.exports;
|
|
81
|
+
const ee = { class: "space-y-8 mb-10" }, te = /* @__PURE__ */ x("div", { class: "fm-typo-en-body-lg-600" }, "Advanced Setting", -1), ne = { class: "flex justify-end" }, oe = {
|
|
82
|
+
key: 1,
|
|
83
|
+
class: /* @__PURE__ */ Y([
|
|
84
|
+
"flex items-center",
|
|
85
|
+
"border border-fm-color-neutral-gray-300",
|
|
86
|
+
"p-16 space-x-16 rounded-md"
|
|
87
|
+
])
|
|
88
|
+
}, ae = { class: "fm-typo-en-body-lg-400 flex-1 truncate" }, ie = /* @__PURE__ */ I({
|
|
89
|
+
__name: "ImportMemberDialog",
|
|
90
|
+
setup(S) {
|
|
91
|
+
const { t: u } = P(), { emitData: d } = J(), c = A(null), f = A(null), m = A({
|
|
92
|
+
resetCollectionExpiryBalance: !0
|
|
93
|
+
}), s = [
|
|
94
|
+
"Id",
|
|
95
|
+
"Name",
|
|
96
|
+
"Phone",
|
|
97
|
+
"Email",
|
|
98
|
+
"Gender",
|
|
99
|
+
"CardNo",
|
|
100
|
+
"Birthday",
|
|
101
|
+
"Credit",
|
|
102
|
+
"CreditExpiryDate",
|
|
103
|
+
"Exp",
|
|
104
|
+
"Point",
|
|
105
|
+
"Tier",
|
|
106
|
+
// 'Titles',
|
|
107
|
+
"TotalTransaction",
|
|
108
|
+
"AvgSpent",
|
|
109
|
+
"TotalSpent",
|
|
110
|
+
"LastVisit",
|
|
111
|
+
"Feedback",
|
|
112
|
+
"LastSeasonTierEarned",
|
|
113
|
+
"LastSeasonPointEarned",
|
|
114
|
+
"JoinedAt",
|
|
115
|
+
"JoinedAtLocation",
|
|
116
|
+
"VisitFrequency"
|
|
117
|
+
], R = [
|
|
118
|
+
{
|
|
119
|
+
label: "CSV",
|
|
120
|
+
icon: "csv",
|
|
121
|
+
value: "csv"
|
|
122
|
+
/* csv */
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: "Excel",
|
|
126
|
+
icon: "description",
|
|
127
|
+
value: "xlsx"
|
|
128
|
+
/* xlsx */
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
async function p(n) {
|
|
132
|
+
var o, y;
|
|
133
|
+
c.value = ((y = (o = n.target) == null ? void 0 : o.files) == null ? void 0 : y[0]) ?? null;
|
|
134
|
+
}
|
|
135
|
+
async function e(n) {
|
|
136
|
+
switch (n) {
|
|
137
|
+
case "csv":
|
|
138
|
+
t();
|
|
139
|
+
break;
|
|
140
|
+
case "xlsx":
|
|
141
|
+
l();
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
function t() {
|
|
146
|
+
const n = new Blob([s.join(",")], {
|
|
147
|
+
type: "text/csv;charset=utf-8;"
|
|
148
|
+
});
|
|
149
|
+
Z.saveAs(n, "ImportMemberTemplate.csv");
|
|
150
|
+
}
|
|
151
|
+
function l() {
|
|
152
|
+
const n = L.aoa_to_sheet([s]), o = L.book_new();
|
|
153
|
+
L.book_append_sheet(o, n, "Sheet1"), W(o, "ImportMemberTemplate.xlsx");
|
|
154
|
+
}
|
|
155
|
+
return D(c, () => {
|
|
156
|
+
d({ file: c.value, config: m.value });
|
|
157
|
+
}), (n, o) => {
|
|
158
|
+
const y = k("FmSwitch"), v = k("FmButton"), _ = k("FmMenuItem"), E = k("FmMenu"), i = k("FmDropField");
|
|
159
|
+
return g(), C(B, null, [
|
|
160
|
+
x("div", ee, [
|
|
161
|
+
te,
|
|
162
|
+
h(y, {
|
|
163
|
+
"model-value": r(m).resetCollectionExpiryBalance ?? !0,
|
|
164
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => r(m).resetCollectionExpiryBalance = a),
|
|
165
|
+
label: "Replace Existing Free Credit",
|
|
166
|
+
sublabel: "When enabled, this will clear existing free credit and replace with new values from the import.",
|
|
167
|
+
"label-placement": "right"
|
|
168
|
+
}, null, 8, ["model-value"])
|
|
169
|
+
]),
|
|
170
|
+
x("div", ne, [
|
|
171
|
+
h(E, null, {
|
|
172
|
+
"menu-button": M(() => [
|
|
173
|
+
h(v, {
|
|
174
|
+
variant: "tertiary",
|
|
175
|
+
icon: "download",
|
|
176
|
+
label: "Download Template"
|
|
177
|
+
})
|
|
178
|
+
]),
|
|
179
|
+
default: M(() => [
|
|
180
|
+
(g(), C(B, null, $(R, (a) => h(_, {
|
|
181
|
+
key: a.value,
|
|
182
|
+
icon: a.icon,
|
|
183
|
+
label: a.label,
|
|
184
|
+
onClick: (b) => e(a.value),
|
|
185
|
+
selectable: ""
|
|
186
|
+
}, null, 8, ["icon", "label", "onClick"])), 64))
|
|
187
|
+
]),
|
|
188
|
+
_: 1
|
|
189
|
+
})
|
|
190
|
+
]),
|
|
191
|
+
r(c) ? (g(), C("div", oe, [
|
|
192
|
+
h(v, {
|
|
193
|
+
variant: r(U).Tertiary,
|
|
194
|
+
"prepend-icon": "attach_file"
|
|
195
|
+
}, null, 8, ["variant"]),
|
|
196
|
+
x("p", ae, H(r(c).name), 1),
|
|
197
|
+
x("label", {
|
|
198
|
+
ref_key: "fileLabelRef",
|
|
199
|
+
ref: f,
|
|
200
|
+
htmlFor: "file"
|
|
201
|
+
}, [
|
|
202
|
+
h(v, {
|
|
203
|
+
variant: r(U).Plain,
|
|
204
|
+
label: r(u)("Replace File"),
|
|
205
|
+
onClick: o[2] || (o[2] = () => {
|
|
206
|
+
var a;
|
|
207
|
+
return (a = r(f)) == null ? void 0 : a.click();
|
|
208
|
+
})
|
|
209
|
+
}, null, 8, ["variant", "label"]),
|
|
210
|
+
x("input", {
|
|
211
|
+
id: "file",
|
|
212
|
+
accept: ".csv, .xlsx",
|
|
213
|
+
class: "hidden",
|
|
214
|
+
type: "file",
|
|
215
|
+
multiple: "",
|
|
216
|
+
onChange: p
|
|
217
|
+
}, null, 32)
|
|
218
|
+
], 512)
|
|
219
|
+
])) : (g(), j(i, {
|
|
220
|
+
key: 0,
|
|
221
|
+
onFileUpload: o[1] || (o[1] = (a) => c.value = a),
|
|
222
|
+
accept: ".csv, .xlsx",
|
|
223
|
+
"max-file-size": 5e6
|
|
224
|
+
}))
|
|
225
|
+
], 64);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
}), le = { class: "px-24 flex flex-col gap-y-16 pb-24" }, ye = /* @__PURE__ */ I({
|
|
229
|
+
__name: "Member",
|
|
230
|
+
setup(S) {
|
|
231
|
+
var v, _, E;
|
|
232
|
+
const u = K(), { t: d } = P(), c = Q(), f = z(), m = X(), s = {
|
|
233
|
+
label: d("connect.loyalty.member.import"),
|
|
234
|
+
value: "import",
|
|
235
|
+
isPrimary: !0,
|
|
236
|
+
prependIcon: "download"
|
|
237
|
+
}, R = {
|
|
238
|
+
label: d("connect.navigation.queue"),
|
|
239
|
+
value: "queue",
|
|
240
|
+
isPrimary: !1,
|
|
241
|
+
prependIcon: "work_history"
|
|
242
|
+
}, p = [
|
|
243
|
+
{
|
|
244
|
+
label: d("connect.loyalty.member.tabs.member_list"),
|
|
245
|
+
value: F["$connect-LOYALTY_MEMBER_LIST"],
|
|
246
|
+
actions: (E = (_ = (v = m.sessionUser) == null ? void 0 : v.value) == null ? void 0 : _.role) != null && E.isAdmin ? [R, s] : []
|
|
247
|
+
}
|
|
248
|
+
], e = q(() => {
|
|
249
|
+
var a, b, w;
|
|
250
|
+
return u.currentRoute.value.name != F["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? {
|
|
251
|
+
title: t.value.label,
|
|
252
|
+
actions: t.value.actions,
|
|
253
|
+
description: void 0
|
|
254
|
+
} : (t.value = p[1], {
|
|
255
|
+
backButton: !0,
|
|
256
|
+
title: d("connect.loyalty.member.title"),
|
|
257
|
+
actions: [],
|
|
258
|
+
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})`,
|
|
259
|
+
onBackButton: async () => {
|
|
260
|
+
await u.push({ name: F["$connect-LOYALTY_MEMBER_LIST"] });
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
}), t = A(
|
|
264
|
+
p.find((i) => i.value === u.currentRoute.value.name) ?? p[0]
|
|
265
|
+
), l = A();
|
|
266
|
+
async function n(i) {
|
|
267
|
+
await u.push({ name: i });
|
|
268
|
+
}
|
|
269
|
+
async function o() {
|
|
270
|
+
c.open({
|
|
271
|
+
title: "Upload File",
|
|
272
|
+
closeButton: !0,
|
|
273
|
+
dismissAway: !1,
|
|
274
|
+
contentComponent: ie,
|
|
275
|
+
primaryActions: { text: "Import", close: !1 }
|
|
276
|
+
}).onPrimary(async (i) => {
|
|
277
|
+
if (!i) {
|
|
278
|
+
f.open({
|
|
279
|
+
type: "error",
|
|
280
|
+
title: "Please upload a file"
|
|
281
|
+
});
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
const { file: a, config: b } = i;
|
|
285
|
+
if (!a)
|
|
286
|
+
f.open({
|
|
287
|
+
type: "error",
|
|
288
|
+
title: "Please upload a file"
|
|
289
|
+
});
|
|
290
|
+
else {
|
|
291
|
+
const w = new FormData();
|
|
292
|
+
w.append("file", a), w.append("config", JSON.stringify(b)), await O.import(w), f.open({
|
|
293
|
+
type: "info",
|
|
294
|
+
title: "Import begins soon. Check Queue for updates.",
|
|
295
|
+
action: "View",
|
|
296
|
+
onAction: async () => {
|
|
297
|
+
await u.push({
|
|
298
|
+
name: F["$connect-QUEUE"]
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
}), c.close();
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
function y(i) {
|
|
306
|
+
switch (i) {
|
|
307
|
+
case "import":
|
|
308
|
+
o();
|
|
309
|
+
break;
|
|
310
|
+
case "queue":
|
|
311
|
+
u.push({ name: F["$connect-QUEUE"] });
|
|
312
|
+
break;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return D(
|
|
316
|
+
() => u.currentRoute.value.name,
|
|
317
|
+
async (i) => {
|
|
318
|
+
t.value = p.find((b) => b.value === i) ?? p[0];
|
|
319
|
+
const a = u.currentRoute.value.params.id;
|
|
320
|
+
a && (l.value = await O.readById(a)), await u.push({ name: i });
|
|
321
|
+
}
|
|
322
|
+
), (i, a) => {
|
|
323
|
+
const b = k("FmPageHead"), w = k("FmTabs"), V = k("RouterView");
|
|
324
|
+
return g(), C(B, null, [
|
|
325
|
+
h(b, {
|
|
326
|
+
actions: r(e).actions,
|
|
327
|
+
title: r(e).title,
|
|
328
|
+
description: r(e).description,
|
|
329
|
+
"back-button": r(e).backButton,
|
|
330
|
+
"onClick:back": r(e).onBackButton,
|
|
331
|
+
"onClick:action": y
|
|
332
|
+
}, null, 8, ["actions", "title", "description", "back-button", "onClick:back"]),
|
|
333
|
+
x("div", le, [
|
|
334
|
+
r(u).currentRoute.value.name != r(F)["$connect-LOYALTY_MEMBER_TRANSACTIONS"] ? (g(), j(w, {
|
|
335
|
+
key: 0,
|
|
336
|
+
"model-value": r(t).value,
|
|
337
|
+
items: p,
|
|
338
|
+
"onUpdate:modelValue": n
|
|
339
|
+
}, null, 8, ["model-value"])) : G("", !0),
|
|
340
|
+
h(V)
|
|
341
|
+
])
|
|
342
|
+
], 64);
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
export {
|
|
347
|
+
ye as default
|
|
348
|
+
};
|