@feedmepos/mf-connect 0.1.23-prod → 0.1.25-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-DfTQmuSa.js → Analytic-DmQ3d3sr.js} +18 -17
- package/dist/{App-C5AMrBM2.js → App-BK6DtUuH.js} +6 -6
- package/dist/{Bin-nZv2ZrAD.js → Bin-B7F2tXkP.js} +19 -18
- package/dist/{Broadcast-1ViZILw6.js → Broadcast-6n2TGBgu.js} +13 -12
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Nuj7G5E1.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-_hoK2zXW.js} +14 -8
- package/dist/{Card-CUAfRl0P.js → Card-D6AU_9dV.js} +57 -55
- package/dist/{Collections-DNlV8CiV.js → Collections-CMbKkYFL.js} +13 -11
- package/dist/{Credit-C8WVgeKO.js → Credit-CqLwf2JA.js} +35 -34
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CZmd7K3H.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CRK5WI7g.js} +28 -27
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-Crakwwgo.js → EffectSheet.vue_vue_type_style_index_0_lang-CaSqYPQ2.js} +6 -6
- package/dist/{Experience-C0ZrJ-rU.js → Experience-OoJ1ODiZ.js} +13 -12
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-IAfjkExX.js +278 -0
- package/dist/{Index-C_mvHa_E.js → Index-DqHXbokQ.js} +14 -13
- package/dist/{Marketing-7lvR6gR_.js → Marketing-DIVehK5x.js} +8 -7
- package/dist/Member-BMT7m7s9.js +348 -0
- package/dist/{MemberList-BDsVY1bB.js → MemberList-C3JMhLW6.js} +270 -269
- package/dist/{MemberTransactions-DXgJ8Tua.js → MemberTransactions-lQLljdGi.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BbiWEoQQ.js → MessageInput.vue_vue_type_script_setup_true_lang-DFPEfDUk.js} +15 -18
- package/dist/{Mission-CJnySjh4.js → Mission-BJsuCVHj.js} +118 -96
- package/dist/{Overview-ZENHKQhC.js → Overview-D1AMq951.js} +63 -62
- package/dist/{Point-DvYLQNmg.js → Point-DGffwTWG.js} +11 -10
- package/dist/{Promotion-CE6Mqev4.js → Promotion-Cdu7wiGv.js} +12 -11
- package/dist/Queue-Cm4ekHlP.js +249 -0
- package/dist/{Record-Cl4o08E4.js → Record-B0JjTQ3K.js} +21 -19
- package/dist/{Reward-C1hZ9c6y.js → Reward-U0gEl1no.js} +19 -18
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Co1mzeQA.js → RewardGroup.vue_vue_type_script_setup_true_lang-CiQHPhkN.js} +13 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CDEiSeqW.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgKlwCAG.js} +12 -12
- package/dist/{Segment-1RH6jUyt.js → Segment-BsXsG6Ga.js} +19 -17
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CJTZZ4EH.js → SelectItems.vue_vue_type_script_setup_true_lang-hPQP_srV.js} +2 -2
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLPLYvOq.js +188 -0
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DL2A84oN.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-rL9NYAk0.js} +3 -3
- package/dist/{Setting-DK9lsogh.js → Setting-DJxzwVSf.js} +20 -19
- package/dist/{Store-DSeXriUy.js → Store-sTvnMjPJ.js} +24 -23
- package/dist/{StoreRewards-DFUg0n5g.js → StoreRewards-CffMLGzL.js} +15 -14
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CUPPeZj5.js +994 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-hR4OBTrC.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-DwhQONu8.js} +1 -1
- package/dist/{Tier-Yq3BNKGq.js → Tier-BbfX13Ns.js} +25 -24
- package/dist/{Title-CwWan9gL.js → Title-Bf4fC78d.js} +28 -27
- package/dist/{Transaction-BgO5EYZB.js → Transaction-Ef6ee3WD.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CyUXbl30.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-w66fAQPQ.js} +6 -6
- package/dist/{Voucher-C2w8z86e.js → Voucher-CCH10Wrp.js} +38 -37
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-dEgiWiLL.js → VoucherEditor.vue_vue_type_script_setup_true_lang-C31OGqSE.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BME260O1.js → ZodTextField.vue_vue_type_script_setup_true_lang-BqzMSTXs.js} +1 -1
- package/dist/{app-BVIgk6aa.js → app-D2t3_10I.js} +1 -1
- package/dist/{app-BVsQcG_m.js → app-F5UOtzJ-.js} +235 -166
- package/dist/app.js +1 -1
- package/dist/{business-CdvE-WIp.js → business-NXwwmhbL.js} +1 -1
- package/dist/{campaign-WGLWFuCK.js → campaign-BWkn-fFd.js} +9 -9
- package/dist/{campaign-gunNEZhU.js → campaign-Iww5PvJV.js} +2 -2
- package/dist/{campaign.enum-O82qvpU2.js → campaign.enum--kHpbveJ.js} +1 -1
- package/dist/{campaign.fn-Bzr9Jc5X.js → campaign.fn-D0wKIDQf.js} +123 -123
- package/dist/{collectible.enum-CzUCHExj.js → collectible.enum-BpsFdy57.js} +1 -1
- package/dist/{collection.fn-Czs8Mpdz.js → collection.fn-B-_j1A52.js} +2 -2
- package/dist/{dto-Czd638gm.js → dto-CjOlAnWp.js} +4 -4
- package/dist/{effect-D8Km5OHX.js → effect-BMe9xjgR.js} +1 -1
- package/dist/{email-addresses-2-RgQal8.js → email-addresses-BwGoUD7O.js} +1 -1
- package/dist/{export--jJWZuJy.js → export-Bsk4-mYp.js} +3 -3
- package/dist/{helper-BOwvTpT_.js → helper-CiybWTiD.js} +1 -1
- package/dist/{index-Bg8Lqk3s.js → index-7QyaWVGn.js} +1 -1
- package/dist/{index-DGi6aLjD.js → index-BAW03Ygy.js} +24 -21
- package/dist/{index-C6j2uVRJ.js → index-BG_-ksol.js} +1 -1
- package/dist/{index-FBWWEOV0.js → index-COTHSMx7.js} +1 -1
- package/dist/{index-DExfBo0i.js → index-CRa7QWQZ.js} +3 -3
- package/dist/{index-DllRE4Xv.js → index-Cs0QJDgH.js} +1 -1
- package/dist/{index-BMPlc7it.js → index-Cu28MWwC.js} +1162 -1129
- package/dist/{index-CpsX7fKq.js → index-CvKxhzaQ.js} +1 -1
- package/dist/{index-7SYnV8B2.js → index-D7AjQ5_0.js} +1273 -1273
- package/dist/{index-CKSGfZ62.js → index-OLChRkvG.js} +2 -2
- package/dist/{index-DRVIuG-G.js → index-WxOdPYZc.js} +1 -1
- package/dist/{index-CFxA9VYh.js → index-eJ4ofwfd.js} +10 -10
- package/dist/{index.esm2017-CkIJgInI.js → index.esm2017-DMXNt25X.js} +137 -137
- package/dist/loading-CScT_lmc.js +71 -0
- package/dist/{membership-ByveC1Cs.js → membership-DenkPJ5U.js} +3 -3
- package/dist/{money-C_wAhRJ4.js → money-B5hybQjS.js} +1 -1
- package/dist/{number-B1OxEx_j.js → number-anjTvmBi.js} +1 -1
- package/dist/objectid-BHmtsFsO.js +145 -0
- package/dist/{loading-C-HOw2p9.js → plugins-VONaCeWn.js} +1535 -1601
- package/dist/{reward-BOA1fyrM.js → reward-FwctH8OP.js} +1 -1
- package/dist/{rule-CfePtJap.js → rule-BqLIsoB6.js} +3 -3
- package/dist/{rule-builder-B7wNFPfi.js → rule-builder-EwN0tKLd.js} +1 -1
- package/dist/{template-CvIL9Pex.js → template-bVlMDuHk.js} +4 -4
- package/dist/{trigger-D7uzmrxE.js → trigger-Bh7yq_a0.js} +11 -11
- package/dist/usePagination-JoYaROkV.js +223 -0
- package/dist/{user-NlenrMEw.js → user-z65INcT0.js} +1 -1
- package/dist/vue-i18n-59FFzX8P.js +2365 -0
- package/dist/{usePagination-BFzJ3YC7.js → xlsx-D9VDeVL9.js} +2979 -3200
- package/package.json +3 -1
- package/dist/Game-KiwAxjQX.js +0 -256
- package/dist/Member-DR406GTr.js +0 -69
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D_F7zaEl.js +0 -1105
- package/dist/objectid-CtnWn6lG.js +0 -145
- package/dist/vue-i18n-BjInRP6b.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-BwGoUD7O.js";
|
|
5
|
+
import { w as dt } from "./xlsx-D9VDeVL9.js";
|
|
6
|
+
import "./index-BG_-ksol.js";
|
|
7
|
+
import { p as De, c as Ne, b as Ye } from "./plugins-VONaCeWn.js";
|
|
8
|
+
import { u as $e, C as Pe, s as mt } from "./membership-DenkPJ5U.js";
|
|
9
|
+
import { c as ut } from "./index-D7AjQ5_0.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-Cu28MWwC.js";
|
|
13
|
+
import { u as je } from "./loading-CScT_lmc.js";
|
|
14
|
+
import { C as Ae } from "./collection.fn-B-_j1A52.js";
|
|
15
|
+
import { defineStore as xt } from "pinia";
|
|
16
|
+
import { u as qe } from "./business-NXwwmhbL.js";
|
|
17
|
+
import { f as ee } from "./number-anjTvmBi.js";
|
|
18
|
+
import "./index-OLChRkvG.js";
|
|
19
|
+
import "./index-eJ4ofwfd.js";
|
|
20
|
+
import "./index-7QyaWVGn.js";
|
|
21
|
+
import "./index-CRa7QWQZ.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-Bsk4-mYp.js";
|
|
25
|
+
import { m as Me } from "./index-COTHSMx7.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-BpsFdy57.js";
|
|
28
|
+
import { g as Ct, b as wt } from "./campaign-BWkn-fFd.js";
|
|
29
|
+
import { useRouter as He } from "vue-router";
|
|
30
|
+
import { m as le } from "./index-BAW03Ygy.js";
|
|
31
|
+
import { t as Ft } from "./index-WxOdPYZc.js";
|
|
32
|
+
import { R as We } from "./app-F5UOtzJ-.js";
|
|
33
|
+
import { t as Mt } from "./money-B5hybQjS.js";
|
|
34
|
+
import { g as Tt, a as kt, b as At } from "./user-z65INcT0.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,16 +1278,16 @@ 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
|
},
|
|
1291
1293
|
{
|
|
@@ -1299,7 +1301,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1299
1301
|
header: "Tier",
|
|
1300
1302
|
enableSorting: !0,
|
|
1301
1303
|
cell(s) {
|
|
1302
|
-
return
|
|
1304
|
+
return kt(
|
|
1303
1305
|
s.row.original,
|
|
1304
1306
|
p.sortedTiers
|
|
1305
1307
|
);
|
|
@@ -1309,7 +1311,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1309
1311
|
header: "Title",
|
|
1310
1312
|
enableSorting: !1,
|
|
1311
1313
|
cell(s) {
|
|
1312
|
-
return
|
|
1314
|
+
return At(
|
|
1313
1315
|
s.row.original,
|
|
1314
1316
|
p.sortedTitles
|
|
1315
1317
|
);
|
|
@@ -1318,8 +1320,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1318
1320
|
{
|
|
1319
1321
|
accessorKey: "collection_CREDIT_0_balance",
|
|
1320
1322
|
accessorFn: (s) => {
|
|
1321
|
-
var
|
|
1322
|
-
return ee(((T = (w = (
|
|
1323
|
+
var i, w, T;
|
|
1324
|
+
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
1325
|
},
|
|
1324
1326
|
header: "Credit(s)",
|
|
1325
1327
|
enableSorting: !0
|
|
@@ -1327,8 +1329,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1327
1329
|
{
|
|
1328
1330
|
accessorKey: "collection_POINT_0_balance",
|
|
1329
1331
|
accessorFn: (s) => {
|
|
1330
|
-
var
|
|
1331
|
-
return ee(((T = (w = (
|
|
1332
|
+
var i, w, T;
|
|
1333
|
+
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
1334
|
},
|
|
1333
1335
|
header: "Experience(s)",
|
|
1334
1336
|
enableSorting: !0
|
|
@@ -1336,16 +1338,16 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1336
1338
|
{
|
|
1337
1339
|
accessorKey: "collection_COIN_0_balance",
|
|
1338
1340
|
accessorFn: (s) => {
|
|
1339
|
-
var
|
|
1340
|
-
return ee(((T = (w = (
|
|
1341
|
+
var i, w, T;
|
|
1342
|
+
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
1343
|
},
|
|
1342
1344
|
header: "Point(s)",
|
|
1343
1345
|
enableSorting: !0
|
|
1344
1346
|
},
|
|
1345
1347
|
{
|
|
1346
1348
|
accessorFn: (s) => {
|
|
1347
|
-
var
|
|
1348
|
-
return ((
|
|
1349
|
+
var i;
|
|
1350
|
+
return ((i = s.stats) == null ? void 0 : i.visitCount) ?? 0;
|
|
1349
1351
|
},
|
|
1350
1352
|
header: "Total visit",
|
|
1351
1353
|
accessorKey: "stats.visitCount",
|
|
@@ -1353,21 +1355,21 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1353
1355
|
},
|
|
1354
1356
|
{
|
|
1355
1357
|
accessorFn: (s) => {
|
|
1356
|
-
var
|
|
1357
|
-
return (
|
|
1358
|
+
var i;
|
|
1359
|
+
return (i = s.stats) == null ? void 0 : i.lastVisit;
|
|
1358
1360
|
},
|
|
1359
|
-
sortingFn: (s,
|
|
1361
|
+
sortingFn: (s, i) => {
|
|
1360
1362
|
var w, T;
|
|
1361
|
-
return new Date((w = s.original.stats) == null ? void 0 : w.lastVisit).getTime() - new Date((T =
|
|
1363
|
+
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
1364
|
},
|
|
1363
1365
|
id: "stats.lastVisit",
|
|
1364
1366
|
header: "Last visit",
|
|
1365
1367
|
cell(s) {
|
|
1366
|
-
var
|
|
1368
|
+
var i, w;
|
|
1367
1369
|
return K("div", { class: "flex items-center justify-end gap-4" }, [
|
|
1368
1370
|
K(
|
|
1369
1371
|
"span",
|
|
1370
|
-
(
|
|
1372
|
+
(i = s.row.original.stats) != null && i.lastVisit ? S((w = s.row.original.stats) == null ? void 0 : w.lastVisit).fromNow() : "NA"
|
|
1371
1373
|
),
|
|
1372
1374
|
K(
|
|
1373
1375
|
ve.FmTooltip,
|
|
@@ -1388,8 +1390,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1388
1390
|
ve.FmMenu,
|
|
1389
1391
|
{
|
|
1390
1392
|
placement: "bottom-end",
|
|
1391
|
-
onClick: (
|
|
1392
|
-
|
|
1393
|
+
onClick: (i) => {
|
|
1394
|
+
i.stopPropagation();
|
|
1393
1395
|
}
|
|
1394
1396
|
},
|
|
1395
1397
|
{
|
|
@@ -1397,8 +1399,8 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1397
1399
|
default: () => [
|
|
1398
1400
|
K(ve.FmMenuItem, {
|
|
1399
1401
|
label: "Transaction details",
|
|
1400
|
-
onClick: async (
|
|
1401
|
-
|
|
1402
|
+
onClick: async (i) => {
|
|
1403
|
+
i.stopPropagation(), await se(s.row.original._id);
|
|
1402
1404
|
}
|
|
1403
1405
|
})
|
|
1404
1406
|
]
|
|
@@ -1406,7 +1408,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1406
1408
|
);
|
|
1407
1409
|
}
|
|
1408
1410
|
}
|
|
1409
|
-
], { tableMeta: d, rowData: C, onSort: m, debouncedFetchData: g, onSearch:
|
|
1411
|
+
], { 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
1412
|
label: s.name,
|
|
1411
1413
|
value: s._id
|
|
1412
1414
|
})));
|
|
@@ -1420,7 +1422,7 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1420
1422
|
}
|
|
1421
1423
|
async function se(s) {
|
|
1422
1424
|
await o.push({
|
|
1423
|
-
name:
|
|
1425
|
+
name: We["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
1424
1426
|
params: { id: s }
|
|
1425
1427
|
});
|
|
1426
1428
|
}
|
|
@@ -1432,11 +1434,11 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1432
1434
|
rowsNumber: 0
|
|
1433
1435
|
};
|
|
1434
1436
|
function f(s) {
|
|
1435
|
-
const
|
|
1436
|
-
return
|
|
1437
|
+
const i = S(s);
|
|
1438
|
+
return i.isValid() ? i.format("DD/MM/YYYY") : "";
|
|
1437
1439
|
}
|
|
1438
1440
|
async function M() {
|
|
1439
|
-
const s = new
|
|
1441
|
+
const s = new ct(), i = (await le.read({
|
|
1440
1442
|
limit: 1,
|
|
1441
1443
|
skip: 0,
|
|
1442
1444
|
sortBy: c.sortBy,
|
|
@@ -1444,19 +1446,19 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1444
1446
|
})).meta.totalResources ?? 0, w = c.rowsPerPage;
|
|
1445
1447
|
await r(
|
|
1446
1448
|
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
|
|
1449
|
+
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;
|
|
1450
|
+
for (let Z = 0; Z < i; Z += w) {
|
|
1451
|
+
const Xe = {
|
|
1450
1452
|
...c,
|
|
1451
1453
|
limit: w,
|
|
1452
1454
|
skip: c.page - 1,
|
|
1453
1455
|
sortBy: c.sortBy,
|
|
1454
1456
|
descending: c.descending
|
|
1455
|
-
},
|
|
1456
|
-
for (const
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
)) != null && T.domain.includes("feedmepos.com") ? void 0 :
|
|
1457
|
+
}, Qe = await le.read(Xe);
|
|
1458
|
+
for (const l of Qe.resources) {
|
|
1459
|
+
const Ze = (T = lt.parseOneAddress(
|
|
1460
|
+
l == null ? void 0 : l.email
|
|
1461
|
+
)) != 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
1462
|
(ae, ge) => {
|
|
1461
1463
|
var he, Se;
|
|
1462
1464
|
const _e = (Se = (he = p.sortedTitles) == null ? void 0 : he.find(
|
|
@@ -1465,55 +1467,54 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1465
1467
|
return !_e || ge.balance <= 0 || ae.push(_e), ae;
|
|
1466
1468
|
},
|
|
1467
1469
|
[]
|
|
1468
|
-
),
|
|
1470
|
+
), tt = (p.sortedTitles || []).reduce(
|
|
1469
1471
|
(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 :
|
|
1472
|
+
var he, Se, we, Be;
|
|
1473
|
+
const _e = (Be = (we = (Se = (((he = l == null ? void 0 : l.collection) == null ? void 0 : he.TITLE) || []).find(
|
|
1474
|
+
(nt) => nt.collectible === ge._id
|
|
1475
|
+
)) == null ? void 0 : Se.expiryBalance) == null ? void 0 : we[0]) == null ? void 0 : Be.expiredAt;
|
|
1474
1476
|
return ae[ge.name] = _e ? S(_e).format("DD/MM/YYYY") : "", ae;
|
|
1475
1477
|
},
|
|
1476
1478
|
{}
|
|
1477
|
-
),
|
|
1479
|
+
), 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
1480
|
(ae, ge) => ae + ge.amount,
|
|
1479
1481
|
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(
|
|
1482
|
+
)) || 0, Ie = ee(ot, 2), at = {
|
|
1483
|
+
ID: l._id.toString(),
|
|
1484
|
+
Name: ((b = l.name) == null ? void 0 : b.trim()) || "",
|
|
1485
|
+
Phone: ((B = l == null ? void 0 : l.phoneNumber) == null ? void 0 : B.trim()) || "",
|
|
1486
|
+
Email: Ze || "",
|
|
1487
|
+
Gender: l.gender || "",
|
|
1488
|
+
CardNo: l.cardNo || "",
|
|
1489
|
+
Birthday: l != null && l.birthday ? f(l == null ? void 0 : l.birthday) : "",
|
|
1490
|
+
Credit: (Number(Ie) - Number(Ve)).toFixed(2),
|
|
1491
|
+
FreeCredit: Number(Ve.toFixed(2)),
|
|
1492
|
+
TotalCredit: Number(Ie),
|
|
1493
|
+
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,
|
|
1494
|
+
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,
|
|
1495
|
+
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,
|
|
1496
|
+
Titles: et.join(","),
|
|
1497
|
+
...tt,
|
|
1498
|
+
TotalTransaction: l.stats.visitCount,
|
|
1499
|
+
AvgSpent: Mt(Number(l.stats.avgBillSize || 0)).toFormat(
|
|
1499
1500
|
!1
|
|
1500
1501
|
),
|
|
1501
|
-
TotalSpent:
|
|
1502
|
-
LastVisit: f(
|
|
1503
|
-
Feedback: ((
|
|
1504
|
-
LastSeasonTierEarned: ((
|
|
1505
|
-
LastSeasonPointEarned: ((
|
|
1506
|
-
JoinedAt: f(
|
|
1507
|
-
JoinedAtLocation:
|
|
1502
|
+
TotalSpent: l.stats.avgBillSize * l.stats.visitCount,
|
|
1503
|
+
LastVisit: f(l.stats.lastVisit),
|
|
1504
|
+
Feedback: ((ue = l.stats) == null ? void 0 : ue.feedbackCount) || 0,
|
|
1505
|
+
LastSeasonTierEarned: ((pe = l.stats) == null ? void 0 : pe.lastSeasonTierEarned) || 0,
|
|
1506
|
+
LastSeasonPointEarned: ((fe = l.stats) == null ? void 0 : fe.lastSeasonPointEarned) || 0,
|
|
1507
|
+
JoinedAt: f(l.joinAt || void 0),
|
|
1508
|
+
JoinedAtLocation: l.location && ((Q = de.value.find((ae) => ae.value == l.location)) == null ? void 0 : Q.label) || "-",
|
|
1508
1509
|
VisitFrequency: `${Number(
|
|
1509
|
-
Math.ceil(
|
|
1510
|
+
Math.ceil(l.stats.avgVisitFrequency).toFixed(0)
|
|
1510
1511
|
)}`
|
|
1511
1512
|
};
|
|
1512
|
-
s.addRecord(
|
|
1513
|
+
s.addRecord(at);
|
|
1513
1514
|
}
|
|
1514
1515
|
c.page++;
|
|
1515
1516
|
}
|
|
1516
|
-
await
|
|
1517
|
+
await dt(
|
|
1517
1518
|
s.buildExcel(),
|
|
1518
1519
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
1519
1520
|
{
|
|
@@ -1529,18 +1530,18 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1529
1530
|
}
|
|
1530
1531
|
);
|
|
1531
1532
|
}
|
|
1532
|
-
return
|
|
1533
|
+
return ze(async () => {
|
|
1533
1534
|
await p.readMembership(), await k.read(), await x.readLocations(), await g();
|
|
1534
|
-
}), (s,
|
|
1535
|
+
}), (s, i) => {
|
|
1535
1536
|
const w = $("FmSearch"), T = $("FmButton"), O = $("FmSnackbar");
|
|
1536
1537
|
return u(), A("div", null, [
|
|
1537
|
-
t("div",
|
|
1538
|
+
t("div", sa, [
|
|
1538
1539
|
h(w, {
|
|
1539
1540
|
class: "mt-4",
|
|
1540
1541
|
modelValue: e(d).searchValue,
|
|
1541
1542
|
"onUpdate:modelValue": [
|
|
1542
|
-
|
|
1543
|
-
e(
|
|
1543
|
+
i[0] || (i[0] = (E) => e(d).searchValue = E),
|
|
1544
|
+
e(V)
|
|
1544
1545
|
],
|
|
1545
1546
|
placeholder: "Search",
|
|
1546
1547
|
collapsible: ""
|
|
@@ -1551,20 +1552,20 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1551
1552
|
onClick: M
|
|
1552
1553
|
})
|
|
1553
1554
|
]),
|
|
1554
|
-
|
|
1555
|
+
Re(h(O, {
|
|
1555
1556
|
"z-index": 0,
|
|
1556
1557
|
class: "!max-w-full my-16",
|
|
1557
1558
|
title: "Info",
|
|
1558
1559
|
description: "Current list is not up to date, please refresh table for latest data.",
|
|
1559
1560
|
variant: "info",
|
|
1560
1561
|
dismissable: "",
|
|
1561
|
-
onOnDismiss:
|
|
1562
|
+
onOnDismiss: i[1] || (i[1] = (E) => L.value = !1),
|
|
1562
1563
|
action: "Refresh",
|
|
1563
1564
|
onOnAction: W
|
|
1564
1565
|
}, null, 512), [
|
|
1565
|
-
[
|
|
1566
|
+
[Ue, e(L)]
|
|
1566
1567
|
]),
|
|
1567
|
-
h(
|
|
1568
|
+
h(Ge, {
|
|
1568
1569
|
loading: e(d).isLoading,
|
|
1569
1570
|
"row-data": e(C),
|
|
1570
1571
|
"row-count": e(d).totalRows,
|
|
@@ -1574,13 +1575,13 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1574
1575
|
"page-index": e(d).pageIndex,
|
|
1575
1576
|
"page-size": e(d).pageSize,
|
|
1576
1577
|
onSortChange: e(m),
|
|
1577
|
-
onPageChange:
|
|
1578
|
-
onRowClick:
|
|
1578
|
+
onPageChange: i[2] || (i[2] = (E) => e(g)({ pageSize: E.pageSize, pageIndex: E.pageIndex })),
|
|
1579
|
+
onRowClick: i[3] || (i[3] = (E) => {
|
|
1579
1580
|
var U;
|
|
1580
1581
|
P.value = E.original, (U = e(D)) == null || U.showSheet();
|
|
1581
1582
|
})
|
|
1582
1583
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1583
|
-
e(P) ? (u(), R(
|
|
1584
|
+
e(P) ? (u(), R(na, {
|
|
1584
1585
|
key: 0,
|
|
1585
1586
|
ref_key: "sheetRef",
|
|
1586
1587
|
ref: D,
|
|
@@ -1592,5 +1593,5 @@ const Ht = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1592
1593
|
}
|
|
1593
1594
|
});
|
|
1594
1595
|
export {
|
|
1595
|
-
|
|
1596
|
+
Ra as default
|
|
1596
1597
|
};
|