@feedmepos/mf-connect 0.1.98-beta.67 → 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.
Files changed (118) hide show
  1. package/dist/{App-BSev7h5h.js → App-BiKMxixG.js} +8 -8
  2. package/dist/{AuditLogs-DeAlB7jJ.js → AuditLogs-hcUTD8r2.js} +11 -11
  3. package/dist/{Bin-DVjlBYHA.js → Bin-BEIYu4Wb.js} +8 -8
  4. package/dist/{Broadcast-BbI01idN.js → Broadcast-CdsOnoex.js} +11 -11
  5. package/dist/{CampaignAnalytic-DLua9bnk.js → CampaignAnalytic-tfJk4uHv.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BrLZYx65.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DCfa5b54.js} +6 -6
  7. package/dist/{Card-CXmIDEWx.js → Card-DD2E58eg.js} +21 -21
  8. package/dist/{Collections-CJrEprz_.js → Collections-BJ3-qcPo.js} +8 -8
  9. package/dist/{Credit-C6wBp6uU.js → Credit-CaNsiUeh.js} +12 -12
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-UrdGjhUi.js → DateRangeChip.vue_vue_type_script_setup_true_lang-BYl60g2P.js} +1 -1
  11. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BG9D3F4H.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CVnXbrDQ.js} +35 -35
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DSYTcCUw.js → EffectSheet.vue_vue_type_style_index_0_lang-C6j2U0CU.js} +6 -6
  13. package/dist/{Experience-BBpp7fol.js → Experience-WVRmN3BW.js} +12 -12
  14. package/dist/{FileSaver.min-8iG7SnPC.js → FileSaver.min-B0P2vo_g.js} +1 -1
  15. package/dist/{Game-g-w7u2yx.js → Game-B72C_2ZX.js} +13 -13
  16. package/dist/{GiftCardSetup-CH7TErmR.js → GiftCardSetup-BXrBTdxF.js} +193 -191
  17. package/dist/{Grab-C2kR_R20.js → Grab-DkkVMS8x.js} +9 -9
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CtZnT23g.js → ImageInput.vue_vue_type_script_setup_true_lang-DOz5RTkO.js} +1 -1
  19. package/dist/{Index-C8qjv_-U.js → Index-CsTSWAqg.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BKC1fy9_.js → LocationPicker.vue_vue_type_script_setup_true_lang-Bqjz1_TS.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BVLD4gvt.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CDy7s43a.js} +1 -1
  22. package/dist/{LoyaltyDashboard-8k50en91.js → LoyaltyDashboard-Cv1bGSmQ.js} +13 -13
  23. package/dist/{MainLayout-TeVUFA9q.js → MainLayout-fHF57JEF.js} +3 -3
  24. package/dist/{Marketing-J991msMm.js → Marketing-DSR9Ltbm.js} +4 -4
  25. package/dist/{MarketingMaterialEdit-DAoAumQY.js → MarketingMaterialEdit-DPiuYUe2.js} +6 -6
  26. package/dist/{Member-CNZ_0ILJ.js → Member-DS0JP4GM.js} +7 -7
  27. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-Cc3HniMJ.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-Pf9idXlV.js} +23 -31
  28. package/dist/{MemberImportHistory-Dv-oxNaB.js → MemberImportHistory-DhWnUZlE.js} +7 -7
  29. package/dist/MemberList-BxVGAat6.js +334 -0
  30. package/dist/{MemberTransactions-CLM8Dfnw.js → MemberTransactions-Brwauef3.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-BhtSy-i_.js → MessageInput.vue_vue_type_script_setup_true_lang-B9t6HRkS.js} +10 -10
  32. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-BhRIG5Sb.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-pUeLVYJs.js} +1 -1
  33. package/dist/{Mission-BFPp5W38.js → Mission-BU_Broks.js} +13 -13
  34. package/dist/{Overview-CYxji5bG.js → Overview-BCb7SrPX.js} +19 -19
  35. package/dist/{Overview-nh5EBZWQ.js → Overview-Nx3E9gxA.js} +4 -4
  36. package/dist/{Point-zrXRlJBE.js → Point-DxHE0zpA.js} +12 -12
  37. package/dist/{Promotion-CJOmHUUE.js → Promotion-DkXyrAWE.js} +13 -13
  38. package/dist/{Queue-2nn-uJml.js → Queue-DcqW6gFI.js} +11 -11
  39. package/dist/{Record-1keVaDI0.js → Record-T7-Qn-BL.js} +9 -9
  40. package/dist/{Review-Bh78oO8W.js → Review-C0ORLjPk.js} +2 -2
  41. package/dist/{ReviewFacebookCallback-pgVpv6Rz.js → ReviewFacebookCallback-BamFJii5.js} +5 -5
  42. package/dist/{ReviewGoogleCallback--t-5fBRo.js → ReviewGoogleCallback-BbogEq-S.js} +5 -5
  43. package/dist/{Reward-BDLRE4Ty.js → Reward-Bs3PlUm1.js} +16 -16
  44. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-C6MnG83y.js → RewardGroup.vue_vue_type_script_setup_true_lang-bt1XYaTg.js} +12 -12
  45. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-ClVcFvYb.js → RuleGroup.vue_vue_type_script_setup_true_lang-BIhuiOQp.js} +226 -210
  46. package/dist/{Segment-g1uo_rdU.js → Segment-ByHZvxzf.js} +275 -277
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BW6lP_bM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-Chb-W_Sp.js} +13 -13
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Dtq7WzFQ.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-v8tQQ_3M.js} +4 -4
  49. package/dist/{Setting-DEndwisq.js → Setting-CDDQh6Km.js} +14 -14
  50. package/dist/{SettingAdvertisements-CWDzsn2m.js → SettingAdvertisements-vNfSi0PM.js} +12 -12
  51. package/dist/{Settings-D7mPuTyg.js → Settings-Dr9vVMqi.js} +5 -5
  52. package/dist/{Store-BLTx3yC4.js → Store-6jIdhWvV.js} +25 -25
  53. package/dist/{StoreRewards-B3ku_1XV.js → StoreRewards-Bi-vUQa8.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-EypHnz-D.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D_goMUgu.js} +24 -24
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BDPcr_0_.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Dg1Caqaz.js} +2 -2
  56. package/dist/{Tier-HbcNZUPQ.js → Tier-DQxy11b5.js} +1418 -1299
  57. package/dist/{Title-M0r9f4da.js → Title-BrYUm3dJ.js} +21 -21
  58. package/dist/{Transaction-CPtRweMn.js → Transaction-BKaL8ft5.js} +2 -2
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DozDy5mg.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DO6LZkqJ.js} +6 -6
  60. package/dist/{Voucher-CWHQl9v6.js → Voucher-fevudt4N.js} +14 -14
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CzqRhz3w.js → VoucherEditor.vue_vue_type_script_setup_true_lang-Cr4_aclC.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DpglwR2d.js → ZodTextField.vue_vue_type_script_setup_true_lang-CeOuczNX.js} +2 -2
  63. package/dist/{app-Msk98KJg.js → app-BTQMPUaZ.js} +167 -167
  64. package/dist/app.js +1 -1
  65. package/dist/{base.export-CoamCPN5.js → base.export-BvF6HW_b.js} +2 -2
  66. package/dist/{business-BucV5x26.js → business-1bynM2S3.js} +1 -1
  67. package/dist/{campaign-iVpaTK-0.js → campaign-61jHDGE4.js} +2 -2
  68. package/dist/{campaign-CzXbdwtP.js → campaign-x2kSthOl.js} +9 -9
  69. package/dist/{campaign.enum-CP4mlX7i.js → campaign.enum-DPKrl7Yi.js} +1 -1
  70. package/dist/{campaign.fn-DEZEgo-y.js → campaign.fn-DVkjEyJa.js} +37 -37
  71. package/dist/{collectible.enum-BXTBO2A6.js → collectible.enum-C-25_MsY.js} +1 -1
  72. package/dist/{collection.fn-DHXq98H2.js → collection.fn-CTN43Pnh.js} +2 -2
  73. package/dist/{currency-CqAHuPrF.js → currency-CPD7bsCi.js} +1 -1
  74. package/dist/{duplicateCampaign-f7qa0gjH.js → duplicateCampaign-BDFXsGKJ.js} +2 -2
  75. package/dist/{effect-COCNlAdD.js → effect-Dm8vqK1h.js} +1 -1
  76. package/dist/{email-addresses-D_2IsXxB.js → email-addresses-DW8Sb8Cs.js} +2 -2
  77. package/dist/{helper-Bx3UdnpF.js → helper-CCZQK8H8.js} +1 -1
  78. package/dist/{index-BC84wkyE.js → index-B0E21F7i.js} +2 -2
  79. package/dist/{index-nvJwwmuv.js → index-B9nAyvGU.js} +1 -1
  80. package/dist/{index-DhFw6JEp.js → index-BG6_axTA.js} +2 -2
  81. package/dist/{index-BQq-p2et.js → index-BHJFHHKZ.js} +2 -2
  82. package/dist/{index-BqmcwjlW.js → index-BdIWlpWJ.js} +1 -1
  83. package/dist/{index-Chkm-r8k.js → index-C8LcgPDt.js} +8 -8
  84. package/dist/{index-D_zKtME6.js → index-CN7lBDQn.js} +4 -4
  85. package/dist/{index-J6iyiSef.js → index-Cj_YiRca.js} +3 -3
  86. package/dist/{index-gLWU_GM_.js → index-CqOxyfYn.js} +1 -1
  87. package/dist/{index-CZb4b_1X.js → index-D-mVW2R4.js} +5 -5
  88. package/dist/{index-wq_lfdmr.js → index-D5th1Ref.js} +3 -3
  89. package/dist/{index-Ch7pRizF.js → index-DADAdGcF.js} +1 -1
  90. package/dist/{index-C0TwA_Wh.js → index-Dpfl5fwR.js} +7 -7
  91. package/dist/{index-zmTCGR0q.js → index-Ru-8vt_3.js} +5 -5
  92. package/dist/{index-BI06mIEd.js → index-WMXL77u3.js} +1 -1
  93. package/dist/{index-4jnmRY1-.js → index-elefz7dV.js} +7 -7
  94. package/dist/{index-DVIxIjkI.js → index-irwaz38u.js} +99 -91
  95. package/dist/{index-CkiypoZB.js → index-pNqNL1yL.js} +1 -1
  96. package/dist/{index.esm2017-BK-m1mf7.js → index.esm2017-BFkcep8i.js} +37 -37
  97. package/dist/{loading-CrPN7IBD.js → loading-DY5cgK81.js} +1 -1
  98. package/dist/{lodash-Cq86LJZW.js → lodash-Mri5RxId.js} +1 -1
  99. package/dist/{member-import-CqguFqZB.js → member-import-Ds0mHQDO.js} +1 -1
  100. package/dist/{membership-5mxt-mKd.js → membership-Dl9I9gta.js} +3 -3
  101. package/dist/{money-1Uscav6q.js → money-DJf18iEv.js} +1 -1
  102. package/dist/{number-D-SQ4YfT.js → number-CDlVA7gg.js} +1 -1
  103. package/dist/{objectid-Dv1v2_OS.js → objectid-C7Jmt3kj.js} +6 -6
  104. package/dist/{plugins-8dMylfLG.js → plugins-BB3qsUY2.js} +3 -3
  105. package/dist/{reward-lh_oH4Qz.js → reward-BDoWlsUZ.js} +1 -1
  106. package/dist/{rule-qyNmecW-.js → rule-DZQUn3H0.js} +8 -8
  107. package/dist/{template-Bzh-c8hF.js → template-DIsdAHue.js} +6 -6
  108. package/dist/{timezone-BftWdnuB.js → timezone-DINP7HO_.js} +1 -1
  109. package/dist/{transaction.fn-14_FN92e.js → transaction.fn-CorgPho4.js} +1 -1
  110. package/dist/{trigger-DDp0mcTt.js → trigger-BAhUCSbv.js} +5 -5
  111. package/dist/{useMarketingMaterialActions-CbQrS_zG.js → useMarketingMaterialActions-waypQ70p.js} +3 -3
  112. package/dist/{usePagination-B8IZs26_.js → usePagination-BLZ_9QGR.js} +1 -1
  113. package/dist/{user-DURi-ne2.js → user-PO61yniX.js} +1 -1
  114. package/dist/{vue-i18n-CXLriG-n.js → vue-i18n-CfOCSTEg.js} +376 -376
  115. package/dist/{xlsx-1GEVBJpx.js → xlsx-Cu-uiqcb.js} +224 -224
  116. package/dist/{zod-DsZUBW2Y.js → zod-BM3CuDZq.js} +1 -1
  117. package/package.json +1 -1
  118. package/dist/MemberList-DIftEwpi.js +0 -336
@@ -1,4 +1,4 @@
1
- import { i as Z } from "./plugins-8dMylfLG.js";
1
+ import { i as Z } from "./plugins-BB3qsUY2.js";
2
2
  import { h as f } from "vue";
3
3
  function u(e, o) {
4
4
  return e.path.join(".") === o;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-connect",
3
- "version": "0.1.98-beta.67",
3
+ "version": "0.1.98-beta.69",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -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-D_2IsXxB.js";
5
- import { w as Pe } from "./xlsx-1GEVBJpx.js";
6
- import "./index-nvJwwmuv.js";
7
- import "./index-wq_lfdmr.js";
8
- import { u as Re } from "./membership-5mxt-mKd.js";
9
- import { u as Ye, _ as Ae } from "./MemberDetailSheet.vue_vue_type_script_setup_true_lang-Cc3HniMJ.js";
10
- import { f as x } from "./number-D-SQ4YfT.js";
11
- import { u as Le } from "./loading-CrPN7IBD.js";
12
- import { t as Oe } from "./money-1Uscav6q.js";
13
- import { u as ze } from "./business-BucV5x26.js";
14
- import { u as Ke, _ as je } from "./usePagination-B8IZs26_.js";
15
- import { g as Ue, a as $e, b as qe } from "./user-DURi-ne2.js";
16
- import { useRouter as Je } from "vue-router";
17
- import { m as D } from "./index-BC84wkyE.js";
18
- import { R as Ge } from "./app-Msk98KJg.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
- };