@feedmepos/mf-connect 0.1.98-beta.68 → 0.1.98-beta.69
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/{App-C8R4gAPJ.js → App-BiKMxixG.js} +8 -8
- package/dist/{AuditLogs-j94Fb_Cl.js → AuditLogs-hcUTD8r2.js} +11 -11
- package/dist/{Bin-CpFrEnjY.js → Bin-BEIYu4Wb.js} +8 -8
- package/dist/{Broadcast-fBU3lP9R.js → Broadcast-CdsOnoex.js} +11 -11
- package/dist/{CampaignAnalytic-sF1EevSu.js → CampaignAnalytic-tfJk4uHv.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwNGrw8m.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DCfa5b54.js} +6 -6
- package/dist/{Card-ptmYoRqh.js → Card-DD2E58eg.js} +21 -21
- package/dist/{Collections-2Qi09T6w.js → Collections-BJ3-qcPo.js} +8 -8
- package/dist/{Credit-CKN7P3CE.js → Credit-CaNsiUeh.js} +12 -12
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-Den2QXQK.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BYl60g2P.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bv57OWve.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CVnXbrDQ.js} +35 -35
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BI62I5Rc.js → EffectSheet.vue_vue_type_style_index_0_lang-C6j2U0CU.js} +6 -6
- package/dist/{Experience-RfA7aQR5.js → Experience-WVRmN3BW.js} +12 -12
- package/dist/{FileSaver.min-WkbFq642.js → FileSaver.min-B0P2vo_g.js} +1 -1
- package/dist/{Game-D6mGws0G.js → Game-B72C_2ZX.js} +13 -13
- package/dist/{GiftCardSetup-puaT6Cxn.js → GiftCardSetup-BXrBTdxF.js} +10 -10
- package/dist/{Grab-CY5UfE9H.js → Grab-DkkVMS8x.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CdD_Rg8v.js → ImageInput.vue_vue_type_script_setup_true_lang-DOz5RTkO.js} +1 -1
- package/dist/{Index-CPU3B6Cc.js → Index-CsTSWAqg.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-CRHD-P3p.js → LocationPicker.vue_vue_type_script_setup_true_lang-Bqjz1_TS.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Du4PnjmO.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDy7s43a.js} +1 -1
- package/dist/{LoyaltyDashboard-Ch9SyBi9.js → LoyaltyDashboard-Cv1bGSmQ.js} +13 -13
- package/dist/{MainLayout-Ch5IdeRe.js → MainLayout-fHF57JEF.js} +3 -3
- package/dist/{Marketing-HIBKUVH6.js → Marketing-DSR9Ltbm.js} +4 -4
- package/dist/{MarketingMaterialEdit-nulwDpz-.js → MarketingMaterialEdit-DPiuYUe2.js} +6 -6
- package/dist/{Member-DOMD0vYk.js → Member-DS0JP4GM.js} +7 -7
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DBP5lyqH.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Pf9idXlV.js} +23 -31
- package/dist/{MemberImportHistory-CmvdCA4r.js → MemberImportHistory-DhWnUZlE.js} +7 -7
- package/dist/MemberList-BxVGAat6.js +334 -0
- package/dist/{MemberTransactions-BZip5ZjK.js → MemberTransactions-Brwauef3.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CBpLAsMs.js → MessageInput.vue_vue_type_script_setup_true_lang-B9t6HRkS.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-ClIHJYRH.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-pUeLVYJs.js} +1 -1
- package/dist/{Mission-CBaO_oPC.js → Mission-BU_Broks.js} +13 -13
- package/dist/{Overview-CMyo4PkW.js → Overview-BCb7SrPX.js} +19 -19
- package/dist/{Overview-D80aoCWJ.js → Overview-Nx3E9gxA.js} +4 -4
- package/dist/{Point-Cm5wkSKS.js → Point-DxHE0zpA.js} +12 -12
- package/dist/{Promotion-CI-nAziE.js → Promotion-DkXyrAWE.js} +13 -13
- package/dist/{Queue-S-C-qJqC.js → Queue-DcqW6gFI.js} +11 -11
- package/dist/{Record-DLShE52z.js → Record-T7-Qn-BL.js} +9 -9
- package/dist/{Review-DRJry1sV.js → Review-C0ORLjPk.js} +2 -2
- package/dist/{ReviewFacebookCallback-CGligjEJ.js → ReviewFacebookCallback-BamFJii5.js} +5 -5
- package/dist/{ReviewGoogleCallback-Dd0xDoW8.js → ReviewGoogleCallback-BbogEq-S.js} +5 -5
- package/dist/{Reward-B4j3B-Kl.js → Reward-Bs3PlUm1.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Bdp71wHD.js → RewardGroup.vue_vue_type_script_setup_true_lang-bt1XYaTg.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-By3TF33b.js → RuleGroup.vue_vue_type_script_setup_true_lang-BIhuiOQp.js} +226 -210
- package/dist/{Segment-qpQ_N0sj.js → Segment-ByHZvxzf.js} +275 -277
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BglJGLFP.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Chb-W_Sp.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DhhXblf0.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-v8tQQ_3M.js} +4 -4
- package/dist/{Setting-DyXjnfN-.js → Setting-CDDQh6Km.js} +14 -14
- package/dist/{SettingAdvertisements-CECela_p.js → SettingAdvertisements-vNfSi0PM.js} +12 -12
- package/dist/{Settings-Er_e5mMH.js → Settings-Dr9vVMqi.js} +5 -5
- package/dist/{Store-BUrvY3FI.js → Store-6jIdhWvV.js} +25 -25
- package/dist/{StoreRewards-DQqCEUlR.js → StoreRewards-Bi-vUQa8.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-CPopjf1L.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D_goMUgu.js} +24 -24
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C6rth9ZG.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dg1Caqaz.js} +2 -2
- package/dist/{Tier-B4KDa38d.js → Tier-DQxy11b5.js} +1418 -1299
- package/dist/{Title-DXdR7ja5.js → Title-BrYUm3dJ.js} +21 -21
- package/dist/{Transaction-CvBlcbF7.js → Transaction-BKaL8ft5.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CEmMivq9.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DO6LZkqJ.js} +6 -6
- package/dist/{Voucher-B14FbFsZ.js → Voucher-fevudt4N.js} +14 -14
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-D7ct9Lvu.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Cr4_aclC.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D6MiDkQc.js → ZodTextField.vue_vue_type_script_setup_true_lang-CeOuczNX.js} +2 -2
- package/dist/{app-CoqqIDQ3.js → app-BTQMPUaZ.js} +67 -67
- package/dist/app.js +1 -1
- package/dist/{base.export-DqEcPcVG.js → base.export-BvF6HW_b.js} +2 -2
- package/dist/{business-BVKDfmTr.js → business-1bynM2S3.js} +1 -1
- package/dist/{campaign-Da7--J1A.js → campaign-61jHDGE4.js} +2 -2
- package/dist/{campaign-MxlP6zy5.js → campaign-x2kSthOl.js} +9 -9
- package/dist/{campaign.enum-BJGwIqnr.js → campaign.enum-DPKrl7Yi.js} +1 -1
- package/dist/{campaign.fn-BGJv7UgV.js → campaign.fn-DVkjEyJa.js} +37 -37
- package/dist/{collectible.enum-DoPI9HTW.js → collectible.enum-C-25_MsY.js} +1 -1
- package/dist/{collection.fn-BGC-CX3p.js → collection.fn-CTN43Pnh.js} +2 -2
- package/dist/{currency-_6BCBk43.js → currency-CPD7bsCi.js} +1 -1
- package/dist/{duplicateCampaign-D5unmBYk.js → duplicateCampaign-BDFXsGKJ.js} +2 -2
- package/dist/{effect-wC3ZohvD.js → effect-Dm8vqK1h.js} +1 -1
- package/dist/{email-addresses-B5kmcVv4.js → email-addresses-DW8Sb8Cs.js} +2 -2
- package/dist/{helper-BmZ6rhHv.js → helper-CCZQK8H8.js} +1 -1
- package/dist/{index-CxAAIVWe.js → index-B0E21F7i.js} +2 -2
- package/dist/{index-CxXSreSU.js → index-B9nAyvGU.js} +1 -1
- package/dist/{index-znrauISZ.js → index-BG6_axTA.js} +2 -2
- package/dist/{index-D8ABsXrh.js → index-BHJFHHKZ.js} +2 -2
- package/dist/{index-C8hPuGW1.js → index-BdIWlpWJ.js} +1 -1
- package/dist/{index-BnAA5GpH.js → index-C8LcgPDt.js} +8 -8
- package/dist/{index-DfLgRlV3.js → index-CN7lBDQn.js} +4 -4
- package/dist/{index-CvWWuwF1.js → index-Cj_YiRca.js} +3 -3
- package/dist/{index-CetswdiD.js → index-CqOxyfYn.js} +1 -1
- package/dist/{index-DoS4rnIq.js → index-D-mVW2R4.js} +5 -5
- package/dist/{index-Dm9asJIh.js → index-D5th1Ref.js} +3 -3
- package/dist/{index-CAa8UDmo.js → index-DADAdGcF.js} +1 -1
- package/dist/{index-C24wjLJJ.js → index-Dpfl5fwR.js} +7 -7
- package/dist/{index-D-a-FNw6.js → index-Ru-8vt_3.js} +5 -5
- package/dist/{index-BEGcYfI1.js → index-WMXL77u3.js} +1 -1
- package/dist/{index-Bwa_8gRc.js → index-elefz7dV.js} +7 -7
- package/dist/{index-y7EaVFEs.js → index-irwaz38u.js} +5 -5
- package/dist/{index-Ctoy9OUa.js → index-pNqNL1yL.js} +1 -1
- package/dist/{index.esm2017-Db68QPII.js → index.esm2017-BFkcep8i.js} +37 -37
- package/dist/{loading-DAvs1Kcr.js → loading-DY5cgK81.js} +1 -1
- package/dist/{lodash-_fG26-Oo.js → lodash-Mri5RxId.js} +1 -1
- package/dist/{member-import-DTDMjlBF.js → member-import-Ds0mHQDO.js} +1 -1
- package/dist/{membership-DDchFhxy.js → membership-Dl9I9gta.js} +3 -3
- package/dist/{money-ZXFxZSd8.js → money-DJf18iEv.js} +1 -1
- package/dist/{number-D3iyKj4S.js → number-CDlVA7gg.js} +1 -1
- package/dist/{objectid-BZWneRxN.js → objectid-C7Jmt3kj.js} +6 -6
- package/dist/{plugins-BULEC3m-.js → plugins-BB3qsUY2.js} +3 -3
- package/dist/{reward-Zzo07ZUZ.js → reward-BDoWlsUZ.js} +1 -1
- package/dist/{rule-DafCREnD.js → rule-DZQUn3H0.js} +8 -8
- package/dist/{template-DJ_At0vS.js → template-DIsdAHue.js} +6 -6
- package/dist/{timezone-CqDQkIzR.js → timezone-DINP7HO_.js} +1 -1
- package/dist/{transaction.fn-D6R7Elvk.js → transaction.fn-CorgPho4.js} +1 -1
- package/dist/{trigger-DegZcxza.js → trigger-BAhUCSbv.js} +5 -5
- package/dist/{useMarketingMaterialActions-CHpaUSA5.js → useMarketingMaterialActions-waypQ70p.js} +3 -3
- package/dist/{usePagination-CrXA9VeI.js → usePagination-BLZ_9QGR.js} +1 -1
- package/dist/{user-B-r3liHf.js → user-PO61yniX.js} +1 -1
- package/dist/{vue-i18n-CJaAc0Dm.js → vue-i18n-CfOCSTEg.js} +376 -376
- package/dist/{xlsx-CjOaxmU4.js → xlsx-Cu-uiqcb.js} +224 -224
- package/dist/{zod-CJ5R-AQU.js → zod-BM3CuDZq.js} +1 -1
- package/package.json +1 -1
- package/dist/MemberList-kCvn0Ox5.js +0 -336
package/package.json
CHANGED
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
import { defineComponent as xe, ref as E, computed as ve, onMounted as Me, resolveComponent as I, openBlock as ne, createElementBlock as Ne, createElementVNode as Fe, createVNode as y, unref as s, withDirectives as Ee, vShow as Ie, createBlock as De, createCommentVNode as Ve, h as d } from "vue";
|
|
2
|
-
import { h } from "./moment-D7p2TMB-.js";
|
|
3
|
-
import { components as S } from "@feedmepos/ui-library";
|
|
4
|
-
import { e as ke, M as Be } from "./email-addresses-B5kmcVv4.js";
|
|
5
|
-
import { w as Pe } from "./xlsx-CjOaxmU4.js";
|
|
6
|
-
import "./index-CxXSreSU.js";
|
|
7
|
-
import "./index-Dm9asJIh.js";
|
|
8
|
-
import { u as Re } from "./membership-DDchFhxy.js";
|
|
9
|
-
import { u as Ye, _ as Ae } from "./MemberDetailSheet.vue_vue_type_script_setup_true_lang-DBP5lyqH.js";
|
|
10
|
-
import { f as x } from "./number-D3iyKj4S.js";
|
|
11
|
-
import { u as Le } from "./loading-DAvs1Kcr.js";
|
|
12
|
-
import { t as Oe } from "./money-ZXFxZSd8.js";
|
|
13
|
-
import { u as ze } from "./business-BVKDfmTr.js";
|
|
14
|
-
import { u as Ke, _ as je } from "./usePagination-CrXA9VeI.js";
|
|
15
|
-
import { g as Ue, a as $e, b as qe } from "./user-B-r3liHf.js";
|
|
16
|
-
import { useRouter as Je } from "vue-router";
|
|
17
|
-
import { m as D } from "./index-CxAAIVWe.js";
|
|
18
|
-
import { R as Ge } from "./app-CoqqIDQ3.js";
|
|
19
|
-
import { o as se } from "./objectId-dwaoBfJX.js";
|
|
20
|
-
const He = { class: "flex items-center justify-end" }, bt = /* @__PURE__ */ xe({
|
|
21
|
-
__name: "MemberList",
|
|
22
|
-
setup(Qe) {
|
|
23
|
-
const ie = Ye(), u = Re(), v = ze(), { minor: re } = Le, le = Je(), ce = [
|
|
24
|
-
{
|
|
25
|
-
header: "Name",
|
|
26
|
-
enableSorting: !0,
|
|
27
|
-
accessorKey: "name",
|
|
28
|
-
cell(t) {
|
|
29
|
-
return Ue(t.row.original);
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
header: "Phone",
|
|
34
|
-
enableSorting: !0,
|
|
35
|
-
accessorKey: "phoneNumber"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
accessorFn: (t) => h(t.joinAt || se(t._id.toString())).format("D MMM YYYY"),
|
|
39
|
-
header: "Customer Since",
|
|
40
|
-
accessorKey: "_id",
|
|
41
|
-
id: "_id"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
accessorKey: "collection_TIER_0_balance",
|
|
45
|
-
header: "Tier",
|
|
46
|
-
enableSorting: !0,
|
|
47
|
-
cell(t) {
|
|
48
|
-
return $e(
|
|
49
|
-
t.row.original,
|
|
50
|
-
u.sortedTiers
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
header: "Title",
|
|
56
|
-
enableSorting: !1,
|
|
57
|
-
cell(t) {
|
|
58
|
-
return qe(
|
|
59
|
-
t.row.original,
|
|
60
|
-
u.sortedTitles
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
accessorKey: "collection_CREDIT_0_balance",
|
|
66
|
-
accessorFn: (t) => {
|
|
67
|
-
var a, o, n;
|
|
68
|
-
return x(((n = (o = (a = t.collection) == null ? void 0 : a.CREDIT) == null ? void 0 : o[0]) == null ? void 0 : n.balance) ?? 0, 2);
|
|
69
|
-
},
|
|
70
|
-
header: "Credit(s)",
|
|
71
|
-
enableSorting: !0
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
accessorKey: "collection_POINT_0_balance",
|
|
75
|
-
accessorFn: (t) => {
|
|
76
|
-
var a, o, n;
|
|
77
|
-
return x(((n = (o = (a = t.collection) == null ? void 0 : a.POINT) == null ? void 0 : o[0]) == null ? void 0 : n.balance) ?? 0, 2);
|
|
78
|
-
},
|
|
79
|
-
header: "Experience(s)",
|
|
80
|
-
enableSorting: !0
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
accessorKey: "collection_COIN_0_balance",
|
|
84
|
-
accessorFn: (t) => {
|
|
85
|
-
var a, o, n;
|
|
86
|
-
return x(((n = (o = (a = t.collection) == null ? void 0 : a.COIN) == null ? void 0 : o[0]) == null ? void 0 : n.balance) ?? 0, 2);
|
|
87
|
-
},
|
|
88
|
-
header: "Point(s)",
|
|
89
|
-
enableSorting: !0
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
accessorFn: (t) => {
|
|
93
|
-
var a;
|
|
94
|
-
return ((a = t.stats) == null ? void 0 : a.visitCount) ?? 0;
|
|
95
|
-
},
|
|
96
|
-
header: "Total visit",
|
|
97
|
-
accessorKey: "stats.visitCount",
|
|
98
|
-
id: "stats.visitCount"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
accessorFn: (t) => {
|
|
102
|
-
var a;
|
|
103
|
-
return (a = t.stats) == null ? void 0 : a.lastVisit;
|
|
104
|
-
},
|
|
105
|
-
sortingFn: (t, a) => {
|
|
106
|
-
var o, n;
|
|
107
|
-
return new Date((o = t.original.stats) == null ? void 0 : o.lastVisit).getTime() - new Date((n = a.original.stats) == null ? void 0 : n.lastVisit).getTime();
|
|
108
|
-
},
|
|
109
|
-
id: "stats.lastVisit",
|
|
110
|
-
header: "Last visit",
|
|
111
|
-
cell(t) {
|
|
112
|
-
var a, o;
|
|
113
|
-
return d("div", { class: "flex items-center justify-end gap-4" }, [
|
|
114
|
-
d(
|
|
115
|
-
"span",
|
|
116
|
-
(a = t.row.original.stats) != null && a.lastVisit ? h((o = t.row.original.stats) == null ? void 0 : o.lastVisit).fromNow() : "NA"
|
|
117
|
-
),
|
|
118
|
-
d(
|
|
119
|
-
S.FmTooltip,
|
|
120
|
-
{
|
|
121
|
-
content: h(t.row.original.stats.lastVisit).format(
|
|
122
|
-
"D MMM YYYY - hh:mmA"
|
|
123
|
-
)
|
|
124
|
-
},
|
|
125
|
-
[d(S.FmIcon, { name: "info", outline: !0, size: "sm" })]
|
|
126
|
-
)
|
|
127
|
-
]);
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
id: "actions",
|
|
132
|
-
cell(t) {
|
|
133
|
-
return d(
|
|
134
|
-
S.FmMenu,
|
|
135
|
-
{
|
|
136
|
-
placement: "bottom-end",
|
|
137
|
-
onClick: (a) => {
|
|
138
|
-
a.stopPropagation();
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"menu-button": () => d(S.FmButton, { icon: "more_vert", variant: "tertiary" }),
|
|
143
|
-
default: () => [
|
|
144
|
-
d(S.FmMenuItem, {
|
|
145
|
-
label: "Transaction details",
|
|
146
|
-
onClick: async (a) => {
|
|
147
|
-
a.stopPropagation(), await be(t.row.original._id);
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
], { tableMeta: l, rowData: de, onSort: ue, debouncedFetchData: M, onSearch: me } = Ke(D.read), V = E(), _ = E(!1), m = E(), pe = ve(() => v.locations.map((t) => ({
|
|
156
|
-
label: t.name,
|
|
157
|
-
value: t._id
|
|
158
|
-
})));
|
|
159
|
-
async function fe() {
|
|
160
|
-
m.value = await D.readById(
|
|
161
|
-
m.value._id.toString()
|
|
162
|
-
), _.value = !0;
|
|
163
|
-
}
|
|
164
|
-
async function ge() {
|
|
165
|
-
await M(), _.value = !1;
|
|
166
|
-
}
|
|
167
|
-
async function be(t) {
|
|
168
|
-
await le.push({
|
|
169
|
-
name: Ge["$connect-LOYALTY_MEMBER_TRANSACTIONS"],
|
|
170
|
-
params: { id: t }
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
const N = {
|
|
174
|
-
sortBy: "_id",
|
|
175
|
-
descending: !1,
|
|
176
|
-
rowsPerPage: 1e3
|
|
177
|
-
};
|
|
178
|
-
function F(t) {
|
|
179
|
-
const a = h(t);
|
|
180
|
-
return a.isValid() ? a.format("DD/MM/YYYY") : "";
|
|
181
|
-
}
|
|
182
|
-
async function he() {
|
|
183
|
-
const t = new Be(), a = N.rowsPerPage;
|
|
184
|
-
await re(
|
|
185
|
-
async () => {
|
|
186
|
-
var T, r, p, k, B, P, R, Y, A, L, O, z, K, j, U, $, q, J, G, H, Q, W, X, Z, ee;
|
|
187
|
-
let o, n = !0;
|
|
188
|
-
for (; n; ) {
|
|
189
|
-
const C = await D.readCursor({
|
|
190
|
-
limit: a,
|
|
191
|
-
sortBy: N.sortBy,
|
|
192
|
-
descending: N.descending,
|
|
193
|
-
...o ? { cursor: o } : {}
|
|
194
|
-
});
|
|
195
|
-
if (!C.resources.length)
|
|
196
|
-
break;
|
|
197
|
-
for (const e of C.resources) {
|
|
198
|
-
const Se = (T = ke.parseOneAddress(
|
|
199
|
-
e == null ? void 0 : e.email
|
|
200
|
-
)) != null && T.domain.includes("feedmepos.com") ? void 0 : e.email, _e = (p = ((r = e == null ? void 0 : e.collection) == null ? void 0 : r.TITLE) || []) == null ? void 0 : p.reduce(
|
|
201
|
-
(i, c) => {
|
|
202
|
-
var g, b;
|
|
203
|
-
const f = (b = (g = u.sortedTitles) == null ? void 0 : g.find(
|
|
204
|
-
(w) => w._id === c.collectible
|
|
205
|
-
)) == null ? void 0 : b.name;
|
|
206
|
-
return !f || c.balance <= 0 || i.push(f), i;
|
|
207
|
-
},
|
|
208
|
-
[]
|
|
209
|
-
), Te = (u.sortedTitles || []).reduce(
|
|
210
|
-
(i, c) => {
|
|
211
|
-
var g, b, w, oe;
|
|
212
|
-
const f = (oe = (w = (b = (((g = e == null ? void 0 : e.collection) == null ? void 0 : g.TITLE) || []).find(
|
|
213
|
-
(ye) => ye.collectible === c._id
|
|
214
|
-
)) == null ? void 0 : b.expiryBalance) == null ? void 0 : w[0]) == null ? void 0 : oe.expiredAt;
|
|
215
|
-
return i[c.name] = f ? h(f).format("DD/MM/YYYY") : "", i;
|
|
216
|
-
},
|
|
217
|
-
{}
|
|
218
|
-
), Ce = ((P = (B = (k = e.collection) == null ? void 0 : k.CREDIT) == null ? void 0 : B.at(0)) == null ? void 0 : P.balance) || 0, te = ((L = (A = (Y = (R = e.collection) == null ? void 0 : R.CREDIT) == null ? void 0 : Y.at(0)) == null ? void 0 : A.expiryBalance) == null ? void 0 : L.reduce(
|
|
219
|
-
(i, c) => i + c.amount,
|
|
220
|
-
0
|
|
221
|
-
)) || 0, ae = x(Ce, 2), we = {
|
|
222
|
-
ID: e._id.toString(),
|
|
223
|
-
Name: ((O = e.name) == null ? void 0 : O.trim()) || "",
|
|
224
|
-
Phone: ((z = e == null ? void 0 : e.phoneNumber) == null ? void 0 : z.trim()) || "",
|
|
225
|
-
Email: Se || "",
|
|
226
|
-
Gender: e.gender || "",
|
|
227
|
-
CardNo: e.cardNo || "",
|
|
228
|
-
Birthday: e != null && e.birthday ? F(e == null ? void 0 : e.birthday) : "",
|
|
229
|
-
Credit: (Number(ae) - Number(te)).toFixed(2),
|
|
230
|
-
FreeCredit: Number(te.toFixed(2)),
|
|
231
|
-
TotalCredit: Number(ae),
|
|
232
|
-
Exp: e != null && e.collection ? ((U = (j = (K = e.collection) == null ? void 0 : K.POINT) == null ? void 0 : j.at(0)) == null ? void 0 : U.balance) ?? 0 : 0,
|
|
233
|
-
Point: e != null && e.collection ? ((J = (q = ($ = e.collection) == null ? void 0 : $.COIN) == null ? void 0 : q.at(0)) == null ? void 0 : J.balance) ?? 0 : 0,
|
|
234
|
-
Tier: e != null && e.collection ? ((Q = (H = (G = e.collection) == null ? void 0 : G.TIER) == null ? void 0 : H.at(0)) == null ? void 0 : Q.balance) ?? 0 : 0,
|
|
235
|
-
Titles: _e.join(","),
|
|
236
|
-
...Te,
|
|
237
|
-
TotalTransaction: e.stats.visitCount,
|
|
238
|
-
AvgSpent: Oe(Number(e.stats.avgBillSize || 0)).toFormat(
|
|
239
|
-
!1
|
|
240
|
-
),
|
|
241
|
-
TotalSpent: e.stats.avgBillSize * e.stats.visitCount,
|
|
242
|
-
LastVisit: F(e.stats.lastVisit),
|
|
243
|
-
Feedback: ((W = e.stats) == null ? void 0 : W.feedbackCount) || 0,
|
|
244
|
-
LastSeasonTierEarned: ((X = e.stats) == null ? void 0 : X.lastSeasonTierEarned) || 0,
|
|
245
|
-
LastSeasonPointEarned: ((Z = e.stats) == null ? void 0 : Z.lastSeasonPointEarned) || 0,
|
|
246
|
-
JoinedAt: F(e.joinAt || se(e._id)),
|
|
247
|
-
JoinedAtLocation: e.location && ((ee = pe.value.find((i) => i.value == e.location)) == null ? void 0 : ee.label) || "-",
|
|
248
|
-
VisitFrequency: `${Number(
|
|
249
|
-
Math.ceil(e.stats.avgVisitFrequency).toFixed(0)
|
|
250
|
-
)}`
|
|
251
|
-
};
|
|
252
|
-
t.addRecord(we);
|
|
253
|
-
}
|
|
254
|
-
o = C.meta.nextCursor ?? void 0, n = C.meta.hasNext && !!o;
|
|
255
|
-
}
|
|
256
|
-
await Pe(
|
|
257
|
-
t.buildExcel(),
|
|
258
|
-
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
259
|
-
{
|
|
260
|
-
bookType: "xlsx",
|
|
261
|
-
bookSST: !1,
|
|
262
|
-
type: "array"
|
|
263
|
-
}
|
|
264
|
-
);
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
message: "Exporting member...",
|
|
268
|
-
successMessage: "Member exported successfully"
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
return Me(async () => {
|
|
273
|
-
await u.readMembership(), await v.readLocations(), await ie.read(), await v.readLocations(), await M();
|
|
274
|
-
}), (t, a) => {
|
|
275
|
-
const o = I("FmSearch"), n = I("FmButton"), T = I("FmSnackbar");
|
|
276
|
-
return ne(), Ne("div", null, [
|
|
277
|
-
Fe("div", He, [
|
|
278
|
-
y(o, {
|
|
279
|
-
class: "mt-4",
|
|
280
|
-
modelValue: s(l).searchValue,
|
|
281
|
-
"onUpdate:modelValue": [
|
|
282
|
-
a[0] || (a[0] = (r) => s(l).searchValue = r),
|
|
283
|
-
s(me)
|
|
284
|
-
],
|
|
285
|
-
placeholder: "Search",
|
|
286
|
-
collapsible: ""
|
|
287
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
288
|
-
y(n, {
|
|
289
|
-
icon: "ios_share",
|
|
290
|
-
variant: "tertiary",
|
|
291
|
-
onClick: he
|
|
292
|
-
})
|
|
293
|
-
]),
|
|
294
|
-
Ee(y(T, {
|
|
295
|
-
"z-index": 0,
|
|
296
|
-
class: "!max-w-full my-16",
|
|
297
|
-
title: "Info",
|
|
298
|
-
description: "Current list is not up to date, please refresh table for latest data.",
|
|
299
|
-
variant: "info",
|
|
300
|
-
dismissable: "",
|
|
301
|
-
onOnDismiss: a[1] || (a[1] = (r) => _.value = !1),
|
|
302
|
-
action: "Refresh",
|
|
303
|
-
onOnAction: ge
|
|
304
|
-
}, null, 512), [
|
|
305
|
-
[Ie, s(_)]
|
|
306
|
-
]),
|
|
307
|
-
y(je, {
|
|
308
|
-
loading: s(l).isLoading,
|
|
309
|
-
"row-data": s(de),
|
|
310
|
-
"row-count": s(l).totalRows,
|
|
311
|
-
"column-defs": ce,
|
|
312
|
-
"shrink-at": !1,
|
|
313
|
-
"page-count": s(l).pageCount,
|
|
314
|
-
"page-index": s(l).pageIndex,
|
|
315
|
-
"page-size": s(l).pageSize,
|
|
316
|
-
onSortChange: s(ue),
|
|
317
|
-
onPageChange: a[2] || (a[2] = (r) => s(M)({ pageSize: r.pageSize, pageIndex: r.pageIndex })),
|
|
318
|
-
onRowClick: a[3] || (a[3] = (r) => {
|
|
319
|
-
var p;
|
|
320
|
-
m.value = r.original, (p = s(V)) == null || p.showSheet();
|
|
321
|
-
})
|
|
322
|
-
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
323
|
-
s(m) ? (ne(), De(Ae, {
|
|
324
|
-
key: 0,
|
|
325
|
-
ref_key: "sheetRef",
|
|
326
|
-
ref: V,
|
|
327
|
-
member: s(m),
|
|
328
|
-
"onUpdate:member": fe
|
|
329
|
-
}, null, 8, ["member"])) : Ve("", !0)
|
|
330
|
-
]);
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
export {
|
|
335
|
-
bt as default
|
|
336
|
-
};
|