@feedmepos/mf-connect 0.1.31-prod → 0.1.33-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-CSyE-O7F.js → Analytic-Co2Hg28w.js} +11 -11
- package/dist/{App-CI6T_Ggm.js → App-YD2uTuCN.js} +6 -6
- package/dist/{Bin-D129K0UY.js → Bin-CS5h1RIu.js} +8 -8
- package/dist/{Broadcast-1YnrjwTp.js → Broadcast-CZFyQp7d.js} +9 -9
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CUBa7vmH.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BemXOK1e.js} +6 -6
- package/dist/{Card-DnKxZI51.js → Card-z8Ulll5P.js} +97 -96
- package/dist/{Collections-H1k_V_JM.js → Collections-C-d6-7_x.js} +21 -20
- package/dist/{Credit-vgVhr8NN.js → Credit-dbi2wB84.js} +9 -9
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DdqBz-Sf.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DyUjlGB0.js} +29 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-yeZq9E-H.js → EffectSheet.vue_vue_type_style_index_0_lang-JLICv-XJ.js} +6 -6
- package/dist/{Experience-DF0WMhAg.js → Experience-Cw6xpFeZ.js} +9 -9
- package/dist/FileSaver.min-NlMItPOc.js +74 -0
- package/dist/{Game-9aC2CMq1.js → Game-B-e2kaT1.js} +10 -10
- package/dist/{Index-raxs8-hT.js → Index-SoIcUgrm.js} +10 -10
- package/dist/{Marketing-BhCFLx2Z.js → Marketing-CVrykKnH.js} +6 -6
- package/dist/Member-DO-Y7K68.js +287 -0
- package/dist/{MemberList-DLJxPc32.js → MemberList-DIN5h-gR.js} +38 -37
- package/dist/{MemberTransactions-cNPt5lU8.js → MemberTransactions-nkBigpMB.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLfpoWwi.js → MessageInput.vue_vue_type_script_setup_true_lang-CJdZuztF.js} +17 -16
- package/dist/{Mission-DTqWDFkL.js → Mission-Be7oWF9U.js} +88 -93
- package/dist/{Overview-Di1RiMiZ.js → Overview-D5vsXK9o.js} +64 -63
- package/dist/{Point-C7vAdfqf.js → Point-CxipyJ-q.js} +9 -9
- package/dist/{Promotion-DwAl2ueC.js → Promotion-CxnPlE2K.js} +10 -10
- package/dist/{Queue-Ckh5U2q9.js → Queue-CmqdtFUH.js} +72 -63
- package/dist/{Record-CS22Hick.js → Record-DMPpt6UJ.js} +17 -16
- package/dist/{Reward-ceTGl-6M.js → Reward-Dq4YJFIA.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-N5HNvabk.js → RewardGroup.vue_vue_type_script_setup_true_lang-DWOILpY3.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-Bln0CsrL.js → RuleGroup.vue_vue_type_script_setup_true_lang-PBDAieUm.js} +15 -14
- package/dist/Segment-DLnAIOp1.js +882 -0
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CdBSrSG-.js → SelectItems.vue_vue_type_script_setup_true_lang-DJlk6P0T.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-3WYVAiVq.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDQ65Cvv.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D5kPXWZM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CgFxMZkx.js} +3 -3
- package/dist/{Setting-B080_HzI.js → Setting-DD2veGG7.js} +43 -42
- package/dist/{Store-DTeptzE3.js → Store-BHX4yRF4.js} +28 -27
- package/dist/{StoreRewards-CNrENhoO.js → StoreRewards-DcZwldzN.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-D39kPD0g.js → StoreTransactions.vue_vue_type_script_setup_true_lang-0_JejsOU.js} +26 -25
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-YeLylLcx.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DhQNoPO5.js} +1 -1
- package/dist/{Tier-DCtk62vI.js → Tier--njI2EvF.js} +22 -21
- package/dist/{Title-WLmc_Sgb.js → Title-D8YB1KwZ.js} +19 -19
- package/dist/{Transaction-DrZ66hh2.js → Transaction-CzVitP3M.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B934hePK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Dn0amdd3.js} +6 -6
- package/dist/{Voucher-BWxGUu1r.js → Voucher-DwtCnP8w.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Cwm5rKfF.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DoRivv52.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DgNwerl-.js → ZodTextField.vue_vue_type_script_setup_true_lang-DSB9k75Y.js} +1 -1
- package/dist/{app-CD95Y8ID.js → app-CQRB7I5K.js} +1 -1
- package/dist/{app-DXDpfEp1.js → app-H5Nfj0Kj.js} +34 -30
- package/dist/app.js +1 -1
- package/dist/{business-BMmMPKlg.js → business-BD1xVHsg.js} +1 -1
- package/dist/{campaign-DsHXtfeO.js → campaign-2jAMivOE.js} +2 -2
- package/dist/{campaign-CXiUdGVH.js → campaign-Bb1wuQdY.js} +9 -9
- package/dist/{campaign.enum-BmZUaKGr.js → campaign.enum-OZ3v-5ZH.js} +1 -1
- package/dist/{campaign.fn-0yxgF1-s.js → campaign.fn-DGw-fFB0.js} +78 -78
- package/dist/{collectible.enum-CkHgwpV8.js → collectible.enum-21CN4Vsl.js} +1 -1
- package/dist/{collection.fn-BEL2ePbu.js → collection.fn-DpsET9oE.js} +2 -2
- package/dist/{dto-C9i038zS.js → dto-Ct9pFL11.js} +12 -12
- package/dist/{effect-hnRcV89q.js → effect-CrY62aJn.js} +1 -1
- package/dist/{email-addresses-B3aOGn9Q.js → email-addresses-2mZ3tNRf.js} +1 -1
- package/dist/{export-DhXPjZn4.js → export-cukcGV7Q.js} +3 -3
- package/dist/{helper-B91UqTPy.js → helper-CZvv8YqE.js} +1 -1
- package/dist/{index-DdkPyb-X.js → index-B8uC64Qm.js} +346 -346
- package/dist/{index-CkB8qWx9.js → index-B_PlQ967.js} +1 -1
- package/dist/{plugins-CA83RlbH.js → index-BbeEHgvu.js} +3784 -3989
- package/dist/{index-Bv_q5cPS.js → index-BdzOrIZ7.js} +1 -1
- package/dist/{index-DwUvEDm8.js → index-BkgbBp9l.js} +2 -2
- package/dist/{index-CaQznIQx.js → index-BxEQR5a4.js} +1 -1
- package/dist/{index-Dk0fL4Um.js → index-Bzkan3ZR.js} +1 -1
- package/dist/{index-DUESWqjo.js → index-CB4K6lnR.js} +1 -1
- package/dist/{index-DRolGtez.js → index-Cliq3cQb.js} +3 -3
- package/dist/{index-BpiC24Lh.js → index-D2vULsbp.js} +6 -6
- package/dist/{index-MTD1KXCx.js → index-D_qaVSuj.js} +1 -1
- package/dist/{index-h-U0YoGx.js → index-DvESxk9B.js} +469 -456
- package/dist/{index-mWR-Io8r.js → index-uenvHfm3.js} +1 -1
- package/dist/{index.esm2017-DvR1i10j.js → index.esm2017-D4SYmjlC.js} +1 -1
- package/dist/{loading-CYFHRqwc.js → loading-zALstVD_.js} +1 -1
- package/dist/{membership-t5YCs8vf.js → membership-B4kzNrdV.js} +54 -48
- package/dist/{money-u692Iuhj.js → money-DD93KSIZ.js} +1 -1
- package/dist/{number-BFoRQ3UV.js → number-RE8pNotC.js} +1 -1
- package/dist/{objectid-ySkduRSJ.js → objectid-B79yJhh3.js} +5 -5
- package/dist/plugins-77kIdghj.js +208 -0
- package/dist/{reward-BxAjgaY0.js → reward-DObERFDg.js} +1 -1
- package/dist/{rule-B2-KiDax.js → rule-CmevFzjt.js} +3 -3
- package/dist/{rule-builder-D3z1ZTIu.js → rule-builder-CGw5WvTI.js} +1 -1
- package/dist/{template-Ep0uKJmD.js → template-X_Z36LWQ.js} +4 -4
- package/dist/{trigger-i6Qv7Nko.js → trigger-ybZ3np3i.js} +4 -4
- package/dist/{user-bkYeGrIH.js → user-CTQPhh1u.js} +1 -1
- package/dist/{vue-i18n-2yeRgkZ7.js → vue-i18n-BFISHEOF.js} +112 -112
- package/dist/{xlsx-DIyBpsUe.js → xlsx-B9v9c4jL.js} +379 -379
- package/package.json +1 -1
- package/dist/Member-ej-Yvlr1.js +0 -348
- package/dist/Segment-CT4UwYMZ.js +0 -578
package/package.json
CHANGED
package/dist/Member-ej-Yvlr1.js
DELETED
|
@@ -1,348 +0,0 @@
|
|
|
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-MTD1KXCx.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-2yeRgkZ7.js";
|
|
5
|
-
import { u as L, w as W } from "./xlsx-DIyBpsUe.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-mWR-Io8r.js";
|
|
10
|
-
import { R as F } from "./app-DXDpfEp1.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
|
-
};
|