@feedmepos/mf-connect 0.1.24-prod → 0.1.26-prod
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Analytic-DH3odpBh.js → Analytic-WXmpLkLU.js} +18 -17
- package/dist/{App-DT9d3Bm2.js → App-jBGNDeCb.js} +6 -6
- package/dist/{Bin-CEFG1nRH.js → Bin-COj4GqKe.js} +19 -18
- package/dist/{Broadcast-B_rv159-.js → Broadcast-vIqSNTJh.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DzD9-r4-.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVtfunGL.js} +14 -8
- package/dist/{Card-Dyya8J2U.js → Card-CGyBry4S.js} +57 -55
- package/dist/{Collections-Dl2FDFOD.js → Collections-BeQ_uFRE.js} +23 -21
- package/dist/{Credit-B9mz3eUI.js → Credit-DWsgc_P1.js} +35 -34
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-TrKmONi5.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-DxPsGM7d.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVCgGHg4.js → EffectSheet.vue_vue_type_style_index_0_lang-DlCdWAqB.js} +6 -6
- package/dist/{Experience-CGwG9JGa.js → Experience-DQ5ofpRU.js} +13 -12
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-dl01-cxh.js +278 -0
- package/dist/{Index-D0IkkcBH.js → Index-B33SYml2.js} +14 -13
- package/dist/{Marketing-HmC8ZXqz.js → Marketing-CqWuI9r1.js} +8 -7
- package/dist/Member-PuWzURyR.js +348 -0
- package/dist/{MemberList-_MFrJqht.js → MemberList-dQljjKIC.js} +275 -269
- package/dist/{MemberTransactions-kUyU9Qn6.js → MemberTransactions-BH1U_v3f.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DypmZY2G.js → MessageInput.vue_vue_type_script_setup_true_lang-ZSNwpN6m.js} +7 -7
- package/dist/{Mission-OUjm7KRr.js → Mission-PjsS8VTH.js} +118 -96
- package/dist/{Overview-F2AvMo-g.js → Overview-B6zXdxIf.js} +63 -62
- package/dist/{Point-K9poYQjB.js → Point-DhYeSbYo.js} +11 -10
- package/dist/{Promotion-DpS6PQFU.js → Promotion-4yBcCEQA.js} +12 -11
- package/dist/Queue-BCOe370v.js +249 -0
- package/dist/{Record-CZMB7xKL.js → Record-FxeE4KZe.js} +21 -19
- package/dist/{Reward-zMCEkbO5.js → Reward-B4licTuW.js} +19 -18
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Dj73NYhp.js → RewardGroup.vue_vue_type_script_setup_true_lang-CKWOhSQh.js} +13 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-FyuAHi5K.js → RuleGroup.vue_vue_type_script_setup_true_lang-BbOzaj63.js} +12 -12
- package/dist/{Segment-LthACAfl.js → Segment-DONb4N1l.js} +19 -17
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DRe6Gyov.js → SelectItems.vue_vue_type_script_setup_true_lang-CvHYZpGm.js} +2 -2
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-NDwwOZSM.js +188 -0
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Z9Nb9b6-.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2ixqrV7.js} +3 -3
- package/dist/{Setting-8ASd681E.js → Setting-BQOcVtGa.js} +20 -19
- package/dist/{Store-C-bmQP0K.js → Store-BlaFXTeO.js} +24 -23
- package/dist/{StoreRewards-Bu3DWaCn.js → StoreRewards-Lqc34UoD.js} +15 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-C5dViJNi.js +994 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-Bn7aoYqw.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-e_31o0i7.js} +1 -1
- package/dist/{Tier-DDKUGBRg.js → Tier-B26lO0SB.js} +25 -24
- package/dist/{Title-Cup_EWfZ.js → Title-BASSyfhP.js} +28 -27
- package/dist/{Transaction-BqvgfyiW.js → Transaction-BbzBRylw.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BCkXievQ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-BFyl96zy.js} +6 -6
- package/dist/{Voucher-Dxk6zfcN.js → Voucher-A_GG0E5t.js} +38 -37
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DmswMNi5.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CCGtKQTW.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D-UPL1Rc.js → ZodTextField.vue_vue_type_script_setup_true_lang-DGNqvOl5.js} +1 -1
- package/dist/{app-bidojB9R.js → app-C7FQYfsn.js} +1 -1
- package/dist/{app-BDUrJlXZ.js → app-DV-5XPYF.js} +235 -166
- package/dist/app.js +1 -1
- package/dist/{business-CFOn3-Hz.js → business-C8PXQSRE.js} +1 -1
- package/dist/{campaign-DyzzIbnA.js → campaign-B4eKVpps.js} +9 -9
- package/dist/{campaign-BVIiGyq9.js → campaign-CuZ6u4yy.js} +2 -2
- package/dist/{campaign.enum-aFjayQfJ.js → campaign.enum-xbqqPDwY.js} +1 -1
- package/dist/{campaign.fn-BKADpFTx.js → campaign.fn-GFFtrWsz.js} +133 -133
- package/dist/{collectible.enum-vEUgo0YF.js → collectible.enum-DB4oBcfv.js} +1 -1
- package/dist/{collection.fn-D2Kbz9yq.js → collection.fn-BwpscyTl.js} +2 -2
- package/dist/{dto-CKxtFHko.js → dto-Cr20KGr0.js} +4 -4
- package/dist/{effect-BEWKDhDB.js → effect-D9-UiBiK.js} +1 -1
- package/dist/{email-addresses-BWDg5Wvf.js → email-addresses-F3hoXmRI.js} +1 -1
- package/dist/{export-DO-WeD6l.js → export-BIPF1ilY.js} +3 -3
- package/dist/{helper-CSGr0Zgt.js → helper-Tf1bFEee.js} +1 -1
- package/dist/{index-UVHHFXyh.js → index-B2jAIO5k.js} +1162 -1129
- package/dist/{index-Dw_jc7Et.js → index-BYzdfZKb.js} +3 -3
- package/dist/{index-BgJVKNYg.js → index-BhlEaLpy.js} +24 -21
- package/dist/{index-BV4M35iK.js → index-Bkw-11Tg.js} +2 -2
- package/dist/{index-CFXFhGs9.js → index-BvqdtS9H.js} +1 -1
- package/dist/{index-DVsh-nBE.js → index-CpUyyTF6.js} +1 -1
- package/dist/{index-CUlYeKKH.js → index-D4XX55M5.js} +1 -1
- package/dist/{index-CEjeBL2U.js → index-Dow2N7x1.js} +1 -1
- package/dist/{index--Mrx1FRI.js → index-IOTB7rGH.js} +1 -1
- package/dist/{index-CoMMyOsj.js → index-bb6Kd8k_.js} +10 -10
- package/dist/{index-DSBnWOie.js → index-gTmOLzQU.js} +1 -1
- package/dist/{index-Bg3caQS6.js → index-mjBmZtX2.js} +1273 -1273
- package/dist/{index.esm2017-CDzvT_fP.js → index.esm2017-Y_0J3nbR.js} +137 -137
- package/dist/loading-BbC_ZIPE.js +71 -0
- package/dist/{membership-DK9FNo2Y.js → membership-BM_2_hUW.js} +3 -3
- package/dist/{money-DJYiw0es.js → money-BsBmwalY.js} +1 -1
- package/dist/{number-BjhqQBza.js → number-QqpGrk9q.js} +1 -1
- package/dist/objectid-DQj-P2cH.js +145 -0
- package/dist/{loading-CWihCJvJ.js → plugins-DKPF0eaB.js} +1535 -1601
- package/dist/{reward-DlE5Zt3d.js → reward-Yl3EdHrH.js} +1 -1
- package/dist/{rule-a2_WCjR8.js → rule-DW_bLKtu.js} +3 -3
- package/dist/{rule-builder-Q8iGSpDV.js → rule-builder-BoITzEtm.js} +1 -1
- package/dist/{template-3faxO3XM.js → template-BSQzNJs5.js} +4 -4
- package/dist/{trigger-Cnvhgqkj.js → trigger-Bel1H8iR.js} +11 -11
- package/dist/usePagination-JoYaROkV.js +223 -0
- package/dist/{user-CoiXBmet.js → user-Dg2HfZlK.js} +1 -1
- package/dist/vue-i18n-CvvsV6dR.js +2365 -0
- package/dist/{usePagination-dNrSGtRV.js → xlsx-1oIZztwO.js} +2979 -3200
- package/package.json +3 -1
- package/dist/Game-DbhOlio1.js +0 -256
- package/dist/Member-NSQ2nHzW.js +0 -69
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDRpkUaP.js +0 -1105
- package/dist/objectid-Cep7PkzN.js +0 -145
- package/dist/vue-i18n-B2XH0K8P.js +0 -2365
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as be, computed as H, ref as G, resolveComponent as $, openBlock as u, createElementBlock as A, Fragment as q, createElementVNode as t, unref as e, createBlock as R, createCommentVNode as ce, createVNode as h, renderList as ie, withCtx as xe, createTextVNode as Fe, toDisplayString as
|
|
1
|
+
import { defineComponent as be, computed as H, ref as G, resolveComponent as $, openBlock as u, createElementBlock as A, Fragment as q, createElementVNode as t, unref as e, createBlock as R, createCommentVNode as ce, createVNode as h, renderList as ie, withCtx as xe, createTextVNode as Fe, toDisplayString as I, withDirectives as Re, vShow as Ue, watch as Le, onBeforeMount as st, h as K, onMounted as ze, isRef as rt, normalizeClass as it } from "vue";
|
|
2
2
|
import { h as S } from "./moment-BWErdI6_.js";
|
|
3
3
|
import { useDialog as Ee, components as ve } from "@feedmepos/ui-library";
|
|
4
|
-
import { e as
|
|
5
|
-
import {
|
|
6
|
-
import "./index
|
|
7
|
-
import { p as
|
|
8
|
-
import { u as $e, C as
|
|
9
|
-
import { c as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { D as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import "./
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
4
|
+
import { e as lt, M as ct } from "./email-addresses-F3hoXmRI.js";
|
|
5
|
+
import { w as dt } from "./xlsx-1oIZztwO.js";
|
|
6
|
+
import "./index-IOTB7rGH.js";
|
|
7
|
+
import { p as De, c as Ne, b as Ye } from "./plugins-DKPF0eaB.js";
|
|
8
|
+
import { u as $e, C as Pe, s as mt } from "./membership-BM_2_hUW.js";
|
|
9
|
+
import { c as ut } from "./index-mjBmZtX2.js";
|
|
10
|
+
import { _ as Oe } from "./lodash-B5I3zXaY.js";
|
|
11
|
+
import { D as pt } from "./type_drinks-D6jnpvwV.js";
|
|
12
|
+
import { c as ft, d as bt, e as yt, f as gt, g as vt } from "./index-B2jAIO5k.js";
|
|
13
|
+
import { u as je } from "./loading-BbC_ZIPE.js";
|
|
14
|
+
import { C as Ae } from "./collection.fn-BwpscyTl.js";
|
|
15
|
+
import { defineStore as xt } from "pinia";
|
|
16
|
+
import { u as qe } from "./business-C8PXQSRE.js";
|
|
17
|
+
import { f as ee } from "./number-QqpGrk9q.js";
|
|
18
|
+
import "./index-Bkw-11Tg.js";
|
|
19
|
+
import "./index-bb6Kd8k_.js";
|
|
20
|
+
import "./index-D4XX55M5.js";
|
|
21
|
+
import "./index-BYzdfZKb.js";
|
|
22
|
+
import { s as _t } from "./index-CuvNtC_M.js";
|
|
23
|
+
import { u as Ke, _ as Ge } from "./usePagination-JoYaROkV.js";
|
|
24
|
+
import { B as ht, e as St } from "./export-BIPF1ilY.js";
|
|
25
|
+
import { m as Me } from "./index-Dow2N7x1.js";
|
|
24
26
|
import { o as Ce } from "./objectId-dwaoBfJX.js";
|
|
25
|
-
import { F as ke } from "./collectible.enum-
|
|
26
|
-
import { g as
|
|
27
|
-
import { useRouter as
|
|
28
|
-
import { m as le } from "./index-
|
|
29
|
-
import { t as
|
|
30
|
-
import { R as
|
|
31
|
-
import { t as
|
|
32
|
-
import { g as
|
|
33
|
-
const
|
|
27
|
+
import { F as ke } from "./collectible.enum-DB4oBcfv.js";
|
|
28
|
+
import { g as Ct, b as wt } from "./campaign-B4eKVpps.js";
|
|
29
|
+
import { useRouter as He } from "vue-router";
|
|
30
|
+
import { m as le } from "./index-BhlEaLpy.js";
|
|
31
|
+
import { t as Ft } from "./index-BvqdtS9H.js";
|
|
32
|
+
import { R as We } from "./app-DV-5XPYF.js";
|
|
33
|
+
import { t as Mt } from "./money-BsBmwalY.js";
|
|
34
|
+
import { g as Tt, a as kt, b as At } from "./user-Dg2HfZlK.js";
|
|
35
|
+
const Et = { class: "flex flex-col" }, $t = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1), Vt = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1), It = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1), Bt = { key: 1 }, Dt = /* @__PURE__ */ t("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
34
36
|
/* @__PURE__ */ t("div", { class: "flex-1" }, "Title"),
|
|
35
37
|
/* @__PURE__ */ t("div", { class: "flex-1" }, "Expires in days"),
|
|
36
38
|
/* @__PURE__ */ t("div", { class: "w-24 h-1" })
|
|
37
|
-
], -1),
|
|
38
|
-
|
|
39
|
-
],
|
|
39
|
+
], -1), Nt = [
|
|
40
|
+
Dt
|
|
41
|
+
], Yt = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, Pt = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, Ot = /* @__PURE__ */ be({
|
|
40
42
|
__name: "MemberStatsDialog",
|
|
41
43
|
props: {
|
|
42
44
|
member: {
|
|
@@ -60,14 +62,14 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
60
62
|
(te) => te._id.toString() === M.collectible
|
|
61
63
|
);
|
|
62
64
|
if (!s) return f;
|
|
63
|
-
const
|
|
65
|
+
const i = [...M.expiryBalance ?? []].sort(
|
|
64
66
|
(te, z) => S(te.expiredAt).isAfter(S(z.expiredAt)) ? -1 : 1
|
|
65
67
|
);
|
|
66
|
-
return (w =
|
|
68
|
+
return (w = i[0]) != null && w.expiredAt && S((T = i[0]) == null ? void 0 : T.expiredAt).isBefore(S()) || f.push({
|
|
67
69
|
_id: s._id,
|
|
68
70
|
name: s.name,
|
|
69
|
-
expiredAt: (O =
|
|
70
|
-
expiresIn: S((U =
|
|
71
|
+
expiredAt: (O = i[0]) != null && O.expiredAt ? S((E = i[0]) == null ? void 0 : E.expiredAt).toISOString() : "",
|
|
72
|
+
expiresIn: S((U = i[0]) == null ? void 0 : U.expiredAt).diff(S(), "days")
|
|
71
73
|
}), f;
|
|
72
74
|
},
|
|
73
75
|
[]
|
|
@@ -100,8 +102,8 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
100
102
|
);
|
|
101
103
|
}
|
|
102
104
|
const m = H(() => {
|
|
103
|
-
var M, s,
|
|
104
|
-
const c = ((s = (M = x.member.collection) == null ? void 0 : M.TIER) == null ? void 0 : s[0].balance) ?? -1, f = ((w = (
|
|
105
|
+
var M, s, i, w, T, O;
|
|
106
|
+
const c = ((s = (M = x.member.collection) == null ? void 0 : M.TIER) == null ? void 0 : s[0].balance) ?? -1, f = ((w = (i = x.member.collection) == null ? void 0 : i.POINT) == null ? void 0 : w[0].balance) ?? 0;
|
|
105
107
|
if (c != o.value.tier) return !0;
|
|
106
108
|
if (o.value.experience && o.value.experience != f) {
|
|
107
109
|
const E = ((T = d.value[c - 1]) == null ? void 0 : T.from) ?? 0, U = ((O = d.value[c - 1]) == null ? void 0 : O.to) ?? 0;
|
|
@@ -114,27 +116,27 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
114
116
|
var f;
|
|
115
117
|
return (f = r.value.find((M) => M._id === c)) == null ? void 0 : f.expiresIn;
|
|
116
118
|
}
|
|
117
|
-
const
|
|
118
|
-
const c =
|
|
119
|
+
const V = H(() => {
|
|
120
|
+
const c = ft.safeParse(o.value);
|
|
119
121
|
return c.success ? void 0 : c.error.errors;
|
|
120
122
|
});
|
|
121
123
|
function D(c) {
|
|
122
124
|
var f, M;
|
|
123
|
-
return (M = (f =
|
|
125
|
+
return (M = (f = V.value) == null ? void 0 : f.find((s) => s.path.join(".") === c)) == null ? void 0 : M.message;
|
|
124
126
|
}
|
|
125
127
|
function L(c) {
|
|
126
128
|
var f;
|
|
127
|
-
return (f =
|
|
129
|
+
return (f = V.value) == null ? void 0 : f.filter((M) => M.path.join(".").startsWith(c)).map((M) => M.message);
|
|
128
130
|
}
|
|
129
131
|
async function P() {
|
|
130
132
|
await x.onSubmit(o.value), k.close();
|
|
131
133
|
}
|
|
132
134
|
return (c, f) => {
|
|
133
135
|
var te, z;
|
|
134
|
-
const M = $("FmSelect"), s = $("FmStepperField"),
|
|
136
|
+
const M = $("FmSelect"), s = $("FmStepperField"), i = $("FmTextField"), w = $("FmField"), T = $("FmFormGroup"), O = $("FmButton"), E = $("FmHelperText"), U = $("FmSpacer");
|
|
135
137
|
return u(), A(q, null, [
|
|
136
|
-
t("div",
|
|
137
|
-
|
|
138
|
+
t("div", Et, [
|
|
139
|
+
$t,
|
|
138
140
|
e(d).length ? (u(), R(M, {
|
|
139
141
|
key: 0,
|
|
140
142
|
modelValue: e(o).tier,
|
|
@@ -155,18 +157,18 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
155
157
|
"helper-text": D("experience"),
|
|
156
158
|
"helper-state": D("experience") ? "error" : void 0
|
|
157
159
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
158
|
-
|
|
159
|
-
h(
|
|
160
|
+
Vt,
|
|
161
|
+
h(i, {
|
|
160
162
|
modelValue: e(o).cardNo,
|
|
161
163
|
"onUpdate:modelValue": f[2] || (f[2] = (F) => e(o).cardNo = F),
|
|
162
164
|
label: "Card number",
|
|
163
165
|
"helper-text": D("cardNo"),
|
|
164
166
|
"helper-state": D("cardNo") ? "error" : void 0
|
|
165
167
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
166
|
-
|
|
167
|
-
(te = e(o).titles) != null && te.length ? (u(), A("div",
|
|
168
|
+
It,
|
|
169
|
+
(te = e(o).titles) != null && te.length ? (u(), A("div", Bt, Nt)) : ce("", !0),
|
|
168
170
|
(u(!0), A(q, null, ie(e(o).titles ?? [], (F, J) => (u(), A("div", { key: J }, [
|
|
169
|
-
t("div",
|
|
171
|
+
t("div", Yt, [
|
|
170
172
|
e(r).some((a) => a._id === F.id) ? (u(), R(T, {
|
|
171
173
|
key: 1,
|
|
172
174
|
"model-value": "",
|
|
@@ -180,7 +182,7 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
180
182
|
default: xe(() => {
|
|
181
183
|
var a;
|
|
182
184
|
return [
|
|
183
|
-
Fe(
|
|
185
|
+
Fe(I((a = e(v).find((n) => n.value === F.id)) == null ? void 0 : a.label), 1)
|
|
184
186
|
];
|
|
185
187
|
}),
|
|
186
188
|
_: 2
|
|
@@ -245,12 +247,12 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
245
247
|
})
|
|
246
248
|
})) : ce("", !0)
|
|
247
249
|
]),
|
|
248
|
-
t("div",
|
|
249
|
-
|
|
250
|
+
t("div", Pt, [
|
|
251
|
+
Re(h(E, {
|
|
250
252
|
state: "warning",
|
|
251
253
|
text: "Updating member will cause tier to change"
|
|
252
254
|
}, null, 512), [
|
|
253
|
-
[
|
|
255
|
+
[Ue, e(m)]
|
|
254
256
|
]),
|
|
255
257
|
h(U),
|
|
256
258
|
h(O, {
|
|
@@ -260,7 +262,7 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
260
262
|
onClick: f[4] || (f[4] = (F) => e(k).close())
|
|
261
263
|
}),
|
|
262
264
|
h(O, {
|
|
263
|
-
disabled: !!e(
|
|
265
|
+
disabled: !!e(V),
|
|
264
266
|
variant: "primary",
|
|
265
267
|
label: "Submit",
|
|
266
268
|
size: "md",
|
|
@@ -270,7 +272,7 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
270
272
|
], 64);
|
|
271
273
|
};
|
|
272
274
|
}
|
|
273
|
-
}),
|
|
275
|
+
}), Rt = { class: "fm-typo-en-title-sm-800" }, Ut = { class: "space-y-16" }, Lt = { class: "flex flex-nowrap gap-8 items-center justify-end pt-24 w-full" }, zt = /* @__PURE__ */ be({
|
|
274
276
|
__name: "CreditCoinDialog",
|
|
275
277
|
props: {
|
|
276
278
|
type: { type: String, required: !0 },
|
|
@@ -292,35 +294,35 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
292
294
|
async function d() {
|
|
293
295
|
if (p.action === "send") {
|
|
294
296
|
const m = x.value.day ? `, expire in ${x.value.day} days` : "";
|
|
295
|
-
|
|
297
|
+
De.confirm(
|
|
296
298
|
`Are you sure to send ${x.value.amount} ${o.value.toLowerCase()}${m}? This action cannot be reversed.`
|
|
297
299
|
).then(async (g) => {
|
|
298
300
|
g && await p.onSubmit(x.value);
|
|
299
301
|
});
|
|
300
302
|
} else
|
|
301
|
-
|
|
303
|
+
De.confirm(
|
|
302
304
|
`Are you sure to deduct ${x.value.amount} ${o.value.toLowerCase()}? This action cannot be reversed.`
|
|
303
305
|
).then(async (m) => {
|
|
304
306
|
m && await p.onSubmit(x.value);
|
|
305
307
|
});
|
|
306
308
|
}
|
|
307
309
|
const C = H(() => {
|
|
308
|
-
const g = (p.action === "send" ? p.type === "coin" ?
|
|
310
|
+
const g = (p.action === "send" ? p.type === "coin" ? bt : yt : p.type === "coin" ? gt : vt).safeParse(x.value);
|
|
309
311
|
return g.success == !1 ? g.error.flatten().fieldErrors : void 0;
|
|
310
312
|
});
|
|
311
313
|
return (m, g) => {
|
|
312
|
-
const
|
|
314
|
+
const V = $("FmStepperField"), D = $("FmSwitch"), L = $("FmTextarea"), P = $("FmButton"), de = $("FmCard");
|
|
313
315
|
return u(), R(de, { class: "flex flex-col gap-16 p-16" }, {
|
|
314
316
|
default: xe(() => {
|
|
315
317
|
var ne, W, se, c, f, M;
|
|
316
318
|
return [
|
|
317
|
-
t("div",
|
|
318
|
-
Fe(" " +
|
|
319
|
-
t("div",
|
|
320
|
-
h(
|
|
319
|
+
t("div", Rt, I(p.action == "send" ? "Send" : "Deduct") + " " + I(e(Pe)[p.type.toUpperCase()].name), 1),
|
|
320
|
+
Fe(" " + I(e(C)) + " ", 1),
|
|
321
|
+
t("div", Ut, [
|
|
322
|
+
h(V, {
|
|
321
323
|
modelValue: e(x).amount,
|
|
322
324
|
"onUpdate:modelValue": g[0] || (g[0] = (s) => e(x).amount = s),
|
|
323
|
-
label: `${e(
|
|
325
|
+
label: `${e(Pe)[p.type.toUpperCase()].name} amount`,
|
|
324
326
|
"is-currency": !0,
|
|
325
327
|
"max-fraction-digits": 2,
|
|
326
328
|
"helper-state": (ne = e(C)) != null && ne.amount ? "error" : void 0,
|
|
@@ -333,7 +335,7 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
333
335
|
"label-placement": "right",
|
|
334
336
|
"onUpdate:modelValue": g[1] || (g[1] = (s) => v(s))
|
|
335
337
|
}, null, 8, ["model-value", "label"])) : ce("", !0),
|
|
336
|
-
y.action === "send" && e(r) ? (u(), R(
|
|
338
|
+
y.action === "send" && e(r) ? (u(), R(V, {
|
|
337
339
|
key: 1,
|
|
338
340
|
modelValue: e(x).day,
|
|
339
341
|
"onUpdate:modelValue": g[2] || (g[2] = (s) => e(x).day = s),
|
|
@@ -351,7 +353,7 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
351
353
|
label: "Remark"
|
|
352
354
|
}, null, 8, ["modelValue"])
|
|
353
355
|
]),
|
|
354
|
-
t("div",
|
|
356
|
+
t("div", Lt, [
|
|
355
357
|
h(P, {
|
|
356
358
|
variant: "secondary",
|
|
357
359
|
label: "Cancel",
|
|
@@ -372,10 +374,10 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
372
374
|
});
|
|
373
375
|
};
|
|
374
376
|
}
|
|
375
|
-
}),
|
|
377
|
+
}), Je = xt("segment", () => {
|
|
376
378
|
const y = G([]);
|
|
377
379
|
async function k() {
|
|
378
|
-
const p = await
|
|
380
|
+
const p = await mt.readAll({
|
|
379
381
|
limit: 1e3,
|
|
380
382
|
skip: 0,
|
|
381
383
|
sortBy: "_id",
|
|
@@ -388,9 +390,9 @@ const Vt = { class: "flex flex-col" }, Bt = /* @__PURE__ */ t("div", { class: "f
|
|
|
388
390
|
read: k
|
|
389
391
|
};
|
|
390
392
|
});
|
|
391
|
-
class
|
|
393
|
+
class jt extends ht {
|
|
392
394
|
}
|
|
393
|
-
const
|
|
395
|
+
const qt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" }, Kt = { class: "hidden xs:flex items-center justify-end" }, Gt = { class: "flex items-center justify-between mb-4" }, Ht = { class: "flex items-center justify-between gap-x-8" }, Wt = { class: "fm-typo-en-body-lg-600" }, Jt = { class: "px-4 py-0.5 rounded-md bg-fm-color-neutral-gray-100 fm-typo-en-body-md-600" }, Xt = { class: "xs:hidden flex justify-between gap-x-4" }, Te = /* @__PURE__ */ be({
|
|
394
396
|
__name: "MemberCollectionTable",
|
|
395
397
|
props: {
|
|
396
398
|
member: {
|
|
@@ -421,18 +423,18 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
421
423
|
setup(y) {
|
|
422
424
|
const k = y, p = G({
|
|
423
425
|
search: ""
|
|
424
|
-
}), x = G(!1), { tableMeta: r, rowData: o, onSort: v, debouncedFetchData: d, onSearch: C } =
|
|
425
|
-
const
|
|
426
|
+
}), x = G(!1), { tableMeta: r, rowData: o, onSort: v, debouncedFetchData: d, onSearch: C } = Ke(async (g) => {
|
|
427
|
+
const V = {
|
|
426
428
|
...p.value,
|
|
427
429
|
...k.filters
|
|
428
430
|
};
|
|
429
431
|
return await Me.readCollectionsByMemberId(
|
|
430
432
|
k.member._id.toString(),
|
|
431
433
|
g,
|
|
432
|
-
|
|
434
|
+
V
|
|
433
435
|
);
|
|
434
436
|
});
|
|
435
|
-
|
|
437
|
+
Le(
|
|
436
438
|
p,
|
|
437
439
|
() => {
|
|
438
440
|
d();
|
|
@@ -446,11 +448,11 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
446
448
|
...p.value,
|
|
447
449
|
...k.filters
|
|
448
450
|
};
|
|
449
|
-
await
|
|
450
|
-
exporter: new
|
|
451
|
-
readFunction: (
|
|
451
|
+
await St({
|
|
452
|
+
exporter: new jt(),
|
|
453
|
+
readFunction: (V) => Me.readCollectionsByMemberId(
|
|
452
454
|
k.member._id.toString(),
|
|
453
|
-
|
|
455
|
+
V,
|
|
454
456
|
g
|
|
455
457
|
),
|
|
456
458
|
transformRecord: k.transformExportRecord,
|
|
@@ -462,17 +464,17 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
462
464
|
x.value = !1;
|
|
463
465
|
}
|
|
464
466
|
}
|
|
465
|
-
return
|
|
467
|
+
return st(async () => {
|
|
466
468
|
await d();
|
|
467
|
-
}), (g,
|
|
469
|
+
}), (g, V) => {
|
|
468
470
|
const D = $("FmSearch"), L = $("FmButton");
|
|
469
|
-
return u(), A("div",
|
|
470
|
-
t("div",
|
|
471
|
+
return u(), A("div", qt, [
|
|
472
|
+
t("div", Kt, [
|
|
471
473
|
h(D, {
|
|
472
474
|
class: "hidden xs:flex",
|
|
473
475
|
modelValue: e(p).search,
|
|
474
476
|
"onUpdate:modelValue": [
|
|
475
|
-
|
|
477
|
+
V[0] || (V[0] = (P) => e(p).search = P),
|
|
476
478
|
e(C)
|
|
477
479
|
],
|
|
478
480
|
placeholder: "Search",
|
|
@@ -485,16 +487,16 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
485
487
|
onClick: m
|
|
486
488
|
})) : ce("", !0)
|
|
487
489
|
]),
|
|
488
|
-
t("div",
|
|
489
|
-
t("div",
|
|
490
|
-
t("div",
|
|
491
|
-
t("div",
|
|
490
|
+
t("div", Gt, [
|
|
491
|
+
t("div", Ht, [
|
|
492
|
+
t("div", Wt, I(k.title), 1),
|
|
493
|
+
t("div", Jt, I(e(r).totalRows), 1)
|
|
492
494
|
]),
|
|
493
|
-
t("div",
|
|
495
|
+
t("div", Xt, [
|
|
494
496
|
h(D, {
|
|
495
497
|
modelValue: e(p).search,
|
|
496
498
|
"onUpdate:modelValue": [
|
|
497
|
-
|
|
499
|
+
V[1] || (V[1] = (P) => e(p).search = P),
|
|
498
500
|
e(C)
|
|
499
501
|
],
|
|
500
502
|
placeholder: "Search"
|
|
@@ -507,7 +509,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
507
509
|
})) : ce("", !0)
|
|
508
510
|
])
|
|
509
511
|
]),
|
|
510
|
-
h(
|
|
512
|
+
h(Ge, {
|
|
511
513
|
loading: e(r).isLoading,
|
|
512
514
|
"row-data": e(o),
|
|
513
515
|
"row-count": e(r).totalRows,
|
|
@@ -517,7 +519,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
517
519
|
"page-size": e(r).pageSize,
|
|
518
520
|
"shrink-at": !1,
|
|
519
521
|
onSortChange: e(v),
|
|
520
|
-
onPageChange:
|
|
522
|
+
onPageChange: V[2] || (V[2] = (P) => e(d)({
|
|
521
523
|
pageSize: P.pageSize,
|
|
522
524
|
pageIndex: P.pageIndex
|
|
523
525
|
}))
|
|
@@ -525,7 +527,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
525
527
|
]);
|
|
526
528
|
};
|
|
527
529
|
}
|
|
528
|
-
}),
|
|
530
|
+
}), Qt = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Voucher Collections", -1), Zt = /* @__PURE__ */ be({
|
|
529
531
|
__name: "MemberVouchers",
|
|
530
532
|
props: {
|
|
531
533
|
member: {
|
|
@@ -571,7 +573,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
571
573
|
header: "Transfer open",
|
|
572
574
|
accessorFn: (o) => {
|
|
573
575
|
var v, d, C;
|
|
574
|
-
return
|
|
576
|
+
return _t((C = (d = (v = o.pf_collectible) == null ? void 0 : v.options) == null ? void 0 : d.enableTransfer) == null ? void 0 : C.toString());
|
|
575
577
|
},
|
|
576
578
|
enableSorting: !1
|
|
577
579
|
}
|
|
@@ -579,7 +581,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
579
581
|
type: ke.enum.VOUCHER,
|
|
580
582
|
isActive: o
|
|
581
583
|
}), r = (o) => {
|
|
582
|
-
var v, d, C, m, g,
|
|
584
|
+
var v, d, C, m, g, V, D;
|
|
583
585
|
return {
|
|
584
586
|
CollectionID: o._id,
|
|
585
587
|
Title: (v = o.pf_collectible) == null ? void 0 : v.name,
|
|
@@ -587,11 +589,11 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
587
589
|
"D MMM YYYY, hh:mmA"
|
|
588
590
|
),
|
|
589
591
|
ExpiredAt: (C = (d = o.expiryBalance) == null ? void 0 : d[0]) != null && C.expiredAt ? S((g = (m = o.expiryBalance) == null ? void 0 : m[0]) == null ? void 0 : g.expiredAt).format("D MMM YYYY") : "",
|
|
590
|
-
TransferOpen: ((D = (
|
|
592
|
+
TransferOpen: ((D = (V = o.pf_collectible) == null ? void 0 : V.options) == null ? void 0 : D.enableTransfer) || !1
|
|
591
593
|
};
|
|
592
594
|
};
|
|
593
595
|
return (o, v) => (u(), A(q, null, [
|
|
594
|
-
|
|
596
|
+
Qt,
|
|
595
597
|
h(Te, {
|
|
596
598
|
member: k.member,
|
|
597
599
|
columns: p,
|
|
@@ -610,7 +612,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
610
612
|
}, null, 8, ["member", "filters"])
|
|
611
613
|
], 64));
|
|
612
614
|
}
|
|
613
|
-
}),
|
|
615
|
+
}), eo = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Mission", -1), to = /* @__PURE__ */ be({
|
|
614
616
|
__name: "MemberMissions",
|
|
615
617
|
props: {
|
|
616
618
|
member: {
|
|
@@ -639,7 +641,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
639
641
|
header: "Type",
|
|
640
642
|
accessorFn: (r) => {
|
|
641
643
|
var o, v, d;
|
|
642
|
-
return
|
|
644
|
+
return Ne.title(((d = (v = (o = r == null ? void 0 : r.pf_collectible) == null ? void 0 : o.extras) == null ? void 0 : v.mission) == null ? void 0 : d.type) || "-");
|
|
643
645
|
},
|
|
644
646
|
enableSorting: !1
|
|
645
647
|
},
|
|
@@ -652,12 +654,12 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
652
654
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
653
655
|
completed: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
654
656
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
655
|
-
}, v =
|
|
657
|
+
}, v = Ct(
|
|
656
658
|
r.row.original.pf_campaign
|
|
657
659
|
), C = r.row.original.balance === r.row.original.pf_collectible.extras.mission.end && v === "active" ? "completed" : v;
|
|
658
660
|
return K(ve.FmChip, {
|
|
659
661
|
class: o[C],
|
|
660
|
-
label:
|
|
662
|
+
label: Ne.title(C),
|
|
661
663
|
compact: !0
|
|
662
664
|
});
|
|
663
665
|
}
|
|
@@ -671,7 +673,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
671
673
|
},
|
|
672
674
|
{
|
|
673
675
|
header: "Summary",
|
|
674
|
-
accessorFn: (r) => r != null && r.pf_campaign ?
|
|
676
|
+
accessorFn: (r) => r != null && r.pf_campaign ? wt(r.pf_campaign) : "Deleted Campaign",
|
|
675
677
|
enableSorting: !1
|
|
676
678
|
},
|
|
677
679
|
{
|
|
@@ -691,7 +693,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
691
693
|
type: ke.enum.STAMP
|
|
692
694
|
};
|
|
693
695
|
return (r, o) => (u(), A(q, null, [
|
|
694
|
-
|
|
696
|
+
eo,
|
|
695
697
|
h(Te, {
|
|
696
698
|
member: k.member,
|
|
697
699
|
columns: p,
|
|
@@ -700,7 +702,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
700
702
|
}, null, 8, ["member"])
|
|
701
703
|
], 64));
|
|
702
704
|
}
|
|
703
|
-
}),
|
|
705
|
+
}), oo = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-600 mb-16" }, "Game program", -1), ao = /* @__PURE__ */ be({
|
|
704
706
|
__name: "MemberGames",
|
|
705
707
|
props: {
|
|
706
708
|
member: {
|
|
@@ -752,7 +754,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
752
754
|
isActive: r
|
|
753
755
|
});
|
|
754
756
|
return (r, o) => (u(), A(q, null, [
|
|
755
|
-
|
|
757
|
+
oo,
|
|
756
758
|
h(Te, {
|
|
757
759
|
member: k.member,
|
|
758
760
|
columns: p,
|
|
@@ -761,19 +763,19 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
761
763
|
}, null, 8, ["member", "filters"])
|
|
762
764
|
], 64));
|
|
763
765
|
}
|
|
764
|
-
}),
|
|
766
|
+
}), no = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, so = { class: "grid md:grid-cols-2 lg:grid-cols-2 gap-x-36 gap-y-24" }, ro = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mb-16" }, "Profile Information", -1), io = { class: "space-y-16" }, lo = { class: "flex gap-16 items-center" }, co = { class: "flex-auto" }, mo = /* @__PURE__ */ t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Member Name ", -1), uo = { class: "fm-typo-en-body-md-600" }, po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bo = { class: "fm-typo-en-body-md-800" }, yo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, go = { class: "fm-typo-en-body-md-600" }, vo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, xo = { class: "fm-typo-en-body-md-800" }, _o = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800 mb-16" }, "Activities", -1), ho = { class: "gap-16 grid grid-cols-1" }, So = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Co = { class: "fm-typo-en-body-md-600" }, wo = /* @__PURE__ */ t("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1), Fo = { 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" }, Mo = { class: "flex justify-between mb-16" }, To = { class: "fm-typo-en-title-sm-600" }, ko = ["onClick"], Ao = { class: "flex flex-col gap-y-16" }, Eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $o = { class: "fm-typo-en-body-md-600" }, Vo = { class: "space-y-8" }, Io = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1), Bo = {
|
|
765
767
|
key: 0,
|
|
766
768
|
class: "space-x-8"
|
|
767
|
-
},
|
|
769
|
+
}, Do = {
|
|
768
770
|
key: 1,
|
|
769
771
|
class: "text-fm-color-typo-secondary"
|
|
770
|
-
},
|
|
772
|
+
}, No = /* @__PURE__ */ t("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1), Yo = { class: "space-y-8" }, Po = /* @__PURE__ */ t("div", { class: "fm-typo-en-title-sm-800" }, "Title badge", -1), Oo = ["src"], Ro = { class: "fm-typo-en-body-md-600" }, Uo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Lo = {
|
|
771
773
|
key: 1,
|
|
772
774
|
class: "text-fm-color-typo-secondary"
|
|
773
|
-
},
|
|
775
|
+
}, zo = {
|
|
774
776
|
key: 1,
|
|
775
777
|
class: "space-y-24"
|
|
776
|
-
},
|
|
778
|
+
}, jo = { class: "space-y-8" }, qo = /* @__PURE__ */ t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1), Ko = { class: "fm-typo-en-title-md-800" }, Go = { class: "space-y-4" }, Ho = /* @__PURE__ */ t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1), Wo = { class: "fm-typo-en-body-md-600" }, Jo = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, Xo = { class: "space-y-8" }, Qo = /* @__PURE__ */ t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1), Zo = { class: "fm-typo-en-title-md-800" }, ea = { class: "space-y-4" }, ta = /* @__PURE__ */ t("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1), oa = { class: "fm-typo-en-body-md-600" }, aa = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, na = /* @__PURE__ */ be({
|
|
777
779
|
__name: "MemberDetailSheet",
|
|
778
780
|
props: {
|
|
779
781
|
member: {
|
|
@@ -783,7 +785,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
783
785
|
},
|
|
784
786
|
emits: ["update:member"],
|
|
785
787
|
setup(y, { expose: k, emit: p }) {
|
|
786
|
-
const x =
|
|
788
|
+
const x = He(), r = $e(), o = qe(), v = Je(), d = Ee(), { minor: C } = je, m = y, g = p, V = H(() => o.locations.map((a) => ({
|
|
787
789
|
label: a.name,
|
|
788
790
|
value: a._id
|
|
789
791
|
}))), D = H(() => (m.member.segment || []).map((a) => {
|
|
@@ -827,11 +829,11 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
827
829
|
stats: [
|
|
828
830
|
{
|
|
829
831
|
label: "Stamp missions",
|
|
830
|
-
getter: () => ee(
|
|
832
|
+
getter: () => ee(i.value.stamp, 0)
|
|
831
833
|
},
|
|
832
834
|
{
|
|
833
835
|
label: "Progress missions",
|
|
834
|
-
getter: () => ee(
|
|
836
|
+
getter: () => ee(i.value.progressive, 0)
|
|
835
837
|
}
|
|
836
838
|
]
|
|
837
839
|
},
|
|
@@ -872,7 +874,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
872
874
|
switch (a.stopPropagation(), n) {
|
|
873
875
|
case "Store bundle":
|
|
874
876
|
await x.push({
|
|
875
|
-
name:
|
|
877
|
+
name: We["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
876
878
|
params: { id: m.member._id.toString() },
|
|
877
879
|
query: { tab: "store" }
|
|
878
880
|
});
|
|
@@ -885,7 +887,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
885
887
|
async function W(a, n) {
|
|
886
888
|
d.open({
|
|
887
889
|
title: "",
|
|
888
|
-
dialogComponent:
|
|
890
|
+
dialogComponent: zt,
|
|
889
891
|
dialogComponentProps: {
|
|
890
892
|
type: a,
|
|
891
893
|
action: n,
|
|
@@ -916,7 +918,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
916
918
|
async function se() {
|
|
917
919
|
d.open({
|
|
918
920
|
title: "Update member statistics",
|
|
919
|
-
contentComponent:
|
|
921
|
+
contentComponent: Ot,
|
|
920
922
|
contentComponentProps: {
|
|
921
923
|
member: m.member,
|
|
922
924
|
onSubmit: async (a) => {
|
|
@@ -942,7 +944,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
942
944
|
label: "Tier",
|
|
943
945
|
getter: (a) => {
|
|
944
946
|
var re, me, ye, _, Y;
|
|
945
|
-
const n = (((me =
|
|
947
|
+
const n = (((me = Oe.first((re = m.member.collection) == null ? void 0 : re.TIER)) == null ? void 0 : me.balance) || 0) - 1, b = M.value.name, B = ((_ = (ye = a.collection) == null ? void 0 : ye.POINT) == null ? void 0 : _[0].balance) ?? 0, N = r.sortedTiers[n + 1], X = ((Y = N == null ? void 0 : N.option) == null ? void 0 : Y.to) ?? 1 / 0;
|
|
946
948
|
return `${b} (${B}/${X})`;
|
|
947
949
|
}
|
|
948
950
|
},
|
|
@@ -963,12 +965,12 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
963
965
|
label: "Joined at location",
|
|
964
966
|
getter: (a) => {
|
|
965
967
|
var n;
|
|
966
|
-
return a != null && a.location && ((n =
|
|
968
|
+
return a != null && a.location && ((n = V.value.find((b) => b.value == a.location)) == null ? void 0 : n.label) || "-";
|
|
967
969
|
}
|
|
968
970
|
},
|
|
969
971
|
{
|
|
970
972
|
label: "Total visit(s)",
|
|
971
|
-
getter: (a) =>
|
|
973
|
+
getter: (a) => Ye.singularOrPlural(a.stats.visitCount, "bill")
|
|
972
974
|
},
|
|
973
975
|
{
|
|
974
976
|
label: "Last visit",
|
|
@@ -976,14 +978,14 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
976
978
|
},
|
|
977
979
|
{
|
|
978
980
|
label: "Frequency",
|
|
979
|
-
getter: (a) => `Every ${
|
|
981
|
+
getter: (a) => `Every ${Ye.singularOrPlural(
|
|
980
982
|
Number(Math.ceil(a.stats.avgVisitFrequency).toFixed(0)),
|
|
981
983
|
"day"
|
|
982
984
|
)}`
|
|
983
985
|
},
|
|
984
986
|
{
|
|
985
987
|
label: "Average spend",
|
|
986
|
-
getter: (a) =>
|
|
988
|
+
getter: (a) => ut.Dinero.fromNumber({ number: Number(a.stats.avgBillSize || 0) }).toFormat(
|
|
987
989
|
!0
|
|
988
990
|
)
|
|
989
991
|
}
|
|
@@ -1001,7 +1003,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1001
1003
|
// },
|
|
1002
1004
|
], M = H(() => {
|
|
1003
1005
|
var b, B;
|
|
1004
|
-
const a = (((B =
|
|
1006
|
+
const a = (((B = Oe.first((b = m.member.collection) == null ? void 0 : b.TIER)) == null ? void 0 : B.balance) || 0) - 1, n = r.sortedTiers[a];
|
|
1005
1007
|
return { name: (n == null ? void 0 : n.name) || "-", tier: a, config: n };
|
|
1006
1008
|
}), s = H(() => {
|
|
1007
1009
|
var a;
|
|
@@ -1018,7 +1020,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1018
1020
|
}).filter(
|
|
1019
1021
|
(n) => n.expiredAt ? S(n.expiredAt).isAfter(S()) : !0
|
|
1020
1022
|
);
|
|
1021
|
-
}),
|
|
1023
|
+
}), i = G({ stamp: 0, progressive: 0 }), w = G({ active: 0, past: 0 }), T = G([]), O = H(
|
|
1022
1024
|
() => T.value.reduce((a, n) => a + n.count, 0)
|
|
1023
1025
|
), E = G(!0);
|
|
1024
1026
|
function U() {
|
|
@@ -1052,15 +1054,15 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1052
1054
|
w.value = await Me.readCollectionCountByMemberId(
|
|
1053
1055
|
m.member._id.toString(),
|
|
1054
1056
|
ke.enum.VOUCHER
|
|
1055
|
-
), T.value = await
|
|
1057
|
+
), T.value = await Ft.readPurchaseCountByMember(
|
|
1056
1058
|
m.member._id.toString()
|
|
1057
|
-
),
|
|
1059
|
+
), i.value = await Me.readMissionCountByMemberId(
|
|
1058
1060
|
m.member._id.toString()
|
|
1059
1061
|
);
|
|
1060
1062
|
};
|
|
1061
|
-
return
|
|
1063
|
+
return ze(async () => {
|
|
1062
1064
|
await r.readMembership(), await J(), o.locations.length || await o.readLocations();
|
|
1063
|
-
}),
|
|
1065
|
+
}), Le(E, async () => {
|
|
1064
1066
|
await J();
|
|
1065
1067
|
}), k({
|
|
1066
1068
|
showSheet: U,
|
|
@@ -1069,7 +1071,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1069
1071
|
const b = $("FmTabs"), B = $("FmAvatar"), N = $("FmButton"), X = $("FmIcon"), re = $("FmChip"), me = $("FmCard"), ye = $("FmSideSheet");
|
|
1070
1072
|
return u(), R(ye, {
|
|
1071
1073
|
modelValue: e(E),
|
|
1072
|
-
"onUpdate:modelValue": n[5] || (n[5] = (_) =>
|
|
1074
|
+
"onUpdate:modelValue": n[5] || (n[5] = (_) => rt(E) ? E.value = _ : null),
|
|
1073
1075
|
header: "Member Detail",
|
|
1074
1076
|
"dismiss-away": "",
|
|
1075
1077
|
"close-button": !0,
|
|
@@ -1077,7 +1079,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1077
1079
|
}, {
|
|
1078
1080
|
"side-sheet-footer": xe(() => []),
|
|
1079
1081
|
default: xe(() => [
|
|
1080
|
-
t("div",
|
|
1082
|
+
t("div", no, [
|
|
1081
1083
|
t("div", null, [
|
|
1082
1084
|
h(b, {
|
|
1083
1085
|
"model-value": e(F).value,
|
|
@@ -1087,22 +1089,22 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1087
1089
|
}, null, 8, ["model-value"])
|
|
1088
1090
|
]),
|
|
1089
1091
|
e(F).value == "overview" ? (u(), A(q, { key: 0 }, [
|
|
1090
|
-
t("div",
|
|
1092
|
+
t("div", so, [
|
|
1091
1093
|
t("div", null, [
|
|
1092
|
-
|
|
1093
|
-
t("div",
|
|
1094
|
-
t("div",
|
|
1094
|
+
ro,
|
|
1095
|
+
t("div", io, [
|
|
1096
|
+
t("div", lo, [
|
|
1095
1097
|
h(B, {
|
|
1096
1098
|
name: y.member.photoUrl ? void 0 : y.member.name,
|
|
1097
1099
|
src: y.member.photoUrl || void 0
|
|
1098
1100
|
}, null, 8, ["name", "src"]),
|
|
1099
|
-
t("div",
|
|
1100
|
-
|
|
1101
|
-
t("div",
|
|
1102
|
-
t("div",
|
|
1103
|
-
t("div",
|
|
1101
|
+
t("div", co, [
|
|
1102
|
+
mo,
|
|
1103
|
+
t("div", uo, I(y.member.name), 1),
|
|
1104
|
+
t("div", po, I(y.member._id), 1),
|
|
1105
|
+
t("div", fo, [
|
|
1104
1106
|
Fe(" Member Card: "),
|
|
1105
|
-
t("span",
|
|
1107
|
+
t("span", bo, I(y.member.cardNo ? y.member.cardNo : "-"), 1)
|
|
1106
1108
|
])
|
|
1107
1109
|
]),
|
|
1108
1110
|
h(N, {
|
|
@@ -1112,35 +1114,35 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1112
1114
|
})
|
|
1113
1115
|
]),
|
|
1114
1116
|
(u(), A(q, null, ie(c, (_, Y) => t("div", { key: Y }, [
|
|
1115
|
-
t("div",
|
|
1116
|
-
t("div",
|
|
1117
|
+
t("div", yo, I(_.label), 1),
|
|
1118
|
+
t("div", go, I(_.key ? y.member[_.key] : _.getter(y.member)), 1)
|
|
1117
1119
|
])), 64)),
|
|
1118
|
-
t("div",
|
|
1120
|
+
t("div", vo, [
|
|
1119
1121
|
Fe(" Referral Code: "),
|
|
1120
|
-
t("span",
|
|
1122
|
+
t("span", xo, I(y.member.referralCode ? y.member.referralCode : "-"), 1)
|
|
1121
1123
|
])
|
|
1122
1124
|
])
|
|
1123
1125
|
]),
|
|
1124
1126
|
t("div", null, [
|
|
1125
|
-
|
|
1126
|
-
t("div",
|
|
1127
|
+
_o,
|
|
1128
|
+
t("div", ho, [
|
|
1127
1129
|
(u(), A(q, null, ie(f, (_) => t("div", {
|
|
1128
1130
|
key: _.key
|
|
1129
1131
|
}, [
|
|
1130
|
-
t("div",
|
|
1131
|
-
t("div",
|
|
1132
|
+
t("div", So, I(_.label), 1),
|
|
1133
|
+
t("div", Co, I(_.key ? m.member.stats[_.key] || "-" : _.getter(y.member)), 1)
|
|
1132
1134
|
])), 64))
|
|
1133
1135
|
])
|
|
1134
1136
|
])
|
|
1135
1137
|
]),
|
|
1136
|
-
|
|
1137
|
-
(u(!0), A(q, null, ie(e(de), (_) => (u(), A("div",
|
|
1138
|
+
wo,
|
|
1139
|
+
(u(!0), A(q, null, ie(e(de), (_) => (u(), A("div", Fo, [
|
|
1138
1140
|
(u(!0), A(q, null, ie(_, (Y, oe) => (u(), A("div", { key: oe }, [
|
|
1139
1141
|
t("div", {
|
|
1140
|
-
class:
|
|
1142
|
+
class: it(oe !== 0 ? "pt-12 md:pt-0 lg:pt-0 md:pl-12 lg:pl-12" : "")
|
|
1141
1143
|
}, [
|
|
1142
|
-
t("div",
|
|
1143
|
-
t("div",
|
|
1144
|
+
t("div", Mo, [
|
|
1145
|
+
t("div", To, I(Y.label), 1),
|
|
1144
1146
|
t("button", {
|
|
1145
1147
|
onClick: (j) => ne(j, Y.label)
|
|
1146
1148
|
}, [
|
|
@@ -1149,45 +1151,45 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1149
1151
|
outline: "",
|
|
1150
1152
|
size: "md"
|
|
1151
1153
|
})
|
|
1152
|
-
], 8,
|
|
1154
|
+
], 8, ko)
|
|
1153
1155
|
]),
|
|
1154
|
-
t("div",
|
|
1156
|
+
t("div", Ao, [
|
|
1155
1157
|
(u(!0), A(q, null, ie(Y.stats, (j) => (u(), A("div", {
|
|
1156
1158
|
key: j.key
|
|
1157
1159
|
}, [
|
|
1158
|
-
t("div",
|
|
1159
|
-
t("div",
|
|
1160
|
+
t("div", Eo, I(j.label), 1),
|
|
1161
|
+
t("div", $o, I(j.getter(y.member)), 1)
|
|
1160
1162
|
]))), 128))
|
|
1161
1163
|
])
|
|
1162
1164
|
], 2)
|
|
1163
1165
|
]))), 128))
|
|
1164
1166
|
]))), 256)),
|
|
1165
|
-
t("div",
|
|
1166
|
-
|
|
1167
|
-
e(D).length ? (u(), A("div",
|
|
1167
|
+
t("div", Vo, [
|
|
1168
|
+
Io,
|
|
1169
|
+
e(D).length ? (u(), A("div", Bo, [
|
|
1168
1170
|
(u(!0), A(q, null, ie(e(D), (_) => (u(), R(re, {
|
|
1169
1171
|
label: _.toString()
|
|
1170
1172
|
}, null, 8, ["label"]))), 256))
|
|
1171
|
-
])) : (u(), A("div",
|
|
1173
|
+
])) : (u(), A("div", Do, "No titles"))
|
|
1172
1174
|
]),
|
|
1173
|
-
|
|
1174
|
-
t("div",
|
|
1175
|
-
|
|
1175
|
+
No,
|
|
1176
|
+
t("div", Yo, [
|
|
1177
|
+
Po,
|
|
1176
1178
|
e(s).length ? (u(!0), A(q, { key: 0 }, ie(e(s).filter((_) => _.collectible), (_) => (u(), A("div", {
|
|
1177
1179
|
class: "flex items-center gap-x-8 h-48",
|
|
1178
1180
|
key: _.name
|
|
1179
1181
|
}, [
|
|
1180
1182
|
t("img", {
|
|
1181
|
-
src: _.collectible.image || e(
|
|
1183
|
+
src: _.collectible.image || e(pt),
|
|
1182
1184
|
class: "aspect-square h-full object-contain"
|
|
1183
|
-
}, null, 8,
|
|
1185
|
+
}, null, 8, Oo),
|
|
1184
1186
|
t("div", null, [
|
|
1185
|
-
t("div",
|
|
1186
|
-
t("div",
|
|
1187
|
+
t("div", Ro, I(_.name), 1),
|
|
1188
|
+
t("div", Uo, " Expired on " + I(e(S)(_.expiredAt).format("MMM D, Y")), 1)
|
|
1187
1189
|
])
|
|
1188
|
-
]))), 128)) : (u(), A("div",
|
|
1190
|
+
]))), 128)) : (u(), A("div", Lo, "No titles"))
|
|
1189
1191
|
])
|
|
1190
|
-
], 64)) : e(F).value == "loyalty" ? (u(), A("div",
|
|
1192
|
+
], 64)) : e(F).value == "loyalty" ? (u(), A("div", zo, [
|
|
1191
1193
|
h(me, {
|
|
1192
1194
|
class: "p-16 space-y-24",
|
|
1193
1195
|
variant: "outlined"
|
|
@@ -1195,18 +1197,18 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1195
1197
|
default: xe(() => {
|
|
1196
1198
|
var _, Y, oe, j, ue, pe, fe;
|
|
1197
1199
|
return [
|
|
1200
|
+
t("div", jo, [
|
|
1201
|
+
qo,
|
|
1202
|
+
t("div", Ko, I(((oe = (Y = (_ = y.member.collection) == null ? void 0 : _.CREDIT) == null ? void 0 : Y[0]) == null ? void 0 : oe.balance) ?? 0), 1)
|
|
1203
|
+
]),
|
|
1198
1204
|
t("div", Go, [
|
|
1199
1205
|
Ho,
|
|
1200
|
-
t("div", Wo,
|
|
1201
|
-
]),
|
|
1202
|
-
t("div", Jo, [
|
|
1203
|
-
Xo,
|
|
1204
|
-
t("div", Qo, V(((fe = (pe = (ue = (j = y.member.collection) == null ? void 0 : j.CREDIT) == null ? void 0 : ue[0]) == null ? void 0 : pe.expiryBalance) == null ? void 0 : fe.reduce(
|
|
1206
|
+
t("div", Wo, I(((fe = (pe = (ue = (j = y.member.collection) == null ? void 0 : j.CREDIT) == null ? void 0 : ue[0]) == null ? void 0 : pe.expiryBalance) == null ? void 0 : fe.reduce(
|
|
1205
1207
|
(Q, Z) => Z.expiredAt && e(S)(Z.expiredAt).isAfter(e(S)()) && e(S)(Z.expiredAt).isBefore(e(S)().add(30, "days")) ? Q + Z.amount : Q,
|
|
1206
1208
|
0
|
|
1207
1209
|
)) ?? 0), 1)
|
|
1208
1210
|
]),
|
|
1209
|
-
t("div",
|
|
1211
|
+
t("div", Jo, [
|
|
1210
1212
|
h(N, {
|
|
1211
1213
|
label: "Add credit",
|
|
1212
1214
|
icon: "add",
|
|
@@ -1231,18 +1233,18 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1231
1233
|
default: xe(() => {
|
|
1232
1234
|
var _, Y, oe, j, ue, pe, fe;
|
|
1233
1235
|
return [
|
|
1236
|
+
t("div", Xo, [
|
|
1237
|
+
Qo,
|
|
1238
|
+
t("div", Zo, I(((oe = (Y = (_ = y.member.collection) == null ? void 0 : _.COIN) == null ? void 0 : Y[0]) == null ? void 0 : oe.balance) ?? 0), 1)
|
|
1239
|
+
]),
|
|
1234
1240
|
t("div", ea, [
|
|
1235
1241
|
ta,
|
|
1236
|
-
t("div", oa,
|
|
1237
|
-
]),
|
|
1238
|
-
t("div", aa, [
|
|
1239
|
-
na,
|
|
1240
|
-
t("div", sa, V(((fe = (pe = (ue = (j = y.member.collection) == null ? void 0 : j.COIN) == null ? void 0 : ue[0]) == null ? void 0 : pe.expiryBalance) == null ? void 0 : fe.reduce(
|
|
1242
|
+
t("div", oa, I(((fe = (pe = (ue = (j = y.member.collection) == null ? void 0 : j.COIN) == null ? void 0 : ue[0]) == null ? void 0 : pe.expiryBalance) == null ? void 0 : fe.reduce(
|
|
1241
1243
|
(Q, Z) => Z.expiredAt && e(S)(Z.expiredAt).isAfter(e(S)()) && e(S)(Z.expiredAt).isBefore(e(S)().add(30, "days")) ? Q + Z.amount : Q,
|
|
1242
1244
|
0
|
|
1243
1245
|
)) ?? 0), 1)
|
|
1244
1246
|
]),
|
|
1245
|
-
t("div",
|
|
1247
|
+
t("div", aa, [
|
|
1246
1248
|
h(N, {
|
|
1247
1249
|
label: "Add point",
|
|
1248
1250
|
icon: "add",
|
|
@@ -1260,13 +1262,13 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1260
1262
|
}),
|
|
1261
1263
|
_: 1
|
|
1262
1264
|
})
|
|
1263
|
-
])) : e(F).value == "voucher" ? (u(), R(
|
|
1265
|
+
])) : e(F).value == "voucher" ? (u(), R(Zt, {
|
|
1264
1266
|
key: 2,
|
|
1265
1267
|
member: m.member
|
|
1266
|
-
}, null, 8, ["member"])) : e(F).value == "mission" ? (u(), R(
|
|
1268
|
+
}, null, 8, ["member"])) : e(F).value == "mission" ? (u(), R(to, {
|
|
1267
1269
|
key: 3,
|
|
1268
1270
|
member: m.member
|
|
1269
|
-
}, null, 8, ["member"])) : e(F).value == "game" ? (u(), R(
|
|
1271
|
+
}, null, 8, ["member"])) : e(F).value == "game" ? (u(), R(ao, {
|
|
1270
1272
|
key: 4,
|
|
1271
1273
|
member: m.member
|
|
1272
1274
|
}, null, 8, ["member"])) : ce("", !0)
|
|
@@ -1276,18 +1278,23 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1276
1278
|
}, 8, ["modelValue"]);
|
|
1277
1279
|
};
|
|
1278
1280
|
}
|
|
1279
|
-
}),
|
|
1281
|
+
}), sa = { class: "flex items-center justify-end" }, Ra = /* @__PURE__ */ be({
|
|
1280
1282
|
__name: "MemberList",
|
|
1281
1283
|
setup(y) {
|
|
1282
|
-
const k =
|
|
1284
|
+
const k = Je(), p = $e(), x = qe(), { minor: r } = je, o = He(), v = [
|
|
1283
1285
|
{
|
|
1284
1286
|
header: "Name",
|
|
1285
1287
|
enableSorting: !0,
|
|
1286
1288
|
accessorKey: "name",
|
|
1287
1289
|
cell(s) {
|
|
1288
|
-
return
|
|
1290
|
+
return Tt(s.row.original);
|
|
1289
1291
|
}
|
|
1290
1292
|
},
|
|
1293
|
+
{
|
|
1294
|
+
header: "Phone",
|
|
1295
|
+
enableSorting: !0,
|
|
1296
|
+
accessorKey: "phoneNumber"
|
|
1297
|
+
},
|
|
1291
1298
|
{
|
|
1292
1299
|
accessorFn: (s) => S(Ce(s._id.toString())).format("D MMM YYYY"),
|
|
1293
1300
|
header: "Customer Since",
|
|
@@ -1299,7 +1306,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1299
1306
|
header: "Tier",
|
|
1300
1307
|
enableSorting: !0,
|
|
1301
1308
|
cell(s) {
|
|
1302
|
-
return
|
|
1309
|
+
return kt(
|
|
1303
1310
|
s.row.original,
|
|
1304
1311
|
p.sortedTiers
|
|
1305
1312
|
);
|
|
@@ -1309,7 +1316,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1309
1316
|
header: "Title",
|
|
1310
1317
|
enableSorting: !1,
|
|
1311
1318
|
cell(s) {
|
|
1312
|
-
return
|
|
1319
|
+
return At(
|
|
1313
1320
|
s.row.original,
|
|
1314
1321
|
p.sortedTitles
|
|
1315
1322
|
);
|
|
@@ -1318,8 +1325,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1318
1325
|
{
|
|
1319
1326
|
accessorKey: "collection_CREDIT_0_balance",
|
|
1320
1327
|
accessorFn: (s) => {
|
|
1321
|
-
var
|
|
1322
|
-
return ee(((T = (w = (
|
|
1328
|
+
var i, w, T;
|
|
1329
|
+
return ee(((T = (w = (i = s.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : w[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1323
1330
|
},
|
|
1324
1331
|
header: "Credit(s)",
|
|
1325
1332
|
enableSorting: !0
|
|
@@ -1327,8 +1334,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1327
1334
|
{
|
|
1328
1335
|
accessorKey: "collection_POINT_0_balance",
|
|
1329
1336
|
accessorFn: (s) => {
|
|
1330
|
-
var
|
|
1331
|
-
return ee(((T = (w = (
|
|
1337
|
+
var i, w, T;
|
|
1338
|
+
return ee(((T = (w = (i = s.collection) == null ? void 0 : i.POINT) == null ? void 0 : w[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1332
1339
|
},
|
|
1333
1340
|
header: "Experience(s)",
|
|
1334
1341
|
enableSorting: !0
|
|
@@ -1336,16 +1343,16 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1336
1343
|
{
|
|
1337
1344
|
accessorKey: "collection_COIN_0_balance",
|
|
1338
1345
|
accessorFn: (s) => {
|
|
1339
|
-
var
|
|
1340
|
-
return ee(((T = (w = (
|
|
1346
|
+
var i, w, T;
|
|
1347
|
+
return ee(((T = (w = (i = s.collection) == null ? void 0 : i.COIN) == null ? void 0 : w[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1341
1348
|
},
|
|
1342
1349
|
header: "Point(s)",
|
|
1343
1350
|
enableSorting: !0
|
|
1344
1351
|
},
|
|
1345
1352
|
{
|
|
1346
1353
|
accessorFn: (s) => {
|
|
1347
|
-
var
|
|
1348
|
-
return ((
|
|
1354
|
+
var i;
|
|
1355
|
+
return ((i = s.stats) == null ? void 0 : i.visitCount) ?? 0;
|
|
1349
1356
|
},
|
|
1350
1357
|
header: "Total visit",
|
|
1351
1358
|
accessorKey: "stats.visitCount",
|
|
@@ -1353,21 +1360,21 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1353
1360
|
},
|
|
1354
1361
|
{
|
|
1355
1362
|
accessorFn: (s) => {
|
|
1356
|
-
var
|
|
1357
|
-
return (
|
|
1363
|
+
var i;
|
|
1364
|
+
return (i = s.stats) == null ? void 0 : i.lastVisit;
|
|
1358
1365
|
},
|
|
1359
|
-
sortingFn: (s,
|
|
1366
|
+
sortingFn: (s, i) => {
|
|
1360
1367
|
var w, T;
|
|
1361
|
-
return new Date((w = s.original.stats) == null ? void 0 : w.lastVisit).getTime() - new Date((T =
|
|
1368
|
+
return new Date((w = s.original.stats) == null ? void 0 : w.lastVisit).getTime() - new Date((T = i.original.stats) == null ? void 0 : T.lastVisit).getTime();
|
|
1362
1369
|
},
|
|
1363
1370
|
id: "stats.lastVisit",
|
|
1364
1371
|
header: "Last visit",
|
|
1365
1372
|
cell(s) {
|
|
1366
|
-
var
|
|
1373
|
+
var i, w;
|
|
1367
1374
|
return K("div", { class: "flex items-center justify-end gap-4" }, [
|
|
1368
1375
|
K(
|
|
1369
1376
|
"span",
|
|
1370
|
-
(
|
|
1377
|
+
(i = s.row.original.stats) != null && i.lastVisit ? S((w = s.row.original.stats) == null ? void 0 : w.lastVisit).fromNow() : "NA"
|
|
1371
1378
|
),
|
|
1372
1379
|
K(
|
|
1373
1380
|
ve.FmTooltip,
|
|
@@ -1388,8 +1395,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1388
1395
|
ve.FmMenu,
|
|
1389
1396
|
{
|
|
1390
1397
|
placement: "bottom-end",
|
|
1391
|
-
onClick: (
|
|
1392
|
-
|
|
1398
|
+
onClick: (i) => {
|
|
1399
|
+
i.stopPropagation();
|
|
1393
1400
|
}
|
|
1394
1401
|
},
|
|
1395
1402
|
{
|
|
@@ -1397,8 +1404,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1397
1404
|
default: () => [
|
|
1398
1405
|
K(ve.FmMenuItem, {
|
|
1399
1406
|
label: "Transaction details",
|
|
1400
|
-
onClick: async (
|
|
1401
|
-
|
|
1407
|
+
onClick: async (i) => {
|
|
1408
|
+
i.stopPropagation(), await se(s.row.original._id);
|
|
1402
1409
|
}
|
|
1403
1410
|
})
|
|
1404
1411
|
]
|
|
@@ -1406,7 +1413,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1406
1413
|
);
|
|
1407
1414
|
}
|
|
1408
1415
|
}
|
|
1409
|
-
], { tableMeta: d, rowData: C, onSort: m, debouncedFetchData: g, onSearch:
|
|
1416
|
+
], { tableMeta: d, rowData: C, onSort: m, debouncedFetchData: g, onSearch: V } = Ke(le.read), D = G(), L = G(!1), P = G(), de = H(() => x.locations.map((s) => ({
|
|
1410
1417
|
label: s.name,
|
|
1411
1418
|
value: s._id
|
|
1412
1419
|
})));
|
|
@@ -1420,7 +1427,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1420
1427
|
}
|
|
1421
1428
|
async function se(s) {
|
|
1422
1429
|
await o.push({
|
|
1423
|
-
name:
|
|
1430
|
+
name: We["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
1424
1431
|
params: { id: s }
|
|
1425
1432
|
});
|
|
1426
1433
|
}
|
|
@@ -1432,11 +1439,11 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1432
1439
|
rowsNumber: 0
|
|
1433
1440
|
};
|
|
1434
1441
|
function f(s) {
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
1442
|
+
const i = S(s);
|
|
1443
|
+
return i.isValid() ? i.format("DD/MM/YYYY") : "";
|
|
1437
1444
|
}
|
|
1438
1445
|
async function M() {
|
|
1439
|
-
const s = new
|
|
1446
|
+
const s = new ct(), i = (await le.read({
|
|
1440
1447
|
limit: 1,
|
|
1441
1448
|
skip: 0,
|
|
1442
1449
|
sortBy: c.sortBy,
|
|
@@ -1444,19 +1451,19 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1444
1451
|
})).meta.totalResources ?? 0, w = c.rowsPerPage;
|
|
1445
1452
|
await r(
|
|
1446
1453
|
async () => {
|
|
1447
|
-
var T, O, E, U, te, z, F, J, a, n, b, B, N, X, re, me, ye, _, Y, oe, j, ue, pe, fe, Q
|
|
1448
|
-
for (let
|
|
1449
|
-
const
|
|
1454
|
+
var T, O, E, U, te, z, F, J, a, n, b, B, N, X, re, me, ye, _, Y, oe, j, ue, pe, fe, Q;
|
|
1455
|
+
for (let Z = 0; Z < i; Z += w) {
|
|
1456
|
+
const Xe = {
|
|
1450
1457
|
...c,
|
|
1451
1458
|
limit: w,
|
|
1452
1459
|
skip: c.page - 1,
|
|
1453
1460
|
sortBy: c.sortBy,
|
|
1454
1461
|
descending: c.descending
|
|
1455
|
-
},
|
|
1456
|
-
for (const
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
)) != null && T.domain.includes("feedmepos.com") ? void 0 :
|
|
1462
|
+
}, Qe = await le.read(Xe);
|
|
1463
|
+
for (const l of Qe.resources) {
|
|
1464
|
+
const Ze = (T = lt.parseOneAddress(
|
|
1465
|
+
l == null ? void 0 : l.email
|
|
1466
|
+
)) != null && T.domain.includes("feedmepos.com") ? void 0 : l.email, et = (E = ((O = l == null ? void 0 : l.collection) == null ? void 0 : O.TITLE) || []) == null ? void 0 : E.reduce(
|
|
1460
1467
|
(ae, ge) => {
|
|
1461
1468
|
var he, Se;
|
|
1462
1469
|
const _e = (Se = (he = p.sortedTitles) == null ? void 0 : he.find(
|
|
@@ -1465,55 +1472,54 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1465
1472
|
return !_e || ge.balance <= 0 || ae.push(_e), ae;
|
|
1466
1473
|
},
|
|
1467
1474
|
[]
|
|
1468
|
-
),
|
|
1475
|
+
), tt = (p.sortedTitles || []).reduce(
|
|
1469
1476
|
(ae, ge) => {
|
|
1470
|
-
var he, Se, we,
|
|
1471
|
-
const _e = (
|
|
1472
|
-
(
|
|
1473
|
-
)) == null ? void 0 : Se.expiryBalance) == null ? void 0 : we[0]) == null ? void 0 :
|
|
1477
|
+
var he, Se, we, Be;
|
|
1478
|
+
const _e = (Be = (we = (Se = (((he = l == null ? void 0 : l.collection) == null ? void 0 : he.TITLE) || []).find(
|
|
1479
|
+
(nt) => nt.collectible === ge._id
|
|
1480
|
+
)) == null ? void 0 : Se.expiryBalance) == null ? void 0 : we[0]) == null ? void 0 : Be.expiredAt;
|
|
1474
1481
|
return ae[ge.name] = _e ? S(_e).format("DD/MM/YYYY") : "", ae;
|
|
1475
1482
|
},
|
|
1476
1483
|
{}
|
|
1477
|
-
),
|
|
1484
|
+
), ot = ((z = (te = (U = l.collection) == null ? void 0 : U.CREDIT) == null ? void 0 : te.at(0)) == null ? void 0 : z.balance) || 0, Ve = ((n = (a = (J = (F = l.collection) == null ? void 0 : F.CREDIT) == null ? void 0 : J.at(0)) == null ? void 0 : a.expiryBalance) == null ? void 0 : n.reduce(
|
|
1478
1485
|
(ae, ge) => ae + ge.amount,
|
|
1479
1486
|
0
|
|
1480
|
-
)) || 0,
|
|
1481
|
-
ID:
|
|
1482
|
-
Name: ((b =
|
|
1483
|
-
Phone: ((B =
|
|
1484
|
-
Email:
|
|
1485
|
-
Gender:
|
|
1486
|
-
CardNo:
|
|
1487
|
-
Birthday:
|
|
1488
|
-
Credit: (Number(
|
|
1489
|
-
FreeCredit: Number(
|
|
1490
|
-
TotalCredit: Number(
|
|
1491
|
-
Exp:
|
|
1492
|
-
Point:
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
AvgSpent: At(Number(i.stats.avgBillSize || 0)).toFormat(
|
|
1487
|
+
)) || 0, Ie = ee(ot, 2), at = {
|
|
1488
|
+
ID: l._id.toString(),
|
|
1489
|
+
Name: ((b = l.name) == null ? void 0 : b.trim()) || "",
|
|
1490
|
+
Phone: ((B = l == null ? void 0 : l.phoneNumber) == null ? void 0 : B.trim()) || "",
|
|
1491
|
+
Email: Ze || "",
|
|
1492
|
+
Gender: l.gender || "",
|
|
1493
|
+
CardNo: l.cardNo || "",
|
|
1494
|
+
Birthday: l != null && l.birthday ? f(l == null ? void 0 : l.birthday) : "",
|
|
1495
|
+
Credit: (Number(Ie) - Number(Ve)).toFixed(2),
|
|
1496
|
+
FreeCredit: Number(Ve.toFixed(2)),
|
|
1497
|
+
TotalCredit: Number(Ie),
|
|
1498
|
+
Exp: l != null && l.collection ? ((re = (X = (N = l.collection) == null ? void 0 : N.POINT) == null ? void 0 : X.at(0)) == null ? void 0 : re.balance) ?? 0 : 0,
|
|
1499
|
+
Point: l != null && l.collection ? ((_ = (ye = (me = l.collection) == null ? void 0 : me.COIN) == null ? void 0 : ye.at(0)) == null ? void 0 : _.balance) ?? 0 : 0,
|
|
1500
|
+
Tier: l != null && l.collection ? ((j = (oe = (Y = l.collection) == null ? void 0 : Y.TIER) == null ? void 0 : oe.at(0)) == null ? void 0 : j.balance) ?? 0 : 0,
|
|
1501
|
+
Titles: et.join(","),
|
|
1502
|
+
...tt,
|
|
1503
|
+
TotalTransaction: l.stats.visitCount,
|
|
1504
|
+
AvgSpent: Mt(Number(l.stats.avgBillSize || 0)).toFormat(
|
|
1499
1505
|
!1
|
|
1500
1506
|
),
|
|
1501
|
-
TotalSpent:
|
|
1502
|
-
LastVisit: f(
|
|
1503
|
-
Feedback: ((
|
|
1504
|
-
LastSeasonTierEarned: ((
|
|
1505
|
-
LastSeasonPointEarned: ((
|
|
1506
|
-
JoinedAt: f(
|
|
1507
|
-
JoinedAtLocation:
|
|
1507
|
+
TotalSpent: l.stats.avgBillSize * l.stats.visitCount,
|
|
1508
|
+
LastVisit: f(l.stats.lastVisit),
|
|
1509
|
+
Feedback: ((ue = l.stats) == null ? void 0 : ue.feedbackCount) || 0,
|
|
1510
|
+
LastSeasonTierEarned: ((pe = l.stats) == null ? void 0 : pe.lastSeasonTierEarned) || 0,
|
|
1511
|
+
LastSeasonPointEarned: ((fe = l.stats) == null ? void 0 : fe.lastSeasonPointEarned) || 0,
|
|
1512
|
+
JoinedAt: f(l.joinAt || void 0),
|
|
1513
|
+
JoinedAtLocation: l.location && ((Q = de.value.find((ae) => ae.value == l.location)) == null ? void 0 : Q.label) || "-",
|
|
1508
1514
|
VisitFrequency: `${Number(
|
|
1509
|
-
Math.ceil(
|
|
1515
|
+
Math.ceil(l.stats.avgVisitFrequency).toFixed(0)
|
|
1510
1516
|
)}`
|
|
1511
1517
|
};
|
|
1512
|
-
s.addRecord(
|
|
1518
|
+
s.addRecord(at);
|
|
1513
1519
|
}
|
|
1514
1520
|
c.page++;
|
|
1515
1521
|
}
|
|
1516
|
-
await
|
|
1522
|
+
await dt(
|
|
1517
1523
|
s.buildExcel(),
|
|
1518
1524
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
1519
1525
|
{
|
|
@@ -1529,18 +1535,18 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1529
1535
|
}
|
|
1530
1536
|
);
|
|
1531
1537
|
}
|
|
1532
|
-
return
|
|
1538
|
+
return ze(async () => {
|
|
1533
1539
|
await p.readMembership(), await k.read(), await x.readLocations(), await g();
|
|
1534
|
-
}), (s,
|
|
1540
|
+
}), (s, i) => {
|
|
1535
1541
|
const w = $("FmSearch"), T = $("FmButton"), O = $("FmSnackbar");
|
|
1536
1542
|
return u(), A("div", null, [
|
|
1537
|
-
t("div",
|
|
1543
|
+
t("div", sa, [
|
|
1538
1544
|
h(w, {
|
|
1539
1545
|
class: "mt-4",
|
|
1540
1546
|
modelValue: e(d).searchValue,
|
|
1541
1547
|
"onUpdate:modelValue": [
|
|
1542
|
-
|
|
1543
|
-
e(
|
|
1548
|
+
i[0] || (i[0] = (E) => e(d).searchValue = E),
|
|
1549
|
+
e(V)
|
|
1544
1550
|
],
|
|
1545
1551
|
placeholder: "Search",
|
|
1546
1552
|
collapsible: ""
|
|
@@ -1551,20 +1557,20 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1551
1557
|
onClick: M
|
|
1552
1558
|
})
|
|
1553
1559
|
]),
|
|
1554
|
-
|
|
1560
|
+
Re(h(O, {
|
|
1555
1561
|
"z-index": 0,
|
|
1556
1562
|
class: "!max-w-full my-16",
|
|
1557
1563
|
title: "Info",
|
|
1558
1564
|
description: "Current list is not up to date, please refresh table for latest data.",
|
|
1559
1565
|
variant: "info",
|
|
1560
1566
|
dismissable: "",
|
|
1561
|
-
onOnDismiss:
|
|
1567
|
+
onOnDismiss: i[1] || (i[1] = (E) => L.value = !1),
|
|
1562
1568
|
action: "Refresh",
|
|
1563
1569
|
onOnAction: W
|
|
1564
1570
|
}, null, 512), [
|
|
1565
|
-
[
|
|
1571
|
+
[Ue, e(L)]
|
|
1566
1572
|
]),
|
|
1567
|
-
h(
|
|
1573
|
+
h(Ge, {
|
|
1568
1574
|
loading: e(d).isLoading,
|
|
1569
1575
|
"row-data": e(C),
|
|
1570
1576
|
"row-count": e(d).totalRows,
|
|
@@ -1574,13 +1580,13 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1574
1580
|
"page-index": e(d).pageIndex,
|
|
1575
1581
|
"page-size": e(d).pageSize,
|
|
1576
1582
|
onSortChange: e(m),
|
|
1577
|
-
onPageChange:
|
|
1578
|
-
onRowClick:
|
|
1583
|
+
onPageChange: i[2] || (i[2] = (E) => e(g)({ pageSize: E.pageSize, pageIndex: E.pageIndex })),
|
|
1584
|
+
onRowClick: i[3] || (i[3] = (E) => {
|
|
1579
1585
|
var U;
|
|
1580
1586
|
P.value = E.original, (U = e(D)) == null || U.showSheet();
|
|
1581
1587
|
})
|
|
1582
1588
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1583
|
-
e(P) ? (u(), R(
|
|
1589
|
+
e(P) ? (u(), R(na, {
|
|
1584
1590
|
key: 0,
|
|
1585
1591
|
ref_key: "sheetRef",
|
|
1586
1592
|
ref: D,
|
|
@@ -1592,5 +1598,5 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1592
1598
|
}
|
|
1593
1599
|
});
|
|
1594
1600
|
export {
|
|
1595
|
-
|
|
1601
|
+
Ra as default
|
|
1596
1602
|
};
|