@feedmepos/mf-connect 0.1.0-beta.37 → 0.1.0-beta.38
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-BfWknG6l.js → Analytic-C4_MynWX.js} +10 -10
- package/dist/{App-BG_061Wg.js → App-hlqZyd4R.js} +6 -6
- package/dist/{Broadcast-DdpNtoOo.js → Broadcast-BqqsoThP.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-od-JjpnA.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-P5nMPF4-.js} +6 -6
- package/dist/{Card-Bnng5ta4.js → Card-oCKMHTar.js} +14 -14
- package/dist/{Collections-DnD4xZ5L.js → Collections-DX_tY8Kf.js} +4 -4
- package/dist/{Credit-DwblaWn4.js → Credit-BnUOjfjo.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-COETiGQ4.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-MHFf8UAD.js} +27 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CtEk6tOC.js → EffectSheet.vue_vue_type_style_index_0_lang-DpsYYy14.js} +6 -6
- package/dist/{Experience-Bkn57rfJ.js → Experience-Dc5Y-lES.js} +8 -8
- package/dist/{Game-D0s7bZc-.js → Game-r_sCITiE.js} +8 -8
- package/dist/{Index-D7Zj0U5i.js → Index-ppbyBBbU.js} +9 -9
- package/dist/{Marketing-CLwzvII4.js → Marketing-MpsjOJXt.js} +5 -5
- package/dist/{Member-D-JxENNb.js → Member-B8NQd2MB.js} +4 -4
- package/dist/{MemberList-CMTSjTu-.js → MemberList-CYokRc3j.js} +394 -376
- package/dist/{MemberTransactions-BNcHZfcd.js → MemberTransactions-DM6LBtNR.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B8x9NfzT.js → MessageInput.vue_vue_type_script_setup_true_lang-BPn30LFE.js} +2 -2
- package/dist/{Mission-B-JhXdXX.js → Mission-CveIUM0n.js} +8 -8
- package/dist/{Overview-BZrK3ETv.js → Overview-B53mnhkL.js} +16 -16
- package/dist/{Point-Njw7VSo9.js → Point-BuKZ_7_s.js} +8 -8
- package/dist/{Promotion-DjRs0X1X.js → Promotion-Bxeg_jHA.js} +9 -9
- package/dist/{Record-BnZXhR7W.js → Record-DGPwDG2x.js} +6 -6
- package/dist/{Reward-pD5qUCNJ.js → Reward-BIak3ZV2.js} +14 -14
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-u8IT5N_z.js → RewardGroup.vue_vue_type_script_setup_true_lang-RCTORBPH.js} +10 -10
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-t7vrHFiH.js → RuleGroup.vue_vue_type_script_setup_true_lang-BzF7Dg58.js} +12 -12
- package/dist/{Segment-XKjH6MDU.js → Segment-CwFGTGmM.js} +13 -13
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CqIHHNJg.js → SelectItems.vue_vue_type_script_setup_true_lang-DWW1BMiA.js} +2 -2
- package/dist/{Setting-CjKbl-Em.js → Setting-BpU3V7FC.js} +8 -8
- package/dist/{Store-BXKK7Ys3.js → Store-BmzQ5J94.js} +17 -17
- package/dist/{StoreRewards-C8iQ2BTP.js → StoreRewards-a4btCX5g.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-JdPqalST.js → StoreTransactions.vue_vue_type_script_setup_true_lang-IlyXfny9.js} +17 -17
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-CwfgY4Ft.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DhOWGk5q.js} +1 -1
- package/dist/{Tier-N95LJoLO.js → Tier-BHOq6Aqg.js} +18 -18
- package/dist/{Title-CpnvvVAV.js → Title-DLESKXyK.js} +18 -18
- package/dist/{Transaction-BEN_EeUx.js → Transaction-C9dlvQgb.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-B3NgCEdV.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-z4d8Q8Jy.js} +6 -6
- package/dist/{Voucher-DgxD3oco.js → Voucher-BTzc3xmh.js} +11 -11
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D3c0M6ga.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BBWktc_y.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BOJwFLp-.js → ZodTextField.vue_vue_type_script_setup_true_lang-D9YPGFAr.js} +1 -1
- package/dist/{app-DGplfyjK.js → app-BDUi969b.js} +28 -28
- package/dist/{app-D5HD8YMV.js → app-CRn8LdnG.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-CO2AZHIm.js → business-X8rRPAfz.js} +1 -1
- package/dist/{campaign-DoM_vfA0.js → campaign-C8KDR1Eb.js} +2 -2
- package/dist/{campaign-C6_Zmo0L.js → campaign-FXpP8n18.js} +9 -9
- package/dist/{campaign.enum-Bkgm7Eui.js → campaign.enum-DpHc_AKY.js} +1 -1
- package/dist/{campaign.fn-P4ZkJWZ1.js → campaign.fn-CWbQSsaV.js} +2 -2
- package/dist/{collectible.enum-BP3FWmgp.js → collectible.enum-Bc6yW99E.js} +1 -1
- package/dist/{collection.fn-B5hTEOhD.js → collection.fn--L45oV4w.js} +2 -2
- package/dist/{dto-ao87-Ydo.js → dto-pirGeUnW.js} +4 -4
- package/dist/{effect-BDo1bV-w.js → effect-YTFtNuVH.js} +1 -1
- package/dist/{email-addresses-B-oXjMbu.js → email-addresses-B8bKFPN_.js} +1 -1
- package/dist/{export-BJ93wKMJ.js → export-K8csYP6E.js} +3 -3
- package/dist/{helper-DIBaFgT8.js → helper-mK6u9Bg8.js} +1 -1
- package/dist/{index-H_VNJAQv.js → index-6IGDKCf8.js} +1 -1
- package/dist/{index-BLNNEMcq.js → index-C8ctZEra.js} +1 -1
- package/dist/{index-BxpCMeMY.js → index-C8mcPqGM.js} +6 -6
- package/dist/{index-BBW2oNKe.js → index-C96irFRB.js} +1 -1
- package/dist/{index-sx63iBdE.js → index-CEZb4fna.js} +3 -3
- package/dist/{index-BY9zfO2Y.js → index-CYHgJwnc.js} +3 -3
- package/dist/{index-DDoUQHWH.js → index-CpxH7mdN.js} +4 -4
- package/dist/{index-BX4S_sse.js → index-DE2MpHut.js} +2 -2
- package/dist/{index-CFg7ea6S.js → index-DFLG_2P9.js} +1 -1
- package/dist/{index-C6RWHkGF.js → index-DP7HXEr9.js} +1 -1
- package/dist/{index-KkaBP7vA.js → index-F-pD5WRJ.js} +1 -1
- package/dist/{index-CcIjFlvm.js → index-espwcMLv.js} +1 -1
- package/dist/{index.esm2017-NXs90PMj.js → index.esm2017-BG85b82Z.js} +1 -1
- package/dist/{loading-Bnuw5L3Y.js → loading-DNvnRgpP.js} +4 -4
- package/dist/{membership-CZ_y58_j.js → membership-Ja85Dtss.js} +3 -3
- package/dist/{money-AY6EDrgr.js → money-hL_Dsbxu.js} +1 -1
- package/dist/{number-BbJ6Kbwi.js → number-CwTwPu4r.js} +1 -1
- package/dist/{objectid-DUKoXb-Y.js → objectid-DbcihVwq.js} +8 -8
- package/dist/{reward-CXtVKCBn.js → reward-1byDPYcc.js} +1 -1
- package/dist/{rule-BMKyg1g0.js → rule-BdWrXdvd.js} +3 -3
- package/dist/{rule-builder-DqRZOJfw.js → rule-builder-i8OVsDJ3.js} +1 -1
- package/dist/{template-DJpPUC9p.js → template-CGMDec1D.js} +4 -4
- package/dist/{trigger-Jo5dHemf.js → trigger-qTKI0OAW.js} +4 -4
- package/dist/{usePagination-BJSz3wZu.js → usePagination-BGkqnwZO.js} +1 -1
- package/dist/{user-3cRqdGEW.js → user-BG8vrTfB.js} +1 -1
- package/dist/{vue-i18n-DjADG98J.js → vue-i18n-DXJ3bXfe.js} +154 -154
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { defineComponent as pe, computed as
|
|
2
|
-
import { h as
|
|
3
|
-
import { useDialog as Ie, components as
|
|
4
|
-
import { e as mt, M as ut } from "./email-addresses-
|
|
5
|
-
import { a as qe, _ as Ge, w as pt } from "./usePagination-
|
|
6
|
-
import "./index-
|
|
7
|
-
import { p as Ye, c as bt, b as Oe, u as Ke } from "./loading-
|
|
8
|
-
import { u as Ve, C as Re, s as ft } from "./membership-
|
|
9
|
-
import { c as yt } from "./index-
|
|
1
|
+
import { defineComponent as pe, computed as j, ref as Q, resolveComponent as I, openBlock as f, createElementBlock as A, Fragment as L, createElementVNode as n, unref as t, createBlock as q, createCommentVNode as xe, createVNode as v, renderList as ie, withCtx as ve, createTextVNode as Fe, toDisplayString as E, withDirectives as Le, vShow as ze, watch as it, onBeforeMount as lt, h as z, onMounted as je, isRef as ct, normalizeClass as dt } from "vue";
|
|
2
|
+
import { h as w } from "./moment-BWErdI6_.js";
|
|
3
|
+
import { useDialog as Ie, components as ge } from "@feedmepos/ui-library";
|
|
4
|
+
import { e as mt, M as ut } from "./email-addresses-B8bKFPN_.js";
|
|
5
|
+
import { a as qe, _ as Ge, w as pt } from "./usePagination-BGkqnwZO.js";
|
|
6
|
+
import "./index-C96irFRB.js";
|
|
7
|
+
import { p as Ye, c as bt, b as Oe, u as Ke } from "./loading-DNvnRgpP.js";
|
|
8
|
+
import { u as Ve, C as Re, s as ft } from "./membership-Ja85Dtss.js";
|
|
9
|
+
import { c as yt } from "./index-CEZb4fna.js";
|
|
10
10
|
import { _ as Ue } from "./lodash-B5I3zXaY.js";
|
|
11
11
|
import { D as gt } from "./type_drinks-D6jnpvwV.js";
|
|
12
|
-
import { i as vt, j as xt, k as ht, l as St, m as _t, d as
|
|
13
|
-
import { C as Ae } from "./collection.fn
|
|
14
|
-
import { u as He } from "./business-
|
|
12
|
+
import { i as vt, j as xt, k as ht, l as St, m as _t, d as Te } from "./index-CpxH7mdN.js";
|
|
13
|
+
import { C as Ae } from "./collection.fn--L45oV4w.js";
|
|
14
|
+
import { u as He } from "./business-X8rRPAfz.js";
|
|
15
15
|
import { defineStore as Ct } from "pinia";
|
|
16
|
-
import { u as wt } from "./campaign-
|
|
17
|
-
import { f as X } from "./number-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import "./index-
|
|
22
|
-
import { m as We } from "./index-
|
|
23
|
-
import { s as
|
|
16
|
+
import { u as wt } from "./campaign-C8KDR1Eb.js";
|
|
17
|
+
import { f as X } from "./number-CwTwPu4r.js";
|
|
18
|
+
import "./index-DE2MpHut.js";
|
|
19
|
+
import "./index-C8mcPqGM.js";
|
|
20
|
+
import "./index-DFLG_2P9.js";
|
|
21
|
+
import "./index-CYHgJwnc.js";
|
|
22
|
+
import { m as We } from "./index-espwcMLv.js";
|
|
23
|
+
import { s as Ft } from "./index-CsaQJMAR.js";
|
|
24
24
|
import { o as Me } from "./objectId-dwaoBfJX.js";
|
|
25
|
-
import { a as ke } from "./collectible.enum-
|
|
26
|
-
import { c as
|
|
25
|
+
import { a as ke } from "./collectible.enum-Bc6yW99E.js";
|
|
26
|
+
import { c as Tt, a as Mt } from "./campaign-FXpP8n18.js";
|
|
27
27
|
import { useRouter as Je } from "vue-router";
|
|
28
|
-
import { m as le } from "./index-
|
|
29
|
-
import { t as kt } from "./index-
|
|
30
|
-
import { R as Xe } from "./app-
|
|
31
|
-
import { t as At } from "./money-
|
|
32
|
-
import { g as It, a as Vt, b as Et } from "./user-
|
|
28
|
+
import { m as le } from "./index-DP7HXEr9.js";
|
|
29
|
+
import { t as kt } from "./index-C8ctZEra.js";
|
|
30
|
+
import { R as Xe } from "./app-BDUi969b.js";
|
|
31
|
+
import { t as At } from "./money-hL_Dsbxu.js";
|
|
32
|
+
import { g as It, a as Vt, b as Et } from "./user-BG8vrTfB.js";
|
|
33
33
|
const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, Pt = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, Bt = /* @__PURE__ */ pe({
|
|
34
34
|
__name: "MemberStatsDialog",
|
|
35
35
|
props: {
|
|
@@ -43,25 +43,25 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
setup(y) {
|
|
46
|
-
var be, ne,
|
|
47
|
-
const V = Ie(), b = Ve(), u = y,
|
|
46
|
+
var be, ne, ae, H;
|
|
47
|
+
const V = Ie(), b = Ve(), u = y, r = j(
|
|
48
48
|
() => {
|
|
49
49
|
var m;
|
|
50
50
|
return (((m = u.member.collection) == null ? void 0 : m.TITLE) ?? []).reduce(
|
|
51
|
-
(d,
|
|
52
|
-
var
|
|
51
|
+
(d, M) => {
|
|
52
|
+
var C, F, O, N, D;
|
|
53
53
|
const s = b.sortedTitles.find(
|
|
54
|
-
(ee) => ee._id.toString() ===
|
|
54
|
+
(ee) => ee._id.toString() === M.collectible
|
|
55
55
|
);
|
|
56
56
|
if (!s) return d;
|
|
57
|
-
const
|
|
58
|
-
(ee,
|
|
57
|
+
const c = [...M.expiryBalance ?? []].sort(
|
|
58
|
+
(ee, se) => w(ee.expiredAt).isAfter(w(se.expiredAt)) ? -1 : 1
|
|
59
59
|
);
|
|
60
|
-
return (
|
|
60
|
+
return (C = c[0]) != null && C.expiredAt && w((F = c[0]) == null ? void 0 : F.expiredAt).isBefore(w()) || d.push({
|
|
61
61
|
_id: s._id,
|
|
62
62
|
name: s.name,
|
|
63
|
-
expiredAt: (O =
|
|
64
|
-
expiresIn:
|
|
63
|
+
expiredAt: (O = c[0]) != null && O.expiredAt ? w((N = c[0]) == null ? void 0 : N.expiredAt).toISOString() : "",
|
|
64
|
+
expiresIn: w((D = c[0]) == null ? void 0 : D.expiredAt).diff(w(), "days")
|
|
65
65
|
}), d;
|
|
66
66
|
},
|
|
67
67
|
[]
|
|
@@ -70,15 +70,15 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
70
70
|
), a = Q({
|
|
71
71
|
cardNo: u.member.cardNo,
|
|
72
72
|
experience: ((ne = (be = u.member.collection) == null ? void 0 : be.POINT) == null ? void 0 : ne[0].balance) ?? 0,
|
|
73
|
-
tier: ((H = (
|
|
74
|
-
titles:
|
|
75
|
-
}),
|
|
73
|
+
tier: ((H = (ae = u.member.collection) == null ? void 0 : ae.TIER) == null ? void 0 : H[0].balance) ?? -1,
|
|
74
|
+
titles: r.value.map((m) => ({ expiredAt: m.expiresIn, id: m._id })) ?? void 0
|
|
75
|
+
}), h = j(
|
|
76
76
|
() => (b.sortedTitles ?? []).map((m) => ({
|
|
77
77
|
label: m.name,
|
|
78
78
|
value: m._id.toString(),
|
|
79
|
-
sublabel:
|
|
79
|
+
sublabel: r.value.some((d) => d._id === m._id) ? "Owned" : void 0
|
|
80
80
|
}))
|
|
81
|
-
),
|
|
81
|
+
), x = j(() => (b.sortedTiers ?? []).map((m, d) => ({
|
|
82
82
|
label: m.name,
|
|
83
83
|
sublabel: `${m.option.from} - ${m.option.to}`,
|
|
84
84
|
from: m.option.from,
|
|
@@ -86,19 +86,19 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
86
86
|
value: d + 1
|
|
87
87
|
})));
|
|
88
88
|
function T() {
|
|
89
|
-
var
|
|
90
|
-
const m = ((
|
|
89
|
+
var M, s;
|
|
90
|
+
const m = ((M = x.value[(a.value.tier ?? 1) - 1]) == null ? void 0 : M.from) ?? 0, d = (s = x.value[(a.value.tier ?? 1) - 1]) == null ? void 0 : s.to;
|
|
91
91
|
a.value.experience = Math.min(
|
|
92
92
|
d ?? m,
|
|
93
93
|
Math.max(m, a.value.experience ?? 0)
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
|
-
const
|
|
97
|
-
var
|
|
98
|
-
const m = ((s = (
|
|
96
|
+
const _ = j(() => {
|
|
97
|
+
var M, s, c, C, F, O;
|
|
98
|
+
const m = ((s = (M = u.member.collection) == null ? void 0 : M.TIER) == null ? void 0 : s[0].balance) ?? -1, d = ((C = (c = u.member.collection) == null ? void 0 : c.POINT) == null ? void 0 : C[0].balance) ?? 0;
|
|
99
99
|
if (m != a.value.tier) return !0;
|
|
100
100
|
if (a.value.experience && a.value.experience != d) {
|
|
101
|
-
const N = ((
|
|
101
|
+
const N = ((F = x.value[m - 1]) == null ? void 0 : F.from) ?? 0, D = ((O = x.value[m - 1]) == null ? void 0 : O.to) ?? 0;
|
|
102
102
|
if (a.value.experience < N || D && a.value.experience > D)
|
|
103
103
|
return !0;
|
|
104
104
|
}
|
|
@@ -106,102 +106,102 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
106
106
|
});
|
|
107
107
|
function p(m) {
|
|
108
108
|
var d;
|
|
109
|
-
return (d =
|
|
109
|
+
return (d = r.value.find((M) => M._id === m)) == null ? void 0 : d.expiresIn;
|
|
110
110
|
}
|
|
111
|
-
const Y =
|
|
111
|
+
const Y = j(() => {
|
|
112
112
|
const m = vt.safeParse(a.value);
|
|
113
113
|
return m.success ? void 0 : m.error.errors;
|
|
114
114
|
});
|
|
115
|
-
function
|
|
116
|
-
var d,
|
|
117
|
-
return (
|
|
115
|
+
function G(m) {
|
|
116
|
+
var d, M;
|
|
117
|
+
return (M = (d = Y.value) == null ? void 0 : d.find((s) => s.path.join(".") === m)) == null ? void 0 : M.message;
|
|
118
118
|
}
|
|
119
119
|
function Z(m) {
|
|
120
120
|
var d;
|
|
121
|
-
return (d = Y.value) == null ? void 0 : d.filter((
|
|
121
|
+
return (d = Y.value) == null ? void 0 : d.filter((M) => M.path.join(".").startsWith(m)).map((M) => M.message);
|
|
122
122
|
}
|
|
123
|
-
async function
|
|
123
|
+
async function K() {
|
|
124
124
|
await u.onSubmit(a.value), V.close();
|
|
125
125
|
}
|
|
126
126
|
return (m, d) => {
|
|
127
|
-
var ee,
|
|
128
|
-
const
|
|
129
|
-
return f(),
|
|
127
|
+
var ee, se;
|
|
128
|
+
const M = I("FmSelect"), s = I("FmStepperField"), c = I("FmTextField"), C = I("FmField"), F = I("FmFormGroup"), O = I("FmButton"), N = I("FmHelperText"), D = I("FmSpacer");
|
|
129
|
+
return f(), A(L, null, [
|
|
130
130
|
n("div", $t, [
|
|
131
131
|
d[6] || (d[6] = n("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1)),
|
|
132
|
-
t(
|
|
132
|
+
t(x).length ? (f(), q(M, {
|
|
133
133
|
key: 0,
|
|
134
134
|
modelValue: t(a).tier,
|
|
135
135
|
"onUpdate:modelValue": [
|
|
136
|
-
d[0] || (d[0] = (
|
|
136
|
+
d[0] || (d[0] = (k) => t(a).tier = k),
|
|
137
137
|
T
|
|
138
138
|
],
|
|
139
139
|
label: "Member Tier",
|
|
140
|
-
items: t(
|
|
141
|
-
"helper-text":
|
|
142
|
-
"helper-state":
|
|
143
|
-
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) :
|
|
140
|
+
items: t(x),
|
|
141
|
+
"helper-text": G("tier"),
|
|
142
|
+
"helper-state": G("tier") ? "error" : void 0
|
|
143
|
+
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : xe("", !0),
|
|
144
144
|
v(s, {
|
|
145
145
|
"model-value": t(a).experience ?? 0,
|
|
146
|
-
"onUpdate:modelValue": d[1] || (d[1] = (
|
|
146
|
+
"onUpdate:modelValue": d[1] || (d[1] = (k) => t(a).experience = k),
|
|
147
147
|
label: "Member Experience",
|
|
148
148
|
"max-fraction-digits": 0,
|
|
149
|
-
"helper-text":
|
|
150
|
-
"helper-state":
|
|
149
|
+
"helper-text": G("experience"),
|
|
150
|
+
"helper-state": G("experience") ? "error" : void 0
|
|
151
151
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
152
152
|
d[7] || (d[7] = n("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1)),
|
|
153
|
-
v(
|
|
153
|
+
v(c, {
|
|
154
154
|
modelValue: t(a).cardNo,
|
|
155
|
-
"onUpdate:modelValue": d[2] || (d[2] = (
|
|
155
|
+
"onUpdate:modelValue": d[2] || (d[2] = (k) => t(a).cardNo = k),
|
|
156
156
|
label: "Card number",
|
|
157
|
-
"helper-text":
|
|
158
|
-
"helper-state":
|
|
157
|
+
"helper-text": G("cardNo"),
|
|
158
|
+
"helper-state": G("cardNo") ? "error" : void 0
|
|
159
159
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
160
160
|
d[8] || (d[8] = n("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1)),
|
|
161
|
-
(ee = t(a).titles) != null && ee.length ? (f(),
|
|
161
|
+
(ee = t(a).titles) != null && ee.length ? (f(), A("div", Nt, d[5] || (d[5] = [
|
|
162
162
|
n("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
163
163
|
n("div", { class: "flex-1" }, "Title"),
|
|
164
164
|
n("div", { class: "flex-1" }, "Expires in days"),
|
|
165
165
|
n("div", { class: "w-24 h-1" })
|
|
166
166
|
], -1)
|
|
167
|
-
]))) :
|
|
168
|
-
(f(!0),
|
|
167
|
+
]))) : xe("", !0),
|
|
168
|
+
(f(!0), A(L, null, ie(t(a).titles ?? [], (k, P) => (f(), A("div", { key: P }, [
|
|
169
169
|
n("div", Dt, [
|
|
170
|
-
t(
|
|
170
|
+
t(r).some((o) => o._id === k.id) ? (f(), q(F, {
|
|
171
171
|
key: 1,
|
|
172
172
|
"model-value": "",
|
|
173
173
|
class: "flex-1"
|
|
174
174
|
}, {
|
|
175
|
-
default:
|
|
176
|
-
v(
|
|
175
|
+
default: ve(() => [
|
|
176
|
+
v(C, {
|
|
177
177
|
disabled: !0,
|
|
178
178
|
class: "text-fm-color-typo-secondary"
|
|
179
179
|
}, {
|
|
180
|
-
default:
|
|
180
|
+
default: ve(() => {
|
|
181
181
|
var o;
|
|
182
182
|
return [
|
|
183
|
-
|
|
183
|
+
Fe(E((o = t(h).find((e) => e.value === k.id)) == null ? void 0 : o.label), 1)
|
|
184
184
|
];
|
|
185
185
|
}),
|
|
186
186
|
_: 2
|
|
187
187
|
}, 1024)
|
|
188
188
|
]),
|
|
189
189
|
_: 2
|
|
190
|
-
}, 1024)) : (f(),
|
|
190
|
+
}, 1024)) : (f(), q(M, {
|
|
191
191
|
key: 0,
|
|
192
|
-
modelValue:
|
|
193
|
-
"onUpdate:modelValue": [(o) =>
|
|
192
|
+
modelValue: k.id,
|
|
193
|
+
"onUpdate:modelValue": [(o) => k.id = o, (o) => k.expiredAt = p(o) ?? 1],
|
|
194
194
|
class: "flex-1",
|
|
195
|
-
items: t(
|
|
195
|
+
items: t(h).filter(
|
|
196
196
|
(o) => {
|
|
197
197
|
var e;
|
|
198
|
-
return !((e = t(a).titles) != null && e.map((
|
|
198
|
+
return !((e = t(a).titles) != null && e.map((i) => i.id).includes(o.value)) || k.id === o.value;
|
|
199
199
|
}
|
|
200
200
|
)
|
|
201
201
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])),
|
|
202
202
|
v(s, {
|
|
203
|
-
modelValue:
|
|
204
|
-
"onUpdate:modelValue": (o) =>
|
|
203
|
+
modelValue: k.expiredAt,
|
|
204
|
+
"onUpdate:modelValue": (o) => k.expiredAt = o,
|
|
205
205
|
class: "flex-1",
|
|
206
206
|
label: "",
|
|
207
207
|
"max-fraction-digits": 0
|
|
@@ -216,55 +216,55 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
216
216
|
}
|
|
217
217
|
}, null, 8, ["onClick"])
|
|
218
218
|
]),
|
|
219
|
-
(f(!0),
|
|
219
|
+
(f(!0), A(L, null, ie(Z(`titles.${P}`), (o, e) => (f(), q(N, {
|
|
220
220
|
key: e,
|
|
221
221
|
class: "items-center",
|
|
222
222
|
state: "error",
|
|
223
223
|
text: o.toString()
|
|
224
224
|
}, null, 8, ["text"]))), 128))
|
|
225
225
|
]))), 128)),
|
|
226
|
-
t(
|
|
226
|
+
t(h).length && (((se = t(a).titles) == null ? void 0 : se.length) ?? 0) < t(h).length ? (f(), q(O, {
|
|
227
227
|
key: 2,
|
|
228
228
|
icon: "add",
|
|
229
229
|
label: "Give title",
|
|
230
230
|
variant: "plain",
|
|
231
|
-
onClick: d[3] || (d[3] = (
|
|
231
|
+
onClick: d[3] || (d[3] = (k) => {
|
|
232
232
|
var P;
|
|
233
233
|
return t(a).titles = [
|
|
234
234
|
...t(a).titles ?? [],
|
|
235
235
|
{
|
|
236
|
-
id: ((P = t(
|
|
236
|
+
id: ((P = t(h).find(
|
|
237
237
|
(o) => {
|
|
238
238
|
var e;
|
|
239
|
-
return !((e = t(a).titles) != null && e.map((
|
|
239
|
+
return !((e = t(a).titles) != null && e.map((i) => i.id).includes(o.value));
|
|
240
240
|
}
|
|
241
|
-
)) == null ? void 0 : P.value) || t(
|
|
241
|
+
)) == null ? void 0 : P.value) || t(h)[0].value,
|
|
242
242
|
expiredAt: 0
|
|
243
243
|
}
|
|
244
244
|
];
|
|
245
245
|
})
|
|
246
|
-
})) :
|
|
246
|
+
})) : xe("", !0)
|
|
247
247
|
]),
|
|
248
248
|
n("div", Pt, [
|
|
249
249
|
Le(v(N, {
|
|
250
250
|
state: "warning",
|
|
251
251
|
text: "Updating member will cause tier to change"
|
|
252
252
|
}, null, 512), [
|
|
253
|
-
[ze, t(
|
|
253
|
+
[ze, t(_)]
|
|
254
254
|
]),
|
|
255
255
|
v(D),
|
|
256
256
|
v(O, {
|
|
257
257
|
variant: "secondary",
|
|
258
258
|
label: "Cancel",
|
|
259
259
|
size: "md",
|
|
260
|
-
onClick: d[4] || (d[4] = (
|
|
260
|
+
onClick: d[4] || (d[4] = (k) => t(V).close())
|
|
261
261
|
}),
|
|
262
262
|
v(O, {
|
|
263
263
|
disabled: !!t(Y),
|
|
264
264
|
variant: "primary",
|
|
265
265
|
label: "Submit",
|
|
266
266
|
size: "md",
|
|
267
|
-
onClick:
|
|
267
|
+
onClick: K
|
|
268
268
|
}, null, 8, ["disabled"])
|
|
269
269
|
])
|
|
270
270
|
], 64);
|
|
@@ -285,37 +285,37 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
285
285
|
amount: 1,
|
|
286
286
|
day: 1,
|
|
287
287
|
remark: void 0
|
|
288
|
-
}),
|
|
289
|
-
function
|
|
290
|
-
|
|
288
|
+
}), r = Q(!0), a = j(() => Ae.formattedType(b.type.toUpperCase()));
|
|
289
|
+
function h(_) {
|
|
290
|
+
r.value = _, !_ && b.type === "coin" && (u.value.day = void 0);
|
|
291
291
|
}
|
|
292
|
-
async function
|
|
292
|
+
async function x() {
|
|
293
293
|
if (b.action === "send") {
|
|
294
|
-
const
|
|
294
|
+
const _ = u.value.day ? `, expire in ${u.value.day} days` : "";
|
|
295
295
|
Ye.confirm(
|
|
296
|
-
`Are you sure to send ${u.value.amount} ${a.value.toLowerCase()}${
|
|
296
|
+
`Are you sure to send ${u.value.amount} ${a.value.toLowerCase()}${_}? This action cannot be reversed.`
|
|
297
297
|
).then(async (p) => {
|
|
298
298
|
p && await b.onSubmit(u.value);
|
|
299
299
|
});
|
|
300
300
|
} else
|
|
301
301
|
Ye.confirm(
|
|
302
302
|
`Are you sure to deduct ${u.value.amount} ${a.value.toLowerCase()}? This action cannot be reversed.`
|
|
303
|
-
).then(async (
|
|
304
|
-
|
|
303
|
+
).then(async (_) => {
|
|
304
|
+
_ && await b.onSubmit(u.value);
|
|
305
305
|
});
|
|
306
306
|
}
|
|
307
|
-
const T =
|
|
307
|
+
const T = j(() => {
|
|
308
308
|
const p = (b.action === "send" ? b.type === "coin" ? xt : ht : b.type === "coin" ? St : _t).safeParse(u.value);
|
|
309
309
|
return p.success == !1 ? p.error.flatten().fieldErrors : void 0;
|
|
310
310
|
});
|
|
311
|
-
return (
|
|
312
|
-
const Y = I("FmStepperField"),
|
|
313
|
-
return f(),
|
|
314
|
-
default:
|
|
315
|
-
var ne,
|
|
311
|
+
return (_, p) => {
|
|
312
|
+
const Y = I("FmStepperField"), G = I("FmSwitch"), Z = I("FmTextarea"), K = I("FmButton"), be = I("FmCard");
|
|
313
|
+
return f(), q(be, { class: "flex flex-col gap-16 p-16" }, {
|
|
314
|
+
default: ve(() => {
|
|
315
|
+
var ne, ae, H, m, d, M;
|
|
316
316
|
return [
|
|
317
317
|
n("div", Yt, E(b.action == "send" ? "Send" : "Deduct") + " " + E(t(Re)[b.type.toUpperCase()].name), 1),
|
|
318
|
-
|
|
318
|
+
Fe(" " + E(t(T)) + " ", 1),
|
|
319
319
|
n("div", Ot, [
|
|
320
320
|
v(Y, {
|
|
321
321
|
modelValue: t(u).amount,
|
|
@@ -324,16 +324,16 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
324
324
|
"is-currency": !0,
|
|
325
325
|
"max-fraction-digits": 2,
|
|
326
326
|
"helper-state": (ne = t(T)) != null && ne.amount ? "error" : void 0,
|
|
327
|
-
"helper-text": (H = (
|
|
327
|
+
"helper-text": (H = (ae = t(T)) == null ? void 0 : ae.amount) == null ? void 0 : H[0]
|
|
328
328
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
329
|
-
y.action === "send" && b.type === "coin" ? (f(),
|
|
329
|
+
y.action === "send" && b.type === "coin" ? (f(), q(G, {
|
|
330
330
|
key: 0,
|
|
331
|
-
"model-value": t(
|
|
331
|
+
"model-value": t(r),
|
|
332
332
|
label: `${t(a)} expires`,
|
|
333
333
|
"label-placement": "right",
|
|
334
|
-
"onUpdate:modelValue": p[1] || (p[1] = (s) =>
|
|
335
|
-
}, null, 8, ["model-value", "label"])) :
|
|
336
|
-
y.action === "send" && t(
|
|
334
|
+
"onUpdate:modelValue": p[1] || (p[1] = (s) => h(s))
|
|
335
|
+
}, null, 8, ["model-value", "label"])) : xe("", !0),
|
|
336
|
+
y.action === "send" && t(r) ? (f(), q(Y, {
|
|
337
337
|
key: 1,
|
|
338
338
|
modelValue: t(u).day,
|
|
339
339
|
"onUpdate:modelValue": p[2] || (p[2] = (s) => t(u).day = s),
|
|
@@ -343,8 +343,8 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
343
343
|
max: 9999,
|
|
344
344
|
min: 0,
|
|
345
345
|
"helper-state": (m = t(T)) != null && m.day ? "error" : void 0,
|
|
346
|
-
"helper-text": (
|
|
347
|
-
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"])) :
|
|
346
|
+
"helper-text": (M = (d = t(T)) == null ? void 0 : d.day) == null ? void 0 : M[0]
|
|
347
|
+
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"])) : xe("", !0),
|
|
348
348
|
v(Z, {
|
|
349
349
|
modelValue: t(u).remark,
|
|
350
350
|
"onUpdate:modelValue": p[3] || (p[3] = (s) => t(u).remark = s),
|
|
@@ -352,18 +352,18 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
352
352
|
}, null, 8, ["modelValue"])
|
|
353
353
|
]),
|
|
354
354
|
n("div", Rt, [
|
|
355
|
-
v(
|
|
355
|
+
v(K, {
|
|
356
356
|
variant: "secondary",
|
|
357
357
|
label: "Cancel",
|
|
358
358
|
size: "md",
|
|
359
359
|
onClick: p[4] || (p[4] = (s) => t(V).close())
|
|
360
360
|
}),
|
|
361
|
-
v(
|
|
361
|
+
v(K, {
|
|
362
362
|
disabled: !!t(T),
|
|
363
363
|
variant: "primary",
|
|
364
364
|
label: "Submit",
|
|
365
365
|
size: "md",
|
|
366
|
-
onClick: p[5] || (p[5] = async () =>
|
|
366
|
+
onClick: p[5] || (p[5] = async () => x())
|
|
367
367
|
}, null, 8, ["disabled"])
|
|
368
368
|
])
|
|
369
369
|
];
|
|
@@ -411,35 +411,35 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
411
411
|
setup(y) {
|
|
412
412
|
const V = y, b = Q({
|
|
413
413
|
search: ""
|
|
414
|
-
}), { tableMeta: u, rowData:
|
|
415
|
-
const
|
|
414
|
+
}), { tableMeta: u, rowData: r, onSort: a, debouncedFetchData: h, onSearch: x } = qe(async (T) => {
|
|
415
|
+
const _ = {
|
|
416
416
|
...b.value,
|
|
417
417
|
...V.filters
|
|
418
418
|
};
|
|
419
419
|
return await We.readCollectionsByMemberId(
|
|
420
420
|
V.member._id.toString(),
|
|
421
421
|
T,
|
|
422
|
-
|
|
422
|
+
_
|
|
423
423
|
);
|
|
424
424
|
});
|
|
425
425
|
return it(
|
|
426
426
|
b,
|
|
427
427
|
() => {
|
|
428
|
-
|
|
428
|
+
h();
|
|
429
429
|
},
|
|
430
430
|
{ deep: !0 }
|
|
431
431
|
), lt(async () => {
|
|
432
|
-
await
|
|
433
|
-
}), (T,
|
|
432
|
+
await h();
|
|
433
|
+
}), (T, _) => {
|
|
434
434
|
const p = I("FmSearch");
|
|
435
|
-
return f(),
|
|
435
|
+
return f(), A("div", Lt, [
|
|
436
436
|
n("div", zt, [
|
|
437
437
|
v(p, {
|
|
438
438
|
class: "hidden xs:flex",
|
|
439
439
|
modelValue: t(b).search,
|
|
440
440
|
"onUpdate:modelValue": [
|
|
441
|
-
|
|
442
|
-
t(
|
|
441
|
+
_[0] || (_[0] = (Y) => t(b).search = Y),
|
|
442
|
+
t(x)
|
|
443
443
|
],
|
|
444
444
|
placeholder: "Search",
|
|
445
445
|
collapsible: ""
|
|
@@ -454,15 +454,15 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
454
454
|
class: "xs:hidden",
|
|
455
455
|
modelValue: t(b).search,
|
|
456
456
|
"onUpdate:modelValue": [
|
|
457
|
-
|
|
458
|
-
t(
|
|
457
|
+
_[1] || (_[1] = (Y) => t(b).search = Y),
|
|
458
|
+
t(x)
|
|
459
459
|
],
|
|
460
460
|
placeholder: "Search"
|
|
461
461
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
462
462
|
]),
|
|
463
463
|
v(Ge, {
|
|
464
464
|
loading: t(u).isLoading,
|
|
465
|
-
"row-data": t(
|
|
465
|
+
"row-data": t(r),
|
|
466
466
|
"row-count": t(u).totalRows,
|
|
467
467
|
"column-defs": y.columns,
|
|
468
468
|
"page-count": t(u).pageCount,
|
|
@@ -470,7 +470,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
470
470
|
"page-size": t(u).pageSize,
|
|
471
471
|
"shrink-at": !1,
|
|
472
472
|
onSortChange: t(a),
|
|
473
|
-
onPageChange:
|
|
473
|
+
onPageChange: _[2] || (_[2] = (Y) => t(h)({
|
|
474
474
|
pageSize: Y.pageSize,
|
|
475
475
|
pageIndex: Y.pageIndex
|
|
476
476
|
}))
|
|
@@ -493,11 +493,12 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
493
493
|
meta: {
|
|
494
494
|
maxWidth: "300px"
|
|
495
495
|
},
|
|
496
|
-
cell(
|
|
497
|
-
|
|
496
|
+
cell(r) {
|
|
497
|
+
var a;
|
|
498
|
+
return z(
|
|
498
499
|
"div",
|
|
499
500
|
{ class: "text-ellipsis truncate" },
|
|
500
|
-
|
|
501
|
+
((a = r.row.original.pf_collectible) == null ? void 0 : a.name) || "-"
|
|
501
502
|
);
|
|
502
503
|
},
|
|
503
504
|
enableSorting: !1
|
|
@@ -505,30 +506,33 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
505
506
|
{
|
|
506
507
|
header: "Claimed at",
|
|
507
508
|
accessorKey: "_id",
|
|
508
|
-
accessorFn: (
|
|
509
|
+
accessorFn: (r) => w(Me(r._id.toString())).format("D MMM YYYY"),
|
|
509
510
|
enableSorting: !1
|
|
510
511
|
},
|
|
511
512
|
{
|
|
512
513
|
header: "Expired at",
|
|
513
|
-
cell(
|
|
514
|
-
var
|
|
515
|
-
const a = (
|
|
514
|
+
cell(r) {
|
|
515
|
+
var h, x, T, _;
|
|
516
|
+
const a = (x = (h = r.row.original.expiryBalance) == null ? void 0 : h[0]) != null && x.expiredAt ? w((_ = (T = r.row.original.expiryBalance) == null ? void 0 : T[0]) == null ? void 0 : _.expiredAt).format(
|
|
516
517
|
"D MMM YYYY"
|
|
517
518
|
) : "-";
|
|
518
|
-
return
|
|
519
|
+
return z("div", {}, a);
|
|
519
520
|
},
|
|
520
521
|
enableSorting: !0
|
|
521
522
|
},
|
|
522
523
|
{
|
|
523
524
|
header: "Transfer open",
|
|
524
|
-
accessorFn: (
|
|
525
|
+
accessorFn: (r) => {
|
|
526
|
+
var a, h, x;
|
|
527
|
+
return Ft((x = (h = (a = r.pf_collectible) == null ? void 0 : a.options) == null ? void 0 : h.enableTransfer) == null ? void 0 : x.toString());
|
|
528
|
+
},
|
|
525
529
|
enableSorting: !1
|
|
526
530
|
}
|
|
527
|
-
], u = (
|
|
531
|
+
], u = (r) => ({
|
|
528
532
|
type: [ke.enum.VOUCHER],
|
|
529
|
-
isActive:
|
|
533
|
+
isActive: r
|
|
530
534
|
});
|
|
531
|
-
return (
|
|
535
|
+
return (r, a) => (f(), A(L, null, [
|
|
532
536
|
a[0] || (a[0] = n("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Voucher Collections", -1)),
|
|
533
537
|
v(he, {
|
|
534
538
|
member: V.member,
|
|
@@ -559,27 +563,37 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
559
563
|
meta: {
|
|
560
564
|
maxWidth: "300px"
|
|
561
565
|
},
|
|
562
|
-
cell(
|
|
563
|
-
|
|
566
|
+
cell(r) {
|
|
567
|
+
var a;
|
|
568
|
+
return z(
|
|
564
569
|
"div",
|
|
565
570
|
{ class: "text-ellipsis truncate" },
|
|
566
|
-
|
|
571
|
+
((a = r.row.original.pf_campaign) == null ? void 0 : a.name) || "-"
|
|
567
572
|
);
|
|
568
573
|
},
|
|
569
574
|
enableSorting: !1
|
|
570
575
|
},
|
|
571
576
|
{
|
|
572
577
|
header: "Status",
|
|
573
|
-
cell(
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
578
|
+
cell(r) {
|
|
579
|
+
if (r.row.original.pf_campaign) {
|
|
580
|
+
const a = {
|
|
581
|
+
active: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
|
|
582
|
+
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
583
|
+
completed: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
584
|
+
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
585
|
+
}, h = Tt(
|
|
586
|
+
r.row.original.pf_campaign
|
|
587
|
+
), T = r.row.original.balance === r.row.original.pf_collectible.extras.mission.end && h === "active" ? "completed" : h;
|
|
588
|
+
return z(ge.FmChip, {
|
|
589
|
+
class: a[T],
|
|
590
|
+
label: bt.title(T),
|
|
591
|
+
compact: !0
|
|
592
|
+
});
|
|
593
|
+
}
|
|
594
|
+
return z(ge.FmChip, {
|
|
595
|
+
class: "",
|
|
596
|
+
label: "-",
|
|
583
597
|
compact: !0
|
|
584
598
|
});
|
|
585
599
|
},
|
|
@@ -587,7 +601,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
587
601
|
},
|
|
588
602
|
{
|
|
589
603
|
header: "Summary",
|
|
590
|
-
accessorFn: (
|
|
604
|
+
accessorFn: (r) => r != null && r.pf_campaign ? Mt(r.pf_campaign) : "-",
|
|
591
605
|
enableSorting: !1
|
|
592
606
|
},
|
|
593
607
|
{
|
|
@@ -597,26 +611,29 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
597
611
|
},
|
|
598
612
|
{
|
|
599
613
|
header: "Total Step",
|
|
600
|
-
|
|
614
|
+
accessorFn: (r) => {
|
|
615
|
+
var a, h, x;
|
|
616
|
+
return ((x = (h = (a = r == null ? void 0 : r.pf_collectible) == null ? void 0 : a.extras) == null ? void 0 : h.mission) == null ? void 0 : x.end) ?? 0;
|
|
617
|
+
},
|
|
601
618
|
enableSorting: !1
|
|
602
619
|
}
|
|
603
|
-
], u = (
|
|
620
|
+
], u = (r) => ({
|
|
604
621
|
type: [ke.enum.STAMP],
|
|
605
|
-
"pf_collectible.extras.mission.type": [
|
|
622
|
+
"pf_collectible.extras.mission.type": [r]
|
|
606
623
|
});
|
|
607
|
-
return (
|
|
624
|
+
return (r, a) => (f(), A(L, null, [
|
|
608
625
|
a[0] || (a[0] = n("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Mission", -1)),
|
|
609
626
|
v(he, {
|
|
610
627
|
member: V.member,
|
|
611
628
|
columns: b,
|
|
612
629
|
title: "Stamp mission",
|
|
613
|
-
filters: u(t(
|
|
630
|
+
filters: u(t(Te).enum.STAMP)
|
|
614
631
|
}, null, 8, ["member", "filters"]),
|
|
615
632
|
v(he, {
|
|
616
633
|
member: V.member,
|
|
617
634
|
columns: b,
|
|
618
635
|
title: "Progress mission",
|
|
619
|
-
filters: u(t(
|
|
636
|
+
filters: u(t(Te).enum.PROGRESSIVE)
|
|
620
637
|
}, null, 8, ["member", "filters"])
|
|
621
638
|
], 64));
|
|
622
639
|
}
|
|
@@ -635,11 +652,12 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
635
652
|
meta: {
|
|
636
653
|
maxWidth: "300px"
|
|
637
654
|
},
|
|
638
|
-
cell(
|
|
639
|
-
|
|
655
|
+
cell(r) {
|
|
656
|
+
var a;
|
|
657
|
+
return z(
|
|
640
658
|
"div",
|
|
641
659
|
{ class: "text-ellipsis truncate" },
|
|
642
|
-
|
|
660
|
+
((a = r.row.original.pf_campaign) == null ? void 0 : a.name) || "-"
|
|
643
661
|
);
|
|
644
662
|
},
|
|
645
663
|
enableSorting: !1
|
|
@@ -647,17 +665,17 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
647
665
|
{
|
|
648
666
|
header: "Claimed at",
|
|
649
667
|
accessorKey: "_id",
|
|
650
|
-
accessorFn: (
|
|
668
|
+
accessorFn: (r) => w(Me(r._id.toString())).format("D MMM YYYY"),
|
|
651
669
|
enableSorting: !1
|
|
652
670
|
},
|
|
653
671
|
{
|
|
654
672
|
header: "Expired at",
|
|
655
|
-
cell(
|
|
656
|
-
var
|
|
657
|
-
const a = (
|
|
673
|
+
cell(r) {
|
|
674
|
+
var h, x, T, _;
|
|
675
|
+
const a = (x = (h = r.row.original.expiryBalance) == null ? void 0 : h[0]) != null && x.expiredAt ? w((_ = (T = r.row.original.expiryBalance) == null ? void 0 : T[0]) == null ? void 0 : _.expiredAt).format(
|
|
658
676
|
"D MMM YYYY"
|
|
659
677
|
) : "-";
|
|
660
|
-
return
|
|
678
|
+
return z("div", {}, a);
|
|
661
679
|
},
|
|
662
680
|
enableSorting: !1
|
|
663
681
|
},
|
|
@@ -666,11 +684,11 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
666
684
|
accessorKey: "balance",
|
|
667
685
|
enableSorting: !1
|
|
668
686
|
}
|
|
669
|
-
], u = (
|
|
687
|
+
], u = (r) => ({
|
|
670
688
|
type: [ke.enum.GAME],
|
|
671
|
-
isActive:
|
|
689
|
+
isActive: r
|
|
672
690
|
});
|
|
673
|
-
return (
|
|
691
|
+
return (r, a) => (f(), A(L, null, [
|
|
674
692
|
a[0] || (a[0] = n("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Game program", -1)),
|
|
675
693
|
v(he, {
|
|
676
694
|
member: V.member,
|
|
@@ -686,13 +704,13 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
686
704
|
}, null, 8, ["member", "filters"])
|
|
687
705
|
], 64));
|
|
688
706
|
}
|
|
689
|
-
}), Xt = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, Qt = { class: "grid md:grid-cols-2 lg:grid-cols-2 gap-x-36 gap-y-24" }, Zt = { class: "space-y-16" }, eo = { class: "flex gap-16 items-center" }, to = { class: "flex-auto" }, oo = { class: "fm-typo-en-body-md-600" }, no = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
707
|
+
}), Xt = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, Qt = { class: "grid md:grid-cols-2 lg:grid-cols-2 gap-x-36 gap-y-24" }, Zt = { class: "space-y-16" }, eo = { class: "flex gap-16 items-center" }, to = { class: "flex-auto" }, oo = { class: "fm-typo-en-body-md-600" }, no = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ao = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, so = { class: "fm-typo-en-body-md-800" }, ro = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, io = { class: "fm-typo-en-body-md-800" }, lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, co = { class: "fm-typo-en-body-md-600" }, mo = { class: "gap-16 grid grid-cols-1" }, uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, po = { class: "fm-typo-en-body-md-600" }, bo = { class: "p-16 grid md:grid-cols-3 lg:grid-cols-3 border-2 border-fm-color-neutral-gray-100 rounded-lg gap-16 divide-y md:divide-y-0 lg:divide-y-0 md:divide-x lg:divide-x divide-fm-color-neutral-gray-100" }, fo = { class: "flex justify-between mb-16" }, yo = { class: "fm-typo-en-title-sm-600" }, go = ["onClick"], vo = { class: "flex flex-col gap-y-16" }, xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ho = { class: "fm-typo-en-body-md-600" }, So = { class: "space-y-8" }, _o = {
|
|
690
708
|
key: 0,
|
|
691
709
|
class: "space-x-8"
|
|
692
710
|
}, Co = {
|
|
693
711
|
key: 1,
|
|
694
712
|
class: "text-fm-color-typo-secondary"
|
|
695
|
-
}, wo = { class: "space-y-8" },
|
|
713
|
+
}, wo = { class: "space-y-8" }, Fo = ["src"], To = { class: "fm-typo-en-body-md-600" }, Mo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, ko = {
|
|
696
714
|
key: 1,
|
|
697
715
|
class: "text-fm-color-typo-secondary"
|
|
698
716
|
}, Ao = {
|
|
@@ -708,28 +726,28 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
708
726
|
},
|
|
709
727
|
emits: ["update:member"],
|
|
710
728
|
setup(y, { expose: V, emit: b }) {
|
|
711
|
-
const u = Je(),
|
|
729
|
+
const u = Je(), r = He(), a = Ve(), h = Qe(), x = wt(), T = Ie(), { minor: _ } = Ke, p = y, Y = b, G = j(() => r.locations.map((o) => ({
|
|
712
730
|
label: o.name,
|
|
713
731
|
value: o._id
|
|
714
|
-
}))), Z =
|
|
732
|
+
}))), Z = j(() => (p.member.segment || []).map((o) => {
|
|
715
733
|
var e;
|
|
716
|
-
return ((e =
|
|
717
|
-
}).filter(Boolean)),
|
|
734
|
+
return ((e = h.segments.find((i) => i._id === o)) == null ? void 0 : e.name) || "";
|
|
735
|
+
}).filter(Boolean)), K = [
|
|
718
736
|
{
|
|
719
737
|
label: "Loyalty",
|
|
720
738
|
stats: [
|
|
721
739
|
{
|
|
722
740
|
label: "Experiences",
|
|
723
741
|
getter: (o) => {
|
|
724
|
-
var e,
|
|
725
|
-
return X(((
|
|
742
|
+
var e, i, S;
|
|
743
|
+
return X(((S = (i = (e = o.collection) == null ? void 0 : e.POINT) == null ? void 0 : i[0]) == null ? void 0 : S.balance) ?? 0, 2);
|
|
726
744
|
}
|
|
727
745
|
},
|
|
728
746
|
{
|
|
729
747
|
label: "Credits",
|
|
730
748
|
getter: (o) => {
|
|
731
|
-
var e,
|
|
732
|
-
return X(((
|
|
749
|
+
var e, i, S;
|
|
750
|
+
return X(((S = (i = (e = o.collection) == null ? void 0 : e.CREDIT) == null ? void 0 : i[0]) == null ? void 0 : S.balance) ?? 0, 2);
|
|
733
751
|
}
|
|
734
752
|
}
|
|
735
753
|
]
|
|
@@ -739,11 +757,11 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
739
757
|
stats: [
|
|
740
758
|
{
|
|
741
759
|
label: "Active vouchers",
|
|
742
|
-
getter: (o) => X(
|
|
760
|
+
getter: (o) => X(F.value.active, 0)
|
|
743
761
|
},
|
|
744
762
|
{
|
|
745
763
|
label: "Past vouchers",
|
|
746
|
-
getter: (o) => X(
|
|
764
|
+
getter: (o) => X(F.value.past, 0)
|
|
747
765
|
}
|
|
748
766
|
]
|
|
749
767
|
},
|
|
@@ -752,11 +770,11 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
752
770
|
stats: [
|
|
753
771
|
{
|
|
754
772
|
label: "Stamp missions",
|
|
755
|
-
getter: (o) => X(
|
|
773
|
+
getter: (o) => X(C.value.stamp.length, 0)
|
|
756
774
|
},
|
|
757
775
|
{
|
|
758
776
|
label: "Progress missions",
|
|
759
|
-
getter: (o) => X(
|
|
777
|
+
getter: (o) => X(C.value.progressive.length, 0)
|
|
760
778
|
}
|
|
761
779
|
]
|
|
762
780
|
},
|
|
@@ -766,10 +784,10 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
766
784
|
{
|
|
767
785
|
label: "Tokens",
|
|
768
786
|
getter: (o) => {
|
|
769
|
-
var e,
|
|
787
|
+
var e, i;
|
|
770
788
|
return X(
|
|
771
|
-
((
|
|
772
|
-
(
|
|
789
|
+
((i = (e = o.collection) == null ? void 0 : e.GAME) == null ? void 0 : i.reduce(
|
|
790
|
+
(S, $) => S + $.balance,
|
|
773
791
|
0
|
|
774
792
|
)) || 0,
|
|
775
793
|
0
|
|
@@ -789,11 +807,11 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
789
807
|
}
|
|
790
808
|
], ne = (() => {
|
|
791
809
|
const e = [];
|
|
792
|
-
for (let
|
|
793
|
-
e.push(
|
|
810
|
+
for (let i = 0; i < K.length; i += 3)
|
|
811
|
+
e.push(K.slice(i, i + 3));
|
|
794
812
|
return e;
|
|
795
813
|
})();
|
|
796
|
-
async function
|
|
814
|
+
async function ae(o, e) {
|
|
797
815
|
switch (o.stopPropagation(), e) {
|
|
798
816
|
case "Store bundle":
|
|
799
817
|
await u.push({
|
|
@@ -803,7 +821,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
803
821
|
});
|
|
804
822
|
break;
|
|
805
823
|
default:
|
|
806
|
-
P.value =
|
|
824
|
+
P.value = k.find((i) => i.label === e) || k[0];
|
|
807
825
|
break;
|
|
808
826
|
}
|
|
809
827
|
}
|
|
@@ -814,22 +832,22 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
814
832
|
dialogComponentProps: {
|
|
815
833
|
type: o,
|
|
816
834
|
action: e,
|
|
817
|
-
onSubmit: async (
|
|
818
|
-
await
|
|
835
|
+
onSubmit: async (i) => {
|
|
836
|
+
await _(
|
|
819
837
|
async () => {
|
|
820
|
-
const
|
|
838
|
+
const S = {
|
|
821
839
|
"credit-send": le.sendCredit,
|
|
822
840
|
"credit-deduct": le.deductCredit,
|
|
823
841
|
"coin-send": le.sendCoin,
|
|
824
842
|
"coin-deduct": le.deductCoin
|
|
825
|
-
}, $ = `${o}-${e}`, R =
|
|
826
|
-
R && await R(p.member._id,
|
|
843
|
+
}, $ = `${o}-${e}`, R = S[$];
|
|
844
|
+
R && await R(p.member._id, i), Y("update:member"), T.close();
|
|
827
845
|
},
|
|
828
846
|
{
|
|
829
847
|
message: `Adjusting ${Ae.formattedType(
|
|
830
848
|
o.toUpperCase()
|
|
831
849
|
).toLowerCase()}`,
|
|
832
|
-
successMessage: `${
|
|
850
|
+
successMessage: `${i.amount} ${Ae.formattedType(
|
|
833
851
|
o.toUpperCase()
|
|
834
852
|
).toLowerCase()} ${e} ${e == "send" ? "to" : "from"} ${p.member.phoneNumber}`
|
|
835
853
|
}
|
|
@@ -845,7 +863,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
845
863
|
contentComponentProps: {
|
|
846
864
|
member: p.member,
|
|
847
865
|
onSubmit: async (o) => {
|
|
848
|
-
await
|
|
866
|
+
await _(
|
|
849
867
|
async () => {
|
|
850
868
|
await le.updateMember(p.member._id, o), Y("update:member"), T.close();
|
|
851
869
|
},
|
|
@@ -867,8 +885,8 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
867
885
|
label: "Tier",
|
|
868
886
|
getter: (o) => {
|
|
869
887
|
var re, ce, fe, g, B;
|
|
870
|
-
const e = (((ce = Ue.first((re = p.member.collection) == null ? void 0 : re.TIER)) == null ? void 0 : ce.balance) || 0) - 1,
|
|
871
|
-
return `${
|
|
888
|
+
const e = (((ce = Ue.first((re = p.member.collection) == null ? void 0 : re.TIER)) == null ? void 0 : ce.balance) || 0) - 1, i = s.value.name, S = ((g = (fe = o.collection) == null ? void 0 : fe.POINT) == null ? void 0 : g[0].balance) ?? 0, $ = a.sortedTiers[e + 1], R = ((B = $ == null ? void 0 : $.option) == null ? void 0 : B.to) ?? 1 / 0;
|
|
889
|
+
return `${i} (${S}/${R})`;
|
|
872
890
|
}
|
|
873
891
|
},
|
|
874
892
|
{
|
|
@@ -877,18 +895,18 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
877
895
|
},
|
|
878
896
|
{
|
|
879
897
|
label: "Birthday",
|
|
880
|
-
getter: (o) => o.birthday ?
|
|
898
|
+
getter: (o) => o.birthday ? w(o.birthday).format("D MMM YYYY") : "-"
|
|
881
899
|
}
|
|
882
|
-
],
|
|
900
|
+
], M = [
|
|
883
901
|
{
|
|
884
902
|
label: "Customer since",
|
|
885
|
-
getter: (o) =>
|
|
903
|
+
getter: (o) => w(Me(o._id.toString())).format("D MMM YYYY")
|
|
886
904
|
},
|
|
887
905
|
{
|
|
888
906
|
label: "Joined at location",
|
|
889
907
|
getter: (o) => {
|
|
890
908
|
var e;
|
|
891
|
-
return o != null && o.location && ((e =
|
|
909
|
+
return o != null && o.location && ((e = G.value.find((i) => i.value == o.location)) == null ? void 0 : e.label) || "-";
|
|
892
910
|
}
|
|
893
911
|
},
|
|
894
912
|
{
|
|
@@ -897,7 +915,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
897
915
|
},
|
|
898
916
|
{
|
|
899
917
|
label: "Last visit",
|
|
900
|
-
getter: (o) =>
|
|
918
|
+
getter: (o) => w(o.stats.lastVisit).fromNow()
|
|
901
919
|
},
|
|
902
920
|
{
|
|
903
921
|
label: "Frequency",
|
|
@@ -924,57 +942,57 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
924
942
|
// label: 'Point Earned this season',
|
|
925
943
|
// key: 'lastSeasonPointEarned',
|
|
926
944
|
// },
|
|
927
|
-
], s =
|
|
928
|
-
var
|
|
929
|
-
const o = (((
|
|
945
|
+
], s = j(() => {
|
|
946
|
+
var i, S;
|
|
947
|
+
const o = (((S = Ue.first((i = p.member.collection) == null ? void 0 : i.TIER)) == null ? void 0 : S.balance) || 0) - 1, e = a.sortedTiers[o];
|
|
930
948
|
return { name: (e == null ? void 0 : e.name) || "-", tier: o, config: e };
|
|
931
|
-
}),
|
|
949
|
+
}), c = j(() => {
|
|
932
950
|
var o;
|
|
933
951
|
return (((o = p.member.collection) == null ? void 0 : o.TITLE) || []).map((e) => {
|
|
934
|
-
var
|
|
935
|
-
const
|
|
952
|
+
var S, $, R;
|
|
953
|
+
const i = (S = a.sortedTitles) == null ? void 0 : S.find(
|
|
936
954
|
(re) => re._id == e.collectible
|
|
937
955
|
);
|
|
938
956
|
return {
|
|
939
|
-
name:
|
|
957
|
+
name: i == null ? void 0 : i.name,
|
|
940
958
|
expiredAt: (R = ($ = e.expiryBalance) == null ? void 0 : $.at(-1)) == null ? void 0 : R.expiredAt,
|
|
941
|
-
collectible:
|
|
959
|
+
collectible: i
|
|
942
960
|
};
|
|
943
961
|
}).filter(
|
|
944
|
-
(e) => e.expiredAt ?
|
|
962
|
+
(e) => e.expiredAt ? w(e.expiredAt).isAfter(w()) : !0
|
|
945
963
|
);
|
|
946
|
-
}),
|
|
964
|
+
}), C = j(() => {
|
|
947
965
|
var e;
|
|
948
|
-
const o = (((e = p.member.collection) == null ? void 0 : e.STAMP) || []).map((
|
|
949
|
-
var
|
|
950
|
-
return ($ = (
|
|
951
|
-
(R) => R.collectible.toString() ===
|
|
966
|
+
const o = (((e = p.member.collection) == null ? void 0 : e.STAMP) || []).map((i) => {
|
|
967
|
+
var S, $;
|
|
968
|
+
return ($ = (S = x.campaigns) == null ? void 0 : S.mission) == null ? void 0 : $.find(
|
|
969
|
+
(R) => R.collectible.toString() === i.collectible
|
|
952
970
|
);
|
|
953
|
-
}).filter((
|
|
971
|
+
}).filter((i) => i);
|
|
954
972
|
return {
|
|
955
973
|
stamp: o.filter(
|
|
956
|
-
(
|
|
957
|
-
var
|
|
958
|
-
return ((
|
|
974
|
+
(i) => {
|
|
975
|
+
var S;
|
|
976
|
+
return ((S = i == null ? void 0 : i.mission) == null ? void 0 : S.type) === Te.enum.STAMP;
|
|
959
977
|
}
|
|
960
978
|
),
|
|
961
979
|
progressive: o.filter(
|
|
962
|
-
(
|
|
963
|
-
var
|
|
964
|
-
return ((
|
|
980
|
+
(i) => {
|
|
981
|
+
var S;
|
|
982
|
+
return ((S = i == null ? void 0 : i.mission) == null ? void 0 : S.type) === Te.enum.PROGRESSIVE;
|
|
965
983
|
}
|
|
966
984
|
)
|
|
967
985
|
};
|
|
968
|
-
}),
|
|
986
|
+
}), F = Q({ active: 0, past: 0 }), O = Q([]), N = j(
|
|
969
987
|
() => O.value.reduce((o, e) => o + e.count, 0)
|
|
970
988
|
), D = Q(!0);
|
|
971
989
|
function ee() {
|
|
972
|
-
D.value = !0, P.value =
|
|
990
|
+
D.value = !0, P.value = k[0];
|
|
973
991
|
}
|
|
974
|
-
function
|
|
992
|
+
function se() {
|
|
975
993
|
D.value = !1;
|
|
976
994
|
}
|
|
977
|
-
const
|
|
995
|
+
const k = [
|
|
978
996
|
{
|
|
979
997
|
label: "Overview",
|
|
980
998
|
value: "overview"
|
|
@@ -995,20 +1013,20 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
995
1013
|
label: "Game",
|
|
996
1014
|
value: "game"
|
|
997
1015
|
}
|
|
998
|
-
], P = Q(
|
|
1016
|
+
], P = Q(k[0]);
|
|
999
1017
|
return je(async () => {
|
|
1000
|
-
await a.readMembership(),
|
|
1018
|
+
await a.readMembership(), F.value = await We.readCollectionCountByMemberId(
|
|
1001
1019
|
p.member._id.toString(),
|
|
1002
1020
|
ke.enum.VOUCHER
|
|
1003
|
-
), await
|
|
1021
|
+
), await x.read("MISSION"), O.value = await kt.readPurchaseCountByMember(
|
|
1004
1022
|
p.member._id.toString()
|
|
1005
|
-
),
|
|
1023
|
+
), r.locations.length || await r.readLocations();
|
|
1006
1024
|
}), V({
|
|
1007
1025
|
showSheet: ee,
|
|
1008
|
-
hideSheet:
|
|
1026
|
+
hideSheet: se
|
|
1009
1027
|
}), (o, e) => {
|
|
1010
|
-
const
|
|
1011
|
-
return f(),
|
|
1028
|
+
const i = I("FmTabs"), S = I("FmAvatar"), $ = I("FmButton"), R = I("FmIcon"), re = I("FmChip"), ce = I("FmCard"), fe = I("FmSideSheet");
|
|
1029
|
+
return f(), q(fe, {
|
|
1012
1030
|
modelValue: t(D),
|
|
1013
1031
|
"onUpdate:modelValue": e[5] || (e[5] = (g) => ct(D) ? D.value = g : null),
|
|
1014
1032
|
header: "Member Detail",
|
|
@@ -1016,24 +1034,24 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1016
1034
|
"close-button": !0,
|
|
1017
1035
|
"max-width": 1100
|
|
1018
1036
|
}, {
|
|
1019
|
-
"side-sheet-footer":
|
|
1020
|
-
default:
|
|
1037
|
+
"side-sheet-footer": ve(() => e[19] || (e[19] = [])),
|
|
1038
|
+
default: ve(() => [
|
|
1021
1039
|
n("div", Xt, [
|
|
1022
1040
|
n("div", null, [
|
|
1023
|
-
v(
|
|
1041
|
+
v(i, {
|
|
1024
1042
|
"model-value": t(P).value,
|
|
1025
|
-
items:
|
|
1043
|
+
items: k,
|
|
1026
1044
|
class: "overflow-x-auto",
|
|
1027
|
-
"onUpdate:modelValue": e[0] || (e[0] = (g) => P.value =
|
|
1045
|
+
"onUpdate:modelValue": e[0] || (e[0] = (g) => P.value = k.find((B) => B.value === g))
|
|
1028
1046
|
}, null, 8, ["model-value"])
|
|
1029
1047
|
]),
|
|
1030
|
-
t(P).value == "overview" ? (f(),
|
|
1048
|
+
t(P).value == "overview" ? (f(), A(L, { key: 0 }, [
|
|
1031
1049
|
n("div", Qt, [
|
|
1032
1050
|
n("div", null, [
|
|
1033
1051
|
e[9] || (e[9] = n("div", { class: "fm-typo-en-title-sm-800 mb-16" }, "Profile Information", -1)),
|
|
1034
1052
|
n("div", Zt, [
|
|
1035
1053
|
n("div", eo, [
|
|
1036
|
-
v(
|
|
1054
|
+
v(S, {
|
|
1037
1055
|
name: y.member.photoUrl ? void 0 : y.member.name,
|
|
1038
1056
|
src: y.member.photoUrl || void 0
|
|
1039
1057
|
}, null, 8, ["name", "src"]),
|
|
@@ -1041,12 +1059,12 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1041
1059
|
e[8] || (e[8] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Member Name ", -1)),
|
|
1042
1060
|
n("div", oo, E(y.member.name), 1),
|
|
1043
1061
|
n("div", no, E(y.member._id), 1),
|
|
1044
|
-
n("div",
|
|
1045
|
-
e[6] || (e[6] =
|
|
1046
|
-
n("span",
|
|
1062
|
+
n("div", ao, [
|
|
1063
|
+
e[6] || (e[6] = Fe(" Member Card: ")),
|
|
1064
|
+
n("span", so, E(y.member.cardNo ? y.member.cardNo : "-"), 1)
|
|
1047
1065
|
]),
|
|
1048
1066
|
n("div", ro, [
|
|
1049
|
-
e[7] || (e[7] =
|
|
1067
|
+
e[7] || (e[7] = Fe(" Referral Code: ")),
|
|
1050
1068
|
n("span", io, E(y.member.referralCode ? y.member.referralCode : "-"), 1)
|
|
1051
1069
|
])
|
|
1052
1070
|
]),
|
|
@@ -1056,7 +1074,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1056
1074
|
onClick: m
|
|
1057
1075
|
})
|
|
1058
1076
|
]),
|
|
1059
|
-
(f(),
|
|
1077
|
+
(f(), A(L, null, ie(d, (g, B) => n("div", { key: B }, [
|
|
1060
1078
|
n("div", lo, E(g.label), 1),
|
|
1061
1079
|
n("div", co, E(g.key ? y.member[g.key] : g.getter(y.member)), 1)
|
|
1062
1080
|
])), 64))
|
|
@@ -1065,7 +1083,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1065
1083
|
n("div", null, [
|
|
1066
1084
|
e[10] || (e[10] = n("div", { class: "fm-typo-en-title-sm-800 mb-16" }, "Activities", -1)),
|
|
1067
1085
|
n("div", mo, [
|
|
1068
|
-
(f(),
|
|
1086
|
+
(f(), A(L, null, ie(M, (g) => n("div", {
|
|
1069
1087
|
key: g.key
|
|
1070
1088
|
}, [
|
|
1071
1089
|
n("div", uo, E(g.label), 1),
|
|
@@ -1075,15 +1093,15 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1075
1093
|
])
|
|
1076
1094
|
]),
|
|
1077
1095
|
e[13] || (e[13] = n("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
1078
|
-
(f(!0),
|
|
1079
|
-
(f(!0),
|
|
1096
|
+
(f(!0), A(L, null, ie(t(ne), (g) => (f(), A("div", bo, [
|
|
1097
|
+
(f(!0), A(L, null, ie(g, (B, te) => (f(), A("div", { key: te }, [
|
|
1080
1098
|
n("div", {
|
|
1081
1099
|
class: dt(te !== 0 ? "pt-12 md:pt-0 lg:pt-0 md:pl-12 lg:pl-12" : "")
|
|
1082
1100
|
}, [
|
|
1083
1101
|
n("div", fo, [
|
|
1084
1102
|
n("div", yo, E(B.label), 1),
|
|
1085
1103
|
n("button", {
|
|
1086
|
-
onClick: (U) =>
|
|
1104
|
+
onClick: (U) => ae(U, B.label)
|
|
1087
1105
|
}, [
|
|
1088
1106
|
v(R, {
|
|
1089
1107
|
name: "chevron_right",
|
|
@@ -1093,7 +1111,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1093
1111
|
], 8, go)
|
|
1094
1112
|
]),
|
|
1095
1113
|
n("div", vo, [
|
|
1096
|
-
(f(!0),
|
|
1114
|
+
(f(!0), A(L, null, ie(B.stats, (U) => (f(), A("div", {
|
|
1097
1115
|
key: U.key
|
|
1098
1116
|
}, [
|
|
1099
1117
|
n("div", xo, E(U.label), 1),
|
|
@@ -1105,35 +1123,35 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1105
1123
|
]))), 256)),
|
|
1106
1124
|
n("div", So, [
|
|
1107
1125
|
e[11] || (e[11] = n("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1)),
|
|
1108
|
-
t(Z).length ? (f(),
|
|
1109
|
-
(f(!0),
|
|
1126
|
+
t(Z).length ? (f(), A("div", _o, [
|
|
1127
|
+
(f(!0), A(L, null, ie(t(Z), (g) => (f(), q(re, {
|
|
1110
1128
|
label: g.toString()
|
|
1111
1129
|
}, null, 8, ["label"]))), 256))
|
|
1112
|
-
])) : (f(),
|
|
1130
|
+
])) : (f(), A("div", Co, "No titles"))
|
|
1113
1131
|
]),
|
|
1114
1132
|
e[14] || (e[14] = n("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
1115
1133
|
n("div", wo, [
|
|
1116
1134
|
e[12] || (e[12] = n("div", { class: "fm-typo-en-title-sm-800" }, "Title badge", -1)),
|
|
1117
|
-
t(
|
|
1135
|
+
t(c).length ? (f(!0), A(L, { key: 0 }, ie(t(c).filter((g) => g.collectible), (g) => (f(), A("div", {
|
|
1118
1136
|
class: "flex items-center gap-x-8 h-48",
|
|
1119
1137
|
key: g.name
|
|
1120
1138
|
}, [
|
|
1121
1139
|
n("img", {
|
|
1122
1140
|
src: g.collectible.image || t(gt),
|
|
1123
1141
|
class: "aspect-square h-full object-contain"
|
|
1124
|
-
}, null, 8,
|
|
1142
|
+
}, null, 8, Fo),
|
|
1125
1143
|
n("div", null, [
|
|
1126
|
-
n("div",
|
|
1127
|
-
n("div", Mo, " Expired on " + E(t(
|
|
1144
|
+
n("div", To, E(g.name), 1),
|
|
1145
|
+
n("div", Mo, " Expired on " + E(t(w)(g.expiredAt).format("MMM D, Y")), 1)
|
|
1128
1146
|
])
|
|
1129
|
-
]))), 128)) : (f(),
|
|
1147
|
+
]))), 128)) : (f(), A("div", ko, "No titles"))
|
|
1130
1148
|
])
|
|
1131
|
-
], 64)) : t(P).value == "loyalty" ? (f(),
|
|
1149
|
+
], 64)) : t(P).value == "loyalty" ? (f(), A("div", Ao, [
|
|
1132
1150
|
v(ce, {
|
|
1133
1151
|
class: "p-16 space-y-24",
|
|
1134
1152
|
variant: "outlined"
|
|
1135
1153
|
}, {
|
|
1136
|
-
default:
|
|
1154
|
+
default: ve(() => {
|
|
1137
1155
|
var g, B, te, U, de, me, ue;
|
|
1138
1156
|
return [
|
|
1139
1157
|
n("div", Io, [
|
|
@@ -1143,7 +1161,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1143
1161
|
n("div", Eo, [
|
|
1144
1162
|
e[16] || (e[16] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1)),
|
|
1145
1163
|
n("div", $o, E(((ue = (me = (de = (U = y.member.collection) == null ? void 0 : U.CREDIT) == null ? void 0 : de[0]) == null ? void 0 : me.expiryBalance) == null ? void 0 : ue.reduce(
|
|
1146
|
-
(W, J) => J.expiredAt && t(
|
|
1164
|
+
(W, J) => J.expiredAt && t(w)(J.expiredAt).isAfter(t(w)()) && t(w)(J.expiredAt).isBefore(t(w)().add(30, "days")) ? W + J.amount : W,
|
|
1147
1165
|
0
|
|
1148
1166
|
)) ?? 0), 1)
|
|
1149
1167
|
]),
|
|
@@ -1169,7 +1187,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1169
1187
|
class: "p-16 space-y-24",
|
|
1170
1188
|
variant: "outlined"
|
|
1171
1189
|
}, {
|
|
1172
|
-
default:
|
|
1190
|
+
default: ve(() => {
|
|
1173
1191
|
var g, B, te, U, de, me, ue;
|
|
1174
1192
|
return [
|
|
1175
1193
|
n("div", Do, [
|
|
@@ -1179,7 +1197,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1179
1197
|
n("div", Bo, [
|
|
1180
1198
|
e[18] || (e[18] = n("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1)),
|
|
1181
1199
|
n("div", Yo, E(((ue = (me = (de = (U = y.member.collection) == null ? void 0 : U.COIN) == null ? void 0 : de[0]) == null ? void 0 : me.expiryBalance) == null ? void 0 : ue.reduce(
|
|
1182
|
-
(W, J) => J.expiredAt && t(
|
|
1200
|
+
(W, J) => J.expiredAt && t(w)(J.expiredAt).isAfter(t(w)()) && t(w)(J.expiredAt).isBefore(t(w)().add(30, "days")) ? W + J.amount : W,
|
|
1183
1201
|
0
|
|
1184
1202
|
)) ?? 0), 1)
|
|
1185
1203
|
]),
|
|
@@ -1201,16 +1219,16 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1201
1219
|
}),
|
|
1202
1220
|
_: 1
|
|
1203
1221
|
})
|
|
1204
|
-
])) : t(P).value == "voucher" ? (f(),
|
|
1222
|
+
])) : t(P).value == "voucher" ? (f(), q(Ht, {
|
|
1205
1223
|
key: 2,
|
|
1206
1224
|
member: p.member
|
|
1207
|
-
}, null, 8, ["member"])) : t(P).value == "mission" ? (f(),
|
|
1225
|
+
}, null, 8, ["member"])) : t(P).value == "mission" ? (f(), q(Wt, {
|
|
1208
1226
|
key: 3,
|
|
1209
1227
|
member: p.member
|
|
1210
|
-
}, null, 8, ["member"])) : t(P).value == "game" ? (f(),
|
|
1228
|
+
}, null, 8, ["member"])) : t(P).value == "game" ? (f(), q(Jt, {
|
|
1211
1229
|
key: 4,
|
|
1212
1230
|
member: p.member
|
|
1213
|
-
}, null, 8, ["member"])) :
|
|
1231
|
+
}, null, 8, ["member"])) : xe("", !0)
|
|
1214
1232
|
])
|
|
1215
1233
|
]),
|
|
1216
1234
|
_: 1
|
|
@@ -1220,7 +1238,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1220
1238
|
}), Uo = { class: "flex items-center justify-end" }, Sn = /* @__PURE__ */ pe({
|
|
1221
1239
|
__name: "MemberList",
|
|
1222
1240
|
setup(y) {
|
|
1223
|
-
const V = Qe(), b = Ve(), u = He(), { minor:
|
|
1241
|
+
const V = Qe(), b = Ve(), u = He(), { minor: r } = Ke, a = Je(), h = [
|
|
1224
1242
|
{
|
|
1225
1243
|
header: "Name",
|
|
1226
1244
|
enableSorting: !0,
|
|
@@ -1230,7 +1248,7 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1230
1248
|
}
|
|
1231
1249
|
},
|
|
1232
1250
|
{
|
|
1233
|
-
accessorFn: (s) =>
|
|
1251
|
+
accessorFn: (s) => w(Me(s._id.toString())).format("D MMM YYYY"),
|
|
1234
1252
|
header: "Customer Since",
|
|
1235
1253
|
accessorKey: "_id",
|
|
1236
1254
|
id: "_id"
|
|
@@ -1259,8 +1277,8 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1259
1277
|
{
|
|
1260
1278
|
accessorKey: "collection_CREDIT_0_balance",
|
|
1261
1279
|
accessorFn: (s) => {
|
|
1262
|
-
var
|
|
1263
|
-
return X(((
|
|
1280
|
+
var c, C, F;
|
|
1281
|
+
return X(((F = (C = (c = s.collection) == null ? void 0 : c.CREDIT) == null ? void 0 : C[0]) == null ? void 0 : F.balance) ?? 0, 2);
|
|
1264
1282
|
},
|
|
1265
1283
|
header: "Credit(s)",
|
|
1266
1284
|
enableSorting: !0
|
|
@@ -1268,8 +1286,8 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1268
1286
|
{
|
|
1269
1287
|
accessorKey: "collection_POINT_0_balance",
|
|
1270
1288
|
accessorFn: (s) => {
|
|
1271
|
-
var
|
|
1272
|
-
return X(((
|
|
1289
|
+
var c, C, F;
|
|
1290
|
+
return X(((F = (C = (c = s.collection) == null ? void 0 : c.POINT) == null ? void 0 : C[0]) == null ? void 0 : F.balance) ?? 0, 2);
|
|
1273
1291
|
},
|
|
1274
1292
|
header: "Experience(s)",
|
|
1275
1293
|
enableSorting: !0
|
|
@@ -1277,16 +1295,16 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1277
1295
|
{
|
|
1278
1296
|
accessorKey: "collection_COIN_0_balance",
|
|
1279
1297
|
accessorFn: (s) => {
|
|
1280
|
-
var
|
|
1281
|
-
return X(((
|
|
1298
|
+
var c, C, F;
|
|
1299
|
+
return X(((F = (C = (c = s.collection) == null ? void 0 : c.COIN) == null ? void 0 : C[0]) == null ? void 0 : F.balance) ?? 0, 2);
|
|
1282
1300
|
},
|
|
1283
1301
|
header: "Point(s)",
|
|
1284
1302
|
enableSorting: !0
|
|
1285
1303
|
},
|
|
1286
1304
|
{
|
|
1287
1305
|
accessorFn: (s) => {
|
|
1288
|
-
var
|
|
1289
|
-
return ((
|
|
1306
|
+
var c;
|
|
1307
|
+
return ((c = s.stats) == null ? void 0 : c.visitCount) ?? 0;
|
|
1290
1308
|
},
|
|
1291
1309
|
header: "Total visit",
|
|
1292
1310
|
accessorKey: "stats.visitCount",
|
|
@@ -1294,30 +1312,30 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1294
1312
|
},
|
|
1295
1313
|
{
|
|
1296
1314
|
accessorFn: (s) => {
|
|
1297
|
-
var
|
|
1298
|
-
return (
|
|
1315
|
+
var c;
|
|
1316
|
+
return (c = s.stats) == null ? void 0 : c.lastVisit;
|
|
1299
1317
|
},
|
|
1300
|
-
sortingFn: (s,
|
|
1301
|
-
var
|
|
1302
|
-
return new Date((
|
|
1318
|
+
sortingFn: (s, c) => {
|
|
1319
|
+
var C, F;
|
|
1320
|
+
return new Date((C = s.original.stats) == null ? void 0 : C.lastVisit).getTime() - new Date((F = c.original.stats) == null ? void 0 : F.lastVisit).getTime();
|
|
1303
1321
|
},
|
|
1304
1322
|
id: "stats.lastVisit",
|
|
1305
1323
|
header: "Last visit",
|
|
1306
1324
|
cell(s) {
|
|
1307
|
-
var
|
|
1308
|
-
return
|
|
1309
|
-
|
|
1325
|
+
var c, C;
|
|
1326
|
+
return z("div", { class: "flex items-center justify-end gap-4" }, [
|
|
1327
|
+
z(
|
|
1310
1328
|
"span",
|
|
1311
|
-
(
|
|
1329
|
+
(c = s.row.original.stats) != null && c.lastVisit ? w((C = s.row.original.stats) == null ? void 0 : C.lastVisit).fromNow() : "NA"
|
|
1312
1330
|
),
|
|
1313
|
-
|
|
1314
|
-
|
|
1331
|
+
z(
|
|
1332
|
+
ge.FmTooltip,
|
|
1315
1333
|
{
|
|
1316
|
-
content:
|
|
1334
|
+
content: w(s.row.original.stats.lastVisit).format(
|
|
1317
1335
|
"D MMM YYYY - hh:mmA"
|
|
1318
1336
|
)
|
|
1319
1337
|
},
|
|
1320
|
-
[
|
|
1338
|
+
[z(ge.FmIcon, { name: "info", outline: !0, size: "sm" })]
|
|
1321
1339
|
)
|
|
1322
1340
|
]);
|
|
1323
1341
|
}
|
|
@@ -1325,21 +1343,21 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1325
1343
|
{
|
|
1326
1344
|
id: "actions",
|
|
1327
1345
|
cell(s) {
|
|
1328
|
-
return
|
|
1329
|
-
|
|
1346
|
+
return z(
|
|
1347
|
+
ge.FmMenu,
|
|
1330
1348
|
{
|
|
1331
1349
|
placement: "bottom-end",
|
|
1332
|
-
onClick: (
|
|
1333
|
-
|
|
1350
|
+
onClick: (c) => {
|
|
1351
|
+
c.stopPropagation();
|
|
1334
1352
|
}
|
|
1335
1353
|
},
|
|
1336
1354
|
{
|
|
1337
|
-
"menu-button": () =>
|
|
1355
|
+
"menu-button": () => z(ge.FmButton, { icon: "more_vert", variant: "tertiary" }),
|
|
1338
1356
|
default: () => [
|
|
1339
|
-
|
|
1357
|
+
z(ge.FmMenuItem, {
|
|
1340
1358
|
label: "Transaction details",
|
|
1341
|
-
onClick: async (
|
|
1342
|
-
|
|
1359
|
+
onClick: async (c) => {
|
|
1360
|
+
c.stopPropagation(), await H(s.row.original._id);
|
|
1343
1361
|
}
|
|
1344
1362
|
})
|
|
1345
1363
|
]
|
|
@@ -1347,16 +1365,16 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1347
1365
|
);
|
|
1348
1366
|
}
|
|
1349
1367
|
}
|
|
1350
|
-
], { tableMeta:
|
|
1368
|
+
], { tableMeta: x, rowData: T, onSort: _, debouncedFetchData: p, onSearch: Y } = qe(le.read), G = Q(), Z = Q(!1), K = Q(), be = j(() => u.locations.map((s) => ({
|
|
1351
1369
|
label: s.name,
|
|
1352
1370
|
value: s._id
|
|
1353
1371
|
})));
|
|
1354
1372
|
async function ne() {
|
|
1355
|
-
|
|
1356
|
-
|
|
1373
|
+
K.value = await le.readById(
|
|
1374
|
+
K.value._id.toString()
|
|
1357
1375
|
), Z.value = !0;
|
|
1358
1376
|
}
|
|
1359
|
-
async function
|
|
1377
|
+
async function ae() {
|
|
1360
1378
|
await p(), Z.value = !1;
|
|
1361
1379
|
}
|
|
1362
1380
|
async function H(s) {
|
|
@@ -1373,31 +1391,31 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1373
1391
|
rowsNumber: 0
|
|
1374
1392
|
};
|
|
1375
1393
|
function d(s) {
|
|
1376
|
-
const
|
|
1377
|
-
return
|
|
1394
|
+
const c = w(s);
|
|
1395
|
+
return c.isValid() ? c.format("DD/MM/YYYY") : "";
|
|
1378
1396
|
}
|
|
1379
|
-
async function
|
|
1380
|
-
const s = new ut(),
|
|
1397
|
+
async function M() {
|
|
1398
|
+
const s = new ut(), c = (await le.read({
|
|
1381
1399
|
limit: 1,
|
|
1382
1400
|
skip: 0,
|
|
1383
1401
|
sortBy: m.sortBy,
|
|
1384
1402
|
descending: m.descending
|
|
1385
|
-
})).meta.totalResources ?? 0,
|
|
1386
|
-
await
|
|
1403
|
+
})).meta.totalResources ?? 0, C = m.rowsPerPage;
|
|
1404
|
+
await r(
|
|
1387
1405
|
async () => {
|
|
1388
|
-
var
|
|
1389
|
-
for (let Ne = 0; Ne <
|
|
1406
|
+
var F, O, N, D, ee, se, k, P, o, e, i, S, $, R, re, ce, fe, g, B, te, U, de, me, ue, W, J, Ee, $e;
|
|
1407
|
+
for (let Ne = 0; Ne < c; Ne += C) {
|
|
1390
1408
|
const Ze = {
|
|
1391
1409
|
...m,
|
|
1392
|
-
limit:
|
|
1410
|
+
limit: C,
|
|
1393
1411
|
skip: m.page - 1,
|
|
1394
1412
|
sortBy: m.sortBy,
|
|
1395
1413
|
descending: m.descending
|
|
1396
1414
|
}, et = await le.read(Ze);
|
|
1397
|
-
for (const
|
|
1398
|
-
const tt = (
|
|
1399
|
-
|
|
1400
|
-
)) != null &&
|
|
1415
|
+
for (const l of et.resources) {
|
|
1416
|
+
const tt = (F = mt.parseOneAddress(
|
|
1417
|
+
l == null ? void 0 : l.email
|
|
1418
|
+
)) != null && F.domain.includes("feedmepos.com") ? void 0 : l.email, ot = (N = ((O = l == null ? void 0 : l.collection) == null ? void 0 : O.TITLE) || []) == null ? void 0 : N.reduce(
|
|
1401
1419
|
(oe, ye) => {
|
|
1402
1420
|
var _e, Ce;
|
|
1403
1421
|
const Se = (Ce = (_e = b.sortedTitles) == null ? void 0 : _e.find(
|
|
@@ -1409,48 +1427,48 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1409
1427
|
), nt = (b.sortedTitles || []).reduce(
|
|
1410
1428
|
(oe, ye) => {
|
|
1411
1429
|
var _e, Ce, we, Be;
|
|
1412
|
-
const Se = (Be = (we = (Ce = (((_e =
|
|
1430
|
+
const Se = (Be = (we = (Ce = (((_e = l == null ? void 0 : l.collection) == null ? void 0 : _e.TITLE) || []).find(
|
|
1413
1431
|
(rt) => rt.collectible === ye._id
|
|
1414
1432
|
)) == null ? void 0 : Ce.expiryBalance) == null ? void 0 : we[0]) == null ? void 0 : Be.expiredAt;
|
|
1415
|
-
return oe[ye.name] = Se ?
|
|
1433
|
+
return oe[ye.name] = Se ? w(Se).format("DD/MM/YYYY") : "", oe;
|
|
1416
1434
|
},
|
|
1417
1435
|
{}
|
|
1418
|
-
),
|
|
1436
|
+
), at = ((se = (ee = (D = l.collection) == null ? void 0 : D.CREDIT) == null ? void 0 : ee.at(0)) == null ? void 0 : se.balance) || 0, De = ((e = (o = (P = (k = l.collection) == null ? void 0 : k.CREDIT) == null ? void 0 : P.at(0)) == null ? void 0 : o.expiryBalance) == null ? void 0 : e.reduce(
|
|
1419
1437
|
(oe, ye) => oe + ye.amount,
|
|
1420
1438
|
0
|
|
1421
|
-
)) || 0, Pe = X(
|
|
1422
|
-
ID:
|
|
1423
|
-
Name: ((
|
|
1424
|
-
Phone: ((
|
|
1439
|
+
)) || 0, Pe = X(at, 2), st = {
|
|
1440
|
+
ID: l._id.toString(),
|
|
1441
|
+
Name: ((i = l.name) == null ? void 0 : i.trim()) || "",
|
|
1442
|
+
Phone: ((S = l == null ? void 0 : l.phoneNumber) == null ? void 0 : S.trim()) || "",
|
|
1425
1443
|
Email: tt || "",
|
|
1426
|
-
Gender:
|
|
1427
|
-
CardNo:
|
|
1428
|
-
Birthday:
|
|
1444
|
+
Gender: l.gender || "",
|
|
1445
|
+
CardNo: l.cardNo || "",
|
|
1446
|
+
Birthday: l != null && l.birthday ? d(l == null ? void 0 : l.birthday) : "",
|
|
1429
1447
|
Credit: (Number(Pe) - Number(De)).toFixed(2),
|
|
1430
1448
|
FreeCredit: Number(De.toFixed(2)),
|
|
1431
1449
|
TotalCredit: Number(Pe),
|
|
1432
|
-
Exp:
|
|
1433
|
-
Point:
|
|
1434
|
-
Level:
|
|
1435
|
-
Tier:
|
|
1450
|
+
Exp: l != null && l.collection ? ((re = (R = ($ = l.collection) == null ? void 0 : $.POINT) == null ? void 0 : R.at(0)) == null ? void 0 : re.balance) ?? 0 : 0,
|
|
1451
|
+
Point: l != null && l.collection ? ((g = (fe = (ce = l.collection) == null ? void 0 : ce.COIN) == null ? void 0 : fe.at(0)) == null ? void 0 : g.balance) ?? 0 : 0,
|
|
1452
|
+
Level: l != null && l.collection ? ((U = (te = (B = l.collection) == null ? void 0 : B.TIER) == null ? void 0 : te.at(0)) == null ? void 0 : U.balance) ?? 0 : 0,
|
|
1453
|
+
Tier: l != null && l.collection ? ((ue = (me = (de = l.collection) == null ? void 0 : de.TIER) == null ? void 0 : me.at(0)) == null ? void 0 : ue.balance) ?? 0 : 0,
|
|
1436
1454
|
Titles: ot.join(","),
|
|
1437
1455
|
...nt,
|
|
1438
|
-
TotalTransaction:
|
|
1439
|
-
AvgSpent: At(Number(
|
|
1456
|
+
TotalTransaction: l.stats.visitCount,
|
|
1457
|
+
AvgSpent: At(Number(l.stats.avgBillSize || 0)).toFormat(
|
|
1440
1458
|
!1
|
|
1441
1459
|
),
|
|
1442
|
-
TotalSpent:
|
|
1443
|
-
LastVisit: d(
|
|
1444
|
-
Feedback: ((W =
|
|
1445
|
-
LastSeasonTierEarned: ((J =
|
|
1446
|
-
LastSeasonPointEarned: ((Ee =
|
|
1447
|
-
JoinedAt: d(
|
|
1448
|
-
JoinedAtLocation:
|
|
1460
|
+
TotalSpent: l.stats.avgBillSize * l.stats.visitCount,
|
|
1461
|
+
LastVisit: d(l.stats.lastVisit),
|
|
1462
|
+
Feedback: ((W = l.stats) == null ? void 0 : W.feedbackCount) || 0,
|
|
1463
|
+
LastSeasonTierEarned: ((J = l.stats) == null ? void 0 : J.lastSeasonTierEarned) || 0,
|
|
1464
|
+
LastSeasonPointEarned: ((Ee = l.stats) == null ? void 0 : Ee.lastSeasonPointEarned) || 0,
|
|
1465
|
+
JoinedAt: d(l.joinAt || void 0),
|
|
1466
|
+
JoinedAtLocation: l.location && (($e = be.value.find((oe) => oe.value == l.location)) == null ? void 0 : $e.label) || "-",
|
|
1449
1467
|
VisitFrequency: `${Number(
|
|
1450
|
-
Math.ceil(
|
|
1468
|
+
Math.ceil(l.stats.avgVisitFrequency).toFixed(0)
|
|
1451
1469
|
)}`
|
|
1452
1470
|
};
|
|
1453
|
-
s.addRecord(
|
|
1471
|
+
s.addRecord(st);
|
|
1454
1472
|
}
|
|
1455
1473
|
m.page++;
|
|
1456
1474
|
}
|
|
@@ -1472,24 +1490,24 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1472
1490
|
}
|
|
1473
1491
|
return je(async () => {
|
|
1474
1492
|
await b.readMembership(), await u.readLocations(), await V.read(), await u.readLocations(), await p();
|
|
1475
|
-
}), (s,
|
|
1476
|
-
const
|
|
1477
|
-
return f(),
|
|
1493
|
+
}), (s, c) => {
|
|
1494
|
+
const C = I("FmSearch"), F = I("FmButton"), O = I("FmSnackbar");
|
|
1495
|
+
return f(), A("div", null, [
|
|
1478
1496
|
n("div", Uo, [
|
|
1479
|
-
v(
|
|
1497
|
+
v(C, {
|
|
1480
1498
|
class: "mt-4",
|
|
1481
|
-
modelValue: t(
|
|
1499
|
+
modelValue: t(x).searchValue,
|
|
1482
1500
|
"onUpdate:modelValue": [
|
|
1483
|
-
|
|
1501
|
+
c[0] || (c[0] = (N) => t(x).searchValue = N),
|
|
1484
1502
|
t(Y)
|
|
1485
1503
|
],
|
|
1486
1504
|
placeholder: "Search",
|
|
1487
1505
|
collapsible: ""
|
|
1488
1506
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
1489
|
-
v(
|
|
1507
|
+
v(F, {
|
|
1490
1508
|
icon: "ios_share",
|
|
1491
1509
|
variant: "tertiary",
|
|
1492
|
-
onClick:
|
|
1510
|
+
onClick: M
|
|
1493
1511
|
})
|
|
1494
1512
|
]),
|
|
1495
1513
|
Le(v(O, {
|
|
@@ -1499,35 +1517,35 @@ const $t = { class: "flex flex-col" }, Nt = { key: 1 }, Dt = { class: "flex flex
|
|
|
1499
1517
|
description: "Current list is not up to date, please refresh table for latest data.",
|
|
1500
1518
|
variant: "info",
|
|
1501
1519
|
dismissable: "",
|
|
1502
|
-
onOnDismiss:
|
|
1520
|
+
onOnDismiss: c[1] || (c[1] = (N) => Z.value = !1),
|
|
1503
1521
|
action: "Refresh",
|
|
1504
|
-
onOnAction:
|
|
1522
|
+
onOnAction: ae
|
|
1505
1523
|
}, null, 512), [
|
|
1506
1524
|
[ze, t(Z)]
|
|
1507
1525
|
]),
|
|
1508
1526
|
v(Ge, {
|
|
1509
|
-
loading: t(
|
|
1527
|
+
loading: t(x).isLoading,
|
|
1510
1528
|
"row-data": t(T),
|
|
1511
|
-
"row-count": t(
|
|
1512
|
-
"column-defs":
|
|
1529
|
+
"row-count": t(x).totalRows,
|
|
1530
|
+
"column-defs": h,
|
|
1513
1531
|
"shrink-at": !1,
|
|
1514
|
-
"page-count": t(
|
|
1515
|
-
"page-index": t(
|
|
1516
|
-
"page-size": t(
|
|
1517
|
-
onSortChange: t(
|
|
1518
|
-
onPageChange:
|
|
1519
|
-
onRowClick:
|
|
1532
|
+
"page-count": t(x).pageCount,
|
|
1533
|
+
"page-index": t(x).pageIndex,
|
|
1534
|
+
"page-size": t(x).pageSize,
|
|
1535
|
+
onSortChange: t(_),
|
|
1536
|
+
onPageChange: c[2] || (c[2] = (N) => t(p)({ pageSize: N.pageSize, pageIndex: N.pageIndex })),
|
|
1537
|
+
onRowClick: c[3] || (c[3] = (N) => {
|
|
1520
1538
|
var D;
|
|
1521
|
-
|
|
1539
|
+
K.value = N.original, (D = t(G)) == null || D.showSheet();
|
|
1522
1540
|
})
|
|
1523
1541
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1524
|
-
t(
|
|
1542
|
+
t(K) ? (f(), q(Ro, {
|
|
1525
1543
|
key: 0,
|
|
1526
1544
|
ref_key: "sheetRef",
|
|
1527
|
-
ref:
|
|
1528
|
-
member: t(
|
|
1545
|
+
ref: G,
|
|
1546
|
+
member: t(K),
|
|
1529
1547
|
"onUpdate:member": ne
|
|
1530
|
-
}, null, 8, ["member"])) :
|
|
1548
|
+
}, null, 8, ["member"])) : xe("", !0)
|
|
1531
1549
|
]);
|
|
1532
1550
|
};
|
|
1533
1551
|
}
|