@feedmepos/mf-connect 0.1.0-beta.1 → 0.1.0-beta.3
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-BC5BA6pN.js +622 -0
- package/dist/{App-B1uXIyTX.js → App-gzbM97vW.js} +6 -6
- package/dist/{Broadcast-CcpZLSnJ.js → Broadcast-BwYZkTs0.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2C2AHwnM.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js} +8 -8
- package/dist/{Card-DUCfFEOn.js → Card-CBYQGKwY.js} +15 -15
- package/dist/{Collections-a3-roNwC.js → Collections-Df6tlo8S.js} +4 -4
- package/dist/{Credit-xkoO4GA-.js → Credit-BPel8vA9.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bfe4jlcS.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js} +25 -25
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CXNpRyJu.js → EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js} +6 -6
- package/dist/{Experience-En_4HpV5.js → Experience-CPpz1Zwx.js} +8 -8
- package/dist/{Game-CPIMY5Rx.js → Game-ByLblISC.js} +8 -8
- package/dist/{Marketing-BRojALh8.js → Marketing-D0vm80e_.js} +5 -5
- package/dist/{Member-HM92Pp4V.js → Member-CCc_FEZY.js} +4 -4
- package/dist/{MemberList-BthUMB4B.js → MemberList-CrnipE9y.js} +166 -165
- package/dist/{MemberTransactions-BGZTWPO5.js → MemberTransactions-DD5ahSbY.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhlQe_mh.js → MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js} +2 -2
- package/dist/{Mission-iHEfJLwz.js → Mission-VH4057I-.js} +8 -8
- package/dist/{Point-CBmeOjue.js → Point-Bu3IlpH4.js} +8 -8
- package/dist/{Promotion-D3szKS2s.js → Promotion-B45AOHis.js} +9 -9
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-ClahrluQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js} +14 -14
- package/dist/{Segment-LJyUhy6j.js → Segment-ZWsp48aC.js} +9 -9
- package/dist/{Setting-B89TXHBn.js → Setting-CF09eRQJ.js} +8 -8
- package/dist/{Store-GwzopXoP.js → Store-B_G6Dhmq.js} +13 -13
- package/dist/{StoreRewards-Bg6qPCMi.js → StoreRewards-0iGExjqQ.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DNRDXAV9.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js} +9 -9
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-1m8hE_2Q.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js} +1 -1
- package/dist/{Tier-CvgoQbzr.js → Tier-IaeWe7rM.js} +15 -15
- package/dist/{Title-zQ4E7pkb.js → Title-DD67Zxh5.js} +240 -239
- package/dist/{Transaction-Brg2Prn0.js → Transaction-BsPDnLzB.js} +2 -2
- package/dist/{Voucher-M4_C0xA_.js → Voucher-M7JfcKo0.js} +11 -11
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Cg4OkAeV.js → ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js} +1 -1
- package/dist/{app-hiS1HZ2Q.js → app-DwujUNP-.js} +2 -2
- package/dist/{app-BDO6B-dK.js → app-HFICF0vL.js} +27 -25
- package/dist/app.js +1 -1
- package/dist/{business-BU2rimiT.js → business-BaF1QJXa.js} +1 -1
- package/dist/{campaign-Cak59IlT.js → campaign-CTDtmAE9.js} +2 -2
- package/dist/{collection.fn-lmTn6OT-.js → collection.fn-DMW03W4R.js} +2 -2
- package/dist/{dto-EAvP09nY.js → dto-gpaNZHzQ.js} +9 -9
- package/dist/{effect-imx80Jez.js → effect-CBUmtwet.js} +1 -1
- package/dist/{export-I1QtSXHQ.js → export-Bdh_PbsW.js} +3 -3
- package/dist/{helper-B77FMKeg.js → helper-Cu9elRvl.js} +1 -1
- package/dist/{index-C7Lp9s7K.js → index-8MaN7rez.js} +5 -5
- package/dist/{index-DY3w0_ua.js → index-At6yms5t.js} +2 -2
- package/dist/{index-DSQpb_nd.js → index-BjdHxGDn.js} +2 -2
- package/dist/{index-DEQD6r-F.js → index-CArqG03W.js} +3 -3
- package/dist/{index-Bg5RKEF5.js → index-Ch6XwPzF.js} +1 -1
- package/dist/{index-DGu7q6pb.js → index-Crw-Vgo5.js} +1 -1
- package/dist/{index-DiS3ZJGm.js → index-CtH2S49l.js} +5 -5
- package/dist/{index-Cpont_pY.js → index-Dfdg2Q3E.js} +1 -1
- package/dist/{index-LRf1G2yC.js → index-DrGrOgZB.js} +1 -1
- package/dist/{index-QA2frxkp.js → index-NXiDu42U.js} +1 -1
- package/dist/{index-D2yy8eRo.js → index-RP0XOPRL.js} +3 -3
- package/dist/{index-C8_0ojX4.js → index-ogzk-Mj4.js} +1 -1
- package/dist/{index.esm2017-DhxrMX-Q.js → index.esm2017-CeJpvUbA.js} +1 -1
- package/dist/{loading-CMVcERFb.js → loading-Cn8ml_vy.js} +4 -4
- package/dist/{membership-DIp98t0S.js → membership-CX4AKMlH.js} +3 -3
- package/dist/{money-DFIWDnVe.js → money-BTejgvKu.js} +1 -1
- package/dist/{number-CoCEX2rq.js → number-Cen5TucC.js} +1 -1
- package/dist/{rule-Dkp0gq2R.js → rule-Cv83Y59R.js} +2 -2
- package/dist/{rule-builder-D87kQH2m.js → rule-builder-Dew4yB5Q.js} +1 -1
- package/dist/{template-BOtta_xY.js → template-CSnbgM1o.js} +4 -4
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/{vue-i18n-C1A0vrPS.js → vue-i18n-CNH_IhVd.js} +2 -2
- package/dist/{xlsx-BpU-uByi.js → xlsx-D4DUZHix.js} +1 -1
- package/package.json +2 -2
- package/dist/Analytic-Cz12ieSt.js +0 -763
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
var Pt = Object.defineProperty;
|
|
2
2
|
var Bt = (F, E, x) => E in F ? Pt(F, E, { enumerable: !0, configurable: !0, writable: !0, value: x }) : F[E] = x;
|
|
3
3
|
var it = (F, E, x) => Bt(F, typeof E != "symbol" ? E + "" : E, x);
|
|
4
|
-
import { defineComponent as je, computed as ne, ref as ce, resolveComponent as U, openBlock as A, createElementBlock as Q, Fragment as fe, createElementVNode as m, unref as s, createBlock as re, createCommentVNode as xe, createVNode as
|
|
4
|
+
import { defineComponent as je, computed as ne, ref as ce, resolveComponent as U, openBlock as A, createElementBlock as Q, Fragment as fe, createElementVNode as m, unref as s, createBlock as re, createCommentVNode as xe, createVNode as D, renderList as _e, withCtx as ge, createTextVNode as ct, toDisplayString as J, withDirectives as dt, vShow as mt, onMounted as ft, isRef as Ot, h as ye } from "vue";
|
|
5
5
|
import { h as M } from "./moment-BWErdI6_.js";
|
|
6
|
-
import { useDialog as Ze, components as
|
|
6
|
+
import { useDialog as Ze, components as De } from "@feedmepos/ui-library";
|
|
7
7
|
import { g as Ut } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
8
|
-
import { u as Qe, w as Yt } from "./xlsx-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { p as at, b as st, u as pt } from "./loading-
|
|
11
|
-
import { u as et, C as lt, s as qt } from "./membership-
|
|
12
|
-
import { e as jt } from "./index-
|
|
8
|
+
import { u as Qe, w as Yt } from "./xlsx-D4DUZHix.js";
|
|
9
|
+
import "./index-Dfdg2Q3E.js";
|
|
10
|
+
import { p as at, b as st, u as pt } from "./loading-Cn8ml_vy.js";
|
|
11
|
+
import { u as et, C as lt, s as qt } from "./membership-CX4AKMlH.js";
|
|
12
|
+
import { e as jt } from "./index-RP0XOPRL.js";
|
|
13
13
|
import { _ as ut } from "./lodash-B5I3zXaY.js";
|
|
14
|
-
import {
|
|
15
|
-
import { F as Gt } from "./index-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
14
|
+
import { D as zt } from "./type_drinks-D6jnpvwV.js";
|
|
15
|
+
import { F as Kt, a as Gt } from "./index-At6yms5t.js";
|
|
16
|
+
import { F as Wt } from "./index-CArqG03W.js";
|
|
17
|
+
import { C as Xe } from "./collection.fn-DMW03W4R.js";
|
|
18
|
+
import { u as bt } from "./business-BaF1QJXa.js";
|
|
19
|
+
import { defineStore as Ht } from "pinia";
|
|
20
|
+
import { m as ue } from "./index-Ch6XwPzF.js";
|
|
20
21
|
import { o as vt } from "./objectId-dwaoBfJX.js";
|
|
21
|
-
import { f as qe } from "./number-
|
|
22
|
-
import { t as
|
|
23
|
-
import { u as
|
|
24
|
-
import { g as
|
|
25
|
-
import { useRouter as
|
|
26
|
-
import { R as
|
|
27
|
-
class
|
|
22
|
+
import { f as qe } from "./number-Cen5TucC.js";
|
|
23
|
+
import { t as Jt } from "./money-BTejgvKu.js";
|
|
24
|
+
import { u as Qt, _ as Xt } from "./usePagination-BeF5K3M7.js";
|
|
25
|
+
import { g as Zt, a as en, b as tn } from "./user-Bm4KttFq.js";
|
|
26
|
+
import { useRouter as nn } from "vue-router";
|
|
27
|
+
import { R as rn } from "./app-HFICF0vL.js";
|
|
28
|
+
class on {
|
|
28
29
|
constructor() {
|
|
29
30
|
it(this, "data", []);
|
|
30
31
|
}
|
|
@@ -70,7 +71,7 @@ var yt = { exports: {} };
|
|
|
70
71
|
var a;
|
|
71
72
|
return r === null ? null : (a = L(i), a.tokens = r.tokens, a.semantic = r.semantic, a.children.push(r), a);
|
|
72
73
|
}
|
|
73
|
-
function
|
|
74
|
+
function I(i, r) {
|
|
74
75
|
return r !== null && (i.tokens += r.tokens, i.semantic += r.semantic), i.children.push(r), i;
|
|
75
76
|
}
|
|
76
77
|
function g(i) {
|
|
@@ -94,7 +95,7 @@ var yt = { exports: {} };
|
|
|
94
95
|
for (N = R(), c = L("and"), a = 0; a < i.length; a += 1) {
|
|
95
96
|
if (y = i[a](), y === null)
|
|
96
97
|
return q(N), null;
|
|
97
|
-
|
|
98
|
+
I(c, y);
|
|
98
99
|
}
|
|
99
100
|
return c;
|
|
100
101
|
};
|
|
@@ -133,7 +134,7 @@ var yt = { exports: {} };
|
|
|
133
134
|
return function() {
|
|
134
135
|
var c, y, N, le, ot;
|
|
135
136
|
for (le = R(), c = L("star"), N = 0, ot = r === void 0 ? 0 : r; (y = i()) !== null; )
|
|
136
|
-
N = N + 1,
|
|
137
|
+
N = N + 1, I(c, y);
|
|
137
138
|
return N >= ot ? c : (q(le), null);
|
|
138
139
|
};
|
|
139
140
|
}
|
|
@@ -149,7 +150,7 @@ var yt = { exports: {} };
|
|
|
149
150
|
function p() {
|
|
150
151
|
return u("crlf", t(X, $)());
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
+
function V() {
|
|
153
154
|
return u("dquote", n('"')());
|
|
154
155
|
}
|
|
155
156
|
function T() {
|
|
@@ -193,7 +194,7 @@ var yt = { exports: {} };
|
|
|
193
194
|
)
|
|
194
195
|
)());
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function Ie() {
|
|
197
198
|
return u("ctext", o(
|
|
198
199
|
function() {
|
|
199
200
|
return g(function(a) {
|
|
@@ -204,13 +205,13 @@ var yt = { exports: {} };
|
|
|
204
205
|
xt
|
|
205
206
|
)());
|
|
206
207
|
}
|
|
207
|
-
function
|
|
208
|
-
return u("ccontent", o(
|
|
208
|
+
function Ve() {
|
|
209
|
+
return u("ccontent", o(Ie, H, we)());
|
|
209
210
|
}
|
|
210
211
|
function we() {
|
|
211
212
|
return u("comment", t(
|
|
212
213
|
n("("),
|
|
213
|
-
b(t(e(O),
|
|
214
|
+
b(t(e(O), Ve)),
|
|
214
215
|
e(O),
|
|
215
216
|
n(")")
|
|
216
217
|
)());
|
|
@@ -258,7 +259,7 @@ var yt = { exports: {} };
|
|
|
258
259
|
}
|
|
259
260
|
function Ee() {
|
|
260
261
|
var i, r;
|
|
261
|
-
return i = u("dot-atom-text", b(he, 1)()), i === null || (r = b(t(n("."), b(he, 1)))(), r !== null &&
|
|
262
|
+
return i = u("dot-atom-text", b(he, 1)()), i === null || (r = b(t(n("."), b(he, 1)))(), r !== null && I(i, r)), i;
|
|
262
263
|
}
|
|
263
264
|
function Ae() {
|
|
264
265
|
return u("dot-atom", t(d(e(k)), Ee, d(e(k)))());
|
|
@@ -280,10 +281,10 @@ var yt = { exports: {} };
|
|
|
280
281
|
function ke() {
|
|
281
282
|
return u("quoted-string", t(
|
|
282
283
|
d(e(k)),
|
|
283
|
-
d(
|
|
284
|
+
d(V),
|
|
284
285
|
b(t(e(h(O)), Re)),
|
|
285
286
|
e(d(O)),
|
|
286
|
-
d(
|
|
287
|
+
d(V),
|
|
287
288
|
d(e(k))
|
|
288
289
|
)());
|
|
289
290
|
}
|
|
@@ -367,7 +368,7 @@ var yt = { exports: {} };
|
|
|
367
368
|
return l.rfc6532 && (y = y || P(a)), y;
|
|
368
369
|
});
|
|
369
370
|
},
|
|
370
|
-
|
|
371
|
+
It
|
|
371
372
|
)()
|
|
372
373
|
);
|
|
373
374
|
}
|
|
@@ -383,7 +384,7 @@ var yt = { exports: {} };
|
|
|
383
384
|
}
|
|
384
385
|
function ae() {
|
|
385
386
|
return u("domain", function() {
|
|
386
|
-
var r = o(
|
|
387
|
+
var r = o(Dt, Ae, be)();
|
|
387
388
|
return l.rejectTLD && r && r.semantic && r.semantic.indexOf(".") < 0 ? null : (r && (r.semantic = r.semantic.replace(/\s+/g, "")), r);
|
|
388
389
|
}());
|
|
389
390
|
}
|
|
@@ -517,10 +518,10 @@ var yt = { exports: {} };
|
|
|
517
518
|
function Mt() {
|
|
518
519
|
return l.strict ? null : u("obs-local-part", t(de, b(t(n("."), de)))());
|
|
519
520
|
}
|
|
520
|
-
function
|
|
521
|
+
function Dt() {
|
|
521
522
|
return l.strict ? null : u("obs-domain", t(Se, b(t(n("."), Se)))());
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function It() {
|
|
524
525
|
return l.strict ? null : u("obs-dtext", o(Ue, H)());
|
|
525
526
|
}
|
|
526
527
|
function Ne(i, r) {
|
|
@@ -535,7 +536,7 @@ var yt = { exports: {} };
|
|
|
535
536
|
}
|
|
536
537
|
return null;
|
|
537
538
|
}
|
|
538
|
-
function
|
|
539
|
+
function Vt(i, r) {
|
|
539
540
|
var a, c, y, N;
|
|
540
541
|
if (r == null)
|
|
541
542
|
return null;
|
|
@@ -585,7 +586,7 @@ var yt = { exports: {} };
|
|
|
585
586
|
};
|
|
586
587
|
}
|
|
587
588
|
function nt(i) {
|
|
588
|
-
var r = Ne("display-name", i), a = Ne("addr-spec", i), c =
|
|
589
|
+
var r = Ne("display-name", i), a = Ne("addr-spec", i), c = Vt("cfws", i), y = He(["comment"], i), N = Ne("local-part", a), le = Ne("domain", a);
|
|
589
590
|
return {
|
|
590
591
|
node: i,
|
|
591
592
|
parts: {
|
|
@@ -718,8 +719,8 @@ var yt = { exports: {} };
|
|
|
718
719
|
x.parseOneAddress = _, x.parseAddressList = K, x.parseFrom = S, x.parseSender = G, x.parseReplyTo = Y, F.exports = x;
|
|
719
720
|
})();
|
|
720
721
|
})(yt);
|
|
721
|
-
var
|
|
722
|
-
const
|
|
722
|
+
var an = yt.exports;
|
|
723
|
+
const sn = /* @__PURE__ */ Ut(an), ln = { class: "flex flex-col" }, un = { key: 1 }, cn = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, dn = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, mn = /* @__PURE__ */ je({
|
|
723
724
|
__name: "MemberStatsDialog",
|
|
724
725
|
props: {
|
|
725
726
|
member: {
|
|
@@ -732,7 +733,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
732
733
|
}
|
|
733
734
|
},
|
|
734
735
|
setup(F) {
|
|
735
|
-
var z, L, u,
|
|
736
|
+
var z, L, u, I;
|
|
736
737
|
const E = Ze(), x = et(), _ = F, K = ne(
|
|
737
738
|
() => {
|
|
738
739
|
var g;
|
|
@@ -759,7 +760,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
759
760
|
), S = ce({
|
|
760
761
|
cardNo: _.member.cardNo,
|
|
761
762
|
experience: ((L = (z = _.member.collection) == null ? void 0 : z.POINT) == null ? void 0 : L[0].balance) ?? 0,
|
|
762
|
-
tier: ((
|
|
763
|
+
tier: ((I = (u = _.member.collection) == null ? void 0 : u.TIER) == null ? void 0 : I[0].balance) ?? -1,
|
|
763
764
|
titles: K.value.map((g) => ({ expiredAt: g.expiresIn, id: g._id })) ?? void 0
|
|
764
765
|
}), G = ne(
|
|
765
766
|
() => (x.sortedTitles ?? []).map((g) => ({
|
|
@@ -798,7 +799,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
798
799
|
return (v = K.value.find((n) => n._id === g)) == null ? void 0 : v.expiresIn;
|
|
799
800
|
}
|
|
800
801
|
const W = ne(() => {
|
|
801
|
-
const g =
|
|
802
|
+
const g = Wt.safeParse(S.value);
|
|
802
803
|
return g.success ? void 0 : g.error.errors;
|
|
803
804
|
});
|
|
804
805
|
function R(g) {
|
|
@@ -816,7 +817,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
816
817
|
var P, X;
|
|
817
818
|
const n = U("FmSelect"), t = U("FmStepperField"), o = U("FmTextField"), e = U("FmField"), d = U("FmFormGroup"), h = U("FmButton"), b = U("FmHelperText"), B = U("FmSpacer");
|
|
818
819
|
return A(), Q(fe, null, [
|
|
819
|
-
m("div",
|
|
820
|
+
m("div", ln, [
|
|
820
821
|
v[6] || (v[6] = m("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1)),
|
|
821
822
|
s(Y).length ? (A(), re(n, {
|
|
822
823
|
key: 0,
|
|
@@ -830,7 +831,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
830
831
|
"helper-text": R("tier"),
|
|
831
832
|
"helper-state": R("tier") ? "error" : void 0
|
|
832
833
|
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : xe("", !0),
|
|
833
|
-
|
|
834
|
+
D(t, {
|
|
834
835
|
"model-value": s(S).experience ?? 0,
|
|
835
836
|
"onUpdate:modelValue": v[1] || (v[1] = (p) => s(S).experience = p),
|
|
836
837
|
label: "Member Experience",
|
|
@@ -839,7 +840,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
839
840
|
"helper-state": R("experience") ? "error" : void 0
|
|
840
841
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
841
842
|
v[7] || (v[7] = m("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1)),
|
|
842
|
-
|
|
843
|
+
D(o, {
|
|
843
844
|
modelValue: s(S).cardNo,
|
|
844
845
|
"onUpdate:modelValue": v[2] || (v[2] = (p) => s(S).cardNo = p),
|
|
845
846
|
label: "Card number",
|
|
@@ -847,22 +848,22 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
847
848
|
"helper-state": R("cardNo") ? "error" : void 0
|
|
848
849
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
849
850
|
v[8] || (v[8] = m("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1)),
|
|
850
|
-
(P = s(S).titles) != null && P.length ? (A(), Q("div",
|
|
851
|
+
(P = s(S).titles) != null && P.length ? (A(), Q("div", un, v[5] || (v[5] = [
|
|
851
852
|
m("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
852
853
|
m("div", { class: "flex-1" }, "Title"),
|
|
853
854
|
m("div", { class: "flex-1" }, "Expires in days"),
|
|
854
855
|
m("div", { class: "w-24 h-1" })
|
|
855
856
|
], -1)
|
|
856
857
|
]))) : xe("", !0),
|
|
857
|
-
(A(!0), Q(fe, null, _e(s(S).titles ?? [], (p,
|
|
858
|
-
m("div",
|
|
858
|
+
(A(!0), Q(fe, null, _e(s(S).titles ?? [], (p, V) => (A(), Q("div", { key: V }, [
|
|
859
|
+
m("div", cn, [
|
|
859
860
|
s(K).some((T) => T._id === p.id) ? (A(), re(d, {
|
|
860
861
|
key: 1,
|
|
861
862
|
"model-value": "",
|
|
862
863
|
class: "flex-1"
|
|
863
864
|
}, {
|
|
864
865
|
default: ge(() => [
|
|
865
|
-
|
|
866
|
+
D(e, {
|
|
866
867
|
disabled: !0,
|
|
867
868
|
class: "text-fm-color-typo-secondary"
|
|
868
869
|
}, {
|
|
@@ -888,24 +889,24 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
888
889
|
}
|
|
889
890
|
)
|
|
890
891
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])),
|
|
891
|
-
|
|
892
|
+
D(t, {
|
|
892
893
|
modelValue: p.expiredAt,
|
|
893
894
|
"onUpdate:modelValue": (T) => p.expiredAt = T,
|
|
894
895
|
class: "flex-1",
|
|
895
896
|
label: "",
|
|
896
897
|
"max-fraction-digits": 0
|
|
897
898
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
898
|
-
|
|
899
|
+
D(h, {
|
|
899
900
|
class: "w-24 h-24",
|
|
900
901
|
icon: "close",
|
|
901
902
|
variant: "tertiary",
|
|
902
903
|
onClick: (T) => {
|
|
903
904
|
var $;
|
|
904
|
-
return ($ = s(S).titles) == null ? void 0 : $.splice(
|
|
905
|
+
return ($ = s(S).titles) == null ? void 0 : $.splice(V, 1);
|
|
905
906
|
}
|
|
906
907
|
}, null, 8, ["onClick"])
|
|
907
908
|
]),
|
|
908
|
-
(A(!0), Q(fe, null, _e(q(`titles.${
|
|
909
|
+
(A(!0), Q(fe, null, _e(q(`titles.${V}`), (T, $) => (A(), re(b, {
|
|
909
910
|
key: $,
|
|
910
911
|
class: "items-center",
|
|
911
912
|
state: "error",
|
|
@@ -918,37 +919,37 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
918
919
|
label: "Give title",
|
|
919
920
|
variant: "plain",
|
|
920
921
|
onClick: v[3] || (v[3] = (p) => {
|
|
921
|
-
var
|
|
922
|
+
var V;
|
|
922
923
|
return s(S).titles = [
|
|
923
924
|
...s(S).titles ?? [],
|
|
924
925
|
{
|
|
925
|
-
id: ((
|
|
926
|
+
id: ((V = s(G).find(
|
|
926
927
|
(T) => {
|
|
927
928
|
var $;
|
|
928
929
|
return !(($ = s(S).titles) != null && $.map((Z) => Z.id).includes(T.value));
|
|
929
930
|
}
|
|
930
|
-
)) == null ? void 0 :
|
|
931
|
+
)) == null ? void 0 : V.value) || s(G)[0].value,
|
|
931
932
|
expiredAt: 0
|
|
932
933
|
}
|
|
933
934
|
];
|
|
934
935
|
})
|
|
935
936
|
})) : xe("", !0)
|
|
936
937
|
]),
|
|
937
|
-
m("div",
|
|
938
|
-
dt(
|
|
938
|
+
m("div", dn, [
|
|
939
|
+
dt(D(b, {
|
|
939
940
|
state: "warning",
|
|
940
941
|
text: "Updating member will cause tier to change"
|
|
941
942
|
}, null, 512), [
|
|
942
943
|
[mt, s(l)]
|
|
943
944
|
]),
|
|
944
|
-
|
|
945
|
-
|
|
945
|
+
D(B),
|
|
946
|
+
D(h, {
|
|
946
947
|
variant: "secondary",
|
|
947
948
|
label: "Cancel",
|
|
948
949
|
size: "md",
|
|
949
950
|
onClick: v[4] || (v[4] = (p) => s(E).close())
|
|
950
951
|
}),
|
|
951
|
-
|
|
952
|
+
D(h, {
|
|
952
953
|
disabled: !!s(W),
|
|
953
954
|
variant: "primary",
|
|
954
955
|
label: "Submit",
|
|
@@ -959,7 +960,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
959
960
|
], 64);
|
|
960
961
|
};
|
|
961
962
|
}
|
|
962
|
-
}),
|
|
963
|
+
}), fn = { class: "fm-typo-en-title-sm-800" }, pn = { class: "space-y-16" }, bn = { class: "flex flex-nowrap gap-8 items-center justify-end pt-24 w-full" }, vn = /* @__PURE__ */ je({
|
|
963
964
|
__name: "CreditCoinDialog",
|
|
964
965
|
props: {
|
|
965
966
|
type: { type: String, required: !0 },
|
|
@@ -994,25 +995,25 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
994
995
|
});
|
|
995
996
|
}
|
|
996
997
|
const w = ne(() => {
|
|
997
|
-
const C = (x.action == "send" ?
|
|
998
|
+
const C = (x.action == "send" ? Kt : Gt).safeParse(_.value);
|
|
998
999
|
return C.success == !1 ? C.error.flatten().fieldErrors : void 0;
|
|
999
1000
|
});
|
|
1000
1001
|
return (l, C) => {
|
|
1001
1002
|
const W = U("FmStepperField"), R = U("FmSwitch"), q = U("FmTextarea"), j = U("FmButton"), z = U("FmCard");
|
|
1002
1003
|
return A(), re(z, { class: "flex flex-col gap-16 p-16" }, {
|
|
1003
1004
|
default: ge(() => {
|
|
1004
|
-
var L, u,
|
|
1005
|
+
var L, u, I, g, v, n;
|
|
1005
1006
|
return [
|
|
1006
|
-
m("div",
|
|
1007
|
-
m("div",
|
|
1008
|
-
|
|
1007
|
+
m("div", fn, J(x.action == "send" ? "Send" : "Deduct") + " " + J(s(lt)[x.type.toUpperCase()].name), 1),
|
|
1008
|
+
m("div", pn, [
|
|
1009
|
+
D(W, {
|
|
1009
1010
|
modelValue: s(_).amount,
|
|
1010
1011
|
"onUpdate:modelValue": C[0] || (C[0] = (t) => s(_).amount = t),
|
|
1011
1012
|
label: `${s(lt)[x.type.toUpperCase()].name} amount`,
|
|
1012
1013
|
"is-currency": !0,
|
|
1013
1014
|
"max-fraction-digits": 2,
|
|
1014
1015
|
"helper-state": (L = s(w)) != null && L.amount ? "error" : void 0,
|
|
1015
|
-
"helper-text": (
|
|
1016
|
+
"helper-text": (I = (u = s(w)) == null ? void 0 : u.amount) == null ? void 0 : I[0]
|
|
1016
1017
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1017
1018
|
F.action === "send" && x.type === "coin" ? (A(), re(R, {
|
|
1018
1019
|
key: 0,
|
|
@@ -1032,20 +1033,20 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1032
1033
|
"helper-state": (g = s(w)) != null && g.day ? "error" : void 0,
|
|
1033
1034
|
"helper-text": (n = (v = s(w)) == null ? void 0 : v.day) == null ? void 0 : n[0]
|
|
1034
1035
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"])) : xe("", !0),
|
|
1035
|
-
|
|
1036
|
+
D(q, {
|
|
1036
1037
|
modelValue: s(_).remark,
|
|
1037
1038
|
"onUpdate:modelValue": C[3] || (C[3] = (t) => s(_).remark = t),
|
|
1038
1039
|
label: "Remark"
|
|
1039
1040
|
}, null, 8, ["modelValue"])
|
|
1040
1041
|
]),
|
|
1041
|
-
m("div",
|
|
1042
|
-
|
|
1042
|
+
m("div", bn, [
|
|
1043
|
+
D(j, {
|
|
1043
1044
|
variant: "secondary",
|
|
1044
1045
|
label: "Cancel",
|
|
1045
1046
|
size: "md",
|
|
1046
1047
|
onClick: C[4] || (C[4] = (t) => s(E).close())
|
|
1047
1048
|
}),
|
|
1048
|
-
|
|
1049
|
+
D(j, {
|
|
1049
1050
|
disabled: !!s(w),
|
|
1050
1051
|
variant: "primary",
|
|
1051
1052
|
label: "Submit",
|
|
@@ -1059,7 +1060,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1059
1060
|
});
|
|
1060
1061
|
};
|
|
1061
1062
|
}
|
|
1062
|
-
}), gt =
|
|
1063
|
+
}), gt = Ht("segment", () => {
|
|
1063
1064
|
const F = ce([]);
|
|
1064
1065
|
async function E() {
|
|
1065
1066
|
const x = await qt.readAll({
|
|
@@ -1074,19 +1075,19 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1074
1075
|
segments: F,
|
|
1075
1076
|
read: E
|
|
1076
1077
|
};
|
|
1077
|
-
}),
|
|
1078
|
+
}), yn = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, gn = { class: "space-y-16" }, xn = { class: "flex gap-16 items-center" }, hn = { class: "flex-auto" }, Sn = { class: "fm-typo-en-body-md-600" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tn = { class: "fm-typo-en-body-md-800" }, _n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, wn = { class: "fm-typo-en-body-md-600" }, An = { class: "gap-16 grid grid-cols-2" }, kn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Nn = { class: "fm-typo-en-body-md-600" }, Mn = { class: "space-y-8" }, Dn = {
|
|
1078
1079
|
key: 0,
|
|
1079
1080
|
class: "space-x-8"
|
|
1080
1081
|
}, In = {
|
|
1081
1082
|
key: 1,
|
|
1082
1083
|
class: "text-fm-color-typo-secondary"
|
|
1083
|
-
}, Vn = { class: "space-y-8" },
|
|
1084
|
+
}, Vn = { class: "space-y-8" }, En = ["src"], $n = { class: "fm-typo-en-body-md-600" }, Rn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ln = {
|
|
1084
1085
|
key: 1,
|
|
1085
1086
|
class: "text-fm-color-typo-secondary"
|
|
1086
|
-
},
|
|
1087
|
+
}, Pn = {
|
|
1087
1088
|
key: 1,
|
|
1088
1089
|
class: "space-y-24"
|
|
1089
|
-
},
|
|
1090
|
+
}, Bn = { class: "space-y-8" }, On = { class: "fm-typo-en-title-md-800" }, Un = { class: "space-y-4" }, Yn = { class: "fm-typo-en-body-md-600" }, qn = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, jn = { class: "space-y-8" }, zn = { class: "fm-typo-en-title-md-800" }, Kn = { class: "space-y-4" }, Gn = { class: "fm-typo-en-body-md-600" }, Wn = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, Hn = /* @__PURE__ */ je({
|
|
1090
1091
|
__name: "MemberDetailSheet",
|
|
1091
1092
|
props: {
|
|
1092
1093
|
member: {
|
|
@@ -1106,7 +1107,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1106
1107
|
async function R(o, e) {
|
|
1107
1108
|
G.open({
|
|
1108
1109
|
title: "",
|
|
1109
|
-
dialogComponent:
|
|
1110
|
+
dialogComponent: vn,
|
|
1110
1111
|
dialogComponentProps: {
|
|
1111
1112
|
type: o,
|
|
1112
1113
|
action: e,
|
|
@@ -1133,7 +1134,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1133
1134
|
async function q() {
|
|
1134
1135
|
G.open({
|
|
1135
1136
|
title: "Update member statistics",
|
|
1136
|
-
contentComponent:
|
|
1137
|
+
contentComponent: mn,
|
|
1137
1138
|
contentComponentProps: {
|
|
1138
1139
|
member: w.member,
|
|
1139
1140
|
onSubmit: async (o) => {
|
|
@@ -1158,8 +1159,8 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1158
1159
|
{
|
|
1159
1160
|
label: "Tier",
|
|
1160
1161
|
getter: (o) => {
|
|
1161
|
-
var P, X, p,
|
|
1162
|
-
const e = (((X = ut.first((P = w.member.collection) == null ? void 0 : P.TIER)) == null ? void 0 : X.balance) || 0) - 1, d = L.value.name, h = ((
|
|
1162
|
+
var P, X, p, V, T;
|
|
1163
|
+
const e = (((X = ut.first((P = w.member.collection) == null ? void 0 : P.TIER)) == null ? void 0 : X.balance) || 0) - 1, d = L.value.name, h = ((V = (p = o.collection) == null ? void 0 : p.POINT) == null ? void 0 : V[0].balance) ?? 0, b = K.sortedTiers[e + 1], B = ((T = b == null ? void 0 : b.option) == null ? void 0 : T.to) ?? 1 / 0;
|
|
1163
1164
|
return `${d} (${h}/${B})`;
|
|
1164
1165
|
}
|
|
1165
1166
|
},
|
|
@@ -1232,12 +1233,12 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1232
1233
|
}).filter(
|
|
1233
1234
|
(e) => e.expiredAt ? M(e.expiredAt).isAfter(M()) : !0
|
|
1234
1235
|
);
|
|
1235
|
-
}),
|
|
1236
|
+
}), I = ce(!0);
|
|
1236
1237
|
function g() {
|
|
1237
|
-
|
|
1238
|
+
I.value = !0, t.value = n[0];
|
|
1238
1239
|
}
|
|
1239
1240
|
function v() {
|
|
1240
|
-
|
|
1241
|
+
I.value = !1;
|
|
1241
1242
|
}
|
|
1242
1243
|
const n = [
|
|
1243
1244
|
{
|
|
@@ -1257,8 +1258,8 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1257
1258
|
}), (o, e) => {
|
|
1258
1259
|
const d = U("FmTabs"), h = U("FmAvatar"), b = U("FmButton"), B = U("FmChip"), P = U("FmCard"), X = U("FmSideSheet");
|
|
1259
1260
|
return A(), re(X, {
|
|
1260
|
-
modelValue: s(
|
|
1261
|
-
"onUpdate:modelValue": e[5] || (e[5] = (p) => Ot(
|
|
1261
|
+
modelValue: s(I),
|
|
1262
|
+
"onUpdate:modelValue": e[5] || (e[5] = (p) => Ot(I) ? I.value = p : null),
|
|
1262
1263
|
header: "Member Detail",
|
|
1263
1264
|
"dismiss-away": "",
|
|
1264
1265
|
"close-button": !0,
|
|
@@ -1266,54 +1267,54 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1266
1267
|
}, {
|
|
1267
1268
|
"side-sheet-footer": ge(() => e[19] || (e[19] = [])),
|
|
1268
1269
|
default: ge(() => [
|
|
1269
|
-
m("div",
|
|
1270
|
-
|
|
1270
|
+
m("div", yn, [
|
|
1271
|
+
D(d, {
|
|
1271
1272
|
"model-value": s(t).value,
|
|
1272
1273
|
items: n,
|
|
1273
|
-
"onUpdate:modelValue": e[0] || (e[0] = (p) => t.value = n.find((
|
|
1274
|
+
"onUpdate:modelValue": e[0] || (e[0] = (p) => t.value = n.find((V) => V.value === p))
|
|
1274
1275
|
}, null, 8, ["model-value"]),
|
|
1275
1276
|
s(t).value == "overview" ? (A(), Q(fe, { key: 0 }, [
|
|
1276
1277
|
e[10] || (e[10] = m("div", { class: "fm-typo-en-title-sm-800" }, "Profile Information", -1)),
|
|
1277
|
-
m("div",
|
|
1278
|
-
m("div",
|
|
1279
|
-
|
|
1278
|
+
m("div", gn, [
|
|
1279
|
+
m("div", xn, [
|
|
1280
|
+
D(h, {
|
|
1280
1281
|
name: F.member.photoUrl ? void 0 : F.member.name,
|
|
1281
1282
|
src: F.member.photoUrl || void 0
|
|
1282
1283
|
}, null, 8, ["name", "src"]),
|
|
1283
|
-
m("div",
|
|
1284
|
+
m("div", hn, [
|
|
1284
1285
|
e[7] || (e[7] = m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Member Name ", -1)),
|
|
1285
|
-
m("div",
|
|
1286
|
-
m("div",
|
|
1287
|
-
m("div",
|
|
1286
|
+
m("div", Sn, J(F.member.name), 1),
|
|
1287
|
+
m("div", Fn, J(F.member._id), 1),
|
|
1288
|
+
m("div", Cn, [
|
|
1288
1289
|
e[6] || (e[6] = ct(" Member Card: ")),
|
|
1289
|
-
m("span",
|
|
1290
|
+
m("span", Tn, J(F.member.cardNo ? F.member.cardNo : "-"), 1)
|
|
1290
1291
|
])
|
|
1291
1292
|
]),
|
|
1292
|
-
|
|
1293
|
+
D(b, {
|
|
1293
1294
|
variant: "tertiary",
|
|
1294
1295
|
icon: "settings",
|
|
1295
1296
|
onClick: q
|
|
1296
1297
|
})
|
|
1297
1298
|
]),
|
|
1298
|
-
(A(), Q(fe, null, _e(j, (p,
|
|
1299
|
-
m("div",
|
|
1300
|
-
m("div",
|
|
1299
|
+
(A(), Q(fe, null, _e(j, (p, V) => m("div", { key: V }, [
|
|
1300
|
+
m("div", _n, J(p.label), 1),
|
|
1301
|
+
m("div", wn, J(p.key ? F.member[p.key] : p.getter(F.member)), 1)
|
|
1301
1302
|
])), 64))
|
|
1302
1303
|
]),
|
|
1303
1304
|
e[11] || (e[11] = m("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
1304
1305
|
e[12] || (e[12] = m("div", { class: "fm-typo-en-title-sm-800" }, "Activities", -1)),
|
|
1305
|
-
m("div",
|
|
1306
|
+
m("div", An, [
|
|
1306
1307
|
(A(), Q(fe, null, _e(z, (p) => m("div", {
|
|
1307
1308
|
key: p.key
|
|
1308
1309
|
}, [
|
|
1309
|
-
m("div",
|
|
1310
|
-
m("div",
|
|
1310
|
+
m("div", kn, J(p.label), 1),
|
|
1311
|
+
m("div", Nn, J(p.key ? w.member.stats[p.key] || "-" : p.getter(F.member)), 1)
|
|
1311
1312
|
])), 64))
|
|
1312
1313
|
]),
|
|
1313
1314
|
e[13] || (e[13] = m("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
1314
|
-
m("div",
|
|
1315
|
+
m("div", Mn, [
|
|
1315
1316
|
e[8] || (e[8] = m("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1)),
|
|
1316
|
-
s(W).length ? (A(), Q("div",
|
|
1317
|
+
s(W).length ? (A(), Q("div", Dn, [
|
|
1317
1318
|
(A(!0), Q(fe, null, _e(s(W), (p) => (A(), re(B, {
|
|
1318
1319
|
label: p.toString()
|
|
1319
1320
|
}, null, 8, ["label"]))), 256))
|
|
@@ -1327,42 +1328,42 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1327
1328
|
key: p.name
|
|
1328
1329
|
}, [
|
|
1329
1330
|
m("img", {
|
|
1330
|
-
src: p.collectible.image ||
|
|
1331
|
+
src: p.collectible.image || s(zt),
|
|
1331
1332
|
class: "aspect-square h-full object-contain"
|
|
1332
|
-
}, null, 8,
|
|
1333
|
+
}, null, 8, En),
|
|
1333
1334
|
m("div", null, [
|
|
1334
|
-
m("div",
|
|
1335
|
-
m("div",
|
|
1335
|
+
m("div", $n, J(p.name), 1),
|
|
1336
|
+
m("div", Rn, " Expired on " + J(s(M)(p.expiredAt).format("MMM D, Y")), 1)
|
|
1336
1337
|
])
|
|
1337
|
-
]))), 128)) : (A(), Q("div",
|
|
1338
|
+
]))), 128)) : (A(), Q("div", Ln, "No titles"))
|
|
1338
1339
|
])
|
|
1339
|
-
], 64)) : s(t).value == "loyalty" ? (A(), Q("div",
|
|
1340
|
-
|
|
1340
|
+
], 64)) : s(t).value == "loyalty" ? (A(), Q("div", Pn, [
|
|
1341
|
+
D(P, {
|
|
1341
1342
|
class: "p-16 space-y-24",
|
|
1342
1343
|
variant: "outlined"
|
|
1343
1344
|
}, {
|
|
1344
1345
|
default: ge(() => {
|
|
1345
|
-
var p,
|
|
1346
|
+
var p, V, T, $, Z, oe, ee;
|
|
1346
1347
|
return [
|
|
1347
|
-
m("div",
|
|
1348
|
+
m("div", Bn, [
|
|
1348
1349
|
e[15] || (e[15] = m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1)),
|
|
1349
|
-
m("div",
|
|
1350
|
+
m("div", On, J(((T = (V = (p = F.member.collection) == null ? void 0 : p.CREDIT) == null ? void 0 : V[0]) == null ? void 0 : T.balance) ?? 0), 1)
|
|
1350
1351
|
]),
|
|
1351
|
-
m("div",
|
|
1352
|
+
m("div", Un, [
|
|
1352
1353
|
e[16] || (e[16] = m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1)),
|
|
1353
|
-
m("div",
|
|
1354
|
+
m("div", Yn, J(((ee = (oe = (Z = ($ = F.member.collection) == null ? void 0 : $.CREDIT) == null ? void 0 : Z[0]) == null ? void 0 : oe.expiryBalance) == null ? void 0 : ee.reduce(
|
|
1354
1355
|
(H, O) => O.expiredAt && s(M)(O.expiredAt).isAfter(s(M)()) && s(M)(O.expiredAt).isBefore(s(M)().add(30, "days")) ? H + O.amount : H,
|
|
1355
1356
|
0
|
|
1356
1357
|
)) ?? 0), 1)
|
|
1357
1358
|
]),
|
|
1358
|
-
m("div",
|
|
1359
|
-
|
|
1359
|
+
m("div", qn, [
|
|
1360
|
+
D(b, {
|
|
1360
1361
|
label: "Add credit",
|
|
1361
1362
|
icon: "add",
|
|
1362
1363
|
variant: "plain",
|
|
1363
1364
|
onClick: e[1] || (e[1] = (H) => R("credit", "send"))
|
|
1364
1365
|
}),
|
|
1365
|
-
|
|
1366
|
+
D(b, {
|
|
1366
1367
|
label: "Deduct credit",
|
|
1367
1368
|
icon: "remove",
|
|
1368
1369
|
variant: "plain",
|
|
@@ -1373,32 +1374,32 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1373
1374
|
}),
|
|
1374
1375
|
_: 1
|
|
1375
1376
|
}),
|
|
1376
|
-
|
|
1377
|
+
D(P, {
|
|
1377
1378
|
class: "p-16 space-y-24",
|
|
1378
1379
|
variant: "outlined"
|
|
1379
1380
|
}, {
|
|
1380
1381
|
default: ge(() => {
|
|
1381
|
-
var p,
|
|
1382
|
+
var p, V, T, $, Z, oe, ee;
|
|
1382
1383
|
return [
|
|
1383
|
-
m("div",
|
|
1384
|
+
m("div", jn, [
|
|
1384
1385
|
e[17] || (e[17] = m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1)),
|
|
1385
|
-
m("div",
|
|
1386
|
+
m("div", zn, J(((T = (V = (p = F.member.collection) == null ? void 0 : p.COIN) == null ? void 0 : V[0]) == null ? void 0 : T.balance) ?? 0), 1)
|
|
1386
1387
|
]),
|
|
1387
|
-
m("div",
|
|
1388
|
+
m("div", Kn, [
|
|
1388
1389
|
e[18] || (e[18] = m("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1)),
|
|
1389
|
-
m("div",
|
|
1390
|
+
m("div", Gn, J(((ee = (oe = (Z = ($ = F.member.collection) == null ? void 0 : $.COIN) == null ? void 0 : Z[0]) == null ? void 0 : oe.expiryBalance) == null ? void 0 : ee.reduce(
|
|
1390
1391
|
(H, O) => O.expiredAt && s(M)(O.expiredAt).isAfter(s(M)()) && s(M)(O.expiredAt).isBefore(s(M)().add(30, "days")) ? H + O.amount : H,
|
|
1391
1392
|
0
|
|
1392
1393
|
)) ?? 0), 1)
|
|
1393
1394
|
]),
|
|
1394
|
-
m("div",
|
|
1395
|
-
|
|
1395
|
+
m("div", Wn, [
|
|
1396
|
+
D(b, {
|
|
1396
1397
|
label: "Add point",
|
|
1397
1398
|
icon: "add",
|
|
1398
1399
|
variant: "plain",
|
|
1399
1400
|
onClick: e[3] || (e[3] = (H) => R("coin", "send"))
|
|
1400
1401
|
}),
|
|
1401
|
-
|
|
1402
|
+
D(b, {
|
|
1402
1403
|
label: "Deduct point",
|
|
1403
1404
|
icon: "remove",
|
|
1404
1405
|
variant: "plain",
|
|
@@ -1416,16 +1417,16 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1416
1417
|
}, 8, ["modelValue"]);
|
|
1417
1418
|
};
|
|
1418
1419
|
}
|
|
1419
|
-
}),
|
|
1420
|
+
}), Jn = { class: "flex items-center justify-end" }, Fr = /* @__PURE__ */ je({
|
|
1420
1421
|
__name: "MemberList",
|
|
1421
1422
|
setup(F) {
|
|
1422
|
-
const E = gt(), x = et(), _ = bt(), { minor: K } = pt, S =
|
|
1423
|
+
const E = gt(), x = et(), _ = bt(), { minor: K } = pt, S = nn(), G = [
|
|
1423
1424
|
{
|
|
1424
1425
|
header: "Name",
|
|
1425
1426
|
enableSorting: !0,
|
|
1426
1427
|
accessorKey: "name",
|
|
1427
1428
|
cell(n) {
|
|
1428
|
-
return
|
|
1429
|
+
return Zt(n.row.original);
|
|
1429
1430
|
}
|
|
1430
1431
|
},
|
|
1431
1432
|
{
|
|
@@ -1439,7 +1440,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1439
1440
|
header: "Tier",
|
|
1440
1441
|
enableSorting: !0,
|
|
1441
1442
|
cell(n) {
|
|
1442
|
-
return
|
|
1443
|
+
return en(
|
|
1443
1444
|
n.row.original,
|
|
1444
1445
|
x.sortedTiers
|
|
1445
1446
|
);
|
|
@@ -1449,7 +1450,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1449
1450
|
header: "Title",
|
|
1450
1451
|
enableSorting: !1,
|
|
1451
1452
|
cell(n) {
|
|
1452
|
-
return
|
|
1453
|
+
return tn(
|
|
1453
1454
|
n.row.original,
|
|
1454
1455
|
x.sortedTitles
|
|
1455
1456
|
);
|
|
@@ -1510,13 +1511,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1510
1511
|
(t = n.row.original.stats) != null && t.lastVisit ? M((o = n.row.original.stats) == null ? void 0 : o.lastVisit).fromNow() : "NA"
|
|
1511
1512
|
),
|
|
1512
1513
|
ye(
|
|
1513
|
-
|
|
1514
|
+
De.FmTooltip,
|
|
1514
1515
|
{
|
|
1515
1516
|
content: M(n.row.original.stats.lastVisit).format(
|
|
1516
1517
|
"D MMM YYYY - hh:mmA"
|
|
1517
1518
|
)
|
|
1518
1519
|
},
|
|
1519
|
-
[ye(
|
|
1520
|
+
[ye(De.FmIcon, { name: "info", outline: !0, size: "sm" })]
|
|
1520
1521
|
)
|
|
1521
1522
|
]);
|
|
1522
1523
|
}
|
|
@@ -1525,7 +1526,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1525
1526
|
id: "actions",
|
|
1526
1527
|
cell(n) {
|
|
1527
1528
|
return ye(
|
|
1528
|
-
|
|
1529
|
+
De.FmMenu,
|
|
1529
1530
|
{
|
|
1530
1531
|
placement: "bottom-end",
|
|
1531
1532
|
onClick: (t) => {
|
|
@@ -1533,9 +1534,9 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1533
1534
|
}
|
|
1534
1535
|
},
|
|
1535
1536
|
{
|
|
1536
|
-
"menu-button": () => ye(
|
|
1537
|
+
"menu-button": () => ye(De.FmButton, { icon: "more_vert", variant: "tertiary" }),
|
|
1537
1538
|
default: () => [
|
|
1538
|
-
ye(
|
|
1539
|
+
ye(De.FmMenuItem, {
|
|
1539
1540
|
label: "Transaction details",
|
|
1540
1541
|
onClick: async (t) => {
|
|
1541
1542
|
t.stopPropagation(), await u(n.row.original._id);
|
|
@@ -1546,7 +1547,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1546
1547
|
);
|
|
1547
1548
|
}
|
|
1548
1549
|
}
|
|
1549
|
-
], { tableMeta: Y, rowData: w, onSort: l, debouncedFetchData: C, onSearch: W } =
|
|
1550
|
+
], { tableMeta: Y, rowData: w, onSort: l, debouncedFetchData: C, onSearch: W } = Qt(ue.read), R = ce(), q = ce(!1), j = ce();
|
|
1550
1551
|
async function z() {
|
|
1551
1552
|
j.value = await ue.readById(
|
|
1552
1553
|
j.value._id.toString()
|
|
@@ -1557,11 +1558,11 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1557
1558
|
}
|
|
1558
1559
|
async function u(n) {
|
|
1559
1560
|
await S.push({
|
|
1560
|
-
name:
|
|
1561
|
+
name: rn["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
1561
1562
|
params: { id: n }
|
|
1562
1563
|
});
|
|
1563
1564
|
}
|
|
1564
|
-
const
|
|
1565
|
+
const I = {
|
|
1565
1566
|
sortBy: "_id",
|
|
1566
1567
|
descending: !1,
|
|
1567
1568
|
rowsPerPage: 1e3,
|
|
@@ -1573,25 +1574,25 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1573
1574
|
return t.isValid() ? t.format("DD/MM/YYYY") : "";
|
|
1574
1575
|
}
|
|
1575
1576
|
async function v() {
|
|
1576
|
-
const n = new
|
|
1577
|
+
const n = new on(), t = (await ue.read({
|
|
1577
1578
|
limit: 1,
|
|
1578
1579
|
skip: 0,
|
|
1579
|
-
sortBy:
|
|
1580
|
-
descending:
|
|
1581
|
-
})).meta.totalResources ?? 0, o =
|
|
1580
|
+
sortBy: I.sortBy,
|
|
1581
|
+
descending: I.descending
|
|
1582
|
+
})).meta.totalResources ?? 0, o = I.rowsPerPage;
|
|
1582
1583
|
await K(
|
|
1583
1584
|
async () => {
|
|
1584
|
-
var e, d, h, b, B, P, X, p,
|
|
1585
|
+
var e, d, h, b, B, P, X, p, V, T, $, Z, oe, ee, H, O, Ie, Ve, we, k, he, Se, Ee, Ae, $e, Re, ke;
|
|
1585
1586
|
for (let de = 0; de < t; de += o) {
|
|
1586
1587
|
const ze = {
|
|
1587
|
-
...
|
|
1588
|
+
...I,
|
|
1588
1589
|
limit: o,
|
|
1589
|
-
skip:
|
|
1590
|
-
sortBy:
|
|
1591
|
-
descending:
|
|
1590
|
+
skip: I.page - 1,
|
|
1591
|
+
sortBy: I.sortBy,
|
|
1592
|
+
descending: I.descending
|
|
1592
1593
|
}, me = await ue.read(ze);
|
|
1593
1594
|
for (const f of me.resources) {
|
|
1594
|
-
const Ke = (e =
|
|
1595
|
+
const Ke = (e = sn.parseOneAddress(
|
|
1595
1596
|
f == null ? void 0 : f.email
|
|
1596
1597
|
)) != null && e.domain.includes("feedmepos.com") ? void 0 : f.email, Le = (h = ((d = f == null ? void 0 : f.collection) == null ? void 0 : d.TITLE) || []) == null ? void 0 : h.reduce(
|
|
1597
1598
|
(te, ie) => {
|
|
@@ -1611,7 +1612,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1611
1612
|
return te[ie.name] = be ? M(be).format("DD/MM/YYYY") : "", te;
|
|
1612
1613
|
},
|
|
1613
1614
|
{}
|
|
1614
|
-
), Be = ((P = (B = (b = f.collection) == null ? void 0 : b.CREDIT) == null ? void 0 : B.at(0)) == null ? void 0 : P.balance) || 0, Fe = ((T = (
|
|
1615
|
+
), Be = ((P = (B = (b = f.collection) == null ? void 0 : b.CREDIT) == null ? void 0 : B.at(0)) == null ? void 0 : P.balance) || 0, Fe = ((T = (V = (p = (X = f.collection) == null ? void 0 : X.CREDIT) == null ? void 0 : p.at(0)) == null ? void 0 : V.expiryBalance) == null ? void 0 : T.reduce(
|
|
1615
1616
|
(te, ie) => te + ie.amount,
|
|
1616
1617
|
0
|
|
1617
1618
|
)) || 0, pe = qe(Be, 2), Ge = {
|
|
@@ -1626,13 +1627,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1626
1627
|
FreeCredit: Number(Fe.toFixed(2)),
|
|
1627
1628
|
TotalCredit: Number(pe),
|
|
1628
1629
|
Exp: f != null && f.collection ? ((H = (ee = (oe = f.collection) == null ? void 0 : oe.POINT) == null ? void 0 : ee.at(0)) == null ? void 0 : H.balance) ?? 0 : 0,
|
|
1629
|
-
Point: f != null && f.collection ? ((
|
|
1630
|
+
Point: f != null && f.collection ? ((Ve = (Ie = (O = f.collection) == null ? void 0 : O.COIN) == null ? void 0 : Ie.at(0)) == null ? void 0 : Ve.balance) ?? 0 : 0,
|
|
1630
1631
|
Level: f != null && f.collection ? ((he = (k = (we = f.collection) == null ? void 0 : we.TIER) == null ? void 0 : k.at(0)) == null ? void 0 : he.balance) ?? 0 : 0,
|
|
1631
1632
|
Tier: f != null && f.collection ? ((Ae = (Ee = (Se = f.collection) == null ? void 0 : Se.TIER) == null ? void 0 : Ee.at(0)) == null ? void 0 : Ae.balance) ?? 0 : 0,
|
|
1632
1633
|
Titles: Le.join(","),
|
|
1633
1634
|
...Pe,
|
|
1634
1635
|
TotalTransaction: f.stats.visitCount,
|
|
1635
|
-
AvgSpent:
|
|
1636
|
+
AvgSpent: Jt(Number(f.stats.avgBillSize || 0)).toFormat(
|
|
1636
1637
|
!1
|
|
1637
1638
|
),
|
|
1638
1639
|
TotalSpent: f.stats.avgBillSize * f.stats.visitCount,
|
|
@@ -1647,7 +1648,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1647
1648
|
};
|
|
1648
1649
|
n.addRecord(Ge);
|
|
1649
1650
|
}
|
|
1650
|
-
|
|
1651
|
+
I.page++;
|
|
1651
1652
|
}
|
|
1652
1653
|
await Yt(
|
|
1653
1654
|
n.buildExcel(),
|
|
@@ -1657,7 +1658,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1657
1658
|
bookSST: !1,
|
|
1658
1659
|
type: "array"
|
|
1659
1660
|
}
|
|
1660
|
-
),
|
|
1661
|
+
), I.page = 1;
|
|
1661
1662
|
},
|
|
1662
1663
|
{
|
|
1663
1664
|
message: "Exporting member...",
|
|
@@ -1670,8 +1671,8 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1670
1671
|
}), (n, t) => {
|
|
1671
1672
|
const o = U("FmSearch"), e = U("FmButton"), d = U("FmSnackbar");
|
|
1672
1673
|
return A(), Q("div", null, [
|
|
1673
|
-
m("div",
|
|
1674
|
-
|
|
1674
|
+
m("div", Jn, [
|
|
1675
|
+
D(o, {
|
|
1675
1676
|
class: "mt-4",
|
|
1676
1677
|
modelValue: s(Y).searchValue,
|
|
1677
1678
|
"onUpdate:modelValue": [
|
|
@@ -1681,13 +1682,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1681
1682
|
placeholder: "Search",
|
|
1682
1683
|
collapsible: ""
|
|
1683
1684
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1684
|
-
|
|
1685
|
+
D(e, {
|
|
1685
1686
|
icon: "ios_share",
|
|
1686
1687
|
variant: "tertiary",
|
|
1687
1688
|
onClick: v
|
|
1688
1689
|
})
|
|
1689
1690
|
]),
|
|
1690
|
-
dt(
|
|
1691
|
+
dt(D(d, {
|
|
1691
1692
|
"z-index": 0,
|
|
1692
1693
|
class: "!max-w-full my-16",
|
|
1693
1694
|
title: "Info",
|
|
@@ -1700,7 +1701,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1700
1701
|
}, null, 512), [
|
|
1701
1702
|
[mt, s(q)]
|
|
1702
1703
|
]),
|
|
1703
|
-
|
|
1704
|
+
D(Xt, {
|
|
1704
1705
|
loading: s(Y).isLoading,
|
|
1705
1706
|
"row-data": s(w),
|
|
1706
1707
|
"row-count": s(Y).totalRows,
|
|
@@ -1716,7 +1717,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1716
1717
|
j.value = h.original, (b = s(R)) == null || b.showSheet();
|
|
1717
1718
|
})
|
|
1718
1719
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1719
|
-
s(j) ? (A(), re(
|
|
1720
|
+
s(j) ? (A(), re(Hn, {
|
|
1720
1721
|
key: 0,
|
|
1721
1722
|
ref_key: "sheetRef",
|
|
1722
1723
|
ref: R,
|
|
@@ -1728,5 +1729,5 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = { key:
|
|
|
1728
1729
|
}
|
|
1729
1730
|
});
|
|
1730
1731
|
export {
|
|
1731
|
-
|
|
1732
|
+
Fr as default
|
|
1732
1733
|
};
|