@feedmepos/mf-connect 0.1.0-beta.16 → 0.1.0-beta.17
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-DvSlAa_t.js → Analytic-BvsvVIaJ.js} +8 -8
- package/dist/{App-DmFBcchH.js → App-B6i-kTvi.js} +6 -6
- package/dist/{Broadcast-BTOeVFBU.js → Broadcast-BMNY7jfz.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DT6HXkx5.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cl-VwkQw.js} +9 -9
- package/dist/{Card-DFhm84IK.js → Card-BUxMxMv3.js} +16 -16
- package/dist/{Collections-D2IuYUcN.js → Collections-fJ4dAA8O.js} +4 -4
- package/dist/{Credit-qIvAtq7R.js → Credit-DeLJMW7U.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-EgBOqBH3.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-KB_zk3f0.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-pjKQ_6XW.js → EffectSheet.vue_vue_type_style_index_0_lang-Dy2q_1Kh.js} +6 -6
- package/dist/{Experience-D5gxMCLN.js → Experience-DNlf2fYa.js} +8 -8
- package/dist/{Game-D6mZtzpu.js → Game-BXj3DErV.js} +8 -8
- package/dist/Index-FMFz2f9Z.js +218 -0
- package/dist/{Marketing-BAYFml6G.js → Marketing-C8OjZOr2.js} +5 -5
- package/dist/{Member-CloTy2nL.js → Member-BgwbYQrK.js} +4 -4
- package/dist/{MemberList-BehUKhxr.js → MemberList-DMQUG_Kt.js} +146 -146
- package/dist/{MemberTransactions-CqmxYvON.js → MemberTransactions-CQO2cHn6.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Co0cpxMC.js → MessageInput.vue_vue_type_script_setup_true_lang-Ds_BwKa6.js} +2 -2
- package/dist/{Mission-Cr4V4avB.js → Mission-rHomcJXG.js} +8 -8
- package/dist/Overview-CmwJjXeT.js +864 -0
- package/dist/{Point-IN7NRLJS.js → Point-Du07BO13.js} +8 -8
- package/dist/{Promotion-BJz73ezx.js → Promotion-B1gbbfk2.js} +9 -9
- package/dist/{Record-BKTEX1pP.js → Record-0GtBWXRO.js} +4 -4
- package/dist/Reward-aH7S8WL3.js +375 -0
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Rgbzqn5U.js → RewardGroup.vue_vue_type_script_setup_true_lang-XdyqSqlC.js} +13 -13
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CcbYKFF8.js → RuleGroup.vue_vue_type_script_setup_true_lang-E7ADhGR7.js} +15 -15
- package/dist/{Segment-kyIAhPSY.js → Segment-Ci4BDnan.js} +60 -60
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BvmCUzdR.js → SelectItems.vue_vue_type_script_setup_true_lang-I2KT0px7.js} +2 -2
- package/dist/{Setting-D5dvEk4B.js → Setting-Dc9rLPuI.js} +8 -8
- package/dist/{Store-CjtA_F94.js → Store-B94H-jff.js} +13 -13
- package/dist/{StoreRewards-vpfOX8G_.js → StoreRewards-Cho91MDd.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DHhgVgtJ.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CDiZz1AW.js} +9 -9
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BGf724cg.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BmEP5mI5.js} +1 -1
- package/dist/{Tier-DjC_RxdB.js → Tier-DO9pTl_C.js} +15 -15
- package/dist/{Title-BEXXmy2h.js → Title-CgQD-_3y.js} +15 -15
- package/dist/{Transaction-hqzPHSub.js → Transaction-DPmvpR7n.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Bs3zmaUB.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CJa-Tkws.js} +7 -7
- package/dist/{Voucher-CKkH-xCH.js → Voucher-Bq5Ev_fv.js} +11 -11
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DHKFTJg0.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DeQTAvCe.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-qxZSLYVe.js → ZodTextField.vue_vue_type_script_setup_true_lang-DLFDd3Y3.js} +1 -1
- package/dist/{app-BUvi63vQ.js → app-BT6qeigc.js} +28 -28
- package/dist/{app-C2IaLk6H.js → app-CtaeuBcs.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CN0T4-SZ.js → business-Db2WFn9o.js} +1 -1
- package/dist/{campaign-CoCWssTb.js → campaign-Bo2jmBiD.js} +2 -2
- package/dist/{collectible.enum-Dy--R47i.js → collectible.enum-BR9zmyJv.js} +1 -1
- package/dist/{collection.fn-Cr1ywDaX.js → collection.fn-Drj_6HD1.js} +2 -2
- package/dist/{dto-DM5CYJKF.js → dto-BH8EtK7z.js} +51 -51
- package/dist/{effect-CKuSDDWx.js → effect-l8oNjQBm.js} +1 -1
- package/dist/{email-addresses-DT9fEK3B.js → email-addresses-CBqWAs9Z.js} +1 -1
- package/dist/{export-kDvnDXT3.js → export-D6S3dr04.js} +3 -3
- package/dist/{helper-CvALMpbP.js → helper-CS2Hx33Q.js} +1 -1
- package/dist/{index-Dp57wxPG.js → index-5mZIFDhm.js} +3 -3
- package/dist/{index-DfO38PIj.js → index-BfhjAqeE.js} +3 -3
- package/dist/{index-Cbub3cnc.js → index-Bj5M_at2.js} +1 -1
- package/dist/{index-BQv5U11Y.js → index-BsfC7C2D.js} +1 -1
- package/dist/{index-qGUpKhOc.js → index-C7kr1TMO.js} +60 -50
- package/dist/{index-D4ipGpBx.js → index-CATw-eQI.js} +2 -2
- package/dist/{index-nEtq_D86.js → index-CVfN0Gmc.js} +2 -2
- package/dist/{index-DoYTkrrb.js → index-CXEJbUAO.js} +1 -1
- package/dist/{index-ey2AwCTp.js → index-CmN2dQk5.js} +5 -5
- package/dist/{index-CzPvn8U8.js → index-Ct847l9G.js} +12 -10
- package/dist/{index-C3uwZknZ.js → index-D2d2rTPz.js} +1 -1
- package/dist/{index--_y7iLN0.js → index-DVryx2wz.js} +1 -1
- package/dist/{index-B238hLDe.js → index-XoOcBFvx.js} +4 -4
- package/dist/{index-g3w2CMDp.js → index-Z61r-lWj.js} +1 -1
- package/dist/{index.esm2017-Bk6dMA8A.js → index.esm2017-Dg7M2BO7.js} +1 -1
- package/dist/{loading-BcJ3vmAh.js → loading-DxWIhKJX.js} +4 -4
- package/dist/{membership-DUwlp5ep.js → membership-Df7gtzWJ.js} +3 -3
- package/dist/{money-DdC6bMmU.js → money-Ck4ZGH4F.js} +1 -1
- package/dist/{number-BEED-TPN.js → number-D8umDJ-5.js} +1 -1
- package/dist/{objectid-DY_lUcSp.js → objectid-BGnepAUg.js} +4 -4
- package/dist/{reward-DHQKiUlZ.js → reward-5b5G4KYr.js} +1 -1
- package/dist/{rule-Cqxw5hiW.js → rule-BcLntzKp.js} +3 -3
- package/dist/{rule-builder-d3XamC-m.js → rule-builder-B_RDlrnZ.js} +1 -1
- package/dist/{template-L9JcuU6u.js → template-C-myFW3k.js} +4 -4
- package/dist/{trigger-CHZHABfq.js → trigger-CAK3-5M9.js} +4 -4
- package/dist/{vue-i18n-Dm39UXgR.js → vue-i18n-BC0lAbnG.js} +248 -248
- package/dist/{xlsx-htG2uW_Q.js → xlsx-DNZb1t3l.js} +1 -1
- package/package.json +1 -1
- package/dist/Index-Dkz6CoT6.js +0 -215
- package/dist/Overview-D64jbEDD.js +0 -895
- package/dist/Reward-CCJgOvDH.js +0 -368
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { defineComponent as pe, computed as Y, ref as X, resolveComponent as _, openBlock as v, createElementBlock as V, Fragment as ee, createElementVNode as a, unref as o, createBlock as j, createCommentVNode as ae, createVNode as C, renderList as se, withCtx as ne, createTextVNode as ue, toDisplayString as M, withDirectives as Pe, vShow as Re, onMounted as Oe, isRef as Ze, h as oe } from "vue";
|
|
2
2
|
import { h as g } from "./moment-BWErdI6_.js";
|
|
3
3
|
import { useDialog as be, components as de } from "@feedmepos/ui-library";
|
|
4
|
-
import { e as et, M as tt } from "./email-addresses-
|
|
5
|
-
import { w as ot } from "./xlsx-
|
|
6
|
-
import "./index-
|
|
7
|
-
import { p as Ee, b as De, u as Ye } from "./loading-
|
|
8
|
-
import { u as ye, C as Be, s as nt } from "./membership-
|
|
9
|
-
import { c as at } from "./index-
|
|
4
|
+
import { e as et, M as tt } from "./email-addresses-CBqWAs9Z.js";
|
|
5
|
+
import { w as ot } from "./xlsx-DNZb1t3l.js";
|
|
6
|
+
import "./index-BsfC7C2D.js";
|
|
7
|
+
import { p as Ee, b as De, u as Ye } from "./loading-DxWIhKJX.js";
|
|
8
|
+
import { u as ye, C as Be, s as nt } from "./membership-Df7gtzWJ.js";
|
|
9
|
+
import { c as at } from "./index-BfhjAqeE.js";
|
|
10
10
|
import { _ as Ue } from "./lodash-B5I3zXaY.js";
|
|
11
11
|
import { D as st } from "./type_drinks-D6jnpvwV.js";
|
|
12
|
-
import { F as it, a as rt, b as lt, c as dt } from "./index-
|
|
13
|
-
import { F as
|
|
14
|
-
import { C as fe } from "./collection.fn-
|
|
15
|
-
import { u as Le } from "./business-
|
|
16
|
-
import { defineStore as
|
|
17
|
-
import { m as J } from "./index-
|
|
12
|
+
import { F as it, a as rt, b as lt, c as dt } from "./index-5mZIFDhm.js";
|
|
13
|
+
import { F as ct } from "./index-XoOcBFvx.js";
|
|
14
|
+
import { C as fe } from "./collection.fn-Drj_6HD1.js";
|
|
15
|
+
import { u as Le } from "./business-Db2WFn9o.js";
|
|
16
|
+
import { defineStore as mt } from "pinia";
|
|
17
|
+
import { m as J } from "./index-CXEJbUAO.js";
|
|
18
18
|
import { o as ze } from "./objectId-dwaoBfJX.js";
|
|
19
|
-
import { f as
|
|
20
|
-
import { t as ut } from "./money-
|
|
19
|
+
import { f as me } from "./number-D8umDJ-5.js";
|
|
20
|
+
import { t as ut } from "./money-Ck4ZGH4F.js";
|
|
21
21
|
import { u as pt, _ as ft } from "./usePagination-BeF5K3M7.js";
|
|
22
22
|
import { g as bt, a as yt, b as vt } from "./user-Bm4KttFq.js";
|
|
23
23
|
import { useRouter as xt } from "vue-router";
|
|
24
|
-
import { R as gt } from "./app-
|
|
25
|
-
const Ct = { class: "flex flex-col" }, St = { key: 1 },
|
|
24
|
+
import { R as gt } from "./app-BT6qeigc.js";
|
|
25
|
+
const Ct = { class: "flex flex-col" }, St = { key: 1 }, ht = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, Ft = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, _t = /* @__PURE__ */ pe({
|
|
26
26
|
__name: "MemberStatsDialog",
|
|
27
27
|
props: {
|
|
28
28
|
member: {
|
|
@@ -41,7 +41,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
41
41
|
var l;
|
|
42
42
|
return (((l = u.member.collection) == null ? void 0 : l.TITLE) ?? []).reduce(
|
|
43
43
|
(r, p) => {
|
|
44
|
-
var e, d, y,
|
|
44
|
+
var e, d, y, m, h;
|
|
45
45
|
const n = x.sortedTitles.find(
|
|
46
46
|
(A) => A._id.toString() === p.collectible
|
|
47
47
|
);
|
|
@@ -52,14 +52,14 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
52
52
|
return (e = t[0]) != null && e.expiredAt && g((d = t[0]) == null ? void 0 : d.expiredAt).isBefore(g()) || r.push({
|
|
53
53
|
_id: n._id,
|
|
54
54
|
name: n.name,
|
|
55
|
-
expiredAt: (y = t[0]) != null && y.expiredAt ? g((
|
|
56
|
-
expiresIn: g((
|
|
55
|
+
expiredAt: (y = t[0]) != null && y.expiredAt ? g((m = t[0]) == null ? void 0 : m.expiredAt).toISOString() : "",
|
|
56
|
+
expiresIn: g((h = t[0]) == null ? void 0 : h.expiredAt).diff(g(), "days")
|
|
57
57
|
}), r;
|
|
58
58
|
},
|
|
59
59
|
[]
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
|
-
),
|
|
62
|
+
), c = X({
|
|
63
63
|
cardNo: u.member.cardNo,
|
|
64
64
|
experience: ((H = (W = u.member.collection) == null ? void 0 : W.POINT) == null ? void 0 : H[0].balance) ?? 0,
|
|
65
65
|
tier: ((D = (G = u.member.collection) == null ? void 0 : G.TIER) == null ? void 0 : D[0].balance) ?? -1,
|
|
@@ -79,19 +79,19 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
79
79
|
})));
|
|
80
80
|
function T() {
|
|
81
81
|
var p, n;
|
|
82
|
-
const l = ((p = k.value[(
|
|
83
|
-
|
|
82
|
+
const l = ((p = k.value[(c.value.tier ?? 1) - 1]) == null ? void 0 : p.from) ?? 0, r = (n = k.value[(c.value.tier ?? 1) - 1]) == null ? void 0 : n.to;
|
|
83
|
+
c.value.experience = Math.min(
|
|
84
84
|
r ?? l,
|
|
85
|
-
Math.max(l,
|
|
85
|
+
Math.max(l, c.value.experience ?? 0)
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
88
|
const E = Y(() => {
|
|
89
89
|
var p, n, t, e, d, y;
|
|
90
90
|
const l = ((n = (p = u.member.collection) == null ? void 0 : p.TIER) == null ? void 0 : n[0].balance) ?? -1, r = ((e = (t = u.member.collection) == null ? void 0 : t.POINT) == null ? void 0 : e[0].balance) ?? 0;
|
|
91
|
-
if (l !=
|
|
92
|
-
if (
|
|
93
|
-
const
|
|
94
|
-
if (
|
|
91
|
+
if (l != c.value.tier) return !0;
|
|
92
|
+
if (c.value.experience && c.value.experience != r) {
|
|
93
|
+
const m = ((d = k.value[l - 1]) == null ? void 0 : d.from) ?? 0, h = ((y = k.value[l - 1]) == null ? void 0 : y.to) ?? 0;
|
|
94
|
+
if (c.value.experience < m || h && c.value.experience > h)
|
|
95
95
|
return !0;
|
|
96
96
|
}
|
|
97
97
|
return !1;
|
|
@@ -101,7 +101,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
101
101
|
return (r = I.value.find((p) => p._id === l)) == null ? void 0 : r.expiresIn;
|
|
102
102
|
}
|
|
103
103
|
const L = Y(() => {
|
|
104
|
-
const l =
|
|
104
|
+
const l = ct.safeParse(c.value);
|
|
105
105
|
return l.success ? void 0 : l.error.errors;
|
|
106
106
|
});
|
|
107
107
|
function N(l) {
|
|
@@ -113,19 +113,19 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
113
113
|
return (r = L.value) == null ? void 0 : r.filter((p) => p.path.join(".").startsWith(l)).map((p) => p.message);
|
|
114
114
|
}
|
|
115
115
|
async function B() {
|
|
116
|
-
await u.onSubmit(
|
|
116
|
+
await u.onSubmit(c.value), q.close();
|
|
117
117
|
}
|
|
118
118
|
return (l, r) => {
|
|
119
119
|
var A, U;
|
|
120
|
-
const p = _("FmSelect"), n = _("FmStepperField"), t = _("FmTextField"), e = _("FmField"), d = _("FmFormGroup"), y = _("FmButton"),
|
|
120
|
+
const p = _("FmSelect"), n = _("FmStepperField"), t = _("FmTextField"), e = _("FmField"), d = _("FmFormGroup"), y = _("FmButton"), m = _("FmHelperText"), h = _("FmSpacer");
|
|
121
121
|
return v(), V(ee, null, [
|
|
122
122
|
a("div", Ct, [
|
|
123
123
|
r[6] || (r[6] = a("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1)),
|
|
124
124
|
o(k).length ? (v(), j(p, {
|
|
125
125
|
key: 0,
|
|
126
|
-
modelValue: o(
|
|
126
|
+
modelValue: o(c).tier,
|
|
127
127
|
"onUpdate:modelValue": [
|
|
128
|
-
r[0] || (r[0] = (
|
|
128
|
+
r[0] || (r[0] = (i) => o(c).tier = i),
|
|
129
129
|
T
|
|
130
130
|
],
|
|
131
131
|
label: "Member Tier",
|
|
@@ -134,8 +134,8 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
134
134
|
"helper-state": N("tier") ? "error" : void 0
|
|
135
135
|
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : ae("", !0),
|
|
136
136
|
C(n, {
|
|
137
|
-
"model-value": o(
|
|
138
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
137
|
+
"model-value": o(c).experience ?? 0,
|
|
138
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => o(c).experience = i),
|
|
139
139
|
label: "Member Experience",
|
|
140
140
|
"max-fraction-digits": 0,
|
|
141
141
|
"helper-text": N("experience"),
|
|
@@ -143,23 +143,23 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
143
143
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
144
144
|
r[7] || (r[7] = a("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1)),
|
|
145
145
|
C(t, {
|
|
146
|
-
modelValue: o(
|
|
147
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
146
|
+
modelValue: o(c).cardNo,
|
|
147
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => o(c).cardNo = i),
|
|
148
148
|
label: "Card number",
|
|
149
149
|
"helper-text": N("cardNo"),
|
|
150
150
|
"helper-state": N("cardNo") ? "error" : void 0
|
|
151
151
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
152
152
|
r[8] || (r[8] = a("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1)),
|
|
153
|
-
(A = o(
|
|
153
|
+
(A = o(c).titles) != null && A.length ? (v(), V("div", St, r[5] || (r[5] = [
|
|
154
154
|
a("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
155
155
|
a("div", { class: "flex-1" }, "Title"),
|
|
156
156
|
a("div", { class: "flex-1" }, "Expires in days"),
|
|
157
157
|
a("div", { class: "w-24 h-1" })
|
|
158
158
|
], -1)
|
|
159
159
|
]))) : ae("", !0),
|
|
160
|
-
(v(!0), V(ee, null, se(o(
|
|
161
|
-
a("div",
|
|
162
|
-
o(I).some((f) => f._id ===
|
|
160
|
+
(v(!0), V(ee, null, se(o(c).titles ?? [], (i, F) => (v(), V("div", { key: F }, [
|
|
161
|
+
a("div", ht, [
|
|
162
|
+
o(I).some((f) => f._id === i.id) ? (v(), j(d, {
|
|
163
163
|
key: 1,
|
|
164
164
|
"model-value": "",
|
|
165
165
|
class: "flex-1"
|
|
@@ -172,7 +172,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
172
172
|
default: ne(() => {
|
|
173
173
|
var f;
|
|
174
174
|
return [
|
|
175
|
-
ue(M((f = o($).find((w) => w.value ===
|
|
175
|
+
ue(M((f = o($).find((w) => w.value === i.id)) == null ? void 0 : f.label), 1)
|
|
176
176
|
];
|
|
177
177
|
}),
|
|
178
178
|
_: 2
|
|
@@ -181,19 +181,19 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
181
181
|
_: 2
|
|
182
182
|
}, 1024)) : (v(), j(p, {
|
|
183
183
|
key: 0,
|
|
184
|
-
modelValue:
|
|
185
|
-
"onUpdate:modelValue": [(f) =>
|
|
184
|
+
modelValue: i.id,
|
|
185
|
+
"onUpdate:modelValue": [(f) => i.id = f, (f) => i.expiredAt = S(f) ?? 1],
|
|
186
186
|
class: "flex-1",
|
|
187
187
|
items: o($).filter(
|
|
188
188
|
(f) => {
|
|
189
189
|
var w;
|
|
190
|
-
return !((w = o(
|
|
190
|
+
return !((w = o(c).titles) != null && w.map((P) => P.id).includes(f.value)) || i.id === f.value;
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])),
|
|
194
194
|
C(n, {
|
|
195
|
-
modelValue:
|
|
196
|
-
"onUpdate:modelValue": (f) =>
|
|
195
|
+
modelValue: i.expiredAt,
|
|
196
|
+
"onUpdate:modelValue": (f) => i.expiredAt = f,
|
|
197
197
|
class: "flex-1",
|
|
198
198
|
label: "",
|
|
199
199
|
"max-fraction-digits": 0
|
|
@@ -204,52 +204,52 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
204
204
|
variant: "tertiary",
|
|
205
205
|
onClick: (f) => {
|
|
206
206
|
var w;
|
|
207
|
-
return (w = o(
|
|
207
|
+
return (w = o(c).titles) == null ? void 0 : w.splice(F, 1);
|
|
208
208
|
}
|
|
209
209
|
}, null, 8, ["onClick"])
|
|
210
210
|
]),
|
|
211
|
-
(v(!0), V(ee, null, se(K(`titles.${
|
|
211
|
+
(v(!0), V(ee, null, se(K(`titles.${F}`), (f, w) => (v(), j(m, {
|
|
212
212
|
key: w,
|
|
213
213
|
class: "items-center",
|
|
214
214
|
state: "error",
|
|
215
215
|
text: f.toString()
|
|
216
216
|
}, null, 8, ["text"]))), 128))
|
|
217
217
|
]))), 128)),
|
|
218
|
-
o($).length && (((U = o(
|
|
218
|
+
o($).length && (((U = o(c).titles) == null ? void 0 : U.length) ?? 0) < o($).length ? (v(), j(y, {
|
|
219
219
|
key: 2,
|
|
220
220
|
icon: "add",
|
|
221
221
|
label: "Give title",
|
|
222
222
|
variant: "plain",
|
|
223
|
-
onClick: r[3] || (r[3] = (
|
|
224
|
-
var
|
|
225
|
-
return o(
|
|
226
|
-
...o(
|
|
223
|
+
onClick: r[3] || (r[3] = (i) => {
|
|
224
|
+
var F;
|
|
225
|
+
return o(c).titles = [
|
|
226
|
+
...o(c).titles ?? [],
|
|
227
227
|
{
|
|
228
|
-
id: ((
|
|
228
|
+
id: ((F = o($).find(
|
|
229
229
|
(f) => {
|
|
230
230
|
var w;
|
|
231
|
-
return !((w = o(
|
|
231
|
+
return !((w = o(c).titles) != null && w.map((P) => P.id).includes(f.value));
|
|
232
232
|
}
|
|
233
|
-
)) == null ? void 0 :
|
|
233
|
+
)) == null ? void 0 : F.value) || o($)[0].value,
|
|
234
234
|
expiredAt: 0
|
|
235
235
|
}
|
|
236
236
|
];
|
|
237
237
|
})
|
|
238
238
|
})) : ae("", !0)
|
|
239
239
|
]),
|
|
240
|
-
a("div",
|
|
241
|
-
Pe(C(
|
|
240
|
+
a("div", Ft, [
|
|
241
|
+
Pe(C(m, {
|
|
242
242
|
state: "warning",
|
|
243
243
|
text: "Updating member will cause tier to change"
|
|
244
244
|
}, null, 512), [
|
|
245
245
|
[Re, o(E)]
|
|
246
246
|
]),
|
|
247
|
-
C(
|
|
247
|
+
C(h),
|
|
248
248
|
C(y, {
|
|
249
249
|
variant: "secondary",
|
|
250
250
|
label: "Cancel",
|
|
251
251
|
size: "md",
|
|
252
|
-
onClick: r[4] || (r[4] = (
|
|
252
|
+
onClick: r[4] || (r[4] = (i) => o(q).close())
|
|
253
253
|
}),
|
|
254
254
|
C(y, {
|
|
255
255
|
disabled: !!o(L),
|
|
@@ -277,7 +277,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
277
277
|
amount: 1,
|
|
278
278
|
day: 1,
|
|
279
279
|
remark: void 0
|
|
280
|
-
}), I = X(!0),
|
|
280
|
+
}), I = X(!0), c = Y(() => fe.formattedType(x.type.toUpperCase()));
|
|
281
281
|
function $(E) {
|
|
282
282
|
I.value = E, !E && x.type === "coin" && (u.value.day = void 0);
|
|
283
283
|
}
|
|
@@ -285,13 +285,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
285
285
|
if (x.action === "send") {
|
|
286
286
|
const E = u.value.day ? `, expire in ${u.value.day} days` : "";
|
|
287
287
|
Ee.confirm(
|
|
288
|
-
`Are you sure to send ${u.value.amount} ${
|
|
288
|
+
`Are you sure to send ${u.value.amount} ${c.value.toLowerCase()}${E}? This action cannot be reversed.`
|
|
289
289
|
).then(async (S) => {
|
|
290
290
|
S && await x.onSubmit(u.value);
|
|
291
291
|
});
|
|
292
292
|
} else
|
|
293
293
|
Ee.confirm(
|
|
294
|
-
`Are you sure to deduct ${u.value.amount} ${
|
|
294
|
+
`Are you sure to deduct ${u.value.amount} ${c.value.toLowerCase()}? This action cannot be reversed.`
|
|
295
295
|
).then(async (E) => {
|
|
296
296
|
E && await x.onSubmit(u.value);
|
|
297
297
|
});
|
|
@@ -321,7 +321,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
321
321
|
b.action === "send" && x.type === "coin" ? (v(), j(N, {
|
|
322
322
|
key: 0,
|
|
323
323
|
"model-value": o(I),
|
|
324
|
-
label: `${o(
|
|
324
|
+
label: `${o(c)} expires`,
|
|
325
325
|
"label-placement": "right",
|
|
326
326
|
"onUpdate:modelValue": S[1] || (S[1] = (n) => $(n))
|
|
327
327
|
}, null, 8, ["model-value", "label"])) : ae("", !0),
|
|
@@ -329,7 +329,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
329
329
|
key: 1,
|
|
330
330
|
modelValue: o(u).day,
|
|
331
331
|
"onUpdate:modelValue": S[2] || (S[2] = (n) => o(u).day = n),
|
|
332
|
-
label: `${o(
|
|
332
|
+
label: `${o(c)} expires in`,
|
|
333
333
|
"max-fraction-digits": 0,
|
|
334
334
|
"append-text": "day(s)",
|
|
335
335
|
max: 9999,
|
|
@@ -364,7 +364,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
364
364
|
});
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
}), je =
|
|
367
|
+
}), je = mt("segment", () => {
|
|
368
368
|
const b = X([]);
|
|
369
369
|
async function q() {
|
|
370
370
|
const x = await nt.readAll({
|
|
@@ -391,7 +391,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
391
391
|
}, Qt = {
|
|
392
392
|
key: 1,
|
|
393
393
|
class: "space-y-24"
|
|
394
|
-
}, Zt = { class: "space-y-8" }, eo = { class: "fm-typo-en-title-md-800" }, to = { class: "space-y-4" }, oo = { class: "fm-typo-en-body-md-600" }, no = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, ao = { class: "space-y-8" }, so = { class: "fm-typo-en-title-md-800" }, io = { class: "space-y-4" }, ro = { class: "fm-typo-en-body-md-600" }, lo = { class: "flex gap-24 items-center xs:flex-col xs:items-start" },
|
|
394
|
+
}, Zt = { class: "space-y-8" }, eo = { class: "fm-typo-en-title-md-800" }, to = { class: "space-y-4" }, oo = { class: "fm-typo-en-body-md-600" }, no = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, ao = { class: "space-y-8" }, so = { class: "fm-typo-en-title-md-800" }, io = { class: "space-y-4" }, ro = { class: "fm-typo-en-body-md-600" }, lo = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, co = /* @__PURE__ */ pe({
|
|
395
395
|
__name: "MemberDetailSheet",
|
|
396
396
|
props: {
|
|
397
397
|
member: {
|
|
@@ -401,12 +401,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
401
401
|
},
|
|
402
402
|
emits: ["update:member"],
|
|
403
403
|
setup(b, { expose: q, emit: x }) {
|
|
404
|
-
const u = Le(), I = ye(),
|
|
404
|
+
const u = Le(), I = ye(), c = je(), $ = be(), { minor: k } = Ye, T = b, E = x, S = Y(() => u.locations.map((t) => ({
|
|
405
405
|
label: t.name,
|
|
406
406
|
value: t._id
|
|
407
407
|
}))), L = Y(() => (T.member.segment || []).map((t) => {
|
|
408
408
|
var e;
|
|
409
|
-
return ((e =
|
|
409
|
+
return ((e = c.segments.find((d) => d._id === t)) == null ? void 0 : e.name) || "";
|
|
410
410
|
}).filter(Boolean));
|
|
411
411
|
async function N(t, e) {
|
|
412
412
|
$.open({
|
|
@@ -423,8 +423,8 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
423
423
|
"credit-deduct": J.deductCredit,
|
|
424
424
|
"coin-send": J.sendCoin,
|
|
425
425
|
"coin-deduct": J.deductCoin
|
|
426
|
-
},
|
|
427
|
-
|
|
426
|
+
}, m = `${t}-${e}`, h = y[m];
|
|
427
|
+
h && await h(T.member._id, d), E("update:member"), $.close();
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
430
|
message: `Adjusting ${fe.formattedType(t.toUpperCase()).toLowerCase()}`,
|
|
@@ -463,9 +463,9 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
463
463
|
{
|
|
464
464
|
label: "Tier",
|
|
465
465
|
getter: (t) => {
|
|
466
|
-
var A, U,
|
|
467
|
-
const e = (((U = Ue.first((A = T.member.collection) == null ? void 0 : A.TIER)) == null ? void 0 : U.balance) || 0) - 1, d = H.value.name, y = ((
|
|
468
|
-
return `${d} (${y}/${
|
|
466
|
+
var A, U, i, F, f;
|
|
467
|
+
const e = (((U = Ue.first((A = T.member.collection) == null ? void 0 : A.TIER)) == null ? void 0 : U.balance) || 0) - 1, d = H.value.name, y = ((F = (i = t.collection) == null ? void 0 : i.POINT) == null ? void 0 : F[0].balance) ?? 0, m = I.sortedTiers[e + 1], h = ((f = m == null ? void 0 : m.option) == null ? void 0 : f.to) ?? 1 / 0;
|
|
468
|
+
return `${d} (${y}/${h})`;
|
|
469
469
|
}
|
|
470
470
|
},
|
|
471
471
|
{
|
|
@@ -525,13 +525,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
525
525
|
}), G = Y(() => {
|
|
526
526
|
var t;
|
|
527
527
|
return (((t = T.member.collection) == null ? void 0 : t.TITLE) || []).map((e) => {
|
|
528
|
-
var y,
|
|
528
|
+
var y, m, h;
|
|
529
529
|
const d = (y = I.sortedTitles) == null ? void 0 : y.find(
|
|
530
530
|
(A) => A._id == e.collectible
|
|
531
531
|
);
|
|
532
532
|
return {
|
|
533
533
|
name: d == null ? void 0 : d.name,
|
|
534
|
-
expiredAt: (
|
|
534
|
+
expiredAt: (h = (m = e.expiryBalance) == null ? void 0 : m.at(-1)) == null ? void 0 : h.expiredAt,
|
|
535
535
|
collectible: d
|
|
536
536
|
};
|
|
537
537
|
}).filter(
|
|
@@ -560,10 +560,10 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
560
560
|
showSheet: l,
|
|
561
561
|
hideSheet: r
|
|
562
562
|
}), (t, e) => {
|
|
563
|
-
const d = _("FmTabs"), y = _("FmAvatar"),
|
|
563
|
+
const d = _("FmTabs"), y = _("FmAvatar"), m = _("FmButton"), h = _("FmChip"), A = _("FmCard"), U = _("FmSideSheet");
|
|
564
564
|
return v(), j(U, {
|
|
565
565
|
modelValue: o(D),
|
|
566
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
566
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => Ze(D) ? D.value = i : null),
|
|
567
567
|
header: "Member Detail",
|
|
568
568
|
"dismiss-away": "",
|
|
569
569
|
"close-button": !0,
|
|
@@ -575,7 +575,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
575
575
|
C(d, {
|
|
576
576
|
"model-value": o(n).value,
|
|
577
577
|
items: p,
|
|
578
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
578
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => n.value = p.find((F) => F.value === i))
|
|
579
579
|
}, null, 8, ["model-value"]),
|
|
580
580
|
o(n).value == "overview" ? (v(), V(ee, { key: 0 }, [
|
|
581
581
|
e[11] || (e[11] = a("div", { class: "fm-typo-en-title-sm-800" }, "Profile Information", -1)),
|
|
@@ -598,50 +598,50 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
598
598
|
a("span", Pt, M(b.member.referralCode ? b.member.referralCode : "-"), 1)
|
|
599
599
|
])
|
|
600
600
|
]),
|
|
601
|
-
C(
|
|
601
|
+
C(m, {
|
|
602
602
|
variant: "tertiary",
|
|
603
603
|
icon: "settings",
|
|
604
604
|
onClick: K
|
|
605
605
|
})
|
|
606
606
|
]),
|
|
607
|
-
(v(), V(ee, null, se(B, (
|
|
608
|
-
a("div", Rt, M(
|
|
609
|
-
a("div", Ot, M(
|
|
607
|
+
(v(), V(ee, null, se(B, (i, F) => a("div", { key: F }, [
|
|
608
|
+
a("div", Rt, M(i.label), 1),
|
|
609
|
+
a("div", Ot, M(i.key ? b.member[i.key] : i.getter(b.member)), 1)
|
|
610
610
|
])), 64))
|
|
611
611
|
]),
|
|
612
612
|
e[12] || (e[12] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
613
613
|
e[13] || (e[13] = a("div", { class: "fm-typo-en-title-sm-800" }, "Activities", -1)),
|
|
614
614
|
a("div", Yt, [
|
|
615
|
-
(v(), V(ee, null, se(W, (
|
|
616
|
-
key:
|
|
615
|
+
(v(), V(ee, null, se(W, (i) => a("div", {
|
|
616
|
+
key: i.key
|
|
617
617
|
}, [
|
|
618
|
-
a("div", Lt, M(
|
|
619
|
-
a("div", zt, M(
|
|
618
|
+
a("div", Lt, M(i.label), 1),
|
|
619
|
+
a("div", zt, M(i.key ? T.member.stats[i.key] || "-" : i.getter(b.member)), 1)
|
|
620
620
|
])), 64))
|
|
621
621
|
]),
|
|
622
622
|
e[14] || (e[14] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
623
623
|
a("div", jt, [
|
|
624
624
|
e[9] || (e[9] = a("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1)),
|
|
625
625
|
o(L).length ? (v(), V("div", qt, [
|
|
626
|
-
(v(!0), V(ee, null, se(o(L), (
|
|
627
|
-
label:
|
|
626
|
+
(v(!0), V(ee, null, se(o(L), (i) => (v(), j(h, {
|
|
627
|
+
label: i.toString()
|
|
628
628
|
}, null, 8, ["label"]))), 256))
|
|
629
629
|
])) : (v(), V("div", Kt, "No titles"))
|
|
630
630
|
]),
|
|
631
631
|
e[15] || (e[15] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
632
632
|
a("div", Gt, [
|
|
633
633
|
e[10] || (e[10] = a("div", { class: "fm-typo-en-title-sm-800" }, "Title badge", -1)),
|
|
634
|
-
o(G).length ? (v(!0), V(ee, { key: 0 }, se(o(G).filter((
|
|
634
|
+
o(G).length ? (v(!0), V(ee, { key: 0 }, se(o(G).filter((i) => i.collectible), (i) => (v(), V("div", {
|
|
635
635
|
class: "flex items-center gap-x-8 h-48",
|
|
636
|
-
key:
|
|
636
|
+
key: i.name
|
|
637
637
|
}, [
|
|
638
638
|
a("img", {
|
|
639
|
-
src:
|
|
639
|
+
src: i.collectible.image || o(st),
|
|
640
640
|
class: "aspect-square h-full object-contain"
|
|
641
641
|
}, null, 8, Ht),
|
|
642
642
|
a("div", null, [
|
|
643
|
-
a("div", Jt, M(
|
|
644
|
-
a("div", Xt, " Expired on " + M(o(g)(
|
|
643
|
+
a("div", Jt, M(i.name), 1),
|
|
644
|
+
a("div", Xt, " Expired on " + M(o(g)(i.expiredAt).format("MMM D, Y")), 1)
|
|
645
645
|
])
|
|
646
646
|
]))), 128)) : (v(), V("div", Wt, "No titles"))
|
|
647
647
|
])
|
|
@@ -651,11 +651,11 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
651
651
|
variant: "outlined"
|
|
652
652
|
}, {
|
|
653
653
|
default: ne(() => {
|
|
654
|
-
var
|
|
654
|
+
var i, F, f, w, P, Q, Z;
|
|
655
655
|
return [
|
|
656
656
|
a("div", Zt, [
|
|
657
657
|
e[16] || (e[16] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1)),
|
|
658
|
-
a("div", eo, M(((f = (
|
|
658
|
+
a("div", eo, M(((f = (F = (i = b.member.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
659
659
|
]),
|
|
660
660
|
a("div", to, [
|
|
661
661
|
e[17] || (e[17] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1)),
|
|
@@ -665,13 +665,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
665
665
|
)) ?? 0), 1)
|
|
666
666
|
]),
|
|
667
667
|
a("div", no, [
|
|
668
|
-
C(
|
|
668
|
+
C(m, {
|
|
669
669
|
label: "Add credit",
|
|
670
670
|
icon: "add",
|
|
671
671
|
variant: "plain",
|
|
672
672
|
onClick: e[1] || (e[1] = (R) => N("credit", "send"))
|
|
673
673
|
}),
|
|
674
|
-
C(
|
|
674
|
+
C(m, {
|
|
675
675
|
label: "Deduct credit",
|
|
676
676
|
icon: "remove",
|
|
677
677
|
variant: "plain",
|
|
@@ -687,11 +687,11 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
687
687
|
variant: "outlined"
|
|
688
688
|
}, {
|
|
689
689
|
default: ne(() => {
|
|
690
|
-
var
|
|
690
|
+
var i, F, f, w, P, Q, Z;
|
|
691
691
|
return [
|
|
692
692
|
a("div", ao, [
|
|
693
693
|
e[18] || (e[18] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1)),
|
|
694
|
-
a("div", so, M(((f = (
|
|
694
|
+
a("div", so, M(((f = (F = (i = b.member.collection) == null ? void 0 : i.COIN) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
695
695
|
]),
|
|
696
696
|
a("div", io, [
|
|
697
697
|
e[19] || (e[19] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1)),
|
|
@@ -701,13 +701,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
701
701
|
)) ?? 0), 1)
|
|
702
702
|
]),
|
|
703
703
|
a("div", lo, [
|
|
704
|
-
C(
|
|
704
|
+
C(m, {
|
|
705
705
|
label: "Add point",
|
|
706
706
|
icon: "add",
|
|
707
707
|
variant: "plain",
|
|
708
708
|
onClick: e[3] || (e[3] = (R) => N("coin", "send"))
|
|
709
709
|
}),
|
|
710
|
-
C(
|
|
710
|
+
C(m, {
|
|
711
711
|
label: "Deduct point",
|
|
712
712
|
icon: "remove",
|
|
713
713
|
variant: "plain",
|
|
@@ -725,10 +725,10 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
725
725
|
}, 8, ["modelValue"]);
|
|
726
726
|
};
|
|
727
727
|
}
|
|
728
|
-
}),
|
|
728
|
+
}), mo = { class: "flex items-center justify-end" }, Bo = /* @__PURE__ */ pe({
|
|
729
729
|
__name: "MemberList",
|
|
730
730
|
setup(b) {
|
|
731
|
-
const q = je(), x = ye(), u = Le(), { minor: I } = Ye,
|
|
731
|
+
const q = je(), x = ye(), u = Le(), { minor: I } = Ye, c = xt(), $ = [
|
|
732
732
|
{
|
|
733
733
|
header: "Name",
|
|
734
734
|
enableSorting: !0,
|
|
@@ -768,7 +768,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
768
768
|
accessorKey: "collection_CREDIT_0_balance",
|
|
769
769
|
accessorFn: (n) => {
|
|
770
770
|
var t, e, d;
|
|
771
|
-
return
|
|
771
|
+
return me(((d = (e = (t = n.collection) == null ? void 0 : t.CREDIT) == null ? void 0 : e[0]) == null ? void 0 : d.balance) ?? 0, 2);
|
|
772
772
|
},
|
|
773
773
|
header: "Credit(s)",
|
|
774
774
|
enableSorting: !0
|
|
@@ -777,7 +777,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
777
777
|
accessorKey: "collection_POINT_0_balance",
|
|
778
778
|
accessorFn: (n) => {
|
|
779
779
|
var t, e, d;
|
|
780
|
-
return
|
|
780
|
+
return me(((d = (e = (t = n.collection) == null ? void 0 : t.POINT) == null ? void 0 : e[0]) == null ? void 0 : d.balance) ?? 0, 2);
|
|
781
781
|
},
|
|
782
782
|
header: "Experience(s)",
|
|
783
783
|
enableSorting: !0
|
|
@@ -786,7 +786,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
786
786
|
accessorKey: "collection_COIN_0_balance",
|
|
787
787
|
accessorFn: (n) => {
|
|
788
788
|
var t, e, d;
|
|
789
|
-
return
|
|
789
|
+
return me(((d = (e = (t = n.collection) == null ? void 0 : t.COIN) == null ? void 0 : e[0]) == null ? void 0 : d.balance) ?? 0, 2);
|
|
790
790
|
},
|
|
791
791
|
header: "Point(s)",
|
|
792
792
|
enableSorting: !0
|
|
@@ -868,7 +868,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
868
868
|
await S(), K.value = !1;
|
|
869
869
|
}
|
|
870
870
|
async function D(n) {
|
|
871
|
-
await
|
|
871
|
+
await c.push({
|
|
872
872
|
name: gt["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
873
873
|
params: { id: n }
|
|
874
874
|
});
|
|
@@ -893,7 +893,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
893
893
|
})).meta.totalResources ?? 0, e = l.rowsPerPage;
|
|
894
894
|
await I(
|
|
895
895
|
async () => {
|
|
896
|
-
var d, y,
|
|
896
|
+
var d, y, m, h, A, U, i, F, f, w, P, Q, Z, R, O, ve, xe, ge, Ce, Se, he, Fe, _e, Te, we, ke, Me, Ae;
|
|
897
897
|
for (let Ne = 0; Ne < t; Ne += e) {
|
|
898
898
|
const qe = {
|
|
899
899
|
...l,
|
|
@@ -902,60 +902,60 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
902
902
|
sortBy: l.sortBy,
|
|
903
903
|
descending: l.descending
|
|
904
904
|
}, Ke = await J.read(qe);
|
|
905
|
-
for (const
|
|
905
|
+
for (const s of Ke.resources) {
|
|
906
906
|
const Ge = (d = et.parseOneAddress(
|
|
907
|
-
|
|
908
|
-
)) != null && d.domain.includes("feedmepos.com") ? void 0 :
|
|
907
|
+
s == null ? void 0 : s.email
|
|
908
|
+
)) != null && d.domain.includes("feedmepos.com") ? void 0 : s.email, He = (m = ((y = s == null ? void 0 : s.collection) == null ? void 0 : y.TITLE) || []) == null ? void 0 : m.reduce(
|
|
909
909
|
(z, te) => {
|
|
910
910
|
var re, le;
|
|
911
911
|
const ie = (le = (re = x.sortedTitles) == null ? void 0 : re.find(
|
|
912
|
-
(
|
|
912
|
+
(ce) => ce._id === te.collectible
|
|
913
913
|
)) == null ? void 0 : le.name;
|
|
914
914
|
return !ie || te.balance <= 0 || z.push(ie), z;
|
|
915
915
|
},
|
|
916
916
|
[]
|
|
917
917
|
), Je = (x.sortedTitles || []).reduce(
|
|
918
918
|
(z, te) => {
|
|
919
|
-
var re, le,
|
|
920
|
-
const ie = ($e = (
|
|
919
|
+
var re, le, ce, $e;
|
|
920
|
+
const ie = ($e = (ce = (le = (((re = s == null ? void 0 : s.collection) == null ? void 0 : re.TITLE) || []).find(
|
|
921
921
|
(Qe) => Qe.collectible === te._id
|
|
922
|
-
)) == null ? void 0 : le.expiryBalance) == null ? void 0 :
|
|
922
|
+
)) == null ? void 0 : le.expiryBalance) == null ? void 0 : ce[0]) == null ? void 0 : $e.expiredAt;
|
|
923
923
|
return z[te.name] = ie ? g(ie).format("DD/MM/YYYY") : "", z;
|
|
924
924
|
},
|
|
925
925
|
{}
|
|
926
|
-
), Xe = ((U = (A = (
|
|
926
|
+
), Xe = ((U = (A = (h = s.collection) == null ? void 0 : h.CREDIT) == null ? void 0 : A.at(0)) == null ? void 0 : U.balance) || 0, Ve = ((w = (f = (F = (i = s.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : F.at(0)) == null ? void 0 : f.expiryBalance) == null ? void 0 : w.reduce(
|
|
927
927
|
(z, te) => z + te.amount,
|
|
928
928
|
0
|
|
929
|
-
)) || 0, Ie =
|
|
930
|
-
ID:
|
|
931
|
-
Name: ((P =
|
|
932
|
-
Phone: ((Q =
|
|
929
|
+
)) || 0, Ie = me(Xe, 2), We = {
|
|
930
|
+
ID: s._id.toString(),
|
|
931
|
+
Name: ((P = s.name) == null ? void 0 : P.trim()) || "",
|
|
932
|
+
Phone: ((Q = s == null ? void 0 : s.phoneNumber) == null ? void 0 : Q.trim()) || "",
|
|
933
933
|
Email: Ge || "",
|
|
934
|
-
Gender:
|
|
935
|
-
CardNo:
|
|
936
|
-
Birthday: r(
|
|
934
|
+
Gender: s.gender || "",
|
|
935
|
+
CardNo: s.cardNo || "",
|
|
936
|
+
Birthday: s != null && s.birthday ? r(s == null ? void 0 : s.birthday) : "",
|
|
937
937
|
Credit: (Number(Ie) - Number(Ve)).toFixed(2),
|
|
938
938
|
FreeCredit: Number(Ve.toFixed(2)),
|
|
939
939
|
TotalCredit: Number(Ie),
|
|
940
|
-
Exp:
|
|
941
|
-
Point:
|
|
942
|
-
Level:
|
|
943
|
-
Tier:
|
|
940
|
+
Exp: s != null && s.collection ? ((O = (R = (Z = s.collection) == null ? void 0 : Z.POINT) == null ? void 0 : R.at(0)) == null ? void 0 : O.balance) ?? 0 : 0,
|
|
941
|
+
Point: s != null && s.collection ? ((ge = (xe = (ve = s.collection) == null ? void 0 : ve.COIN) == null ? void 0 : xe.at(0)) == null ? void 0 : ge.balance) ?? 0 : 0,
|
|
942
|
+
Level: s != null && s.collection ? ((he = (Se = (Ce = s.collection) == null ? void 0 : Ce.TIER) == null ? void 0 : Se.at(0)) == null ? void 0 : he.balance) ?? 0 : 0,
|
|
943
|
+
Tier: s != null && s.collection ? ((Te = (_e = (Fe = s.collection) == null ? void 0 : Fe.TIER) == null ? void 0 : _e.at(0)) == null ? void 0 : Te.balance) ?? 0 : 0,
|
|
944
944
|
Titles: He.join(","),
|
|
945
945
|
...Je,
|
|
946
|
-
TotalTransaction:
|
|
947
|
-
AvgSpent: ut(Number(
|
|
946
|
+
TotalTransaction: s.stats.visitCount,
|
|
947
|
+
AvgSpent: ut(Number(s.stats.avgBillSize || 0)).toFormat(
|
|
948
948
|
!1
|
|
949
949
|
),
|
|
950
|
-
TotalSpent:
|
|
951
|
-
LastVisit: r(
|
|
952
|
-
Feedback: ((we =
|
|
953
|
-
LastSeasonTierEarned: ((ke =
|
|
954
|
-
LastSeasonPointEarned: ((Me =
|
|
955
|
-
JoinedAt: r(
|
|
956
|
-
JoinedAtLocation:
|
|
950
|
+
TotalSpent: s.stats.avgBillSize * s.stats.visitCount,
|
|
951
|
+
LastVisit: r(s.stats.lastVisit),
|
|
952
|
+
Feedback: ((we = s.stats) == null ? void 0 : we.feedbackCount) || 0,
|
|
953
|
+
LastSeasonTierEarned: ((ke = s.stats) == null ? void 0 : ke.lastSeasonTierEarned) || 0,
|
|
954
|
+
LastSeasonPointEarned: ((Me = s.stats) == null ? void 0 : Me.lastSeasonPointEarned) || 0,
|
|
955
|
+
JoinedAt: r(s.joinAt || void 0),
|
|
956
|
+
JoinedAtLocation: s.location && ((Ae = W.value.find((z) => z.value == s.location)) == null ? void 0 : Ae.label) || "-",
|
|
957
957
|
VisitFrequency: `${Number(
|
|
958
|
-
Math.ceil(
|
|
958
|
+
Math.ceil(s.stats.avgVisitFrequency).toFixed(0)
|
|
959
959
|
)}`
|
|
960
960
|
};
|
|
961
961
|
n.addRecord(We);
|
|
@@ -983,12 +983,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
983
983
|
}), (n, t) => {
|
|
984
984
|
const e = _("FmSearch"), d = _("FmButton"), y = _("FmSnackbar");
|
|
985
985
|
return v(), V("div", null, [
|
|
986
|
-
a("div",
|
|
986
|
+
a("div", mo, [
|
|
987
987
|
C(e, {
|
|
988
988
|
class: "mt-4",
|
|
989
989
|
modelValue: o(k).searchValue,
|
|
990
990
|
"onUpdate:modelValue": [
|
|
991
|
-
t[0] || (t[0] = (
|
|
991
|
+
t[0] || (t[0] = (m) => o(k).searchValue = m),
|
|
992
992
|
o(L)
|
|
993
993
|
],
|
|
994
994
|
placeholder: "Search",
|
|
@@ -1007,7 +1007,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
1007
1007
|
description: "Current list is not up to date, please refresh table for latest data.",
|
|
1008
1008
|
variant: "info",
|
|
1009
1009
|
dismissable: "",
|
|
1010
|
-
onOnDismiss: t[1] || (t[1] = (
|
|
1010
|
+
onOnDismiss: t[1] || (t[1] = (m) => K.value = !1),
|
|
1011
1011
|
action: "Refresh",
|
|
1012
1012
|
onOnAction: G
|
|
1013
1013
|
}, null, 512), [
|
|
@@ -1023,13 +1023,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, Ft = { class: "flex flex
|
|
|
1023
1023
|
"page-index": o(k).pageIndex,
|
|
1024
1024
|
"page-size": o(k).pageSize,
|
|
1025
1025
|
onSortChange: o(E),
|
|
1026
|
-
onPageChange: t[2] || (t[2] = (
|
|
1027
|
-
onRowClick: t[3] || (t[3] = (
|
|
1028
|
-
var
|
|
1029
|
-
B.value =
|
|
1026
|
+
onPageChange: t[2] || (t[2] = (m) => o(S)({ pageSize: m.pageSize, pageIndex: m.pageIndex })),
|
|
1027
|
+
onRowClick: t[3] || (t[3] = (m) => {
|
|
1028
|
+
var h;
|
|
1029
|
+
B.value = m.original, (h = o(N)) == null || h.showSheet();
|
|
1030
1030
|
})
|
|
1031
1031
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1032
|
-
o(B) ? (v(), j(
|
|
1032
|
+
o(B) ? (v(), j(co, {
|
|
1033
1033
|
key: 0,
|
|
1034
1034
|
ref_key: "sheetRef",
|
|
1035
1035
|
ref: N,
|