@feedmepos/mf-connect 0.1.38-beta.7 → 0.1.38-beta.70
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-NNi-22sK.js → Analytic-qVhEo_im.js} +16 -16
- package/dist/{App-Bu14Mro_.js → App-Ixv1jrHc.js} +625 -619
- package/dist/AuditLogs-B2D62tMF.js +1991 -0
- package/dist/{Bin-CnAQA85j.js → Bin-Lj7jtS9m.js} +10 -10
- package/dist/Broadcast-BpP9VJsx.js +267 -0
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DC_fReu7.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BB43gKXv.js} +6 -6
- package/dist/{Card-DqAGiETA.js → Card-CjArjpou.js} +144 -140
- package/dist/Collections-CFzUAHxz.js +540 -0
- package/dist/Credit-D43x-T3d.js +261 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DlgTeQLe.js +3167 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-9UhSzClJ.js +351 -0
- package/dist/Experience-BaUbRoHV.js +260 -0
- package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BO_rbswB.js} +1 -1
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-DaVqgPWQ.js +331 -0
- package/dist/GenerateMaterial-DJM8fZyl.js +589 -0
- package/dist/Grab-CykZDrWI.js +301 -0
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-C51yGAp9.js} +49 -48
- package/dist/{Index-loHkiwyo.js → Index-Do3WIIfM.js} +54 -54
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BjdBaj4c.js} +1 -1
- package/dist/{MainLayout-B1aJoR95.js → MainLayout-DD-OlYxZ.js} +1 -1
- package/dist/Marketing-C9bsnUaQ.js +145 -0
- package/dist/MarketingMaterialEdit-CbSh8dpn.js +746 -0
- package/dist/{Member-BQjQQdoA.js → Member-IcVRwAAS.js} +38 -37
- package/dist/{MemberList-WPsEUKf_.js → MemberList-C_A4PrQN.js} +158 -159
- package/dist/{MemberTransactions-BtM7dugy.js → MemberTransactions-CBoaY-gv.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Bl9sFIwG.js → MessageInput.vue_vue_type_script_setup_true_lang-Dx28XNPi.js} +13463 -10597
- package/dist/Mission-COY_uhwz.js +335 -0
- package/dist/{Overview-Bsf5IPOg.js → Overview-DDSz2R4K.js} +24 -25
- package/dist/Point-C-KEwgx4.js +263 -0
- package/dist/Promotion-BpW9qWzf.js +397 -0
- package/dist/{Queue-XFVbSuDw.js → Queue-CO32O8i6.js} +14 -15
- package/dist/{Record-CQzujESE.js → Record-BrT5DR9L.js} +10 -10
- package/dist/{Reward-Dj_h_May.js → Reward-CbrEw-If.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Clxk-oYM.js → RewardGroup.vue_vue_type_script_setup_true_lang-CpNjlbjZ.js} +13 -14
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BS5jsRiN.js +1912 -0
- package/dist/{Segment-D_DUu_Sp.js → Segment-Cu9_qwXc.js} +273 -274
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-D3C2mVlv.js → SelectItems.vue_vue_type_script_setup_true_lang-BH-hzxSs.js} +23 -23
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-C0vsl8oV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DGm3gujH.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-5HkJROSb.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DcUb8X-q.js} +4 -4
- package/dist/Setting-CQKfb5b_.js +1999 -0
- package/dist/SettingAdvertisements-BxR6Gl-5.js +263 -0
- package/dist/Store-6TUpmqAr.js +1995 -0
- package/dist/StoreRewards-BOThAOWU.js +534 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BYD229dz.js +1034 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CAamZtdf.js +7005 -0
- package/dist/{Tier-YQsLRt06.js → Tier-MF-ad-xm.js} +561 -480
- package/dist/{Title-C5gxYNvh.js → Title-MkjTHBzb.js} +149 -147
- package/dist/{Transaction-CZ_QdIii.js → Transaction-trYJwTrc.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DqUu7wSt.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DwlNK1TC.js} +7 -7
- package/dist/Voucher-BD5dTdht.js +422 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BhR_s48Q.js +421 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DCtdp-LK.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcTe5TJL.js} +2 -2
- package/dist/app-CybjF-6Q.js +59071 -0
- package/dist/app.js +1 -1
- package/dist/{business-DZYFoAKz.js → business-2hCbD0JX.js} +11 -8
- package/dist/{campaign-Ca4l6UUg.js → campaign-Bv-8uM2S.js} +29 -25
- package/dist/campaign-h1J8NTAo.js +253 -0
- package/dist/campaign.enum-Dea0E4o1.js +26 -0
- package/dist/campaign.fn-DqxZMyu0.js +776 -0
- package/dist/{collectible.enum-DnIeDAB-.js → collectible.enum-DOyAoz4F.js} +1 -1
- package/dist/{collection.fn-mQfXEwJv.js → collection.fn-DU2HuZod.js} +2 -2
- package/dist/dto-CT65-FHY.js +222 -0
- package/dist/duplicateCampaign-YJGHvOqb.js +51 -0
- package/dist/effect-XZ767UQ4.js +89 -0
- package/dist/{email-addresses-CQYqi2rN.js → email-addresses-DSgkxSnV.js} +2 -2
- package/dist/{export-BsikVZw2.js → export-4gx5C9s9.js} +9 -10
- package/dist/{helper-n74IteBU.js → helper-HOLsJca3.js} +22 -7
- package/dist/index-BO7N-s4K.js +8912 -0
- package/dist/{index-Dt6wui_L.js → index-BfRa1sI3.js} +3 -3
- package/dist/index-BnCtmlvU.js +28897 -0
- package/dist/{index-Bg3fAg5z.js → index-C5VvGYtP.js} +1 -1
- package/dist/index-CSzvYzf4.js +3419 -0
- package/dist/{index-Do7TcKmg.js → index-CrdkPXsx.js} +4 -1
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/{index-DTErPYrT.js → index-CxE-VVlL.js} +1 -1
- package/dist/{index-DRrSsoqp.js → index-Djenbz3F.js} +1 -1
- package/dist/{index-BJ-IAF-1.js → index-IHteBJ_D.js} +1 -1
- package/dist/{index-BpjT8Rx0.js → index-dUhOAfj9.js} +455 -245
- package/dist/index-wm4nGBB_.js +30289 -0
- package/dist/{index-CrHCbDIs.js → index-xTrAj026.js} +3 -3
- package/dist/index-yViT18i_.js +36 -0
- package/dist/{index.esm2017-T7F54Aqa.js → index.esm2017-Wq4FUMEv.js} +185 -185
- package/dist/loading-D22xapd8.js +215 -0
- package/dist/{lodash-B5I3zXaY.js → lodash-HM6bxuWV.js} +1 -1
- package/dist/{membership-BRy4jMt2.js → membership-CX464ZBI.js} +3 -3
- package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
- package/dist/{money-B9Auav5u.js → money-B3cPZAZu.js} +1 -1
- package/dist/{number-BdhIBsUp.js → number-DT65dEZt.js} +1 -1
- package/dist/objectid-DZWw4iLL.js +145 -0
- package/dist/{campaign-162kZMje.js → plugins-D-4BlIGs.js} +784 -777
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/{reward-UuqZUHsq.js → reward-C6B-kn0X.js} +1 -1
- package/dist/{rule-D158NIpm.js → rule-B94SrDX1.js} +505 -487
- package/dist/rule-builder-CQ3uHeX4.js +102 -0
- package/dist/style.css +11 -2
- package/dist/template-CXB2Ez2S.js +188 -0
- package/dist/timezone-D3NuV-rx.js +1154 -0
- package/dist/trigger-BsCVC_nU.js +213 -0
- package/dist/usePagination-BOZ0-D67.js +223 -0
- package/dist/user-Dxp7kluY.js +55 -0
- package/dist/vue-i18n-DpCWu1gI.js +2365 -0
- package/dist/{xlsx-Ddqi5i8p.js → xlsx-Cc2a2IL9.js} +1 -1
- package/dist/{zod-Bg2FbC-D.js → zod-BCSHGdXs.js} +32 -31
- package/package.json +14 -6
- package/dist/AuditLogs-Cai9CVBl.js +0 -1887
- package/dist/Broadcast-DskXjXn4.js +0 -227
- package/dist/Collections-DuaIQAk7.js +0 -465
- package/dist/Credit-D40Vzu2g.js +0 -222
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BsQ4iAsV.js +0 -2185
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CDCX5B5k.js +0 -347
- package/dist/Experience-B9yHQPuj.js +0 -223
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
- package/dist/Game-e9-Q3qmO.js +0 -278
- package/dist/Marketing-CipbukIV.js +0 -20073
- package/dist/Mission-B_DJ3Yu_.js +0 -296
- package/dist/Point-DMphcWjy.js +0 -226
- package/dist/Promotion-B33A-Jwe.js +0 -289
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CGAXTOLN.js +0 -1751
- package/dist/Setting-CtdC4G3W.js +0 -1936
- package/dist/Store-DCksWACh.js +0 -1842
- package/dist/StoreRewards-CHWKYKet.js +0 -423
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-D1TDyD6N.js +0 -1029
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D59sGO3F.js +0 -139
- package/dist/Voucher-BzV8yZ3o.js +0 -384
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DjBj_3EF.js +0 -419
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/app-FFOpPHwj.js +0 -33357
- package/dist/app-az9e8Yfl.js +0 -7086
- package/dist/campaign.enum-DWjyDV2D.js +0 -20
- package/dist/campaign.fn-DWWJ74z-.js +0 -758
- package/dist/dto-mKZIPV4o.js +0 -214
- package/dist/effect-B8UexeyG.js +0 -78
- package/dist/index-5ShiAY8U.js +0 -8861
- package/dist/index-Bf6AmJwX.js +0 -32260
- package/dist/index-C5gjIb5d.js +0 -146
- package/dist/index-C9YrDtDN.js +0 -38
- package/dist/index-CK-MAqWE.js +0 -3120
- package/dist/index-CsaQJMAR.js +0 -66
- package/dist/index-f4MzX8IY.js +0 -30038
- package/dist/loading-BEAayQS-.js +0 -71
- package/dist/objectid-K-JVTsfA.js +0 -145
- package/dist/plugins-CWlRYif_.js +0 -208
- package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
- package/dist/rule-builder-DNeViq0I.js +0 -89
- package/dist/template-B02wYF7G.js +0 -190
- package/dist/trigger-BDjnKHLI.js +0 -144
- package/dist/usePagination-BeF5K3M7.js +0 -223
- package/dist/user-DbP37Ohh.js +0 -54
- package/dist/vue-i18n-BbhkYWlk.js +0 -2365
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
import { defineComponent as be, computed as H, ref as G, resolveComponent as V, openBlock as p, createElementBlock as A, Fragment as q, createElementVNode as n, unref as t, createBlock as R, createCommentVNode as ce, createVNode as _, renderList as ie, withCtx as xe, createTextVNode as Fe, toDisplayString as $, withDirectives as Re, vShow as Ue, watch as Le, onBeforeMount as rt, h as K, onMounted as ze, isRef as st, normalizeClass as it } from "vue";
|
|
2
|
-
import { h as S } from "./moment-
|
|
2
|
+
import { h as S } from "./moment-D7p2TMB-.js";
|
|
3
3
|
import { useDialog as Ee, components as ve } from "@feedmepos/ui-library";
|
|
4
|
-
import { e as lt, M as ct } from "./email-addresses-
|
|
5
|
-
import { w as dt } from "./xlsx-
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./index-
|
|
8
|
-
import { u as Ve, C as De, s as mt } from "./membership-
|
|
9
|
-
import { c as ut } from "./index-
|
|
10
|
-
import { _ as Ne } from "./lodash-
|
|
4
|
+
import { e as lt, M as ct } from "./email-addresses-DSgkxSnV.js";
|
|
5
|
+
import { w as dt } from "./xlsx-Cc2a2IL9.js";
|
|
6
|
+
import "./index-Djenbz3F.js";
|
|
7
|
+
import "./index-wm4nGBB_.js";
|
|
8
|
+
import { u as Ve, C as De, s as mt } from "./membership-CX464ZBI.js";
|
|
9
|
+
import { c as ut } from "./index-BnCtmlvU.js";
|
|
10
|
+
import { _ as Ne } from "./lodash-HM6bxuWV.js";
|
|
11
11
|
import { D as pt } from "./type_drinks-D6jnpvwV.js";
|
|
12
|
-
import { d as ft, e as bt, f as yt, g as gt, h as vt } from "./index-
|
|
13
|
-
import { p as Ye, c as Pe, b as Oe } from "./plugins-
|
|
14
|
-
import { u as je } from "./loading-
|
|
15
|
-
import { C as Ae } from "./collection.fn-
|
|
16
|
-
import { u as qe } from "./business-
|
|
12
|
+
import { d as ft, e as bt, f as yt, g as gt, h as vt } from "./index-CSzvYzf4.js";
|
|
13
|
+
import { p as Ye, c as Pe, b as Oe } from "./plugins-D-4BlIGs.js";
|
|
14
|
+
import { m as Me, u as je } from "./loading-D22xapd8.js";
|
|
15
|
+
import { C as Ae } from "./collection.fn-DU2HuZod.js";
|
|
16
|
+
import { u as qe } from "./business-2hCbD0JX.js";
|
|
17
17
|
import { defineStore as xt } from "pinia";
|
|
18
|
-
import { f as ee } from "./number-
|
|
19
|
-
import "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import "./index-
|
|
22
|
-
import "./index-
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { F as ke } from "./collectible.enum-DnIeDAB-.js";
|
|
29
|
-
import { g as Ct, b as wt } from "./campaign-162kZMje.js";
|
|
18
|
+
import { f as ee } from "./number-DT65dEZt.js";
|
|
19
|
+
import "./index-dUhOAfj9.js";
|
|
20
|
+
import "./index-BO7N-s4K.js";
|
|
21
|
+
import "./index-BfRa1sI3.js";
|
|
22
|
+
import { s as ht } from "./index-CuvNtC_M.js";
|
|
23
|
+
import { u as Ke, _ as Ge } from "./usePagination-BOZ0-D67.js";
|
|
24
|
+
import { B as _t, e as St } from "./export-4gx5C9s9.js";
|
|
25
|
+
import { o as he } from "./objectId-dwaoBfJX.js";
|
|
26
|
+
import { F as ke } from "./collectible.enum-DOyAoz4F.js";
|
|
27
|
+
import { a as Ct, c as wt } from "./campaign-h1J8NTAo.js";
|
|
30
28
|
import { useRouter as He } from "vue-router";
|
|
31
|
-
import { m as le } from "./index-
|
|
32
|
-
import { t as Ft } from "./index-
|
|
33
|
-
import { R as We } from "./app-
|
|
34
|
-
import { t as Mt } from "./money-
|
|
35
|
-
import { g as Tt, a as kt, b as At } from "./user-
|
|
29
|
+
import { m as le } from "./index-CxE-VVlL.js";
|
|
30
|
+
import { t as Ft } from "./index-C5VvGYtP.js";
|
|
31
|
+
import { R as We } from "./app-CybjF-6Q.js";
|
|
32
|
+
import { t as Mt } from "./money-B3cPZAZu.js";
|
|
33
|
+
import { g as Tt, a as kt, b as At } from "./user-Dxp7kluY.js";
|
|
36
34
|
const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, $t = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, Bt = /* @__PURE__ */ be({
|
|
37
35
|
__name: "MemberStatsDialog",
|
|
38
36
|
props: {
|
|
@@ -51,21 +49,21 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
51
49
|
() => {
|
|
52
50
|
var d;
|
|
53
51
|
return (((d = x.member.collection) == null ? void 0 : d.TITLE) ?? []).reduce(
|
|
54
|
-
(
|
|
55
|
-
var
|
|
52
|
+
(c, M) => {
|
|
53
|
+
var C, T, O, E, U;
|
|
56
54
|
const r = f.sortedTitles.find(
|
|
57
55
|
(te) => te._id.toString() === M.collectible
|
|
58
56
|
);
|
|
59
|
-
if (!r) return
|
|
57
|
+
if (!r) return c;
|
|
60
58
|
const i = [...M.expiryBalance ?? []].sort(
|
|
61
59
|
(te, z) => S(te.expiredAt).isAfter(S(z.expiredAt)) ? -1 : 1
|
|
62
60
|
);
|
|
63
|
-
return (
|
|
61
|
+
return (C = i[0]) != null && C.expiredAt && S((T = i[0]) == null ? void 0 : T.expiredAt).isBefore(S()) || c.push({
|
|
64
62
|
_id: r._id,
|
|
65
63
|
name: r.name,
|
|
66
64
|
expiredAt: (O = i[0]) != null && O.expiredAt ? S((E = i[0]) == null ? void 0 : E.expiredAt).toISOString() : "",
|
|
67
65
|
expiresIn: S((U = i[0]) == null ? void 0 : U.expiredAt).diff(S(), "days")
|
|
68
|
-
}),
|
|
66
|
+
}), c;
|
|
69
67
|
},
|
|
70
68
|
[]
|
|
71
69
|
);
|
|
@@ -79,28 +77,28 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
79
77
|
() => (f.sortedTitles ?? []).map((d) => ({
|
|
80
78
|
label: d.name,
|
|
81
79
|
value: d._id.toString(),
|
|
82
|
-
sublabel: s.value.some((
|
|
80
|
+
sublabel: s.value.some((c) => c._id === d._id) ? "Owned" : void 0
|
|
83
81
|
}))
|
|
84
|
-
), m = H(() => (f.sortedTiers ?? []).map((d,
|
|
82
|
+
), m = H(() => (f.sortedTiers ?? []).map((d, c) => ({
|
|
85
83
|
label: d.name,
|
|
86
84
|
sublabel: `${d.option.from} - ${d.option.to}`,
|
|
87
85
|
from: d.option.from,
|
|
88
86
|
to: d.option.to,
|
|
89
|
-
value:
|
|
87
|
+
value: c + 1
|
|
90
88
|
})));
|
|
91
|
-
function
|
|
89
|
+
function w() {
|
|
92
90
|
var M, r;
|
|
93
|
-
const d = ((M = m.value[(o.value.tier ?? 1) - 1]) == null ? void 0 : M.from) ?? 0,
|
|
91
|
+
const d = ((M = m.value[(o.value.tier ?? 1) - 1]) == null ? void 0 : M.from) ?? 0, c = (r = m.value[(o.value.tier ?? 1) - 1]) == null ? void 0 : r.to;
|
|
94
92
|
o.value.experience = Math.min(
|
|
95
|
-
|
|
93
|
+
c ?? d,
|
|
96
94
|
Math.max(d, o.value.experience ?? 0)
|
|
97
95
|
);
|
|
98
96
|
}
|
|
99
97
|
const u = H(() => {
|
|
100
|
-
var M, r, i,
|
|
101
|
-
const d = ((r = (M = x.member.collection) == null ? void 0 : M.TIER) == null ? void 0 : r[0].balance) ?? -1,
|
|
98
|
+
var M, r, i, C, T, O;
|
|
99
|
+
const d = ((r = (M = x.member.collection) == null ? void 0 : M.TIER) == null ? void 0 : r[0].balance) ?? -1, c = ((C = (i = x.member.collection) == null ? void 0 : i.POINT) == null ? void 0 : C[0].balance) ?? 0;
|
|
102
100
|
if (d != o.value.tier) return !0;
|
|
103
|
-
if (o.value.experience && o.value.experience !=
|
|
101
|
+
if (o.value.experience && o.value.experience != c) {
|
|
104
102
|
const E = ((T = m.value[d - 1]) == null ? void 0 : T.from) ?? 0, U = ((O = m.value[d - 1]) == null ? void 0 : O.to) ?? 0;
|
|
105
103
|
if (o.value.experience < E || U && o.value.experience > U)
|
|
106
104
|
return !0;
|
|
@@ -108,36 +106,36 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
108
106
|
return !1;
|
|
109
107
|
});
|
|
110
108
|
function v(d) {
|
|
111
|
-
var
|
|
112
|
-
return (
|
|
109
|
+
var c;
|
|
110
|
+
return (c = s.value.find((M) => M._id === d)) == null ? void 0 : c.expiresIn;
|
|
113
111
|
}
|
|
114
112
|
const I = H(() => {
|
|
115
113
|
const d = ft.safeParse(o.value);
|
|
116
114
|
return d.success ? void 0 : d.error.errors;
|
|
117
115
|
});
|
|
118
116
|
function D(d) {
|
|
119
|
-
var
|
|
120
|
-
return (M = (
|
|
117
|
+
var c, M;
|
|
118
|
+
return (M = (c = I.value) == null ? void 0 : c.find((r) => r.path.join(".") === d)) == null ? void 0 : M.message;
|
|
121
119
|
}
|
|
122
120
|
function L(d) {
|
|
123
|
-
var
|
|
124
|
-
return (
|
|
121
|
+
var c;
|
|
122
|
+
return (c = I.value) == null ? void 0 : c.filter((M) => M.path.join(".").startsWith(d)).map((M) => M.message);
|
|
125
123
|
}
|
|
126
124
|
async function P() {
|
|
127
125
|
await x.onSubmit(o.value), k.close();
|
|
128
126
|
}
|
|
129
|
-
return (d,
|
|
127
|
+
return (d, c) => {
|
|
130
128
|
var te, z;
|
|
131
|
-
const M = V("FmSelect"), r = V("FmStepperField"), i = V("FmTextField"),
|
|
129
|
+
const M = V("FmSelect"), r = V("FmStepperField"), i = V("FmTextField"), C = V("FmField"), T = V("FmFormGroup"), O = V("FmButton"), E = V("FmHelperText"), U = V("FmSpacer");
|
|
132
130
|
return p(), A(q, null, [
|
|
133
131
|
n("div", Et, [
|
|
134
|
-
|
|
132
|
+
c[6] || (c[6] = n("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1)),
|
|
135
133
|
t(m).length ? (p(), R(M, {
|
|
136
134
|
key: 0,
|
|
137
135
|
modelValue: t(o).tier,
|
|
138
136
|
"onUpdate:modelValue": [
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
c[0] || (c[0] = (F) => t(o).tier = F),
|
|
138
|
+
w
|
|
141
139
|
],
|
|
142
140
|
label: "Member Tier",
|
|
143
141
|
items: t(m),
|
|
@@ -146,28 +144,28 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
146
144
|
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : ce("", !0),
|
|
147
145
|
_(r, {
|
|
148
146
|
"model-value": t(o).experience ?? 0,
|
|
149
|
-
"onUpdate:modelValue":
|
|
147
|
+
"onUpdate:modelValue": c[1] || (c[1] = (F) => t(o).experience = F),
|
|
150
148
|
label: "Member Experience",
|
|
151
149
|
"max-fraction-digits": 0,
|
|
152
150
|
"helper-text": D("experience"),
|
|
153
151
|
"helper-state": D("experience") ? "error" : void 0
|
|
154
152
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
155
|
-
|
|
153
|
+
c[7] || (c[7] = n("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1)),
|
|
156
154
|
_(i, {
|
|
157
155
|
modelValue: t(o).cardNo,
|
|
158
|
-
"onUpdate:modelValue":
|
|
156
|
+
"onUpdate:modelValue": c[2] || (c[2] = (F) => t(o).cardNo = F),
|
|
159
157
|
label: "Card number",
|
|
160
158
|
"helper-text": D("cardNo"),
|
|
161
159
|
"helper-state": D("cardNo") ? "error" : void 0
|
|
162
160
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
163
|
-
|
|
164
|
-
(te = t(o).titles) != null && te.length ? (p(), A("div", Vt,
|
|
161
|
+
c[8] || (c[8] = n("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1)),
|
|
162
|
+
(te = t(o).titles) != null && te.length ? (p(), A("div", Vt, [...c[5] || (c[5] = [
|
|
165
163
|
n("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
166
164
|
n("div", { class: "flex-1" }, "Title"),
|
|
167
165
|
n("div", { class: "flex-1" }, "Expires in days"),
|
|
168
166
|
n("div", { class: "w-24 h-1" })
|
|
169
167
|
], -1)
|
|
170
|
-
]))) : ce("", !0),
|
|
168
|
+
])])) : ce("", !0),
|
|
171
169
|
(p(!0), A(q, null, ie(t(o).titles ?? [], (F, J) => (p(), A("div", { key: J }, [
|
|
172
170
|
n("div", It, [
|
|
173
171
|
t(s).some((a) => a._id === F.id) ? (p(), R(T, {
|
|
@@ -176,7 +174,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
176
174
|
class: "flex-1"
|
|
177
175
|
}, {
|
|
178
176
|
default: xe(() => [
|
|
179
|
-
_(
|
|
177
|
+
_(C, {
|
|
180
178
|
disabled: !0,
|
|
181
179
|
class: "text-fm-color-typo-secondary"
|
|
182
180
|
}, {
|
|
@@ -234,7 +232,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
234
232
|
icon: "add",
|
|
235
233
|
label: "Give title",
|
|
236
234
|
variant: "plain",
|
|
237
|
-
onClick:
|
|
235
|
+
onClick: c[3] || (c[3] = (F) => {
|
|
238
236
|
var J;
|
|
239
237
|
return t(o).titles = [
|
|
240
238
|
...t(o).titles ?? [],
|
|
@@ -263,7 +261,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
263
261
|
variant: "secondary",
|
|
264
262
|
label: "Cancel",
|
|
265
263
|
size: "md",
|
|
266
|
-
onClick:
|
|
264
|
+
onClick: c[4] || (c[4] = (F) => t(k).close())
|
|
267
265
|
}),
|
|
268
266
|
_(O, {
|
|
269
267
|
disabled: !!t(I),
|
|
@@ -310,7 +308,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
310
308
|
u && await f.onSubmit(x.value);
|
|
311
309
|
});
|
|
312
310
|
}
|
|
313
|
-
const
|
|
311
|
+
const w = H(() => {
|
|
314
312
|
const v = (f.action === "send" ? f.type === "coin" ? bt : yt : f.type === "coin" ? gt : vt).safeParse(x.value);
|
|
315
313
|
return v.success == !1 ? v.error.flatten().fieldErrors : void 0;
|
|
316
314
|
});
|
|
@@ -318,10 +316,10 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
318
316
|
const I = V("FmStepperField"), D = V("FmSwitch"), L = V("FmTextarea"), P = V("FmButton"), de = V("FmCard");
|
|
319
317
|
return p(), R(de, { class: "flex flex-col gap-16 p-16" }, {
|
|
320
318
|
default: xe(() => {
|
|
321
|
-
var ae, W, re, d,
|
|
319
|
+
var ae, W, re, d, c, M;
|
|
322
320
|
return [
|
|
323
321
|
n("div", Dt, $(f.action == "send" ? "Send" : "Deduct") + " " + $(t(De)[f.type.toUpperCase()].name), 1),
|
|
324
|
-
Fe(" " + $(t(
|
|
322
|
+
Fe(" " + $(t(w)) + " ", 1),
|
|
325
323
|
n("div", Nt, [
|
|
326
324
|
_(I, {
|
|
327
325
|
modelValue: t(x).amount,
|
|
@@ -329,8 +327,8 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
329
327
|
label: `${t(De)[f.type.toUpperCase()].name} amount`,
|
|
330
328
|
"is-currency": !0,
|
|
331
329
|
"max-fraction-digits": 2,
|
|
332
|
-
"helper-state": (ae = t(
|
|
333
|
-
"helper-text": (re = (W = t(
|
|
330
|
+
"helper-state": (ae = t(w)) != null && ae.amount ? "error" : void 0,
|
|
331
|
+
"helper-text": (re = (W = t(w)) == null ? void 0 : W.amount) == null ? void 0 : re[0]
|
|
334
332
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
335
333
|
y.action === "send" && f.type === "coin" ? (p(), R(D, {
|
|
336
334
|
key: 0,
|
|
@@ -348,8 +346,8 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
348
346
|
"append-text": "day(s)",
|
|
349
347
|
max: 9999,
|
|
350
348
|
min: 0,
|
|
351
|
-
"helper-state": (d = t(
|
|
352
|
-
"helper-text": (M = (
|
|
349
|
+
"helper-state": (d = t(w)) != null && d.day ? "error" : void 0,
|
|
350
|
+
"helper-text": (M = (c = t(w)) == null ? void 0 : c.day) == null ? void 0 : M[0]
|
|
353
351
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"])) : ce("", !0),
|
|
354
352
|
_(L, {
|
|
355
353
|
modelValue: t(x).remark,
|
|
@@ -365,7 +363,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
365
363
|
onClick: v[4] || (v[4] = (r) => t(k).close())
|
|
366
364
|
}),
|
|
367
365
|
_(P, {
|
|
368
|
-
disabled: !!t(
|
|
366
|
+
disabled: !!t(w),
|
|
369
367
|
variant: "primary",
|
|
370
368
|
label: "Submit",
|
|
371
369
|
size: "md",
|
|
@@ -396,7 +394,7 @@ const Et = { class: "flex flex-col" }, Vt = { key: 1 }, It = { class: "flex flex
|
|
|
396
394
|
});
|
|
397
395
|
class Ot extends _t {
|
|
398
396
|
}
|
|
399
|
-
const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" }, Ut = { class: "hidden xs
|
|
397
|
+
const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" }, Ut = { class: "hidden xs:!flex items-center justify-end" }, Lt = { class: "flex items-center justify-between mb-4" }, zt = { class: "flex items-center justify-between gap-x-8" }, jt = { class: "fm-typo-en-body-lg-600" }, qt = { class: "px-4 py-0.5 rounded-md bg-fm-color-neutral-gray-100 fm-typo-en-body-md-600" }, Kt = { class: "xs:hidden flex justify-between gap-x-4" }, Te = /* @__PURE__ */ be({
|
|
400
398
|
__name: "MemberCollectionTable",
|
|
401
399
|
props: {
|
|
402
400
|
member: {
|
|
@@ -427,7 +425,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
427
425
|
setup(y) {
|
|
428
426
|
const k = y, f = G({
|
|
429
427
|
search: ""
|
|
430
|
-
}), x = G(!1), { tableMeta: s, rowData: o, onSort: g, debouncedFetchData: m, onSearch:
|
|
428
|
+
}), x = G(!1), { tableMeta: s, rowData: o, onSort: g, debouncedFetchData: m, onSearch: w } = Ke(async (v) => {
|
|
431
429
|
const I = {
|
|
432
430
|
...f.value,
|
|
433
431
|
...k.filters
|
|
@@ -475,11 +473,11 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
475
473
|
return p(), A("div", Rt, [
|
|
476
474
|
n("div", Ut, [
|
|
477
475
|
_(D, {
|
|
478
|
-
class: "hidden xs
|
|
476
|
+
class: "hidden xs:!flex",
|
|
479
477
|
modelValue: t(f).search,
|
|
480
478
|
"onUpdate:modelValue": [
|
|
481
479
|
I[0] || (I[0] = (P) => t(f).search = P),
|
|
482
|
-
t(
|
|
480
|
+
t(w)
|
|
483
481
|
],
|
|
484
482
|
placeholder: "Search",
|
|
485
483
|
collapsible: ""
|
|
@@ -501,7 +499,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
501
499
|
modelValue: t(f).search,
|
|
502
500
|
"onUpdate:modelValue": [
|
|
503
501
|
I[1] || (I[1] = (P) => t(f).search = P),
|
|
504
|
-
t(
|
|
502
|
+
t(w)
|
|
505
503
|
],
|
|
506
504
|
placeholder: "Search"
|
|
507
505
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
@@ -559,14 +557,14 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
559
557
|
{
|
|
560
558
|
header: "Claimed at",
|
|
561
559
|
accessorKey: "_id",
|
|
562
|
-
accessorFn: (o) => S(
|
|
560
|
+
accessorFn: (o) => S(he(o._id.toString())).format("D MMM YYYY"),
|
|
563
561
|
enableSorting: !1
|
|
564
562
|
},
|
|
565
563
|
{
|
|
566
564
|
header: "Expired at",
|
|
567
565
|
cell(o) {
|
|
568
|
-
var m,
|
|
569
|
-
const g = (
|
|
566
|
+
var m, w, u, v;
|
|
567
|
+
const g = (w = (m = o.row.original.expiryBalance) == null ? void 0 : m[0]) != null && w.expiredAt ? S((v = (u = o.row.original.expiryBalance) == null ? void 0 : u[0]) == null ? void 0 : v.expiredAt).format(
|
|
570
568
|
"D MMM YYYY"
|
|
571
569
|
) : "-";
|
|
572
570
|
return K("div", {}, g);
|
|
@@ -576,8 +574,8 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
576
574
|
{
|
|
577
575
|
header: "Transfer open",
|
|
578
576
|
accessorFn: (o) => {
|
|
579
|
-
var g, m,
|
|
580
|
-
return ht((
|
|
577
|
+
var g, m, w;
|
|
578
|
+
return ht((w = (m = (g = o.pf_collectible) == null ? void 0 : g.options) == null ? void 0 : m.enableTransfer) == null ? void 0 : w.toString());
|
|
581
579
|
},
|
|
582
580
|
enableSorting: !1
|
|
583
581
|
}
|
|
@@ -585,14 +583,14 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
585
583
|
type: ke.enum.VOUCHER,
|
|
586
584
|
isActive: o
|
|
587
585
|
}), s = (o) => {
|
|
588
|
-
var g, m,
|
|
586
|
+
var g, m, w, u, v, I, D;
|
|
589
587
|
return {
|
|
590
588
|
CollectionID: o._id,
|
|
591
589
|
Title: (g = o.pf_collectible) == null ? void 0 : g.name,
|
|
592
|
-
ClaimedAt: S(
|
|
590
|
+
ClaimedAt: S(he(o._id.toString())).format(
|
|
593
591
|
"D MMM YYYY, hh:mmA"
|
|
594
592
|
),
|
|
595
|
-
ExpiredAt: (
|
|
593
|
+
ExpiredAt: (w = (m = o.expiryBalance) == null ? void 0 : m[0]) != null && w.expiredAt ? S((v = (u = o.expiryBalance) == null ? void 0 : u[0]) == null ? void 0 : v.expiredAt).format("D MMM YYYY") : "",
|
|
596
594
|
TransferOpen: ((D = (I = o.pf_collectible) == null ? void 0 : I.options) == null ? void 0 : D.enableTransfer) || !1
|
|
597
595
|
};
|
|
598
596
|
};
|
|
@@ -652,18 +650,19 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
652
650
|
{
|
|
653
651
|
header: "Status",
|
|
654
652
|
cell(s) {
|
|
653
|
+
var o;
|
|
655
654
|
if (s.row.original.pf_campaign) {
|
|
656
|
-
const
|
|
655
|
+
const g = {
|
|
657
656
|
active: "text-fm-color-typo-warning bg-fm-color-system-warning-100",
|
|
658
657
|
upcoming: "text-fm-color-typo-info bg-fm-color-system-info-100",
|
|
659
658
|
completed: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
660
659
|
expired: "text-fm-color-typo-error bg-fm-color-system-error-100"
|
|
661
|
-
},
|
|
660
|
+
}, m = Ct(
|
|
662
661
|
s.row.original.pf_campaign
|
|
663
|
-
),
|
|
662
|
+
), u = s.row.original.balance === s.row.original.pf_collectible.extras.mission.end && m === "active" ? "completed" : (o = s.row.original) != null && o.deactivatedAt ? "expired" : m;
|
|
664
663
|
return K(ve.FmChip, {
|
|
665
|
-
class:
|
|
666
|
-
label: Pe.title(
|
|
664
|
+
class: g[u],
|
|
665
|
+
label: Pe.title(u),
|
|
667
666
|
compact: !0
|
|
668
667
|
});
|
|
669
668
|
}
|
|
@@ -734,14 +733,14 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
734
733
|
{
|
|
735
734
|
header: "Claimed at",
|
|
736
735
|
accessorKey: "_id",
|
|
737
|
-
accessorFn: (s) => S(
|
|
736
|
+
accessorFn: (s) => S(he(s._id.toString())).format("D MMM YYYY"),
|
|
738
737
|
enableSorting: !1
|
|
739
738
|
},
|
|
740
739
|
{
|
|
741
740
|
header: "Expired at",
|
|
742
741
|
cell(s) {
|
|
743
|
-
var g, m,
|
|
744
|
-
const o = (m = (g = s.row.original.expiryBalance) == null ? void 0 : g[0]) != null && m.expiredAt ? S((u = (
|
|
742
|
+
var g, m, w, u;
|
|
743
|
+
const o = (m = (g = s.row.original.expiryBalance) == null ? void 0 : g[0]) != null && m.expiredAt ? S((u = (w = s.row.original.expiryBalance) == null ? void 0 : w[0]) == null ? void 0 : u.expiredAt).format(
|
|
745
744
|
"D MMM YYYY"
|
|
746
745
|
) : "-";
|
|
747
746
|
return K("div", {}, o);
|
|
@@ -789,7 +788,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
789
788
|
},
|
|
790
789
|
emits: ["update:member"],
|
|
791
790
|
setup(y, { expose: k, emit: f }) {
|
|
792
|
-
const x = He(), s = qe(), o = Ve(), g = Je(), m = Ee(), { minor:
|
|
791
|
+
const x = He(), s = qe(), o = Ve(), g = Je(), m = Ee(), { minor: w } = je, u = y, v = f, I = H(() => s.locations.map((a) => ({
|
|
793
792
|
label: a.name,
|
|
794
793
|
value: a._id
|
|
795
794
|
}))), D = H(() => (u.member.segment || []).map((a) => {
|
|
@@ -820,11 +819,11 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
820
819
|
stats: [
|
|
821
820
|
{
|
|
822
821
|
label: "Active vouchers",
|
|
823
|
-
getter: () => ee(
|
|
822
|
+
getter: () => ee(C.value.active, 0)
|
|
824
823
|
},
|
|
825
824
|
{
|
|
826
825
|
label: "Past vouchers",
|
|
827
|
-
getter: () => ee(
|
|
826
|
+
getter: () => ee(C.value.past, 0)
|
|
828
827
|
}
|
|
829
828
|
]
|
|
830
829
|
},
|
|
@@ -896,7 +895,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
896
895
|
type: a,
|
|
897
896
|
action: e,
|
|
898
897
|
onSubmit: async (b) => {
|
|
899
|
-
await
|
|
898
|
+
await w(
|
|
900
899
|
async () => {
|
|
901
900
|
const B = {
|
|
902
901
|
"credit-send": le.sendCredit,
|
|
@@ -926,7 +925,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
926
925
|
contentComponentProps: {
|
|
927
926
|
member: u.member,
|
|
928
927
|
onSubmit: async (a) => {
|
|
929
|
-
await
|
|
928
|
+
await w(
|
|
930
929
|
async () => {
|
|
931
930
|
await le.updateMember(u.member._id, a), v("update:member"), m.close();
|
|
932
931
|
},
|
|
@@ -948,7 +947,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
948
947
|
label: "Tier",
|
|
949
948
|
getter: (a) => {
|
|
950
949
|
var se, me, ye, h, Y;
|
|
951
|
-
const e = (((me = Ne.first((se = u.member.collection) == null ? void 0 : se.TIER)) == null ? void 0 : me.balance) || 0) - 1, b = M.value.name, B = ((h = (ye = a.collection) == null ? void 0 : ye.POINT) == null ? void 0 : h[0].balance) ?? 0, N = o.sortedTiers[e + 1], X = ((Y = N == null ? void 0 : N.option) == null ? void 0 : Y.
|
|
950
|
+
const e = (((me = Ne.first((se = u.member.collection) == null ? void 0 : se.TIER)) == null ? void 0 : me.balance) || 0) - 1, b = M.value.name, B = ((h = (ye = a.collection) == null ? void 0 : ye.POINT) == null ? void 0 : h[0].balance) ?? 0, N = o.sortedTiers[e + 1], X = ((Y = N == null ? void 0 : N.option) == null ? void 0 : Y.from) ?? 1 / 0;
|
|
952
951
|
return `${b} (${B}/${X})`;
|
|
953
952
|
}
|
|
954
953
|
},
|
|
@@ -960,10 +959,10 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
960
959
|
label: "Birthday",
|
|
961
960
|
getter: (a) => a.birthday ? S(a.birthday).format("D MMM YYYY") : "-"
|
|
962
961
|
}
|
|
963
|
-
],
|
|
962
|
+
], c = [
|
|
964
963
|
{
|
|
965
964
|
label: "Customer since",
|
|
966
|
-
getter: (a) => S(
|
|
965
|
+
getter: (a) => S(he(a._id.toString())).format("D MMM YYYY")
|
|
967
966
|
},
|
|
968
967
|
{
|
|
969
968
|
label: "Joined at location",
|
|
@@ -1024,7 +1023,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1024
1023
|
}).filter(
|
|
1025
1024
|
(e) => e.expiredAt ? S(e.expiredAt).isAfter(S()) : !0
|
|
1026
1025
|
);
|
|
1027
|
-
}), i = G({ stamp: 0, progressive: 0 }),
|
|
1026
|
+
}), i = G({ stamp: 0, progressive: 0 }), C = G({ active: 0, past: 0 }), T = G([]), O = H(
|
|
1028
1027
|
() => T.value.reduce((a, e) => a + e.count, 0)
|
|
1029
1028
|
), E = G(!0);
|
|
1030
1029
|
function U() {
|
|
@@ -1055,7 +1054,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1055
1054
|
value: "game"
|
|
1056
1055
|
}
|
|
1057
1056
|
], F = G(z[0]), J = async () => {
|
|
1058
|
-
|
|
1057
|
+
C.value = await Me.readCollectionCountByMemberId(
|
|
1059
1058
|
u.member._id.toString(),
|
|
1060
1059
|
ke.enum.VOUCHER
|
|
1061
1060
|
), T.value = await Ft.readPurchaseCountByMember(
|
|
@@ -1081,7 +1080,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1081
1080
|
"close-button": !0,
|
|
1082
1081
|
"max-width": 1100
|
|
1083
1082
|
}, {
|
|
1084
|
-
"side-sheet-footer": xe(() => e[19] || (e[19] = [])),
|
|
1083
|
+
"side-sheet-footer": xe(() => [...e[19] || (e[19] = [])]),
|
|
1085
1084
|
default: xe(() => [
|
|
1086
1085
|
n("div", Jt, [
|
|
1087
1086
|
n("div", null, [
|
|
@@ -1107,11 +1106,11 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1107
1106
|
n("div", to, $(y.member.name), 1),
|
|
1108
1107
|
n("div", oo, $(y.member._id), 1),
|
|
1109
1108
|
n("div", no, [
|
|
1110
|
-
e[6] || (e[6] = Fe(" Member Card: ")),
|
|
1109
|
+
e[6] || (e[6] = Fe(" Member Card: ", -1)),
|
|
1111
1110
|
n("span", ao, $(y.member.cardNo ? y.member.cardNo : "-"), 1)
|
|
1112
1111
|
]),
|
|
1113
1112
|
n("div", ro, [
|
|
1114
|
-
e[7] || (e[7] = Fe(" Referral Code: ")),
|
|
1113
|
+
e[7] || (e[7] = Fe(" Referral Code: ", -1)),
|
|
1115
1114
|
n("span", so, $(y.member.referralCode ? y.member.referralCode : "-"), 1)
|
|
1116
1115
|
])
|
|
1117
1116
|
]),
|
|
@@ -1130,7 +1129,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1130
1129
|
n("div", null, [
|
|
1131
1130
|
e[10] || (e[10] = n("div", { class: "fm-typo-en-title-sm-800 mb-16" }, "Activities", -1)),
|
|
1132
1131
|
n("div", co, [
|
|
1133
|
-
(p(), A(q, null, ie(
|
|
1132
|
+
(p(), A(q, null, ie(c, (h) => n("div", {
|
|
1134
1133
|
key: h.key
|
|
1135
1134
|
}, [
|
|
1136
1135
|
n("div", mo, $(h.label), 1),
|
|
@@ -1282,7 +1281,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1282
1281
|
}, 8, ["modelValue"]);
|
|
1283
1282
|
};
|
|
1284
1283
|
}
|
|
1285
|
-
}), Ro = { class: "flex items-center justify-end" },
|
|
1284
|
+
}), Ro = { class: "flex items-center justify-end" }, _n = /* @__PURE__ */ be({
|
|
1286
1285
|
__name: "MemberList",
|
|
1287
1286
|
setup(y) {
|
|
1288
1287
|
const k = Je(), f = Ve(), x = qe(), { minor: s } = je, o = He(), g = [
|
|
@@ -1300,7 +1299,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1300
1299
|
accessorKey: "phoneNumber"
|
|
1301
1300
|
},
|
|
1302
1301
|
{
|
|
1303
|
-
accessorFn: (r) => S(
|
|
1302
|
+
accessorFn: (r) => S(he(r._id.toString())).format("D MMM YYYY"),
|
|
1304
1303
|
header: "Customer Since",
|
|
1305
1304
|
accessorKey: "_id",
|
|
1306
1305
|
id: "_id"
|
|
@@ -1329,8 +1328,8 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1329
1328
|
{
|
|
1330
1329
|
accessorKey: "collection_CREDIT_0_balance",
|
|
1331
1330
|
accessorFn: (r) => {
|
|
1332
|
-
var i,
|
|
1333
|
-
return ee(((T = (
|
|
1331
|
+
var i, C, T;
|
|
1332
|
+
return ee(((T = (C = (i = r.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : C[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1334
1333
|
},
|
|
1335
1334
|
header: "Credit(s)",
|
|
1336
1335
|
enableSorting: !0
|
|
@@ -1338,8 +1337,8 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1338
1337
|
{
|
|
1339
1338
|
accessorKey: "collection_POINT_0_balance",
|
|
1340
1339
|
accessorFn: (r) => {
|
|
1341
|
-
var i,
|
|
1342
|
-
return ee(((T = (
|
|
1340
|
+
var i, C, T;
|
|
1341
|
+
return ee(((T = (C = (i = r.collection) == null ? void 0 : i.POINT) == null ? void 0 : C[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1343
1342
|
},
|
|
1344
1343
|
header: "Experience(s)",
|
|
1345
1344
|
enableSorting: !0
|
|
@@ -1347,8 +1346,8 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1347
1346
|
{
|
|
1348
1347
|
accessorKey: "collection_COIN_0_balance",
|
|
1349
1348
|
accessorFn: (r) => {
|
|
1350
|
-
var i,
|
|
1351
|
-
return ee(((T = (
|
|
1349
|
+
var i, C, T;
|
|
1350
|
+
return ee(((T = (C = (i = r.collection) == null ? void 0 : i.COIN) == null ? void 0 : C[0]) == null ? void 0 : T.balance) ?? 0, 2);
|
|
1352
1351
|
},
|
|
1353
1352
|
header: "Point(s)",
|
|
1354
1353
|
enableSorting: !0
|
|
@@ -1368,17 +1367,17 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1368
1367
|
return (i = r.stats) == null ? void 0 : i.lastVisit;
|
|
1369
1368
|
},
|
|
1370
1369
|
sortingFn: (r, i) => {
|
|
1371
|
-
var
|
|
1372
|
-
return new Date((
|
|
1370
|
+
var C, T;
|
|
1371
|
+
return new Date((C = r.original.stats) == null ? void 0 : C.lastVisit).getTime() - new Date((T = i.original.stats) == null ? void 0 : T.lastVisit).getTime();
|
|
1373
1372
|
},
|
|
1374
1373
|
id: "stats.lastVisit",
|
|
1375
1374
|
header: "Last visit",
|
|
1376
1375
|
cell(r) {
|
|
1377
|
-
var i,
|
|
1376
|
+
var i, C;
|
|
1378
1377
|
return K("div", { class: "flex items-center justify-end gap-4" }, [
|
|
1379
1378
|
K(
|
|
1380
1379
|
"span",
|
|
1381
|
-
(i = r.row.original.stats) != null && i.lastVisit ? S((
|
|
1380
|
+
(i = r.row.original.stats) != null && i.lastVisit ? S((C = r.row.original.stats) == null ? void 0 : C.lastVisit).fromNow() : "NA"
|
|
1382
1381
|
),
|
|
1383
1382
|
K(
|
|
1384
1383
|
ve.FmTooltip,
|
|
@@ -1417,7 +1416,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1417
1416
|
);
|
|
1418
1417
|
}
|
|
1419
1418
|
}
|
|
1420
|
-
], { tableMeta: m, rowData:
|
|
1419
|
+
], { tableMeta: m, rowData: w, onSort: u, debouncedFetchData: v, onSearch: I } = Ke(le.read), D = G(), L = G(!1), P = G(), de = H(() => x.locations.map((r) => ({
|
|
1421
1420
|
label: r.name,
|
|
1422
1421
|
value: r._id
|
|
1423
1422
|
})));
|
|
@@ -1442,7 +1441,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1442
1441
|
page: 1,
|
|
1443
1442
|
rowsNumber: 0
|
|
1444
1443
|
};
|
|
1445
|
-
function
|
|
1444
|
+
function c(r) {
|
|
1446
1445
|
const i = S(r);
|
|
1447
1446
|
return i.isValid() ? i.format("DD/MM/YYYY") : "";
|
|
1448
1447
|
}
|
|
@@ -1452,71 +1451,71 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1452
1451
|
skip: 0,
|
|
1453
1452
|
sortBy: d.sortBy,
|
|
1454
1453
|
descending: d.descending
|
|
1455
|
-
})).meta.totalResources ?? 0,
|
|
1454
|
+
})).meta.totalResources ?? 0, C = d.rowsPerPage;
|
|
1456
1455
|
await s(
|
|
1457
1456
|
async () => {
|
|
1458
1457
|
var T, O, E, U, te, z, F, J, a, e, b, B, N, X, se, me, ye, h, Y, oe, j, ue, pe, fe, Q;
|
|
1459
|
-
for (let Z = 0; Z < i; Z +=
|
|
1458
|
+
for (let Z = 0; Z < i; Z += C) {
|
|
1460
1459
|
const Xe = {
|
|
1461
1460
|
...d,
|
|
1462
|
-
limit:
|
|
1461
|
+
limit: C,
|
|
1463
1462
|
skip: d.page - 1,
|
|
1464
1463
|
sortBy: d.sortBy,
|
|
1465
1464
|
descending: d.descending
|
|
1466
1465
|
}, Qe = await le.read(Xe);
|
|
1467
|
-
for (const
|
|
1466
|
+
for (const l of Qe.resources) {
|
|
1468
1467
|
const Ze = (T = lt.parseOneAddress(
|
|
1469
|
-
|
|
1470
|
-
)) != null && T.domain.includes("feedmepos.com") ? void 0 :
|
|
1468
|
+
l == null ? void 0 : l.email
|
|
1469
|
+
)) != 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(
|
|
1471
1470
|
(ne, ge) => {
|
|
1472
|
-
var
|
|
1473
|
-
const
|
|
1471
|
+
var Se, Ce;
|
|
1472
|
+
const _e = (Ce = (Se = f.sortedTitles) == null ? void 0 : Se.find(
|
|
1474
1473
|
(we) => we._id === ge.collectible
|
|
1475
|
-
)) == null ? void 0 :
|
|
1476
|
-
return !
|
|
1474
|
+
)) == null ? void 0 : Ce.name;
|
|
1475
|
+
return !_e || ge.balance <= 0 || ne.push(_e), ne;
|
|
1477
1476
|
},
|
|
1478
1477
|
[]
|
|
1479
1478
|
), tt = (f.sortedTitles || []).reduce(
|
|
1480
1479
|
(ne, ge) => {
|
|
1481
|
-
var
|
|
1482
|
-
const
|
|
1480
|
+
var Se, Ce, we, Be;
|
|
1481
|
+
const _e = (Be = (we = (Ce = (((Se = l == null ? void 0 : l.collection) == null ? void 0 : Se.TITLE) || []).find(
|
|
1483
1482
|
(at) => at.collectible === ge._id
|
|
1484
|
-
)) == null ? void 0 :
|
|
1485
|
-
return ne[ge.name] =
|
|
1483
|
+
)) == null ? void 0 : Ce.expiryBalance) == null ? void 0 : we[0]) == null ? void 0 : Be.expiredAt;
|
|
1484
|
+
return ne[ge.name] = _e ? S(_e).format("DD/MM/YYYY") : "", ne;
|
|
1486
1485
|
},
|
|
1487
1486
|
{}
|
|
1488
|
-
), ot = ((z = (te = (U =
|
|
1487
|
+
), ot = ((z = (te = (U = l.collection) == null ? void 0 : U.CREDIT) == null ? void 0 : te.at(0)) == null ? void 0 : z.balance) || 0, Ie = ((e = (a = (J = (F = l.collection) == null ? void 0 : F.CREDIT) == null ? void 0 : J.at(0)) == null ? void 0 : a.expiryBalance) == null ? void 0 : e.reduce(
|
|
1489
1488
|
(ne, ge) => ne + ge.amount,
|
|
1490
1489
|
0
|
|
1491
1490
|
)) || 0, $e = ee(ot, 2), nt = {
|
|
1492
|
-
ID:
|
|
1493
|
-
Name: ((b =
|
|
1494
|
-
Phone: ((B =
|
|
1491
|
+
ID: l._id.toString(),
|
|
1492
|
+
Name: ((b = l.name) == null ? void 0 : b.trim()) || "",
|
|
1493
|
+
Phone: ((B = l == null ? void 0 : l.phoneNumber) == null ? void 0 : B.trim()) || "",
|
|
1495
1494
|
Email: Ze || "",
|
|
1496
|
-
Gender:
|
|
1497
|
-
CardNo:
|
|
1498
|
-
Birthday:
|
|
1495
|
+
Gender: l.gender || "",
|
|
1496
|
+
CardNo: l.cardNo || "",
|
|
1497
|
+
Birthday: l != null && l.birthday ? c(l == null ? void 0 : l.birthday) : "",
|
|
1499
1498
|
Credit: (Number($e) - Number(Ie)).toFixed(2),
|
|
1500
1499
|
FreeCredit: Number(Ie.toFixed(2)),
|
|
1501
1500
|
TotalCredit: Number($e),
|
|
1502
|
-
Exp:
|
|
1503
|
-
Point:
|
|
1504
|
-
Tier:
|
|
1501
|
+
Exp: l != null && l.collection ? ((se = (X = (N = l.collection) == null ? void 0 : N.POINT) == null ? void 0 : X.at(0)) == null ? void 0 : se.balance) ?? 0 : 0,
|
|
1502
|
+
Point: l != null && l.collection ? ((h = (ye = (me = l.collection) == null ? void 0 : me.COIN) == null ? void 0 : ye.at(0)) == null ? void 0 : h.balance) ?? 0 : 0,
|
|
1503
|
+
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,
|
|
1505
1504
|
Titles: et.join(","),
|
|
1506
1505
|
...tt,
|
|
1507
|
-
TotalTransaction:
|
|
1508
|
-
AvgSpent: Mt(Number(
|
|
1506
|
+
TotalTransaction: l.stats.visitCount,
|
|
1507
|
+
AvgSpent: Mt(Number(l.stats.avgBillSize || 0)).toFormat(
|
|
1509
1508
|
!1
|
|
1510
1509
|
),
|
|
1511
|
-
TotalSpent:
|
|
1512
|
-
LastVisit: l
|
|
1513
|
-
Feedback: ((ue =
|
|
1514
|
-
LastSeasonTierEarned: ((pe =
|
|
1515
|
-
LastSeasonPointEarned: ((fe =
|
|
1516
|
-
JoinedAt: l
|
|
1517
|
-
JoinedAtLocation:
|
|
1510
|
+
TotalSpent: l.stats.avgBillSize * l.stats.visitCount,
|
|
1511
|
+
LastVisit: c(l.stats.lastVisit),
|
|
1512
|
+
Feedback: ((ue = l.stats) == null ? void 0 : ue.feedbackCount) || 0,
|
|
1513
|
+
LastSeasonTierEarned: ((pe = l.stats) == null ? void 0 : pe.lastSeasonTierEarned) || 0,
|
|
1514
|
+
LastSeasonPointEarned: ((fe = l.stats) == null ? void 0 : fe.lastSeasonPointEarned) || 0,
|
|
1515
|
+
JoinedAt: c(l.joinAt || he(l._id)),
|
|
1516
|
+
JoinedAtLocation: l.location && ((Q = de.value.find((ne) => ne.value == l.location)) == null ? void 0 : Q.label) || "-",
|
|
1518
1517
|
VisitFrequency: `${Number(
|
|
1519
|
-
Math.ceil(
|
|
1518
|
+
Math.ceil(l.stats.avgVisitFrequency).toFixed(0)
|
|
1520
1519
|
)}`
|
|
1521
1520
|
};
|
|
1522
1521
|
r.addRecord(nt);
|
|
@@ -1542,10 +1541,10 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1542
1541
|
return ze(async () => {
|
|
1543
1542
|
await f.readMembership(), await x.readLocations(), await k.read(), await x.readLocations(), await v();
|
|
1544
1543
|
}), (r, i) => {
|
|
1545
|
-
const
|
|
1544
|
+
const C = V("FmSearch"), T = V("FmButton"), O = V("FmSnackbar");
|
|
1546
1545
|
return p(), A("div", null, [
|
|
1547
1546
|
n("div", Ro, [
|
|
1548
|
-
_(
|
|
1547
|
+
_(C, {
|
|
1549
1548
|
class: "mt-4",
|
|
1550
1549
|
modelValue: t(m).searchValue,
|
|
1551
1550
|
"onUpdate:modelValue": [
|
|
@@ -1576,7 +1575,7 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1576
1575
|
]),
|
|
1577
1576
|
_(Ge, {
|
|
1578
1577
|
loading: t(m).isLoading,
|
|
1579
|
-
"row-data": t(
|
|
1578
|
+
"row-data": t(w),
|
|
1580
1579
|
"row-count": t(m).totalRows,
|
|
1581
1580
|
"column-defs": g,
|
|
1582
1581
|
"shrink-at": !1,
|
|
@@ -1602,5 +1601,5 @@ const Rt = { class: "border border-fm-color-neutral-gray-100 rounded-lg p-16" },
|
|
|
1602
1601
|
}
|
|
1603
1602
|
});
|
|
1604
1603
|
export {
|
|
1605
|
-
|
|
1604
|
+
_n as default
|
|
1606
1605
|
};
|