@feedmepos/mf-connect 0.1.24-prod → 0.1.26-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-DH3odpBh.js → Analytic-WXmpLkLU.js} +18 -17
- package/dist/{App-DT9d3Bm2.js → App-jBGNDeCb.js} +6 -6
- package/dist/{Bin-CEFG1nRH.js → Bin-COj4GqKe.js} +19 -18
- package/dist/{Broadcast-B_rv159-.js → Broadcast-vIqSNTJh.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DzD9-r4-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVtfunGL.js} +14 -8
- package/dist/{Card-Dyya8J2U.js → Card-CGyBry4S.js} +57 -55
- package/dist/{Collections-Dl2FDFOD.js → Collections-BeQ_uFRE.js} +23 -21
- package/dist/{Credit-B9mz3eUI.js → Credit-DWsgc_P1.js} +35 -34
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-TrKmONi5.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DxPsGM7d.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVCgGHg4.js → EffectSheet.vue_vue_type_style_index_0_lang-DlCdWAqB.js} +6 -6
- package/dist/{Experience-CGwG9JGa.js → Experience-DQ5ofpRU.js} +13 -12
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-dl01-cxh.js +278 -0
- package/dist/{Index-D0IkkcBH.js → Index-B33SYml2.js} +14 -13
- package/dist/{Marketing-HmC8ZXqz.js → Marketing-CqWuI9r1.js} +8 -7
- package/dist/Member-PuWzURyR.js +348 -0
- package/dist/{MemberList-_MFrJqht.js → MemberList-dQljjKIC.js} +275 -269
- package/dist/{MemberTransactions-kUyU9Qn6.js → MemberTransactions-BH1U_v3f.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DypmZY2G.js → MessageInput.vue_vue_type_script_setup_true_lang-ZSNwpN6m.js} +7 -7
- package/dist/{Mission-OUjm7KRr.js → Mission-PjsS8VTH.js} +118 -96
- package/dist/{Overview-F2AvMo-g.js → Overview-B6zXdxIf.js} +63 -62
- package/dist/{Point-K9poYQjB.js → Point-DhYeSbYo.js} +11 -10
- package/dist/{Promotion-DpS6PQFU.js → Promotion-4yBcCEQA.js} +12 -11
- package/dist/Queue-BCOe370v.js +249 -0
- package/dist/{Record-CZMB7xKL.js → Record-FxeE4KZe.js} +21 -19
- package/dist/{Reward-zMCEkbO5.js → Reward-B4licTuW.js} +19 -18
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dj73NYhp.js → RewardGroup.vue_vue_type_script_setup_true_lang-CKWOhSQh.js} +13 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-FyuAHi5K.js → RuleGroup.vue_vue_type_script_setup_true_lang-BbOzaj63.js} +12 -12
- package/dist/{Segment-LthACAfl.js → Segment-DONb4N1l.js} +19 -17
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DRe6Gyov.js → SelectItems.vue_vue_type_script_setup_true_lang-CvHYZpGm.js} +2 -2
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-NDwwOZSM.js +188 -0
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Z9Nb9b6-.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2ixqrV7.js} +3 -3
- package/dist/{Setting-8ASd681E.js → Setting-BQOcVtGa.js} +20 -19
- package/dist/{Store-C-bmQP0K.js → Store-BlaFXTeO.js} +24 -23
- package/dist/{StoreRewards-Bu3DWaCn.js → StoreRewards-Lqc34UoD.js} +15 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C5dViJNi.js +994 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Bn7aoYqw.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-e_31o0i7.js} +1 -1
- package/dist/{Tier-DDKUGBRg.js → Tier-B26lO0SB.js} +25 -24
- package/dist/{Title-Cup_EWfZ.js → Title-BASSyfhP.js} +28 -27
- package/dist/{Transaction-BqvgfyiW.js → Transaction-BbzBRylw.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BCkXievQ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BFyl96zy.js} +6 -6
- package/dist/{Voucher-Dxk6zfcN.js → Voucher-A_GG0E5t.js} +38 -37
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DmswMNi5.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CCGtKQTW.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D-UPL1Rc.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGNqvOl5.js} +1 -1
- package/dist/{app-bidojB9R.js → app-C7FQYfsn.js} +1 -1
- package/dist/{app-BDUrJlXZ.js → app-DV-5XPYF.js} +235 -166
- package/dist/app.js +1 -1
- package/dist/{business-CFOn3-Hz.js → business-C8PXQSRE.js} +1 -1
- package/dist/{campaign-DyzzIbnA.js → campaign-B4eKVpps.js} +9 -9
- package/dist/{campaign-BVIiGyq9.js → campaign-CuZ6u4yy.js} +2 -2
- package/dist/{campaign.enum-aFjayQfJ.js → campaign.enum-xbqqPDwY.js} +1 -1
- package/dist/{campaign.fn-BKADpFTx.js → campaign.fn-GFFtrWsz.js} +133 -133
- package/dist/{collectible.enum-vEUgo0YF.js → collectible.enum-DB4oBcfv.js} +1 -1
- package/dist/{collection.fn-D2Kbz9yq.js → collection.fn-BwpscyTl.js} +2 -2
- package/dist/{dto-CKxtFHko.js → dto-Cr20KGr0.js} +4 -4
- package/dist/{effect-BEWKDhDB.js → effect-D9-UiBiK.js} +1 -1
- package/dist/{email-addresses-BWDg5Wvf.js → email-addresses-F3hoXmRI.js} +1 -1
- package/dist/{export-DO-WeD6l.js → export-BIPF1ilY.js} +3 -3
- package/dist/{helper-CSGr0Zgt.js → helper-Tf1bFEee.js} +1 -1
- package/dist/{index-UVHHFXyh.js → index-B2jAIO5k.js} +1162 -1129
- package/dist/{index-Dw_jc7Et.js → index-BYzdfZKb.js} +3 -3
- package/dist/{index-BgJVKNYg.js → index-BhlEaLpy.js} +24 -21
- package/dist/{index-BV4M35iK.js → index-Bkw-11Tg.js} +2 -2
- package/dist/{index-CFXFhGs9.js → index-BvqdtS9H.js} +1 -1
- package/dist/{index-DVsh-nBE.js → index-CpUyyTF6.js} +1 -1
- package/dist/{index-CUlYeKKH.js → index-D4XX55M5.js} +1 -1
- package/dist/{index-CEjeBL2U.js → index-Dow2N7x1.js} +1 -1
- package/dist/{index--Mrx1FRI.js → index-IOTB7rGH.js} +1 -1
- package/dist/{index-CoMMyOsj.js → index-bb6Kd8k_.js} +10 -10
- package/dist/{index-DSBnWOie.js → index-gTmOLzQU.js} +1 -1
- package/dist/{index-Bg3caQS6.js → index-mjBmZtX2.js} +1273 -1273
- package/dist/{index.esm2017-CDzvT_fP.js → index.esm2017-Y_0J3nbR.js} +137 -137
- package/dist/loading-BbC_ZIPE.js +71 -0
- package/dist/{membership-DK9FNo2Y.js → membership-BM_2_hUW.js} +3 -3
- package/dist/{money-DJYiw0es.js → money-BsBmwalY.js} +1 -1
- package/dist/{number-BjhqQBza.js → number-QqpGrk9q.js} +1 -1
- package/dist/objectid-DQj-P2cH.js +145 -0
- package/dist/{loading-CWihCJvJ.js → plugins-DKPF0eaB.js} +1535 -1601
- package/dist/{reward-DlE5Zt3d.js → reward-Yl3EdHrH.js} +1 -1
- package/dist/{rule-a2_WCjR8.js → rule-DW_bLKtu.js} +3 -3
- package/dist/{rule-builder-Q8iGSpDV.js → rule-builder-BoITzEtm.js} +1 -1
- package/dist/{template-3faxO3XM.js → template-BSQzNJs5.js} +4 -4
- package/dist/{trigger-Cnvhgqkj.js → trigger-Bel1H8iR.js} +11 -11
- package/dist/usePagination-JoYaROkV.js +223 -0
- package/dist/{user-CoiXBmet.js → user-Dg2HfZlK.js} +1 -1
- package/dist/vue-i18n-CvvsV6dR.js +2365 -0
- package/dist/{usePagination-dNrSGtRV.js → xlsx-1oIZztwO.js} +2979 -3200
- package/package.json +3 -1
- package/dist/Game-DbhOlio1.js +0 -256
- package/dist/Member-NSQ2nHzW.js +0 -69
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDRpkUaP.js +0 -1105
- package/dist/objectid-Cep7PkzN.js +0 -145
- package/dist/vue-i18n-B2XH0K8P.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-IOTB7rGH.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-CvvsV6dR.js";
|
|
5
|
+
import { u as L, w as W } from "./xlsx-1oIZztwO.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-BhlEaLpy.js";
|
|
10
|
+
import { R as F } from "./app-DV-5XPYF.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
|
+
};
|