@feedmepos/mf-connect 0.0.38-prod → 0.0.39-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-DiPv4lpi.js → Analytic-DMFueUju.js} +7 -7
- package/dist/{App-G2hYsetm.js → App-X3fNEBF3.js} +5 -5
- package/dist/{Broadcast-2RMKz0rq.js → Broadcast-YIfWIXeA.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DDLvGIHN.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CRYS_tzZ.js} +8 -8
- package/dist/{Card-CuYU88SG.js → Card-BIxlgQm7.js} +65 -65
- package/dist/{Collections-BFqfMiu9.js → Collections-M6DaHM2W.js} +4 -4
- package/dist/{Credit-sE7NWAcB.js → Credit-BtRy-xoY.js} +7 -7
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-D51S1TJe.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DoZyevfa.js} +21 -21
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-P5ZX8bEv.js → EffectSheet.vue_vue_type_style_index_0_lang-D5DNTBSQ.js} +5 -5
- package/dist/{Experience-BC4PY4WP.js → Experience-DGm1lnqj.js} +7 -7
- package/dist/{Game-DigOp_ED.js → Game-B8-lG7qq.js} +7 -7
- package/dist/{Marketing-CvHkjSHV.js → Marketing-DtG3AIWr.js} +4 -4
- package/dist/{Member-B62kMsOC.js → Member-K443-9Vy.js} +3 -3
- package/dist/{MemberList-DtudvJZN.js → MemberList-CYXHXFTL.js} +157 -156
- package/dist/{MemberTransactions-IQB4RuTX.js → MemberTransactions-DueaXBCy.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-tf8BoLeB.js → MessageInput.vue_vue_type_script_setup_true_lang-Bk2HLVmt.js} +2 -2
- package/dist/{Mission-BBR658y4.js → Mission-CN5umXXA.js} +7 -7
- package/dist/{Point-CzQaGWAJ.js → Point-XAm6H2p_.js} +7 -7
- package/dist/{Promotion-CQ2ZJlz0.js → Promotion-DsrA4KiE.js} +8 -8
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-BPY9uGdh.js → RuleGroup.vue_vue_type_script_setup_true_lang-_RX1J0Br.js} +14 -14
- package/dist/{Segment-D1KmHL13.js → Segment-CZGGHoAu.js} +7 -7
- package/dist/{Setting-DoQjSSBY.js → Setting-BjfxLKyp.js} +7 -7
- package/dist/{Store-BswP8VFn.js → Store-D_B-vhh3.js} +11 -11
- package/dist/{StoreRewards-B0ptduFD.js → StoreRewards-BjHffUKj.js} +10 -10
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CSd_fhBv.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CLFiuO5k.js} +9 -9
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CMXL8iJM.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CoMQBL4P.js} +1 -1
- package/dist/{Tier-_d_85vU4.js → Tier-CftEoP_R.js} +13 -13
- package/dist/{Title-Bv0kV0YZ.js → Title-BsavXbYh.js} +245 -244
- package/dist/{Transaction-C6eldjGm.js → Transaction-CdxzoKDG.js} +1 -1
- package/dist/{Voucher-CZFwv0lf.js → Voucher-B_9Nv1Mr.js} +10 -10
- package/dist/{app-Dy_DZ6AF.js → app--1Ks5Hms.js} +24 -24
- package/dist/{app-BoI4UuqB.js → app-BNmAx3zq.js} +2 -2
- package/dist/app.js +1 -1
- package/dist/{business-Cg3ywZho.js → business-DGL4Ayx0.js} +1 -1
- package/dist/{campaign-D26h9gJj.js → campaign-D94sS1kM.js} +2 -2
- package/dist/{collection.fn-WTvCMcti.js → collection.fn-BHJ1ISqO.js} +2 -2
- package/dist/{dto-Dn6sbWaP.js → dto-X0Eeujxx.js} +41 -41
- package/dist/{effect-D2B5MLph.js → effect-CFRICzlM.js} +1 -1
- package/dist/{export-CouPSQjb.js → export-w2o9NYcy.js} +3 -3
- package/dist/{helper-BXUxMixo.js → helper-CUDWQ8vq.js} +1 -1
- package/dist/{index-Dm2S2ymV.js → index-BGuLhEym.js} +2 -2
- package/dist/{index-CpVSB8sN.js → index-BPEV5Tzg.js} +5 -5
- package/dist/{index-Cq0BKkCJ.js → index-BPNG8N-w.js} +1 -1
- package/dist/{index-BALUtQny.js → index-BQ6isIeo.js} +1 -1
- package/dist/{index-B2AFfJRZ.js → index-BcWJcD9f.js} +1 -1
- package/dist/{index--DusHwVD.js → index-BjwyxNSp.js} +1 -1
- package/dist/{index-bvQE3qgC.js → index-CFMBSL24.js} +2 -2
- package/dist/{index-D9WHWglp.js → index-CpwFQFTV.js} +3 -3
- package/dist/{index-Bdo76FfU.js → index-DIq2KVis.js} +1 -1
- package/dist/{index-Bm1BTabR.js → index-DWM9MWGj.js} +3 -3
- package/dist/{index-B1FmgLrH.js → index-VjUw31dN.js} +1 -1
- package/dist/{index-B2k-pzX0.js → index-tZ1aqhks.js} +5 -5
- package/dist/{index.esm2017-suPTDhZ_.js → index.esm2017-zciuPty-.js} +1 -1
- package/dist/{loading-B0BlfmLv.js → loading-GuXe5bYG.js} +4 -4
- package/dist/{membership-CDCTl2DR.js → membership-BHWJVI3e.js} +3 -3
- package/dist/{money-CLopI7wF.js → money-CrttVpCp.js} +1 -1
- package/dist/{number-BSyUs7E_.js → number-CIndGU4O.js} +1 -1
- package/dist/{rule-CrtZHP-I.js → rule-MgNa_8FF.js} +2 -2
- package/dist/{rule-builder-CtJTsNwZ.js → rule-builder-BsBCWzq_.js} +1 -1
- package/dist/{template-B0QjF3Pc.js → template-D6k3lusq.js} +4 -4
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/{xlsx-CSr_vw9x.js → xlsx-ClrA4KOh.js} +1 -1
- package/package.json +2 -2
|
@@ -3,28 +3,29 @@ var Ot = (_, V, x) => V in _ ? Pt(_, V, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var ot = (_, V, x) => Ot(_, typeof V != "symbol" ? V + "" : V, x);
|
|
4
4
|
import { defineComponent as je, computed as ne, ref as ue, resolveComponent as U, openBlock as A, createElementBlock as H, Fragment as me, createElementVNode as f, unref as s, createBlock as re, createCommentVNode as xe, createVNode as $, renderList as Te, withCtx as ge, createTextVNode as ct, toDisplayString as W, withDirectives as ut, vShow as dt, onMounted as mt, isRef as Bt, h as ye } from "vue";
|
|
5
5
|
import { h as M } from "./moment-BWErdI6_.js";
|
|
6
|
-
import { useDialog as Xe, components as
|
|
6
|
+
import { useDialog as Xe, components as De } from "@feedmepos/ui-library";
|
|
7
7
|
import { g as Ut } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
8
|
-
import { u as Je, w as Yt } from "./xlsx-
|
|
9
|
-
import "./index-
|
|
10
|
-
import { p as it, b as at, u as ft } from "./loading-
|
|
11
|
-
import { u as Ze, C as st, s as qt } from "./membership-
|
|
12
|
-
import { c as jt } from "./index-
|
|
8
|
+
import { u as Je, w as Yt } from "./xlsx-ClrA4KOh.js";
|
|
9
|
+
import "./index-BPNG8N-w.js";
|
|
10
|
+
import { p as it, b as at, u as ft } from "./loading-GuXe5bYG.js";
|
|
11
|
+
import { u as Ze, C as st, s as qt } from "./membership-BHWJVI3e.js";
|
|
12
|
+
import { c as jt } from "./index-DWM9MWGj.js";
|
|
13
13
|
import { _ as lt } 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-CFMBSL24.js";
|
|
16
|
+
import { F as Wt } from "./index-CpwFQFTV.js";
|
|
17
|
+
import { C as Qe } from "./collection.fn-BHJ1ISqO.js";
|
|
18
|
+
import { defineStore as Ht } from "pinia";
|
|
19
|
+
import { u as pt } from "./business-DGL4Ayx0.js";
|
|
20
|
+
import { m as ce } from "./index-VjUw31dN.js";
|
|
20
21
|
import { o as bt } 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-CIndGU4O.js";
|
|
23
|
+
import { t as Jt } from "./money-CrttVpCp.js";
|
|
24
|
+
import { u as Qt, _ as Xt } from "./usePagination-JoYaROkV.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--1Ks5Hms.js";
|
|
28
|
+
class on {
|
|
28
29
|
constructor() {
|
|
29
30
|
ot(this, "data", []);
|
|
30
31
|
}
|
|
@@ -46,7 +47,7 @@ var vt = { exports: {} };
|
|
|
46
47
|
function z() {
|
|
47
48
|
return $e[Ce];
|
|
48
49
|
}
|
|
49
|
-
function
|
|
50
|
+
function D() {
|
|
50
51
|
return Ce;
|
|
51
52
|
}
|
|
52
53
|
function Y(r) {
|
|
@@ -91,7 +92,7 @@ var vt = { exports: {} };
|
|
|
91
92
|
var r = arguments;
|
|
92
93
|
return function() {
|
|
93
94
|
var a, m, y, N;
|
|
94
|
-
for (N =
|
|
95
|
+
for (N = D(), m = L("and"), a = 0; a < r.length; a += 1) {
|
|
95
96
|
if (y = r[a](), y === null)
|
|
96
97
|
return Y(N), null;
|
|
97
98
|
q(m, y);
|
|
@@ -103,7 +104,7 @@ var vt = { exports: {} };
|
|
|
103
104
|
var r = arguments;
|
|
104
105
|
return function() {
|
|
105
106
|
var a, m, y;
|
|
106
|
-
for (y =
|
|
107
|
+
for (y = D(), a = 0; a < r.length; a += 1) {
|
|
107
108
|
if (m = r[a](), m !== null)
|
|
108
109
|
return m;
|
|
109
110
|
Y(y);
|
|
@@ -114,7 +115,7 @@ var vt = { exports: {} };
|
|
|
114
115
|
function i(r) {
|
|
115
116
|
return function() {
|
|
116
117
|
var a, m;
|
|
117
|
-
return m =
|
|
118
|
+
return m = D(), a = r(), a !== null ? a : (Y(m), L("opt"));
|
|
118
119
|
};
|
|
119
120
|
}
|
|
120
121
|
function d(r) {
|
|
@@ -132,7 +133,7 @@ var vt = { exports: {} };
|
|
|
132
133
|
function v(r, t) {
|
|
133
134
|
return function() {
|
|
134
135
|
var m, y, N, le, rt;
|
|
135
|
-
for (le =
|
|
136
|
+
for (le = D(), m = L("star"), N = 0, rt = t === void 0 ? 0 : t; (y = r()) !== null; )
|
|
136
137
|
N = N + 1, q(m, y);
|
|
137
138
|
return N >= rt ? m : (Y(le), null);
|
|
138
139
|
};
|
|
@@ -149,7 +150,7 @@ var vt = { exports: {} };
|
|
|
149
150
|
function p() {
|
|
150
151
|
return c("crlf", n(Q, E)());
|
|
151
152
|
}
|
|
152
|
-
function
|
|
153
|
+
function I() {
|
|
153
154
|
return c("dquote", e('"')());
|
|
154
155
|
}
|
|
155
156
|
function F() {
|
|
@@ -193,7 +194,7 @@ var vt = { exports: {} };
|
|
|
193
194
|
)
|
|
194
195
|
)());
|
|
195
196
|
}
|
|
196
|
-
function
|
|
197
|
+
function Ie() {
|
|
197
198
|
return c("ctext", o(
|
|
198
199
|
function() {
|
|
199
200
|
return g(function(a) {
|
|
@@ -205,7 +206,7 @@ var vt = { exports: {} };
|
|
|
205
206
|
)());
|
|
206
207
|
}
|
|
207
208
|
function Ve() {
|
|
208
|
-
return c("ccontent", o(
|
|
209
|
+
return c("ccontent", o(Ie, G, we)());
|
|
209
210
|
}
|
|
210
211
|
function we() {
|
|
211
212
|
return c("comment", n(
|
|
@@ -280,10 +281,10 @@ var vt = { exports: {} };
|
|
|
280
281
|
function ke() {
|
|
281
282
|
return c("quoted-string", n(
|
|
282
283
|
d(i(k)),
|
|
283
|
-
d(
|
|
284
|
+
d(I),
|
|
284
285
|
v(n(i(S(B)), Le)),
|
|
285
286
|
i(d(B)),
|
|
286
|
-
d(
|
|
287
|
+
d(I),
|
|
287
288
|
d(i(k))
|
|
288
289
|
)());
|
|
289
290
|
}
|
|
@@ -367,7 +368,7 @@ var vt = { exports: {} };
|
|
|
367
368
|
return l.rfc6532 && (y = y || P(a)), y;
|
|
368
369
|
});
|
|
369
370
|
},
|
|
370
|
-
|
|
371
|
+
Dt
|
|
371
372
|
)()
|
|
372
373
|
);
|
|
373
374
|
}
|
|
@@ -520,7 +521,7 @@ var vt = { exports: {} };
|
|
|
520
521
|
function $t() {
|
|
521
522
|
return l.strict ? null : c("obs-domain", n(_e, v(n(e("."), _e)))());
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function Dt() {
|
|
524
525
|
return l.strict ? null : c("obs-dtext", o(Ue, G)());
|
|
525
526
|
}
|
|
526
527
|
function Me(r, t) {
|
|
@@ -535,7 +536,7 @@ var vt = { exports: {} };
|
|
|
535
536
|
}
|
|
536
537
|
return null;
|
|
537
538
|
}
|
|
538
|
-
function
|
|
539
|
+
function It(r, t) {
|
|
539
540
|
var a, m, y, N;
|
|
540
541
|
if (t == null)
|
|
541
542
|
return null;
|
|
@@ -585,7 +586,7 @@ var vt = { exports: {} };
|
|
|
585
586
|
};
|
|
586
587
|
}
|
|
587
588
|
function tt(r) {
|
|
588
|
-
var t = Me("display-name", r), a = Me("addr-spec", r), m =
|
|
589
|
+
var t = Me("display-name", r), a = Me("addr-spec", r), m = It("cfws", r), y = We(["comment"], r), N = Me("local-part", a), le = Me("domain", a);
|
|
589
590
|
return {
|
|
590
591
|
node: r,
|
|
591
592
|
parts: {
|
|
@@ -686,7 +687,7 @@ var vt = { exports: {} };
|
|
|
686
687
|
function z(L) {
|
|
687
688
|
return Object.prototype.toString.call(L) === "[object String]";
|
|
688
689
|
}
|
|
689
|
-
function
|
|
690
|
+
function D(L) {
|
|
690
691
|
return L === Object(L);
|
|
691
692
|
}
|
|
692
693
|
function Y(L) {
|
|
@@ -695,7 +696,7 @@ var vt = { exports: {} };
|
|
|
695
696
|
var X, j;
|
|
696
697
|
if (z(l))
|
|
697
698
|
l = { input: l };
|
|
698
|
-
else if (!
|
|
699
|
+
else if (!D(l))
|
|
699
700
|
return null;
|
|
700
701
|
if (!z(l.input) || !T)
|
|
701
702
|
return null;
|
|
@@ -718,14 +719,14 @@ var vt = { exports: {} };
|
|
|
718
719
|
x.parseOneAddress = C, x.parseAddressList = K, x.parseFrom = h, x.parseSender = R, x.parseReplyTo = J, _.exports = x;
|
|
719
720
|
})();
|
|
720
721
|
})(vt);
|
|
721
|
-
var
|
|
722
|
-
const
|
|
722
|
+
var an = vt.exports;
|
|
723
|
+
const sn = /* @__PURE__ */ Ut(an), ln = { class: "flex flex-col" }, cn = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1), un = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1), dn = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1), mn = { key: 1 }, fn = /* @__PURE__ */ f("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
723
724
|
/* @__PURE__ */ f("div", { class: "flex-1" }, "Title"),
|
|
724
725
|
/* @__PURE__ */ f("div", { class: "flex-1" }, "Expires in days"),
|
|
725
726
|
/* @__PURE__ */ f("div", { class: "w-24 h-1" })
|
|
726
|
-
], -1),
|
|
727
|
-
|
|
728
|
-
],
|
|
727
|
+
], -1), pn = [
|
|
728
|
+
fn
|
|
729
|
+
], bn = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, vn = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, yn = /* @__PURE__ */ je({
|
|
729
730
|
__name: "MemberStatsDialog",
|
|
730
731
|
props: {
|
|
731
732
|
member: {
|
|
@@ -804,10 +805,10 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
804
805
|
return (u = K.value.find((e) => e._id === g)) == null ? void 0 : u.expiresIn;
|
|
805
806
|
}
|
|
806
807
|
const z = ne(() => {
|
|
807
|
-
const g =
|
|
808
|
+
const g = Wt.safeParse(h.value);
|
|
808
809
|
return g.success ? void 0 : g.error.errors;
|
|
809
810
|
});
|
|
810
|
-
function
|
|
811
|
+
function D(g) {
|
|
811
812
|
var u, e;
|
|
812
813
|
return (e = (u = z.value) == null ? void 0 : u.find((n) => n.path.join(".") === g)) == null ? void 0 : e.message;
|
|
813
814
|
}
|
|
@@ -822,8 +823,8 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
822
823
|
var P, Q;
|
|
823
824
|
const e = U("FmSelect"), n = U("FmStepperField"), o = U("FmTextField"), i = U("FmField"), d = U("FmFormGroup"), S = U("FmButton"), v = U("FmHelperText"), O = U("FmSpacer");
|
|
824
825
|
return A(), H(me, null, [
|
|
825
|
-
f("div",
|
|
826
|
-
|
|
826
|
+
f("div", ln, [
|
|
827
|
+
cn,
|
|
827
828
|
s(J).length ? (A(), re(e, {
|
|
828
829
|
key: 0,
|
|
829
830
|
modelValue: s(h).tier,
|
|
@@ -833,29 +834,29 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
833
834
|
],
|
|
834
835
|
label: "Member Tier",
|
|
835
836
|
items: s(J),
|
|
836
|
-
"helper-text":
|
|
837
|
-
"helper-state":
|
|
837
|
+
"helper-text": D("tier"),
|
|
838
|
+
"helper-state": D("tier") ? "error" : void 0
|
|
838
839
|
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : xe("", !0),
|
|
839
840
|
$(n, {
|
|
840
841
|
"model-value": s(h).experience ?? 0,
|
|
841
842
|
"onUpdate:modelValue": u[1] || (u[1] = (p) => s(h).experience = p),
|
|
842
843
|
label: "Member Experience",
|
|
843
844
|
"max-fraction-digits": 0,
|
|
844
|
-
"helper-text":
|
|
845
|
-
"helper-state":
|
|
845
|
+
"helper-text": D("experience"),
|
|
846
|
+
"helper-state": D("experience") ? "error" : void 0
|
|
846
847
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
847
|
-
|
|
848
|
+
un,
|
|
848
849
|
$(o, {
|
|
849
850
|
modelValue: s(h).cardNo,
|
|
850
851
|
"onUpdate:modelValue": u[2] || (u[2] = (p) => s(h).cardNo = p),
|
|
851
852
|
label: "Card number",
|
|
852
|
-
"helper-text":
|
|
853
|
-
"helper-state":
|
|
853
|
+
"helper-text": D("cardNo"),
|
|
854
|
+
"helper-state": D("cardNo") ? "error" : void 0
|
|
854
855
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
855
|
-
|
|
856
|
-
(P = s(h).titles) != null && P.length ? (A(), H("div",
|
|
857
|
-
(A(!0), H(me, null, Te(s(h).titles ?? [], (p,
|
|
858
|
-
f("div",
|
|
856
|
+
dn,
|
|
857
|
+
(P = s(h).titles) != null && P.length ? (A(), H("div", mn, pn)) : xe("", !0),
|
|
858
|
+
(A(!0), H(me, null, Te(s(h).titles ?? [], (p, I) => (A(), H("div", { key: I }, [
|
|
859
|
+
f("div", bn, [
|
|
859
860
|
s(K).some((F) => F._id === p.id) ? (A(), re(d, {
|
|
860
861
|
key: 1,
|
|
861
862
|
"model-value": "",
|
|
@@ -901,11 +902,11 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
901
902
|
variant: "tertiary",
|
|
902
903
|
onClick: (F) => {
|
|
903
904
|
var E;
|
|
904
|
-
return (E = s(h).titles) == null ? void 0 : E.splice(
|
|
905
|
+
return (E = s(h).titles) == null ? void 0 : E.splice(I, 1);
|
|
905
906
|
}
|
|
906
907
|
}, null, 8, ["onClick"])
|
|
907
908
|
]),
|
|
908
|
-
(A(!0), H(me, null, Te(Y(`titles.${
|
|
909
|
+
(A(!0), H(me, null, Te(Y(`titles.${I}`), (F, E) => (A(), re(v, {
|
|
909
910
|
key: E,
|
|
910
911
|
class: "items-center",
|
|
911
912
|
state: "error",
|
|
@@ -918,23 +919,23 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
918
919
|
label: "Give title",
|
|
919
920
|
variant: "plain",
|
|
920
921
|
onClick: u[3] || (u[3] = (p) => {
|
|
921
|
-
var
|
|
922
|
+
var I;
|
|
922
923
|
return s(h).titles = [
|
|
923
924
|
...s(h).titles ?? [],
|
|
924
925
|
{
|
|
925
|
-
id: ((
|
|
926
|
+
id: ((I = s(R).find(
|
|
926
927
|
(F) => {
|
|
927
928
|
var E;
|
|
928
929
|
return !((E = s(h).titles) != null && E.map((Z) => Z.id).includes(F.value));
|
|
929
930
|
}
|
|
930
|
-
)) == null ? void 0 :
|
|
931
|
+
)) == null ? void 0 : I.value) || s(R)[0].value,
|
|
931
932
|
expiredAt: 0
|
|
932
933
|
}
|
|
933
934
|
];
|
|
934
935
|
})
|
|
935
936
|
})) : xe("", !0)
|
|
936
937
|
]),
|
|
937
|
-
f("div",
|
|
938
|
+
f("div", vn, [
|
|
938
939
|
ut($(v, {
|
|
939
940
|
state: "warning",
|
|
940
941
|
text: "Updating member will cause tier to change"
|
|
@@ -959,7 +960,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
959
960
|
], 64);
|
|
960
961
|
};
|
|
961
962
|
}
|
|
962
|
-
}),
|
|
963
|
+
}), gn = { class: "fm-typo-en-title-sm-800" }, xn = { class: "space-y-16" }, hn = { class: "flex flex-nowrap gap-8 items-center justify-end pt-24 w-full" }, _n = /* @__PURE__ */ je({
|
|
963
964
|
__name: "CreditCoinDialog",
|
|
964
965
|
props: {
|
|
965
966
|
type: { type: String, required: !0 },
|
|
@@ -994,17 +995,17 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
994
995
|
});
|
|
995
996
|
}
|
|
996
997
|
const w = ne(() => {
|
|
997
|
-
const T = (x.action == "send" ?
|
|
998
|
+
const T = (x.action == "send" ? Kt : Gt).safeParse(C.value);
|
|
998
999
|
return T.success == !1 ? T.error.flatten().fieldErrors : void 0;
|
|
999
1000
|
});
|
|
1000
1001
|
return (l, T) => {
|
|
1001
|
-
const z = U("FmStepperField"),
|
|
1002
|
+
const z = U("FmStepperField"), D = U("FmSwitch"), Y = U("FmTextarea"), X = U("FmButton"), j = U("FmCard");
|
|
1002
1003
|
return A(), re(j, { class: "flex flex-col gap-16 p-16" }, {
|
|
1003
1004
|
default: ge(() => {
|
|
1004
1005
|
var L, c, q, g, u, e;
|
|
1005
1006
|
return [
|
|
1006
|
-
f("div",
|
|
1007
|
-
f("div",
|
|
1007
|
+
f("div", gn, W(x.action == "send" ? "Send" : "Deduct") + " " + W(s(st)[x.type.toUpperCase()].name), 1),
|
|
1008
|
+
f("div", xn, [
|
|
1008
1009
|
$(z, {
|
|
1009
1010
|
modelValue: s(C).amount,
|
|
1010
1011
|
"onUpdate:modelValue": T[0] || (T[0] = (n) => s(C).amount = n),
|
|
@@ -1014,7 +1015,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1014
1015
|
"helper-state": (L = s(w)) != null && L.amount ? "error" : void 0,
|
|
1015
1016
|
"helper-text": (q = (c = s(w)) == null ? void 0 : c.amount) == null ? void 0 : q[0]
|
|
1016
1017
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
1017
|
-
_.action === "send" && x.type === "coin" ? (A(), re(
|
|
1018
|
+
_.action === "send" && x.type === "coin" ? (A(), re(D, {
|
|
1018
1019
|
key: 0,
|
|
1019
1020
|
"model-value": s(K),
|
|
1020
1021
|
label: `${s(h)} expires`,
|
|
@@ -1038,7 +1039,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1038
1039
|
label: "Remark"
|
|
1039
1040
|
}, null, 8, ["modelValue"])
|
|
1040
1041
|
]),
|
|
1041
|
-
f("div",
|
|
1042
|
+
f("div", hn, [
|
|
1042
1043
|
$(X, {
|
|
1043
1044
|
variant: "secondary",
|
|
1044
1045
|
label: "Cancel",
|
|
@@ -1059,7 +1060,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1059
1060
|
});
|
|
1060
1061
|
};
|
|
1061
1062
|
}
|
|
1062
|
-
}), yt =
|
|
1063
|
+
}), yt = Ht("segment", () => {
|
|
1063
1064
|
const _ = ue([]);
|
|
1064
1065
|
async function V() {
|
|
1065
1066
|
const x = await qt.readAll({
|
|
@@ -1074,19 +1075,19 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1074
1075
|
segments: _,
|
|
1075
1076
|
read: V
|
|
1076
1077
|
};
|
|
1077
|
-
}),
|
|
1078
|
+
}), Sn = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, Fn = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800" }, "Profile Information", -1), Cn = { class: "space-y-16" }, Tn = { class: "flex gap-16 items-center" }, wn = { class: "flex-auto" }, An = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Member Name ", -1), kn = { class: "fm-typo-en-body-md-600" }, Nn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $n = { class: "fm-typo-en-body-md-800" }, Dn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, In = { class: "fm-typo-en-body-md-600" }, Vn = /* @__PURE__ */ f("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1), En = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800" }, "Activities", -1), Rn = { class: "gap-16 grid grid-cols-2" }, Ln = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pn = { class: "fm-typo-en-body-md-600" }, On = /* @__PURE__ */ f("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1), Bn = { class: "space-y-8" }, Un = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1), Yn = {
|
|
1078
1079
|
key: 0,
|
|
1079
1080
|
class: "space-x-8"
|
|
1080
|
-
},
|
|
1081
|
+
}, qn = {
|
|
1081
1082
|
key: 1,
|
|
1082
1083
|
class: "text-fm-color-typo-secondary"
|
|
1083
|
-
},
|
|
1084
|
+
}, jn = /* @__PURE__ */ f("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1), zn = { class: "space-y-8" }, Kn = /* @__PURE__ */ f("div", { class: "fm-typo-en-title-sm-800" }, "Title badge", -1), Gn = ["src"], Wn = { class: "fm-typo-en-body-md-600" }, Hn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Jn = {
|
|
1084
1085
|
key: 1,
|
|
1085
1086
|
class: "text-fm-color-typo-secondary"
|
|
1086
|
-
},
|
|
1087
|
+
}, Qn = {
|
|
1087
1088
|
key: 1,
|
|
1088
1089
|
class: "space-y-24"
|
|
1089
|
-
},
|
|
1090
|
+
}, Xn = { class: "space-y-8" }, Zn = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1), er = { class: "fm-typo-en-title-md-800" }, tr = { class: "space-y-4" }, nr = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1), rr = { class: "fm-typo-en-body-md-600" }, or = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, ir = { class: "space-y-8" }, ar = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1), sr = { class: "fm-typo-en-title-md-800" }, lr = { class: "space-y-4" }, cr = /* @__PURE__ */ f("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1), ur = { class: "fm-typo-en-body-md-600" }, dr = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, mr = /* @__PURE__ */ je({
|
|
1090
1091
|
__name: "MemberDetailSheet",
|
|
1091
1092
|
props: {
|
|
1092
1093
|
member: {
|
|
@@ -1103,10 +1104,10 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1103
1104
|
var i;
|
|
1104
1105
|
return ((i = h.segments.find((d) => d._id === o)) == null ? void 0 : i.name) || "";
|
|
1105
1106
|
}).filter(Boolean));
|
|
1106
|
-
async function
|
|
1107
|
+
async function D(o, i) {
|
|
1107
1108
|
R.open({
|
|
1108
1109
|
title: "",
|
|
1109
|
-
dialogComponent:
|
|
1110
|
+
dialogComponent: _n,
|
|
1110
1111
|
dialogComponentProps: {
|
|
1111
1112
|
type: o,
|
|
1112
1113
|
action: i,
|
|
@@ -1133,7 +1134,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1133
1134
|
async function Y() {
|
|
1134
1135
|
R.open({
|
|
1135
1136
|
title: "Update member statistics",
|
|
1136
|
-
contentComponent:
|
|
1137
|
+
contentComponent: yn,
|
|
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 = /* @__P
|
|
|
1158
1159
|
{
|
|
1159
1160
|
label: "Tier",
|
|
1160
1161
|
getter: (o) => {
|
|
1161
|
-
var P, Q, p,
|
|
1162
|
-
const i = (((Q = lt.first((P = w.member.collection) == null ? void 0 : P.TIER)) == null ? void 0 : Q.balance) || 0) - 1, d = L.value.name, S = ((
|
|
1162
|
+
var P, Q, p, I, F;
|
|
1163
|
+
const i = (((Q = lt.first((P = w.member.collection) == null ? void 0 : P.TIER)) == null ? void 0 : Q.balance) || 0) - 1, d = L.value.name, S = ((I = (p = o.collection) == null ? void 0 : p.POINT) == null ? void 0 : I[0].balance) ?? 0, v = C.sortedTiers[i + 1], O = ((F = v == null ? void 0 : v.option) == null ? void 0 : F.to) ?? 1 / 0;
|
|
1163
1164
|
return `${d} (${S}/${O})`;
|
|
1164
1165
|
}
|
|
1165
1166
|
},
|
|
@@ -1266,27 +1267,27 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1266
1267
|
}, {
|
|
1267
1268
|
"side-sheet-footer": ge(() => []),
|
|
1268
1269
|
default: ge(() => [
|
|
1269
|
-
f("div",
|
|
1270
|
+
f("div", Sn, [
|
|
1270
1271
|
$(d, {
|
|
1271
1272
|
"model-value": s(n).value,
|
|
1272
1273
|
items: e,
|
|
1273
|
-
"onUpdate:modelValue": i[0] || (i[0] = (p) => n.value = e.find((
|
|
1274
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => n.value = e.find((I) => I.value === p))
|
|
1274
1275
|
}, null, 8, ["model-value"]),
|
|
1275
1276
|
s(n).value == "overview" ? (A(), H(me, { key: 0 }, [
|
|
1276
|
-
|
|
1277
|
-
f("div",
|
|
1278
|
-
f("div",
|
|
1277
|
+
Fn,
|
|
1278
|
+
f("div", Cn, [
|
|
1279
|
+
f("div", Tn, [
|
|
1279
1280
|
$(S, {
|
|
1280
1281
|
name: _.member.photoUrl ? void 0 : _.member.name,
|
|
1281
1282
|
src: _.member.photoUrl || void 0
|
|
1282
1283
|
}, null, 8, ["name", "src"]),
|
|
1283
|
-
f("div",
|
|
1284
|
-
|
|
1285
|
-
f("div",
|
|
1286
|
-
f("div",
|
|
1287
|
-
f("div",
|
|
1284
|
+
f("div", wn, [
|
|
1285
|
+
An,
|
|
1286
|
+
f("div", kn, W(_.member.name), 1),
|
|
1287
|
+
f("div", Nn, W(_.member._id), 1),
|
|
1288
|
+
f("div", Mn, [
|
|
1288
1289
|
ct(" Member Card: "),
|
|
1289
|
-
f("span",
|
|
1290
|
+
f("span", $n, W(_.member.cardNo ? _.member.cardNo : "-"), 1)
|
|
1290
1291
|
])
|
|
1291
1292
|
]),
|
|
1292
1293
|
$(v, {
|
|
@@ -1295,78 +1296,78 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1295
1296
|
onClick: Y
|
|
1296
1297
|
})
|
|
1297
1298
|
]),
|
|
1298
|
-
(A(), H(me, null, Te(X, (p,
|
|
1299
|
-
f("div",
|
|
1299
|
+
(A(), H(me, null, Te(X, (p, I) => f("div", { key: I }, [
|
|
1300
|
+
f("div", Dn, W(p.label), 1),
|
|
1300
1301
|
f("div", In, W(p.key ? _.member[p.key] : p.getter(_.member)), 1)
|
|
1301
1302
|
])), 64))
|
|
1302
1303
|
]),
|
|
1303
|
-
Dn,
|
|
1304
1304
|
Vn,
|
|
1305
|
-
|
|
1305
|
+
En,
|
|
1306
|
+
f("div", Rn, [
|
|
1306
1307
|
(A(), H(me, null, Te(j, (p) => f("div", {
|
|
1307
1308
|
key: p.key
|
|
1308
1309
|
}, [
|
|
1309
|
-
f("div",
|
|
1310
|
-
f("div",
|
|
1310
|
+
f("div", Ln, W(p.label), 1),
|
|
1311
|
+
f("div", Pn, W(p.key ? w.member.stats[p.key] || "-" : p.getter(_.member)), 1)
|
|
1311
1312
|
])), 64))
|
|
1312
1313
|
]),
|
|
1313
|
-
|
|
1314
|
-
f("div",
|
|
1315
|
-
|
|
1316
|
-
s(z).length ? (A(), H("div",
|
|
1314
|
+
On,
|
|
1315
|
+
f("div", Bn, [
|
|
1316
|
+
Un,
|
|
1317
|
+
s(z).length ? (A(), H("div", Yn, [
|
|
1317
1318
|
(A(!0), H(me, null, Te(s(z), (p) => (A(), re(O, {
|
|
1318
1319
|
label: p.toString()
|
|
1319
1320
|
}, null, 8, ["label"]))), 256))
|
|
1320
|
-
])) : (A(), H("div",
|
|
1321
|
+
])) : (A(), H("div", qn, "No titles"))
|
|
1321
1322
|
]),
|
|
1322
|
-
|
|
1323
|
-
f("div",
|
|
1324
|
-
|
|
1323
|
+
jn,
|
|
1324
|
+
f("div", zn, [
|
|
1325
|
+
Kn,
|
|
1325
1326
|
s(c).length ? (A(!0), H(me, { key: 0 }, Te(s(c).filter((p) => p.collectible), (p) => (A(), H("div", {
|
|
1326
1327
|
class: "flex items-center gap-x-8 h-48",
|
|
1327
1328
|
key: p.name
|
|
1328
1329
|
}, [
|
|
1329
1330
|
f("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, Gn),
|
|
1333
1334
|
f("div", null, [
|
|
1334
|
-
f("div",
|
|
1335
|
-
f("div",
|
|
1335
|
+
f("div", Wn, W(p.name), 1),
|
|
1336
|
+
f("div", Hn, " Expired on " + W(s(M)(p.expiredAt).format("MMM D, Y")), 1)
|
|
1336
1337
|
])
|
|
1337
|
-
]))), 128)) : (A(), H("div",
|
|
1338
|
+
]))), 128)) : (A(), H("div", Jn, "No titles"))
|
|
1338
1339
|
])
|
|
1339
|
-
], 64)) : s(n).value == "loyalty" ? (A(), H("div",
|
|
1340
|
+
], 64)) : s(n).value == "loyalty" ? (A(), H("div", Qn, [
|
|
1340
1341
|
$(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, I, F, E, Z, oe, ee;
|
|
1346
1347
|
return [
|
|
1347
|
-
f("div",
|
|
1348
|
-
|
|
1349
|
-
f("div",
|
|
1348
|
+
f("div", Xn, [
|
|
1349
|
+
Zn,
|
|
1350
|
+
f("div", er, W(((F = (I = (p = _.member.collection) == null ? void 0 : p.CREDIT) == null ? void 0 : I[0]) == null ? void 0 : F.balance) ?? 0), 1)
|
|
1350
1351
|
]),
|
|
1351
|
-
f("div",
|
|
1352
|
-
|
|
1353
|
-
f("div",
|
|
1352
|
+
f("div", tr, [
|
|
1353
|
+
nr,
|
|
1354
|
+
f("div", rr, W(((ee = (oe = (Z = (E = _.member.collection) == null ? void 0 : E.CREDIT) == null ? void 0 : Z[0]) == null ? void 0 : oe.expiryBalance) == null ? void 0 : ee.reduce(
|
|
1354
1355
|
(G, B) => B.expiredAt && s(M)(B.expiredAt).isAfter(s(M)()) && s(M)(B.expiredAt).isBefore(s(M)().add(30, "days")) ? G + B.amount : G,
|
|
1355
1356
|
0
|
|
1356
1357
|
)) ?? 0), 1)
|
|
1357
1358
|
]),
|
|
1358
|
-
f("div",
|
|
1359
|
+
f("div", or, [
|
|
1359
1360
|
$(v, {
|
|
1360
1361
|
label: "Add credit",
|
|
1361
1362
|
icon: "add",
|
|
1362
1363
|
variant: "plain",
|
|
1363
|
-
onClick: i[1] || (i[1] = (G) =>
|
|
1364
|
+
onClick: i[1] || (i[1] = (G) => D("credit", "send"))
|
|
1364
1365
|
}),
|
|
1365
1366
|
$(v, {
|
|
1366
1367
|
label: "Deduct credit",
|
|
1367
1368
|
icon: "remove",
|
|
1368
1369
|
variant: "plain",
|
|
1369
|
-
onClick: i[2] || (i[2] = (G) =>
|
|
1370
|
+
onClick: i[2] || (i[2] = (G) => D("credit", "deduct"))
|
|
1370
1371
|
})
|
|
1371
1372
|
])
|
|
1372
1373
|
];
|
|
@@ -1378,31 +1379,31 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1378
1379
|
variant: "outlined"
|
|
1379
1380
|
}, {
|
|
1380
1381
|
default: ge(() => {
|
|
1381
|
-
var p,
|
|
1382
|
+
var p, I, F, E, Z, oe, ee;
|
|
1382
1383
|
return [
|
|
1383
|
-
f("div",
|
|
1384
|
-
|
|
1385
|
-
f("div",
|
|
1384
|
+
f("div", ir, [
|
|
1385
|
+
ar,
|
|
1386
|
+
f("div", sr, W(((F = (I = (p = _.member.collection) == null ? void 0 : p.COIN) == null ? void 0 : I[0]) == null ? void 0 : F.balance) ?? 0), 1)
|
|
1386
1387
|
]),
|
|
1387
|
-
f("div",
|
|
1388
|
-
|
|
1389
|
-
f("div",
|
|
1388
|
+
f("div", lr, [
|
|
1389
|
+
cr,
|
|
1390
|
+
f("div", ur, W(((ee = (oe = (Z = (E = _.member.collection) == null ? void 0 : E.COIN) == null ? void 0 : Z[0]) == null ? void 0 : oe.expiryBalance) == null ? void 0 : ee.reduce(
|
|
1390
1391
|
(G, B) => B.expiredAt && s(M)(B.expiredAt).isAfter(s(M)()) && s(M)(B.expiredAt).isBefore(s(M)().add(30, "days")) ? G + B.amount : G,
|
|
1391
1392
|
0
|
|
1392
1393
|
)) ?? 0), 1)
|
|
1393
1394
|
]),
|
|
1394
|
-
f("div",
|
|
1395
|
+
f("div", dr, [
|
|
1395
1396
|
$(v, {
|
|
1396
1397
|
label: "Add point",
|
|
1397
1398
|
icon: "add",
|
|
1398
1399
|
variant: "plain",
|
|
1399
|
-
onClick: i[3] || (i[3] = (G) =>
|
|
1400
|
+
onClick: i[3] || (i[3] = (G) => D("coin", "send"))
|
|
1400
1401
|
}),
|
|
1401
1402
|
$(v, {
|
|
1402
1403
|
label: "Deduct point",
|
|
1403
1404
|
icon: "remove",
|
|
1404
1405
|
variant: "plain",
|
|
1405
|
-
onClick: i[4] || (i[4] = (G) =>
|
|
1406
|
+
onClick: i[4] || (i[4] = (G) => D("coin", "deduct"))
|
|
1406
1407
|
})
|
|
1407
1408
|
])
|
|
1408
1409
|
];
|
|
@@ -1416,18 +1417,18 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1416
1417
|
}, 8, ["modelValue"]);
|
|
1417
1418
|
};
|
|
1418
1419
|
}
|
|
1419
|
-
}),
|
|
1420
|
+
}), fr = { class: "flex items-center justify-end" }, Or = /* @__PURE__ */ je({
|
|
1420
1421
|
__name: "MemberList",
|
|
1421
1422
|
setup(_) {
|
|
1422
1423
|
const V = yt(), x = Ze();
|
|
1423
1424
|
pt();
|
|
1424
|
-
const { minor: C } = ft, K =
|
|
1425
|
+
const { minor: C } = ft, K = nn(), h = [
|
|
1425
1426
|
{
|
|
1426
1427
|
header: "Name",
|
|
1427
1428
|
enableSorting: !0,
|
|
1428
1429
|
accessorKey: "name",
|
|
1429
1430
|
cell(u) {
|
|
1430
|
-
return
|
|
1431
|
+
return Zt(u.row.original);
|
|
1431
1432
|
}
|
|
1432
1433
|
},
|
|
1433
1434
|
{
|
|
@@ -1441,7 +1442,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1441
1442
|
header: "Tier",
|
|
1442
1443
|
enableSorting: !0,
|
|
1443
1444
|
cell(u) {
|
|
1444
|
-
return
|
|
1445
|
+
return en(
|
|
1445
1446
|
u.row.original,
|
|
1446
1447
|
x.sortedTiers
|
|
1447
1448
|
);
|
|
@@ -1451,7 +1452,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1451
1452
|
header: "Title",
|
|
1452
1453
|
enableSorting: !1,
|
|
1453
1454
|
cell(u) {
|
|
1454
|
-
return
|
|
1455
|
+
return tn(
|
|
1455
1456
|
u.row.original,
|
|
1456
1457
|
x.sortedTitles
|
|
1457
1458
|
);
|
|
@@ -1512,13 +1513,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1512
1513
|
(e = u.row.original.stats) != null && e.lastVisit ? M((n = u.row.original.stats) == null ? void 0 : n.lastVisit).fromNow() : "NA"
|
|
1513
1514
|
),
|
|
1514
1515
|
ye(
|
|
1515
|
-
|
|
1516
|
+
De.FmTooltip,
|
|
1516
1517
|
{
|
|
1517
1518
|
content: M(u.row.original.stats.lastVisit).format(
|
|
1518
1519
|
"D MMM YYYY - hh:mmA"
|
|
1519
1520
|
)
|
|
1520
1521
|
},
|
|
1521
|
-
[ye(
|
|
1522
|
+
[ye(De.FmIcon, { name: "info", outline: !0, size: "sm" })]
|
|
1522
1523
|
)
|
|
1523
1524
|
]);
|
|
1524
1525
|
}
|
|
@@ -1527,7 +1528,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1527
1528
|
id: "actions",
|
|
1528
1529
|
cell(u) {
|
|
1529
1530
|
return ye(
|
|
1530
|
-
|
|
1531
|
+
De.FmMenu,
|
|
1531
1532
|
{
|
|
1532
1533
|
placement: "bottom-end",
|
|
1533
1534
|
onClick: (e) => {
|
|
@@ -1535,9 +1536,9 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1535
1536
|
}
|
|
1536
1537
|
},
|
|
1537
1538
|
{
|
|
1538
|
-
"menu-button": () => ye(
|
|
1539
|
+
"menu-button": () => ye(De.FmButton, { icon: "more_vert", variant: "tertiary" }),
|
|
1539
1540
|
default: () => [
|
|
1540
|
-
ye(
|
|
1541
|
+
ye(De.FmMenuItem, {
|
|
1541
1542
|
label: "Transaction details",
|
|
1542
1543
|
onClick: async (e) => {
|
|
1543
1544
|
e.stopPropagation(), await L(u.row.original._id);
|
|
@@ -1548,18 +1549,18 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1548
1549
|
);
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
1551
|
-
], { tableMeta: R, rowData: J, onSort: w, debouncedFetchData: l, onSearch: T } =
|
|
1552
|
+
], { tableMeta: R, rowData: J, onSort: w, debouncedFetchData: l, onSearch: T } = Qt(ce.read), z = ue(), D = ue(!1), Y = ue();
|
|
1552
1553
|
async function X() {
|
|
1553
1554
|
Y.value = await ce.readById(
|
|
1554
1555
|
Y.value._id.toString()
|
|
1555
|
-
),
|
|
1556
|
+
), D.value = !0;
|
|
1556
1557
|
}
|
|
1557
1558
|
async function j() {
|
|
1558
|
-
await l(),
|
|
1559
|
+
await l(), D.value = !1;
|
|
1559
1560
|
}
|
|
1560
1561
|
async function L(u) {
|
|
1561
1562
|
await K.push({
|
|
1562
|
-
name:
|
|
1563
|
+
name: rn["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
1563
1564
|
params: { id: u }
|
|
1564
1565
|
});
|
|
1565
1566
|
}
|
|
@@ -1575,7 +1576,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1575
1576
|
return e.isValid() ? e.format("DD/MM/YYYY") : "";
|
|
1576
1577
|
}
|
|
1577
1578
|
async function g() {
|
|
1578
|
-
const u = new
|
|
1579
|
+
const u = new on(), e = (await ce.read({
|
|
1579
1580
|
limit: 1,
|
|
1580
1581
|
skip: 0,
|
|
1581
1582
|
sortBy: c.sortBy,
|
|
@@ -1583,7 +1584,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1583
1584
|
})).meta.totalResources ?? 0, n = c.rowsPerPage;
|
|
1584
1585
|
await C(
|
|
1585
1586
|
async () => {
|
|
1586
|
-
var o, i, d, S, v, O, P, Q, p,
|
|
1587
|
+
var o, i, d, S, v, O, P, Q, p, I, F, E, Z, oe, ee, G, B, Ie, Ve, we, k, he, _e, Ee, Ae, Re, Le;
|
|
1587
1588
|
for (let ke = 0; ke < e; ke += n) {
|
|
1588
1589
|
const fe = {
|
|
1589
1590
|
...c,
|
|
@@ -1593,7 +1594,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1593
1594
|
descending: c.descending
|
|
1594
1595
|
}, ze = await ce.read(fe);
|
|
1595
1596
|
for (const b of ze.resources) {
|
|
1596
|
-
const ie = (o =
|
|
1597
|
+
const ie = (o = sn.parseOneAddress(
|
|
1597
1598
|
b == null ? void 0 : b.email
|
|
1598
1599
|
)) != null && o.domain.includes("feedmepos.com") ? void 0 : b.email, Ke = (d = ((i = b == null ? void 0 : b.collection) == null ? void 0 : i.TITLE) || []) == null ? void 0 : d.reduce(
|
|
1599
1600
|
(te, ae) => {
|
|
@@ -1613,7 +1614,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1613
1614
|
return te[ae.name] = pe ? M(pe).format("DD/MM/YYYY") : "", te;
|
|
1614
1615
|
},
|
|
1615
1616
|
{}
|
|
1616
|
-
), Oe = ((O = (v = (S = b.collection) == null ? void 0 : S.CREDIT) == null ? void 0 : v.at(0)) == null ? void 0 : O.balance) || 0, Ne = ((
|
|
1617
|
+
), Oe = ((O = (v = (S = b.collection) == null ? void 0 : S.CREDIT) == null ? void 0 : v.at(0)) == null ? void 0 : O.balance) || 0, Ne = ((I = (p = (Q = (P = b.collection) == null ? void 0 : P.CREDIT) == null ? void 0 : Q.at(0)) == null ? void 0 : p.expiryBalance) == null ? void 0 : I.reduce(
|
|
1617
1618
|
(te, ae) => te + ae.amount,
|
|
1618
1619
|
0
|
|
1619
1620
|
)) || 0, Se = qe(Oe, 2), Fe = {
|
|
@@ -1628,13 +1629,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1628
1629
|
FreeCredit: Number(Ne.toFixed(2)),
|
|
1629
1630
|
TotalCredit: Number(Se),
|
|
1630
1631
|
Exp: b != null && b.collection ? ((ee = (oe = (Z = b.collection) == null ? void 0 : Z.POINT) == null ? void 0 : oe.at(0)) == null ? void 0 : ee.balance) ?? 0 : 0,
|
|
1631
|
-
Point: b != null && b.collection ? ((
|
|
1632
|
+
Point: b != null && b.collection ? ((Ie = (B = (G = b.collection) == null ? void 0 : G.COIN) == null ? void 0 : B.at(0)) == null ? void 0 : Ie.balance) ?? 0 : 0,
|
|
1632
1633
|
Level: b != null && b.collection ? ((k = (we = (Ve = b.collection) == null ? void 0 : Ve.TIER) == null ? void 0 : we.at(0)) == null ? void 0 : k.balance) ?? 0 : 0,
|
|
1633
1634
|
Tier: b != null && b.collection ? ((Ee = (_e = (he = b.collection) == null ? void 0 : he.TIER) == null ? void 0 : _e.at(0)) == null ? void 0 : Ee.balance) ?? 0 : 0,
|
|
1634
1635
|
Titles: Ke.join(","),
|
|
1635
1636
|
...Pe,
|
|
1636
1637
|
TotalTransaction: b.stats.visitCount,
|
|
1637
|
-
AvgSpent:
|
|
1638
|
+
AvgSpent: Jt(Number(b.stats.avgBillSize || 0)).toFormat(
|
|
1638
1639
|
!1
|
|
1639
1640
|
),
|
|
1640
1641
|
TotalSpent: b.stats.avgBillSize * b.stats.visitCount,
|
|
@@ -1672,7 +1673,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1672
1673
|
}), (u, e) => {
|
|
1673
1674
|
const n = U("FmSearch"), o = U("FmButton"), i = U("FmSnackbar");
|
|
1674
1675
|
return A(), H("div", null, [
|
|
1675
|
-
f("div",
|
|
1676
|
+
f("div", fr, [
|
|
1676
1677
|
$(n, {
|
|
1677
1678
|
class: "mt-4",
|
|
1678
1679
|
modelValue: s(R).searchValue,
|
|
@@ -1696,13 +1697,13 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1696
1697
|
description: "Current list is not up to date, please refresh table for latest data.",
|
|
1697
1698
|
variant: "info",
|
|
1698
1699
|
dismissable: "",
|
|
1699
|
-
onOnDismiss: e[1] || (e[1] = (d) =>
|
|
1700
|
+
onOnDismiss: e[1] || (e[1] = (d) => D.value = !1),
|
|
1700
1701
|
action: "Refresh",
|
|
1701
1702
|
onOnAction: j
|
|
1702
1703
|
}, null, 512), [
|
|
1703
|
-
[dt, s(
|
|
1704
|
+
[dt, s(D)]
|
|
1704
1705
|
]),
|
|
1705
|
-
$(
|
|
1706
|
+
$(Xt, {
|
|
1706
1707
|
loading: s(R).isLoading,
|
|
1707
1708
|
"row-data": s(J),
|
|
1708
1709
|
"row-count": s(R).totalRows,
|
|
@@ -1718,7 +1719,7 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1718
1719
|
Y.value = d.original, (S = s(z)) == null || S.showSheet();
|
|
1719
1720
|
})
|
|
1720
1721
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1721
|
-
s(Y) ? (A(), re(
|
|
1722
|
+
s(Y) ? (A(), re(mr, {
|
|
1722
1723
|
key: 0,
|
|
1723
1724
|
ref_key: "sheetRef",
|
|
1724
1725
|
ref: z,
|
|
@@ -1730,5 +1731,5 @@ const an = /* @__PURE__ */ Ut(on), sn = { class: "flex flex-col" }, ln = /* @__P
|
|
|
1730
1731
|
}
|
|
1731
1732
|
});
|
|
1732
1733
|
export {
|
|
1733
|
-
|
|
1734
|
+
Or as default
|
|
1734
1735
|
};
|