@feedmepos/mf-connect 0.1.0-beta.15 → 0.1.0-beta.17
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-BvsvVIaJ.js +424 -0
- package/dist/{App-BeD6_T_Z.js → App-B6i-kTvi.js} +40 -36
- package/dist/{Broadcast-Di-DP7MU.js → Broadcast-BMNY7jfz.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BszRUIC8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cl-VwkQw.js} +9 -8
- package/dist/Card-BUxMxMv3.js +685 -0
- package/dist/{Collections-kplzfC-n.js → Collections-fJ4dAA8O.js} +10 -9
- package/dist/{Credit-DrZdTG27.js → Credit-DeLJMW7U.js} +14 -14
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-KB_zk3f0.js +2199 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DE7rq_ro.js → EffectSheet.vue_vue_type_style_index_0_lang-Dy2q_1Kh.js} +8 -8
- package/dist/{Experience-BQz_RASv.js → Experience-DNlf2fYa.js} +8 -8
- package/dist/{Game-C5RUfcwo.js → Game-BXj3DErV.js} +15 -15
- package/dist/Index-FMFz2f9Z.js +218 -0
- package/dist/{Marketing-Ca00_q-k.js → Marketing-C8OjZOr2.js} +5 -5
- package/dist/{Member-B-9P7bbG.js → Member-BgwbYQrK.js} +4 -4
- package/dist/{MemberList-DoAOs_FC.js → MemberList-DMQUG_Kt.js} +251 -246
- package/dist/{MemberTransactions-D-qjANZL.js → MemberTransactions-CQO2cHn6.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DgWXNnd_.js → MessageInput.vue_vue_type_script_setup_true_lang-Ds_BwKa6.js} +2 -2
- package/dist/{Mission-DrKEtkuB.js → Mission-rHomcJXG.js} +15 -15
- package/dist/Overview-CmwJjXeT.js +864 -0
- package/dist/{Point-vO06ComP.js → Point-Du07BO13.js} +15 -15
- package/dist/{Promotion-DiJLB7iq.js → Promotion-B1gbbfk2.js} +53 -47
- package/dist/Record-0GtBWXRO.js +178 -0
- package/dist/Reward-aH7S8WL3.js +375 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-XdyqSqlC.js +138 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-E7ADhGR7.js +1597 -0
- package/dist/{Segment-x3OLFugO.js → Segment-Ci4BDnan.js} +65 -64
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-I2KT0px7.js +181 -0
- package/dist/{Setting-C27PXvat.js → Setting-Dc9rLPuI.js} +8 -8
- package/dist/{Store-Dn2A_coC.js → Store-B94H-jff.js} +13 -13
- package/dist/{StoreRewards-CZMCXl-k.js → StoreRewards-Cho91MDd.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DMsmMCOw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CDiZz1AW.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-j8UbHQpT.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BmEP5mI5.js} +1 -1
- package/dist/{Tier-BnbE3qLA.js → Tier-DO9pTl_C.js} +15 -15
- package/dist/{Title-BAGSqm5D.js → Title-CgQD-_3y.js} +15 -15
- package/dist/{Transaction-DWvA09mr.js → Transaction-DPmvpR7n.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CJa-Tkws.js +130 -0
- package/dist/{Voucher-CLgdPRSd.js → Voucher-Bq5Ev_fv.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeQTAvCe.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DweS66z_.js → ZodTextField.vue_vue_type_script_setup_true_lang-DLFDd3Y3.js} +1 -1
- package/dist/{app-CEoOXnMP.js → app-BT6qeigc.js} +509 -391
- package/dist/{app-DbEoLwS2.js → app-CtaeuBcs.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DIsK1ZSi.js → business-Db2WFn9o.js} +1 -1
- package/dist/{campaign-DilFl2u4.js → campaign-Bo2jmBiD.js} +2 -2
- package/dist/collectible.enum-BR9zmyJv.js +19 -0
- package/dist/{collection.fn-DOGveN-U.js → collection.fn-Drj_6HD1.js} +2 -2
- package/dist/{dto-D146MexX.js → dto-BH8EtK7z.js} +54 -54
- package/dist/{effect-BAoY-7Mo.js → effect-l8oNjQBm.js} +1 -1
- package/dist/{email-addresses-D4ptdJi7.js → email-addresses-CBqWAs9Z.js} +1 -1
- package/dist/{export-ZdS0ijA0.js → export-D6S3dr04.js} +3 -3
- package/dist/{helper-CYBvYPRB.js → helper-CS2Hx33Q.js} +1 -1
- package/dist/{index-sJUCCkLn.js → index-5mZIFDhm.js} +21 -17
- package/dist/{index-D5OipTW2.js → index-BfhjAqeE.js} +3 -3
- package/dist/{index-Dw-QQGVh.js → index-Bj5M_at2.js} +1 -1
- package/dist/{index-BJNzAvF6.js → index-BsfC7C2D.js} +1 -1
- package/dist/{index-Dwsdu9aR.js → index-C7kr1TMO.js} +209 -116
- package/dist/{index-CBd5MdRb.js → index-CATw-eQI.js} +1348 -1342
- package/dist/{index-VOFTSIqj.js → index-CVfN0Gmc.js} +2 -2
- package/dist/{index-r3--ddX3.js → index-CXEJbUAO.js} +1 -1
- package/dist/{index-fSC0-_uQ.js → index-CmN2dQk5.js} +55 -44
- package/dist/index-Ct847l9G.js +50 -0
- package/dist/index-D2d2rTPz.js +38 -0
- package/dist/{index-CyvTJWa0.js → index-DVryx2wz.js} +1 -1
- package/dist/{index-DXwoelMh.js → index-XoOcBFvx.js} +39 -35
- package/dist/{index-RKVC43XB.js → index-Z61r-lWj.js} +1 -1
- package/dist/{index.esm2017-ClQvLeXO.js → index.esm2017-Dg7M2BO7.js} +1 -1
- package/dist/{loading-DyvR-Q2q.js → loading-DxWIhKJX.js} +156 -153
- package/dist/{membership-DjHOR91O.js → membership-Df7gtzWJ.js} +51 -43
- package/dist/{money-C9nfcrN2.js → money-Ck4ZGH4F.js} +1 -1
- package/dist/{number-BH4v9H5s.js → number-D8umDJ-5.js} +1 -1
- package/dist/objectid-BGnepAUg.js +145 -0
- package/dist/reward-5b5G4KYr.js +36 -0
- package/dist/{rule-DdzmxL5G.js → rule-BcLntzKp.js} +4 -3
- package/dist/{rule-builder-C3LgxTPd.js → rule-builder-B_RDlrnZ.js} +1 -1
- package/dist/{template-CTOkKogt.js → template-C-myFW3k.js} +4 -4
- package/dist/trigger-CAK3-5M9.js +114 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/{vue-i18n-Dw456kF3.js → vue-i18n-BC0lAbnG.js} +248 -248
- package/dist/{usePagination-BLsmsO5l.js → xlsx-DNZb1t3l.js} +2962 -3183
- package/package.json +1 -1
- package/dist/Analytic-BudPZ7yo.js +0 -622
- package/dist/Card-BSUIJ4V3.js +0 -824
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DTxdtvAX.js +0 -2816
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BO8_N-Hl.js +0 -1762
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { h as
|
|
1
|
+
import { defineComponent as pe, computed as Y, ref as X, resolveComponent as _, openBlock as v, createElementBlock as V, Fragment as ee, createElementVNode as a, unref as o, createBlock as j, createCommentVNode as ae, createVNode as C, renderList as se, withCtx as ne, createTextVNode as ue, toDisplayString as M, withDirectives as Pe, vShow as Re, onMounted as Oe, isRef as Ze, h as oe } from "vue";
|
|
2
|
+
import { h as g } from "./moment-BWErdI6_.js";
|
|
3
3
|
import { useDialog as be, components as de } from "@feedmepos/ui-library";
|
|
4
|
-
import { e as et, M as tt } from "./email-addresses-
|
|
5
|
-
import {
|
|
6
|
-
import "./index-
|
|
7
|
-
import { p as Ee, b as De, u as Ye } from "./loading-
|
|
8
|
-
import { u as ye, C as Be, s as
|
|
9
|
-
import { c as
|
|
4
|
+
import { e as et, M as tt } from "./email-addresses-CBqWAs9Z.js";
|
|
5
|
+
import { w as ot } from "./xlsx-DNZb1t3l.js";
|
|
6
|
+
import "./index-BsfC7C2D.js";
|
|
7
|
+
import { p as Ee, b as De, u as Ye } from "./loading-DxWIhKJX.js";
|
|
8
|
+
import { u as ye, C as Be, s as nt } from "./membership-Df7gtzWJ.js";
|
|
9
|
+
import { c as at } from "./index-BfhjAqeE.js";
|
|
10
10
|
import { _ as Ue } from "./lodash-B5I3zXaY.js";
|
|
11
|
-
import { D as
|
|
12
|
-
import { F as
|
|
13
|
-
import { F as
|
|
14
|
-
import { C as
|
|
15
|
-
import { u as Le } from "./business-
|
|
16
|
-
import { defineStore as
|
|
17
|
-
import { m as J } from "./index-
|
|
11
|
+
import { D as st } from "./type_drinks-D6jnpvwV.js";
|
|
12
|
+
import { F as it, a as rt, b as lt, c as dt } from "./index-5mZIFDhm.js";
|
|
13
|
+
import { F as ct } from "./index-XoOcBFvx.js";
|
|
14
|
+
import { C as fe } from "./collection.fn-Drj_6HD1.js";
|
|
15
|
+
import { u as Le } from "./business-Db2WFn9o.js";
|
|
16
|
+
import { defineStore as mt } from "pinia";
|
|
17
|
+
import { m as J } from "./index-CXEJbUAO.js";
|
|
18
18
|
import { o as ze } from "./objectId-dwaoBfJX.js";
|
|
19
|
-
import { f as me } from "./number-
|
|
20
|
-
import { t as
|
|
19
|
+
import { f as me } from "./number-D8umDJ-5.js";
|
|
20
|
+
import { t as ut } from "./money-Ck4ZGH4F.js";
|
|
21
|
+
import { u as pt, _ as ft } from "./usePagination-BeF5K3M7.js";
|
|
21
22
|
import { g as bt, a as yt, b as vt } from "./user-Bm4KttFq.js";
|
|
22
23
|
import { useRouter as xt } from "vue-router";
|
|
23
|
-
import { R as gt } from "./app-
|
|
24
|
-
const Ct = { class: "flex flex-col" }, St = { key: 1 },
|
|
24
|
+
import { R as gt } from "./app-BT6qeigc.js";
|
|
25
|
+
const Ct = { class: "flex flex-col" }, St = { key: 1 }, ht = { class: "flex flex-nowrap gap-4 items-center my-[-4px]" }, Ft = { class: "flex flex-nowrap gap-8 items-center pt-24 w-full" }, _t = /* @__PURE__ */ pe({
|
|
25
26
|
__name: "MemberStatsDialog",
|
|
26
27
|
props: {
|
|
27
28
|
member: {
|
|
@@ -33,26 +34,26 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
33
34
|
required: !0
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
|
-
setup(
|
|
37
|
+
setup(b) {
|
|
37
38
|
var W, H, G, D;
|
|
38
|
-
const q = be(),
|
|
39
|
+
const q = be(), x = ye(), u = b, I = Y(
|
|
39
40
|
() => {
|
|
40
41
|
var l;
|
|
41
42
|
return (((l = u.member.collection) == null ? void 0 : l.TITLE) ?? []).reduce(
|
|
42
43
|
(r, p) => {
|
|
43
|
-
var e, d,
|
|
44
|
-
const n =
|
|
45
|
-
(
|
|
44
|
+
var e, d, y, m, h;
|
|
45
|
+
const n = x.sortedTitles.find(
|
|
46
|
+
(A) => A._id.toString() === p.collectible
|
|
46
47
|
);
|
|
47
48
|
if (!n) return r;
|
|
48
49
|
const t = [...p.expiryBalance ?? []].sort(
|
|
49
|
-
(
|
|
50
|
+
(A, U) => g(A.expiredAt).isAfter(g(U.expiredAt)) ? -1 : 1
|
|
50
51
|
);
|
|
51
|
-
return (e = t[0]) != null && e.expiredAt &&
|
|
52
|
+
return (e = t[0]) != null && e.expiredAt && g((d = t[0]) == null ? void 0 : d.expiredAt).isBefore(g()) || r.push({
|
|
52
53
|
_id: n._id,
|
|
53
54
|
name: n.name,
|
|
54
|
-
expiredAt: (
|
|
55
|
-
expiresIn:
|
|
55
|
+
expiredAt: (y = t[0]) != null && y.expiredAt ? g((m = t[0]) == null ? void 0 : m.expiredAt).toISOString() : "",
|
|
56
|
+
expiresIn: g((h = t[0]) == null ? void 0 : h.expiredAt).diff(g(), "days")
|
|
56
57
|
}), r;
|
|
57
58
|
},
|
|
58
59
|
[]
|
|
@@ -64,12 +65,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
64
65
|
tier: ((D = (G = u.member.collection) == null ? void 0 : G.TIER) == null ? void 0 : D[0].balance) ?? -1,
|
|
65
66
|
titles: I.value.map((l) => ({ expiredAt: l.expiresIn, id: l._id })) ?? void 0
|
|
66
67
|
}), $ = Y(
|
|
67
|
-
() => (
|
|
68
|
+
() => (x.sortedTitles ?? []).map((l) => ({
|
|
68
69
|
label: l.name,
|
|
69
70
|
value: l._id.toString(),
|
|
70
71
|
sublabel: I.value.some((r) => r._id === l._id) ? "Owned" : void 0
|
|
71
72
|
}))
|
|
72
|
-
), k = Y(() => (
|
|
73
|
+
), k = Y(() => (x.sortedTiers ?? []).map((l, r) => ({
|
|
73
74
|
label: l.name,
|
|
74
75
|
sublabel: `${l.option.from} - ${l.option.to}`,
|
|
75
76
|
from: l.option.from,
|
|
@@ -85,12 +86,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
85
86
|
);
|
|
86
87
|
}
|
|
87
88
|
const E = Y(() => {
|
|
88
|
-
var p, n, t, e, d,
|
|
89
|
+
var p, n, t, e, d, y;
|
|
89
90
|
const l = ((n = (p = u.member.collection) == null ? void 0 : p.TIER) == null ? void 0 : n[0].balance) ?? -1, r = ((e = (t = u.member.collection) == null ? void 0 : t.POINT) == null ? void 0 : e[0].balance) ?? 0;
|
|
90
91
|
if (l != c.value.tier) return !0;
|
|
91
92
|
if (c.value.experience && c.value.experience != r) {
|
|
92
|
-
const m = ((d = k.value[l - 1]) == null ? void 0 : d.from) ?? 0,
|
|
93
|
-
if (c.value.experience < m ||
|
|
93
|
+
const m = ((d = k.value[l - 1]) == null ? void 0 : d.from) ?? 0, h = ((y = k.value[l - 1]) == null ? void 0 : y.to) ?? 0;
|
|
94
|
+
if (c.value.experience < m || h && c.value.experience > h)
|
|
94
95
|
return !0;
|
|
95
96
|
}
|
|
96
97
|
return !1;
|
|
@@ -100,7 +101,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
100
101
|
return (r = I.value.find((p) => p._id === l)) == null ? void 0 : r.expiresIn;
|
|
101
102
|
}
|
|
102
103
|
const L = Y(() => {
|
|
103
|
-
const l =
|
|
104
|
+
const l = ct.safeParse(c.value);
|
|
104
105
|
return l.success ? void 0 : l.error.errors;
|
|
105
106
|
});
|
|
106
107
|
function N(l) {
|
|
@@ -115,16 +116,16 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
115
116
|
await u.onSubmit(c.value), q.close();
|
|
116
117
|
}
|
|
117
118
|
return (l, r) => {
|
|
118
|
-
var
|
|
119
|
-
const p =
|
|
120
|
-
return
|
|
119
|
+
var A, U;
|
|
120
|
+
const p = _("FmSelect"), n = _("FmStepperField"), t = _("FmTextField"), e = _("FmField"), d = _("FmFormGroup"), y = _("FmButton"), m = _("FmHelperText"), h = _("FmSpacer");
|
|
121
|
+
return v(), V(ee, null, [
|
|
121
122
|
a("div", Ct, [
|
|
122
123
|
r[6] || (r[6] = a("div", { class: "fm-typo-en-title-sm-800 mb-8" }, "Member tiering", -1)),
|
|
123
|
-
o(k).length ? (
|
|
124
|
+
o(k).length ? (v(), j(p, {
|
|
124
125
|
key: 0,
|
|
125
126
|
modelValue: o(c).tier,
|
|
126
127
|
"onUpdate:modelValue": [
|
|
127
|
-
r[0] || (r[0] = (
|
|
128
|
+
r[0] || (r[0] = (i) => o(c).tier = i),
|
|
128
129
|
T
|
|
129
130
|
],
|
|
130
131
|
label: "Member Tier",
|
|
@@ -132,72 +133,72 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
132
133
|
"helper-text": N("tier"),
|
|
133
134
|
"helper-state": N("tier") ? "error" : void 0
|
|
134
135
|
}, null, 8, ["modelValue", "items", "helper-text", "helper-state"])) : ae("", !0),
|
|
135
|
-
|
|
136
|
+
C(n, {
|
|
136
137
|
"model-value": o(c).experience ?? 0,
|
|
137
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
138
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => o(c).experience = i),
|
|
138
139
|
label: "Member Experience",
|
|
139
140
|
"max-fraction-digits": 0,
|
|
140
141
|
"helper-text": N("experience"),
|
|
141
142
|
"helper-state": N("experience") ? "error" : void 0
|
|
142
143
|
}, null, 8, ["model-value", "helper-text", "helper-state"]),
|
|
143
144
|
r[7] || (r[7] = a("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Member Card", -1)),
|
|
144
|
-
|
|
145
|
+
C(t, {
|
|
145
146
|
modelValue: o(c).cardNo,
|
|
146
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
147
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => o(c).cardNo = i),
|
|
147
148
|
label: "Card number",
|
|
148
149
|
"helper-text": N("cardNo"),
|
|
149
150
|
"helper-state": N("cardNo") ? "error" : void 0
|
|
150
151
|
}, null, 8, ["modelValue", "helper-text", "helper-state"]),
|
|
151
152
|
r[8] || (r[8] = a("div", { class: "fm-typo-en-title-sm-800 mt-16 mb-8" }, "Titles", -1)),
|
|
152
|
-
(
|
|
153
|
+
(A = o(c).titles) != null && A.length ? (v(), V("div", St, r[5] || (r[5] = [
|
|
153
154
|
a("div", { class: "flex flex-nowrap gap-4 items-center" }, [
|
|
154
155
|
a("div", { class: "flex-1" }, "Title"),
|
|
155
156
|
a("div", { class: "flex-1" }, "Expires in days"),
|
|
156
157
|
a("div", { class: "w-24 h-1" })
|
|
157
158
|
], -1)
|
|
158
159
|
]))) : ae("", !0),
|
|
159
|
-
(
|
|
160
|
-
a("div",
|
|
161
|
-
o(I).some((f) => f._id ===
|
|
160
|
+
(v(!0), V(ee, null, se(o(c).titles ?? [], (i, F) => (v(), V("div", { key: F }, [
|
|
161
|
+
a("div", ht, [
|
|
162
|
+
o(I).some((f) => f._id === i.id) ? (v(), j(d, {
|
|
162
163
|
key: 1,
|
|
163
164
|
"model-value": "",
|
|
164
165
|
class: "flex-1"
|
|
165
166
|
}, {
|
|
166
167
|
default: ne(() => [
|
|
167
|
-
|
|
168
|
+
C(e, {
|
|
168
169
|
disabled: !0,
|
|
169
170
|
class: "text-fm-color-typo-secondary"
|
|
170
171
|
}, {
|
|
171
172
|
default: ne(() => {
|
|
172
173
|
var f;
|
|
173
174
|
return [
|
|
174
|
-
|
|
175
|
+
ue(M((f = o($).find((w) => w.value === i.id)) == null ? void 0 : f.label), 1)
|
|
175
176
|
];
|
|
176
177
|
}),
|
|
177
178
|
_: 2
|
|
178
179
|
}, 1024)
|
|
179
180
|
]),
|
|
180
181
|
_: 2
|
|
181
|
-
}, 1024)) : (
|
|
182
|
+
}, 1024)) : (v(), j(p, {
|
|
182
183
|
key: 0,
|
|
183
|
-
modelValue:
|
|
184
|
-
"onUpdate:modelValue": [(f) =>
|
|
184
|
+
modelValue: i.id,
|
|
185
|
+
"onUpdate:modelValue": [(f) => i.id = f, (f) => i.expiredAt = S(f) ?? 1],
|
|
185
186
|
class: "flex-1",
|
|
186
187
|
items: o($).filter(
|
|
187
188
|
(f) => {
|
|
188
189
|
var w;
|
|
189
|
-
return !((w = o(c).titles) != null && w.map((P) => P.id).includes(f.value)) ||
|
|
190
|
+
return !((w = o(c).titles) != null && w.map((P) => P.id).includes(f.value)) || i.id === f.value;
|
|
190
191
|
}
|
|
191
192
|
)
|
|
192
193
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])),
|
|
193
|
-
|
|
194
|
-
modelValue:
|
|
195
|
-
"onUpdate:modelValue": (f) =>
|
|
194
|
+
C(n, {
|
|
195
|
+
modelValue: i.expiredAt,
|
|
196
|
+
"onUpdate:modelValue": (f) => i.expiredAt = f,
|
|
196
197
|
class: "flex-1",
|
|
197
198
|
label: "",
|
|
198
199
|
"max-fraction-digits": 0
|
|
199
200
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
200
|
-
|
|
201
|
+
C(y, {
|
|
201
202
|
class: "w-24 h-24",
|
|
202
203
|
icon: "close",
|
|
203
204
|
variant: "tertiary",
|
|
@@ -207,19 +208,19 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
207
208
|
}
|
|
208
209
|
}, null, 8, ["onClick"])
|
|
209
210
|
]),
|
|
210
|
-
(
|
|
211
|
+
(v(!0), V(ee, null, se(K(`titles.${F}`), (f, w) => (v(), j(m, {
|
|
211
212
|
key: w,
|
|
212
213
|
class: "items-center",
|
|
213
214
|
state: "error",
|
|
214
215
|
text: f.toString()
|
|
215
216
|
}, null, 8, ["text"]))), 128))
|
|
216
217
|
]))), 128)),
|
|
217
|
-
o($).length && (((U = o(c).titles) == null ? void 0 : U.length) ?? 0) < o($).length ? (
|
|
218
|
+
o($).length && (((U = o(c).titles) == null ? void 0 : U.length) ?? 0) < o($).length ? (v(), j(y, {
|
|
218
219
|
key: 2,
|
|
219
220
|
icon: "add",
|
|
220
221
|
label: "Give title",
|
|
221
222
|
variant: "plain",
|
|
222
|
-
onClick: r[3] || (r[3] = (
|
|
223
|
+
onClick: r[3] || (r[3] = (i) => {
|
|
223
224
|
var F;
|
|
224
225
|
return o(c).titles = [
|
|
225
226
|
...o(c).titles ?? [],
|
|
@@ -237,20 +238,20 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
237
238
|
})) : ae("", !0)
|
|
238
239
|
]),
|
|
239
240
|
a("div", Ft, [
|
|
240
|
-
Pe(
|
|
241
|
+
Pe(C(m, {
|
|
241
242
|
state: "warning",
|
|
242
243
|
text: "Updating member will cause tier to change"
|
|
243
244
|
}, null, 512), [
|
|
244
|
-
[
|
|
245
|
+
[Re, o(E)]
|
|
245
246
|
]),
|
|
246
|
-
|
|
247
|
-
|
|
247
|
+
C(h),
|
|
248
|
+
C(y, {
|
|
248
249
|
variant: "secondary",
|
|
249
250
|
label: "Cancel",
|
|
250
251
|
size: "md",
|
|
251
|
-
onClick: r[4] || (r[4] = (
|
|
252
|
+
onClick: r[4] || (r[4] = (i) => o(q).close())
|
|
252
253
|
}),
|
|
253
|
-
|
|
254
|
+
C(y, {
|
|
254
255
|
disabled: !!o(L),
|
|
255
256
|
variant: "primary",
|
|
256
257
|
label: "Submit",
|
|
@@ -261,7 +262,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
261
262
|
], 64);
|
|
262
263
|
};
|
|
263
264
|
}
|
|
264
|
-
}), Tt = { class: "fm-typo-en-title-sm-800" }, wt = { class: "space-y-16" }, kt = { class: "flex flex-nowrap gap-8 items-center justify-end pt-24 w-full" }, Mt = /* @__PURE__ */
|
|
265
|
+
}), Tt = { class: "fm-typo-en-title-sm-800" }, wt = { class: "space-y-16" }, kt = { class: "flex flex-nowrap gap-8 items-center justify-end pt-24 w-full" }, Mt = /* @__PURE__ */ pe({
|
|
265
266
|
__name: "CreditCoinDialog",
|
|
266
267
|
props: {
|
|
267
268
|
type: { type: String, required: !0 },
|
|
@@ -271,60 +272,60 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
271
272
|
required: !0
|
|
272
273
|
}
|
|
273
274
|
},
|
|
274
|
-
setup(
|
|
275
|
-
const q = be(),
|
|
275
|
+
setup(b) {
|
|
276
|
+
const q = be(), x = b, u = X({
|
|
276
277
|
amount: 1,
|
|
277
278
|
day: 1,
|
|
278
279
|
remark: void 0
|
|
279
|
-
}), I = X(!0), c = Y(() =>
|
|
280
|
+
}), I = X(!0), c = Y(() => fe.formattedType(x.type.toUpperCase()));
|
|
280
281
|
function $(E) {
|
|
281
|
-
I.value = E, !E &&
|
|
282
|
+
I.value = E, !E && x.type === "coin" && (u.value.day = void 0);
|
|
282
283
|
}
|
|
283
284
|
async function k() {
|
|
284
|
-
if (
|
|
285
|
+
if (x.action === "send") {
|
|
285
286
|
const E = u.value.day ? `, expire in ${u.value.day} days` : "";
|
|
286
287
|
Ee.confirm(
|
|
287
288
|
`Are you sure to send ${u.value.amount} ${c.value.toLowerCase()}${E}? This action cannot be reversed.`
|
|
288
289
|
).then(async (S) => {
|
|
289
|
-
S && await
|
|
290
|
+
S && await x.onSubmit(u.value);
|
|
290
291
|
});
|
|
291
292
|
} else
|
|
292
293
|
Ee.confirm(
|
|
293
294
|
`Are you sure to deduct ${u.value.amount} ${c.value.toLowerCase()}? This action cannot be reversed.`
|
|
294
295
|
).then(async (E) => {
|
|
295
|
-
E && await
|
|
296
|
+
E && await x.onSubmit(u.value);
|
|
296
297
|
});
|
|
297
298
|
}
|
|
298
299
|
const T = Y(() => {
|
|
299
|
-
const S = (
|
|
300
|
+
const S = (x.action === "send" ? x.type === "coin" ? it : rt : x.type === "coin" ? lt : dt).safeParse(u.value);
|
|
300
301
|
return S.success == !1 ? S.error.flatten().fieldErrors : void 0;
|
|
301
302
|
});
|
|
302
303
|
return (E, S) => {
|
|
303
|
-
const L =
|
|
304
|
-
return
|
|
304
|
+
const L = _("FmStepperField"), N = _("FmSwitch"), K = _("FmTextarea"), B = _("FmButton"), W = _("FmCard");
|
|
305
|
+
return v(), j(W, { class: "flex flex-col gap-16 p-16" }, {
|
|
305
306
|
default: ne(() => {
|
|
306
307
|
var H, G, D, l, r, p;
|
|
307
308
|
return [
|
|
308
|
-
a("div", Tt,
|
|
309
|
-
|
|
309
|
+
a("div", Tt, M(x.action == "send" ? "Send" : "Deduct") + " " + M(o(Be)[x.type.toUpperCase()].name), 1),
|
|
310
|
+
ue(" " + M(o(T)) + " ", 1),
|
|
310
311
|
a("div", wt, [
|
|
311
|
-
|
|
312
|
+
C(L, {
|
|
312
313
|
modelValue: o(u).amount,
|
|
313
314
|
"onUpdate:modelValue": S[0] || (S[0] = (n) => o(u).amount = n),
|
|
314
|
-
label: `${o(Be)[
|
|
315
|
+
label: `${o(Be)[x.type.toUpperCase()].name} amount`,
|
|
315
316
|
"is-currency": !0,
|
|
316
317
|
"max-fraction-digits": 2,
|
|
317
318
|
"helper-state": (H = o(T)) != null && H.amount ? "error" : void 0,
|
|
318
319
|
"helper-text": (D = (G = o(T)) == null ? void 0 : G.amount) == null ? void 0 : D[0]
|
|
319
320
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"]),
|
|
320
|
-
|
|
321
|
+
b.action === "send" && x.type === "coin" ? (v(), j(N, {
|
|
321
322
|
key: 0,
|
|
322
323
|
"model-value": o(I),
|
|
323
324
|
label: `${o(c)} expires`,
|
|
324
325
|
"label-placement": "right",
|
|
325
326
|
"onUpdate:modelValue": S[1] || (S[1] = (n) => $(n))
|
|
326
327
|
}, null, 8, ["model-value", "label"])) : ae("", !0),
|
|
327
|
-
|
|
328
|
+
b.action === "send" && o(I) ? (v(), j(L, {
|
|
328
329
|
key: 1,
|
|
329
330
|
modelValue: o(u).day,
|
|
330
331
|
"onUpdate:modelValue": S[2] || (S[2] = (n) => o(u).day = n),
|
|
@@ -336,20 +337,20 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
336
337
|
"helper-state": (l = o(T)) != null && l.day ? "error" : void 0,
|
|
337
338
|
"helper-text": (p = (r = o(T)) == null ? void 0 : r.day) == null ? void 0 : p[0]
|
|
338
339
|
}, null, 8, ["modelValue", "label", "helper-state", "helper-text"])) : ae("", !0),
|
|
339
|
-
|
|
340
|
+
C(K, {
|
|
340
341
|
modelValue: o(u).remark,
|
|
341
342
|
"onUpdate:modelValue": S[3] || (S[3] = (n) => o(u).remark = n),
|
|
342
343
|
label: "Remark"
|
|
343
344
|
}, null, 8, ["modelValue"])
|
|
344
345
|
]),
|
|
345
346
|
a("div", kt, [
|
|
346
|
-
|
|
347
|
+
C(B, {
|
|
347
348
|
variant: "secondary",
|
|
348
349
|
label: "Cancel",
|
|
349
350
|
size: "md",
|
|
350
351
|
onClick: S[4] || (S[4] = (n) => o(q).close())
|
|
351
352
|
}),
|
|
352
|
-
|
|
353
|
+
C(B, {
|
|
353
354
|
disabled: !!o(T),
|
|
354
355
|
variant: "primary",
|
|
355
356
|
label: "Submit",
|
|
@@ -363,34 +364,34 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
363
364
|
});
|
|
364
365
|
};
|
|
365
366
|
}
|
|
366
|
-
}), je =
|
|
367
|
-
const
|
|
367
|
+
}), je = mt("segment", () => {
|
|
368
|
+
const b = X([]);
|
|
368
369
|
async function q() {
|
|
369
|
-
const
|
|
370
|
+
const x = await nt.readAll({
|
|
370
371
|
limit: 1e3,
|
|
371
372
|
skip: 0,
|
|
372
373
|
sortBy: "_id",
|
|
373
374
|
descending: !0
|
|
374
375
|
});
|
|
375
|
-
|
|
376
|
+
b.value = x.resources;
|
|
376
377
|
}
|
|
377
378
|
return {
|
|
378
|
-
segments:
|
|
379
|
+
segments: b,
|
|
379
380
|
read: q
|
|
380
381
|
};
|
|
381
|
-
}), At = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, Nt = { class: "space-y-16" }, Vt = { class: "flex gap-16 items-center" }, It = { class: "flex-auto" }, $t = { class: "fm-typo-en-body-md-600" }, Et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bt = { class: "fm-typo-en-body-md-800" }, Ut = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pt = { class: "fm-typo-en-body-md-
|
|
382
|
+
}), At = { class: "flex flex-col flex-nowrap gap-y-24 max-h-full" }, Nt = { class: "space-y-16" }, Vt = { class: "flex gap-16 items-center" }, It = { class: "flex-auto" }, $t = { class: "fm-typo-en-body-md-600" }, Et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bt = { class: "fm-typo-en-body-md-800" }, Ut = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pt = { class: "fm-typo-en-body-md-800" }, Rt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ot = { class: "fm-typo-en-body-md-600" }, Yt = { class: "gap-16 grid grid-cols-2" }, Lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, zt = { class: "fm-typo-en-body-md-600" }, jt = { class: "space-y-8" }, qt = {
|
|
382
383
|
key: 0,
|
|
383
384
|
class: "space-x-8"
|
|
384
|
-
},
|
|
385
|
+
}, Kt = {
|
|
385
386
|
key: 1,
|
|
386
387
|
class: "text-fm-color-typo-secondary"
|
|
387
|
-
},
|
|
388
|
+
}, Gt = { class: "space-y-8" }, Ht = ["src"], Jt = { class: "fm-typo-en-body-md-600" }, Xt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Wt = {
|
|
388
389
|
key: 1,
|
|
389
390
|
class: "text-fm-color-typo-secondary"
|
|
390
|
-
},
|
|
391
|
+
}, Qt = {
|
|
391
392
|
key: 1,
|
|
392
393
|
class: "space-y-24"
|
|
393
|
-
},
|
|
394
|
+
}, Zt = { class: "space-y-8" }, eo = { class: "fm-typo-en-title-md-800" }, to = { class: "space-y-4" }, oo = { class: "fm-typo-en-body-md-600" }, no = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, ao = { class: "space-y-8" }, so = { class: "fm-typo-en-title-md-800" }, io = { class: "space-y-4" }, ro = { class: "fm-typo-en-body-md-600" }, lo = { class: "flex gap-24 items-center xs:flex-col xs:items-start" }, co = /* @__PURE__ */ pe({
|
|
394
395
|
__name: "MemberDetailSheet",
|
|
395
396
|
props: {
|
|
396
397
|
member: {
|
|
@@ -399,8 +400,8 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
399
400
|
}
|
|
400
401
|
},
|
|
401
402
|
emits: ["update:member"],
|
|
402
|
-
setup(
|
|
403
|
-
const u = Le(), I = ye(), c = je(), $ = be(), { minor: k } = Ye, T =
|
|
403
|
+
setup(b, { expose: q, emit: x }) {
|
|
404
|
+
const u = Le(), I = ye(), c = je(), $ = be(), { minor: k } = Ye, T = b, E = x, S = Y(() => u.locations.map((t) => ({
|
|
404
405
|
label: t.name,
|
|
405
406
|
value: t._id
|
|
406
407
|
}))), L = Y(() => (T.member.segment || []).map((t) => {
|
|
@@ -417,17 +418,17 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
417
418
|
onSubmit: async (d) => {
|
|
418
419
|
await k(
|
|
419
420
|
async () => {
|
|
420
|
-
const
|
|
421
|
+
const y = {
|
|
421
422
|
"credit-send": J.sendCredit,
|
|
422
423
|
"credit-deduct": J.deductCredit,
|
|
423
424
|
"coin-send": J.sendCoin,
|
|
424
425
|
"coin-deduct": J.deductCoin
|
|
425
|
-
}, m = `${t}-${e}`,
|
|
426
|
-
|
|
426
|
+
}, m = `${t}-${e}`, h = y[m];
|
|
427
|
+
h && await h(T.member._id, d), E("update:member"), $.close();
|
|
427
428
|
},
|
|
428
429
|
{
|
|
429
|
-
message: `Adjusting ${
|
|
430
|
-
successMessage: `${d.amount} ${
|
|
430
|
+
message: `Adjusting ${fe.formattedType(t.toUpperCase()).toLowerCase()}`,
|
|
431
|
+
successMessage: `${d.amount} ${fe.formattedType(t.toUpperCase()).toLowerCase()} ${e} ${e == "send" ? "to" : "from"} ${T.member.phoneNumber}`
|
|
431
432
|
}
|
|
432
433
|
);
|
|
433
434
|
}
|
|
@@ -437,7 +438,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
437
438
|
async function K() {
|
|
438
439
|
$.open({
|
|
439
440
|
title: "Update member statistics",
|
|
440
|
-
contentComponent:
|
|
441
|
+
contentComponent: _t,
|
|
441
442
|
contentComponentProps: {
|
|
442
443
|
member: T.member,
|
|
443
444
|
onSubmit: async (t) => {
|
|
@@ -462,9 +463,9 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
462
463
|
{
|
|
463
464
|
label: "Tier",
|
|
464
465
|
getter: (t) => {
|
|
465
|
-
var
|
|
466
|
-
const e = (((U = Ue.first((
|
|
467
|
-
return `${d} (${
|
|
466
|
+
var A, U, i, F, f;
|
|
467
|
+
const e = (((U = Ue.first((A = T.member.collection) == null ? void 0 : A.TIER)) == null ? void 0 : U.balance) || 0) - 1, d = H.value.name, y = ((F = (i = t.collection) == null ? void 0 : i.POINT) == null ? void 0 : F[0].balance) ?? 0, m = I.sortedTiers[e + 1], h = ((f = m == null ? void 0 : m.option) == null ? void 0 : f.to) ?? 1 / 0;
|
|
468
|
+
return `${d} (${y}/${h})`;
|
|
468
469
|
}
|
|
469
470
|
},
|
|
470
471
|
{
|
|
@@ -473,12 +474,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
473
474
|
},
|
|
474
475
|
{
|
|
475
476
|
label: "Birthday",
|
|
476
|
-
getter: (t) => t.birthday ?
|
|
477
|
+
getter: (t) => t.birthday ? g(t.birthday).format("D MMM YYYY") : "-"
|
|
477
478
|
}
|
|
478
479
|
], W = [
|
|
479
480
|
{
|
|
480
481
|
label: "Customer since",
|
|
481
|
-
getter: (t) =>
|
|
482
|
+
getter: (t) => g(ze(t._id.toString())).format("D MMM YYYY")
|
|
482
483
|
},
|
|
483
484
|
{
|
|
484
485
|
label: "Joined at location",
|
|
@@ -493,7 +494,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
493
494
|
},
|
|
494
495
|
{
|
|
495
496
|
label: "Last visit",
|
|
496
|
-
getter: (t) =>
|
|
497
|
+
getter: (t) => g(t.stats.lastVisit).fromNow()
|
|
497
498
|
},
|
|
498
499
|
{
|
|
499
500
|
label: "Frequency",
|
|
@@ -501,7 +502,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
501
502
|
},
|
|
502
503
|
{
|
|
503
504
|
label: "Average spend",
|
|
504
|
-
getter: (t) =>
|
|
505
|
+
getter: (t) => at.Dinero.fromNumber({ number: Number(t.stats.avgBillSize || 0) }).toFormat(
|
|
505
506
|
!0
|
|
506
507
|
)
|
|
507
508
|
}
|
|
@@ -518,23 +519,23 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
518
519
|
// key: 'lastSeasonPointEarned',
|
|
519
520
|
// },
|
|
520
521
|
], H = Y(() => {
|
|
521
|
-
var d,
|
|
522
|
-
const t = (((
|
|
522
|
+
var d, y;
|
|
523
|
+
const t = (((y = Ue.first((d = T.member.collection) == null ? void 0 : d.TIER)) == null ? void 0 : y.balance) || 0) - 1, e = I.sortedTiers[t];
|
|
523
524
|
return { name: (e == null ? void 0 : e.name) || "-", tier: t, config: e };
|
|
524
525
|
}), G = Y(() => {
|
|
525
526
|
var t;
|
|
526
527
|
return (((t = T.member.collection) == null ? void 0 : t.TITLE) || []).map((e) => {
|
|
527
|
-
var
|
|
528
|
-
const d = (
|
|
529
|
-
(
|
|
528
|
+
var y, m, h;
|
|
529
|
+
const d = (y = I.sortedTitles) == null ? void 0 : y.find(
|
|
530
|
+
(A) => A._id == e.collectible
|
|
530
531
|
);
|
|
531
532
|
return {
|
|
532
533
|
name: d == null ? void 0 : d.name,
|
|
533
|
-
expiredAt: (
|
|
534
|
+
expiredAt: (h = (m = e.expiryBalance) == null ? void 0 : m.at(-1)) == null ? void 0 : h.expiredAt,
|
|
534
535
|
collectible: d
|
|
535
536
|
};
|
|
536
537
|
}).filter(
|
|
537
|
-
(e) => e.expiredAt ?
|
|
538
|
+
(e) => e.expiredAt ? g(e.expiredAt).isAfter(g()) : !0
|
|
538
539
|
);
|
|
539
540
|
}), D = X(!0);
|
|
540
541
|
function l() {
|
|
@@ -553,160 +554,164 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
553
554
|
value: "loyalty"
|
|
554
555
|
}
|
|
555
556
|
], n = X(p[0]);
|
|
556
|
-
return
|
|
557
|
+
return Oe(async () => {
|
|
557
558
|
await I.readMembership(), u.locations.length || await u.readLocations();
|
|
558
559
|
}), q({
|
|
559
560
|
showSheet: l,
|
|
560
561
|
hideSheet: r
|
|
561
562
|
}), (t, e) => {
|
|
562
|
-
const d =
|
|
563
|
-
return
|
|
563
|
+
const d = _("FmTabs"), y = _("FmAvatar"), m = _("FmButton"), h = _("FmChip"), A = _("FmCard"), U = _("FmSideSheet");
|
|
564
|
+
return v(), j(U, {
|
|
564
565
|
modelValue: o(D),
|
|
565
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
566
|
+
"onUpdate:modelValue": e[5] || (e[5] = (i) => Ze(D) ? D.value = i : null),
|
|
566
567
|
header: "Member Detail",
|
|
567
568
|
"dismiss-away": "",
|
|
568
569
|
"close-button": !0,
|
|
569
570
|
"max-width": 550
|
|
570
571
|
}, {
|
|
571
|
-
"side-sheet-footer": ne(() => e[
|
|
572
|
+
"side-sheet-footer": ne(() => e[20] || (e[20] = [])),
|
|
572
573
|
default: ne(() => [
|
|
573
574
|
a("div", At, [
|
|
574
|
-
|
|
575
|
+
C(d, {
|
|
575
576
|
"model-value": o(n).value,
|
|
576
577
|
items: p,
|
|
577
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
578
|
+
"onUpdate:modelValue": e[0] || (e[0] = (i) => n.value = p.find((F) => F.value === i))
|
|
578
579
|
}, null, 8, ["model-value"]),
|
|
579
|
-
o(n).value == "overview" ? (
|
|
580
|
-
e[
|
|
580
|
+
o(n).value == "overview" ? (v(), V(ee, { key: 0 }, [
|
|
581
|
+
e[11] || (e[11] = a("div", { class: "fm-typo-en-title-sm-800" }, "Profile Information", -1)),
|
|
581
582
|
a("div", Nt, [
|
|
582
583
|
a("div", Vt, [
|
|
583
|
-
|
|
584
|
-
name:
|
|
585
|
-
src:
|
|
584
|
+
C(y, {
|
|
585
|
+
name: b.member.photoUrl ? void 0 : b.member.name,
|
|
586
|
+
src: b.member.photoUrl || void 0
|
|
586
587
|
}, null, 8, ["name", "src"]),
|
|
587
588
|
a("div", It, [
|
|
588
|
-
e[
|
|
589
|
-
a("div", $t,
|
|
590
|
-
a("div", Et,
|
|
589
|
+
e[8] || (e[8] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Member Name ", -1)),
|
|
590
|
+
a("div", $t, M(b.member.name), 1),
|
|
591
|
+
a("div", Et, M(b.member._id), 1),
|
|
591
592
|
a("div", Dt, [
|
|
592
|
-
e[6] || (e[6] =
|
|
593
|
-
a("span", Bt,
|
|
593
|
+
e[6] || (e[6] = ue(" Member Card: ")),
|
|
594
|
+
a("span", Bt, M(b.member.cardNo ? b.member.cardNo : "-"), 1)
|
|
595
|
+
]),
|
|
596
|
+
a("div", Ut, [
|
|
597
|
+
e[7] || (e[7] = ue(" Referral Code: ")),
|
|
598
|
+
a("span", Pt, M(b.member.referralCode ? b.member.referralCode : "-"), 1)
|
|
594
599
|
])
|
|
595
600
|
]),
|
|
596
|
-
|
|
601
|
+
C(m, {
|
|
597
602
|
variant: "tertiary",
|
|
598
603
|
icon: "settings",
|
|
599
604
|
onClick: K
|
|
600
605
|
})
|
|
601
606
|
]),
|
|
602
|
-
(
|
|
603
|
-
a("div",
|
|
604
|
-
a("div",
|
|
607
|
+
(v(), V(ee, null, se(B, (i, F) => a("div", { key: F }, [
|
|
608
|
+
a("div", Rt, M(i.label), 1),
|
|
609
|
+
a("div", Ot, M(i.key ? b.member[i.key] : i.getter(b.member)), 1)
|
|
605
610
|
])), 64))
|
|
606
611
|
]),
|
|
607
|
-
e[
|
|
608
|
-
e[
|
|
609
|
-
a("div",
|
|
610
|
-
(
|
|
611
|
-
key:
|
|
612
|
+
e[12] || (e[12] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
613
|
+
e[13] || (e[13] = a("div", { class: "fm-typo-en-title-sm-800" }, "Activities", -1)),
|
|
614
|
+
a("div", Yt, [
|
|
615
|
+
(v(), V(ee, null, se(W, (i) => a("div", {
|
|
616
|
+
key: i.key
|
|
612
617
|
}, [
|
|
613
|
-
a("div",
|
|
614
|
-
a("div",
|
|
618
|
+
a("div", Lt, M(i.label), 1),
|
|
619
|
+
a("div", zt, M(i.key ? T.member.stats[i.key] || "-" : i.getter(b.member)), 1)
|
|
615
620
|
])), 64))
|
|
616
621
|
]),
|
|
617
|
-
e[
|
|
618
|
-
a("div",
|
|
619
|
-
e[
|
|
620
|
-
o(L).length ? (
|
|
621
|
-
(
|
|
622
|
-
label:
|
|
622
|
+
e[14] || (e[14] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
623
|
+
a("div", jt, [
|
|
624
|
+
e[9] || (e[9] = a("div", { class: "fm-typo-en-title-sm-800" }, "Segments", -1)),
|
|
625
|
+
o(L).length ? (v(), V("div", qt, [
|
|
626
|
+
(v(!0), V(ee, null, se(o(L), (i) => (v(), j(h, {
|
|
627
|
+
label: i.toString()
|
|
623
628
|
}, null, 8, ["label"]))), 256))
|
|
624
|
-
])) : (
|
|
629
|
+
])) : (v(), V("div", Kt, "No titles"))
|
|
625
630
|
]),
|
|
626
|
-
e[
|
|
627
|
-
a("div",
|
|
628
|
-
e[
|
|
629
|
-
o(G).length ? (
|
|
631
|
+
e[15] || (e[15] = a("div", { class: "border-fm-color-neutral-gray-100 rounded-sm border-t" }, null, -1)),
|
|
632
|
+
a("div", Gt, [
|
|
633
|
+
e[10] || (e[10] = a("div", { class: "fm-typo-en-title-sm-800" }, "Title badge", -1)),
|
|
634
|
+
o(G).length ? (v(!0), V(ee, { key: 0 }, se(o(G).filter((i) => i.collectible), (i) => (v(), V("div", {
|
|
630
635
|
class: "flex items-center gap-x-8 h-48",
|
|
631
|
-
key:
|
|
636
|
+
key: i.name
|
|
632
637
|
}, [
|
|
633
638
|
a("img", {
|
|
634
|
-
src:
|
|
639
|
+
src: i.collectible.image || o(st),
|
|
635
640
|
class: "aspect-square h-full object-contain"
|
|
636
|
-
}, null, 8,
|
|
641
|
+
}, null, 8, Ht),
|
|
637
642
|
a("div", null, [
|
|
638
|
-
a("div",
|
|
639
|
-
a("div",
|
|
643
|
+
a("div", Jt, M(i.name), 1),
|
|
644
|
+
a("div", Xt, " Expired on " + M(o(g)(i.expiredAt).format("MMM D, Y")), 1)
|
|
640
645
|
])
|
|
641
|
-
]))), 128)) : (
|
|
646
|
+
]))), 128)) : (v(), V("div", Wt, "No titles"))
|
|
642
647
|
])
|
|
643
|
-
], 64)) : o(n).value == "loyalty" ? (
|
|
644
|
-
|
|
648
|
+
], 64)) : o(n).value == "loyalty" ? (v(), V("div", Qt, [
|
|
649
|
+
C(A, {
|
|
645
650
|
class: "p-16 space-y-24",
|
|
646
651
|
variant: "outlined"
|
|
647
652
|
}, {
|
|
648
653
|
default: ne(() => {
|
|
649
|
-
var
|
|
654
|
+
var i, F, f, w, P, Q, Z;
|
|
650
655
|
return [
|
|
651
|
-
a("div", Wt, [
|
|
652
|
-
e[15] || (e[15] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1)),
|
|
653
|
-
a("div", Qt, A(((f = (F = (s = C.member.collection) == null ? void 0 : s.CREDIT) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
654
|
-
]),
|
|
655
656
|
a("div", Zt, [
|
|
656
|
-
e[16] || (e[16] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit
|
|
657
|
-
a("div", eo,
|
|
658
|
-
|
|
657
|
+
e[16] || (e[16] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit ", -1)),
|
|
658
|
+
a("div", eo, M(((f = (F = (i = b.member.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
659
|
+
]),
|
|
660
|
+
a("div", to, [
|
|
661
|
+
e[17] || (e[17] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Credit(s) to be expired in 30 days ", -1)),
|
|
662
|
+
a("div", oo, M(((Z = (Q = (P = (w = b.member.collection) == null ? void 0 : w.CREDIT) == null ? void 0 : P[0]) == null ? void 0 : Q.expiryBalance) == null ? void 0 : Z.reduce(
|
|
663
|
+
(R, O) => O.expiredAt && o(g)(O.expiredAt).isAfter(o(g)()) && o(g)(O.expiredAt).isBefore(o(g)().add(30, "days")) ? R + O.amount : R,
|
|
659
664
|
0
|
|
660
665
|
)) ?? 0), 1)
|
|
661
666
|
]),
|
|
662
|
-
a("div",
|
|
663
|
-
|
|
667
|
+
a("div", no, [
|
|
668
|
+
C(m, {
|
|
664
669
|
label: "Add credit",
|
|
665
670
|
icon: "add",
|
|
666
671
|
variant: "plain",
|
|
667
|
-
onClick: e[1] || (e[1] = (
|
|
672
|
+
onClick: e[1] || (e[1] = (R) => N("credit", "send"))
|
|
668
673
|
}),
|
|
669
|
-
|
|
674
|
+
C(m, {
|
|
670
675
|
label: "Deduct credit",
|
|
671
676
|
icon: "remove",
|
|
672
677
|
variant: "plain",
|
|
673
|
-
onClick: e[2] || (e[2] = (
|
|
678
|
+
onClick: e[2] || (e[2] = (R) => N("credit", "deduct"))
|
|
674
679
|
})
|
|
675
680
|
])
|
|
676
681
|
];
|
|
677
682
|
}),
|
|
678
683
|
_: 1
|
|
679
684
|
}),
|
|
680
|
-
|
|
685
|
+
C(A, {
|
|
681
686
|
class: "p-16 space-y-24",
|
|
682
687
|
variant: "outlined"
|
|
683
688
|
}, {
|
|
684
689
|
default: ne(() => {
|
|
685
|
-
var
|
|
690
|
+
var i, F, f, w, P, Q, Z;
|
|
686
691
|
return [
|
|
687
|
-
a("div", oo, [
|
|
688
|
-
e[17] || (e[17] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1)),
|
|
689
|
-
a("div", no, A(((f = (F = (s = C.member.collection) == null ? void 0 : s.COIN) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
690
|
-
]),
|
|
691
692
|
a("div", ao, [
|
|
692
|
-
e[18] || (e[18] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point
|
|
693
|
-
a("div", so,
|
|
694
|
-
|
|
693
|
+
e[18] || (e[18] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point ", -1)),
|
|
694
|
+
a("div", so, M(((f = (F = (i = b.member.collection) == null ? void 0 : i.COIN) == null ? void 0 : F[0]) == null ? void 0 : f.balance) ?? 0), 1)
|
|
695
|
+
]),
|
|
696
|
+
a("div", io, [
|
|
697
|
+
e[19] || (e[19] = a("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Point(s) to be expired in 30 days ", -1)),
|
|
698
|
+
a("div", ro, M(((Z = (Q = (P = (w = b.member.collection) == null ? void 0 : w.COIN) == null ? void 0 : P[0]) == null ? void 0 : Q.expiryBalance) == null ? void 0 : Z.reduce(
|
|
699
|
+
(R, O) => O.expiredAt && o(g)(O.expiredAt).isAfter(o(g)()) && o(g)(O.expiredAt).isBefore(o(g)().add(30, "days")) ? R + O.amount : R,
|
|
695
700
|
0
|
|
696
701
|
)) ?? 0), 1)
|
|
697
702
|
]),
|
|
698
|
-
a("div",
|
|
699
|
-
|
|
703
|
+
a("div", lo, [
|
|
704
|
+
C(m, {
|
|
700
705
|
label: "Add point",
|
|
701
706
|
icon: "add",
|
|
702
707
|
variant: "plain",
|
|
703
|
-
onClick: e[3] || (e[3] = (
|
|
708
|
+
onClick: e[3] || (e[3] = (R) => N("coin", "send"))
|
|
704
709
|
}),
|
|
705
|
-
|
|
710
|
+
C(m, {
|
|
706
711
|
label: "Deduct point",
|
|
707
712
|
icon: "remove",
|
|
708
713
|
variant: "plain",
|
|
709
|
-
onClick: e[4] || (e[4] = (
|
|
714
|
+
onClick: e[4] || (e[4] = (R) => N("coin", "deduct"))
|
|
710
715
|
})
|
|
711
716
|
])
|
|
712
717
|
];
|
|
@@ -720,10 +725,10 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
720
725
|
}, 8, ["modelValue"]);
|
|
721
726
|
};
|
|
722
727
|
}
|
|
723
|
-
}),
|
|
728
|
+
}), mo = { class: "flex items-center justify-end" }, Bo = /* @__PURE__ */ pe({
|
|
724
729
|
__name: "MemberList",
|
|
725
|
-
setup(
|
|
726
|
-
const q = je(),
|
|
730
|
+
setup(b) {
|
|
731
|
+
const q = je(), x = ye(), u = Le(), { minor: I } = Ye, c = xt(), $ = [
|
|
727
732
|
{
|
|
728
733
|
header: "Name",
|
|
729
734
|
enableSorting: !0,
|
|
@@ -733,7 +738,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
733
738
|
}
|
|
734
739
|
},
|
|
735
740
|
{
|
|
736
|
-
accessorFn: (n) =>
|
|
741
|
+
accessorFn: (n) => g(ze(n._id.toString())).format("D MMM YYYY"),
|
|
737
742
|
header: "Customer Since",
|
|
738
743
|
accessorKey: "_id",
|
|
739
744
|
id: "_id"
|
|
@@ -745,7 +750,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
745
750
|
cell(n) {
|
|
746
751
|
return yt(
|
|
747
752
|
n.row.original,
|
|
748
|
-
|
|
753
|
+
x.sortedTiers
|
|
749
754
|
);
|
|
750
755
|
}
|
|
751
756
|
},
|
|
@@ -755,7 +760,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
755
760
|
cell(n) {
|
|
756
761
|
return vt(
|
|
757
762
|
n.row.original,
|
|
758
|
-
|
|
763
|
+
x.sortedTitles
|
|
759
764
|
);
|
|
760
765
|
}
|
|
761
766
|
},
|
|
@@ -811,12 +816,12 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
811
816
|
return oe("div", { class: "flex items-center justify-end gap-4" }, [
|
|
812
817
|
oe(
|
|
813
818
|
"span",
|
|
814
|
-
(t = n.row.original.stats) != null && t.lastVisit ?
|
|
819
|
+
(t = n.row.original.stats) != null && t.lastVisit ? g((e = n.row.original.stats) == null ? void 0 : e.lastVisit).fromNow() : "NA"
|
|
815
820
|
),
|
|
816
821
|
oe(
|
|
817
822
|
de.FmTooltip,
|
|
818
823
|
{
|
|
819
|
-
content:
|
|
824
|
+
content: g(n.row.original.stats.lastVisit).format(
|
|
820
825
|
"D MMM YYYY - hh:mmA"
|
|
821
826
|
)
|
|
822
827
|
},
|
|
@@ -850,7 +855,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
850
855
|
);
|
|
851
856
|
}
|
|
852
857
|
}
|
|
853
|
-
], { tableMeta: k, rowData: T, onSort: E, debouncedFetchData: S, onSearch: L } =
|
|
858
|
+
], { tableMeta: k, rowData: T, onSort: E, debouncedFetchData: S, onSearch: L } = pt(J.read), N = X(), K = X(!1), B = X(), W = Y(() => u.locations.map((n) => ({
|
|
854
859
|
label: n.name,
|
|
855
860
|
value: n._id
|
|
856
861
|
})));
|
|
@@ -876,7 +881,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
876
881
|
rowsNumber: 0
|
|
877
882
|
};
|
|
878
883
|
function r(n) {
|
|
879
|
-
const t =
|
|
884
|
+
const t = g(n);
|
|
880
885
|
return t.isValid() ? t.format("DD/MM/YYYY") : "";
|
|
881
886
|
}
|
|
882
887
|
async function p() {
|
|
@@ -888,7 +893,7 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
888
893
|
})).meta.totalResources ?? 0, e = l.rowsPerPage;
|
|
889
894
|
await I(
|
|
890
895
|
async () => {
|
|
891
|
-
var d,
|
|
896
|
+
var d, y, m, h, A, U, i, F, f, w, P, Q, Z, R, O, ve, xe, ge, Ce, Se, he, Fe, _e, Te, we, ke, Me, Ae;
|
|
892
897
|
for (let Ne = 0; Ne < t; Ne += e) {
|
|
893
898
|
const qe = {
|
|
894
899
|
...l,
|
|
@@ -897,67 +902,67 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
897
902
|
sortBy: l.sortBy,
|
|
898
903
|
descending: l.descending
|
|
899
904
|
}, Ke = await J.read(qe);
|
|
900
|
-
for (const
|
|
905
|
+
for (const s of Ke.resources) {
|
|
901
906
|
const Ge = (d = et.parseOneAddress(
|
|
902
|
-
|
|
903
|
-
)) != null && d.domain.includes("feedmepos.com") ? void 0 :
|
|
907
|
+
s == null ? void 0 : s.email
|
|
908
|
+
)) != null && d.domain.includes("feedmepos.com") ? void 0 : s.email, He = (m = ((y = s == null ? void 0 : s.collection) == null ? void 0 : y.TITLE) || []) == null ? void 0 : m.reduce(
|
|
904
909
|
(z, te) => {
|
|
905
910
|
var re, le;
|
|
906
|
-
const ie = (le = (re =
|
|
911
|
+
const ie = (le = (re = x.sortedTitles) == null ? void 0 : re.find(
|
|
907
912
|
(ce) => ce._id === te.collectible
|
|
908
913
|
)) == null ? void 0 : le.name;
|
|
909
914
|
return !ie || te.balance <= 0 || z.push(ie), z;
|
|
910
915
|
},
|
|
911
916
|
[]
|
|
912
|
-
), Je = (
|
|
917
|
+
), Je = (x.sortedTitles || []).reduce(
|
|
913
918
|
(z, te) => {
|
|
914
919
|
var re, le, ce, $e;
|
|
915
|
-
const ie = ($e = (ce = (le = (((re =
|
|
920
|
+
const ie = ($e = (ce = (le = (((re = s == null ? void 0 : s.collection) == null ? void 0 : re.TITLE) || []).find(
|
|
916
921
|
(Qe) => Qe.collectible === te._id
|
|
917
922
|
)) == null ? void 0 : le.expiryBalance) == null ? void 0 : ce[0]) == null ? void 0 : $e.expiredAt;
|
|
918
|
-
return z[te.name] = ie ?
|
|
923
|
+
return z[te.name] = ie ? g(ie).format("DD/MM/YYYY") : "", z;
|
|
919
924
|
},
|
|
920
925
|
{}
|
|
921
|
-
), Xe = ((U = (
|
|
926
|
+
), Xe = ((U = (A = (h = s.collection) == null ? void 0 : h.CREDIT) == null ? void 0 : A.at(0)) == null ? void 0 : U.balance) || 0, Ve = ((w = (f = (F = (i = s.collection) == null ? void 0 : i.CREDIT) == null ? void 0 : F.at(0)) == null ? void 0 : f.expiryBalance) == null ? void 0 : w.reduce(
|
|
922
927
|
(z, te) => z + te.amount,
|
|
923
928
|
0
|
|
924
929
|
)) || 0, Ie = me(Xe, 2), We = {
|
|
925
|
-
ID:
|
|
926
|
-
Name: ((P =
|
|
927
|
-
Phone: ((Q =
|
|
930
|
+
ID: s._id.toString(),
|
|
931
|
+
Name: ((P = s.name) == null ? void 0 : P.trim()) || "",
|
|
932
|
+
Phone: ((Q = s == null ? void 0 : s.phoneNumber) == null ? void 0 : Q.trim()) || "",
|
|
928
933
|
Email: Ge || "",
|
|
929
|
-
Gender:
|
|
930
|
-
CardNo:
|
|
931
|
-
Birthday: r(
|
|
934
|
+
Gender: s.gender || "",
|
|
935
|
+
CardNo: s.cardNo || "",
|
|
936
|
+
Birthday: s != null && s.birthday ? r(s == null ? void 0 : s.birthday) : "",
|
|
932
937
|
Credit: (Number(Ie) - Number(Ve)).toFixed(2),
|
|
933
938
|
FreeCredit: Number(Ve.toFixed(2)),
|
|
934
939
|
TotalCredit: Number(Ie),
|
|
935
|
-
Exp:
|
|
936
|
-
Point:
|
|
937
|
-
Level:
|
|
938
|
-
Tier:
|
|
940
|
+
Exp: s != null && s.collection ? ((O = (R = (Z = s.collection) == null ? void 0 : Z.POINT) == null ? void 0 : R.at(0)) == null ? void 0 : O.balance) ?? 0 : 0,
|
|
941
|
+
Point: s != null && s.collection ? ((ge = (xe = (ve = s.collection) == null ? void 0 : ve.COIN) == null ? void 0 : xe.at(0)) == null ? void 0 : ge.balance) ?? 0 : 0,
|
|
942
|
+
Level: s != null && s.collection ? ((he = (Se = (Ce = s.collection) == null ? void 0 : Ce.TIER) == null ? void 0 : Se.at(0)) == null ? void 0 : he.balance) ?? 0 : 0,
|
|
943
|
+
Tier: s != null && s.collection ? ((Te = (_e = (Fe = s.collection) == null ? void 0 : Fe.TIER) == null ? void 0 : _e.at(0)) == null ? void 0 : Te.balance) ?? 0 : 0,
|
|
939
944
|
Titles: He.join(","),
|
|
940
945
|
...Je,
|
|
941
|
-
TotalTransaction:
|
|
942
|
-
AvgSpent:
|
|
946
|
+
TotalTransaction: s.stats.visitCount,
|
|
947
|
+
AvgSpent: ut(Number(s.stats.avgBillSize || 0)).toFormat(
|
|
943
948
|
!1
|
|
944
949
|
),
|
|
945
|
-
TotalSpent:
|
|
946
|
-
LastVisit: r(
|
|
947
|
-
Feedback: ((we =
|
|
948
|
-
LastSeasonTierEarned: ((ke =
|
|
949
|
-
LastSeasonPointEarned: ((Me =
|
|
950
|
-
JoinedAt: r(
|
|
951
|
-
JoinedAtLocation:
|
|
950
|
+
TotalSpent: s.stats.avgBillSize * s.stats.visitCount,
|
|
951
|
+
LastVisit: r(s.stats.lastVisit),
|
|
952
|
+
Feedback: ((we = s.stats) == null ? void 0 : we.feedbackCount) || 0,
|
|
953
|
+
LastSeasonTierEarned: ((ke = s.stats) == null ? void 0 : ke.lastSeasonTierEarned) || 0,
|
|
954
|
+
LastSeasonPointEarned: ((Me = s.stats) == null ? void 0 : Me.lastSeasonPointEarned) || 0,
|
|
955
|
+
JoinedAt: r(s.joinAt || void 0),
|
|
956
|
+
JoinedAtLocation: s.location && ((Ae = W.value.find((z) => z.value == s.location)) == null ? void 0 : Ae.label) || "-",
|
|
952
957
|
VisitFrequency: `${Number(
|
|
953
|
-
Math.ceil(
|
|
958
|
+
Math.ceil(s.stats.avgVisitFrequency).toFixed(0)
|
|
954
959
|
)}`
|
|
955
960
|
};
|
|
956
961
|
n.addRecord(We);
|
|
957
962
|
}
|
|
958
963
|
l.page++;
|
|
959
964
|
}
|
|
960
|
-
await
|
|
965
|
+
await ot(
|
|
961
966
|
n.buildExcel(),
|
|
962
967
|
`members-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
963
968
|
{
|
|
@@ -973,13 +978,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
973
978
|
}
|
|
974
979
|
);
|
|
975
980
|
}
|
|
976
|
-
return
|
|
977
|
-
await
|
|
981
|
+
return Oe(async () => {
|
|
982
|
+
await x.readMembership(), await u.readLocations(), await q.read(), await u.readLocations(), await S();
|
|
978
983
|
}), (n, t) => {
|
|
979
|
-
const e =
|
|
980
|
-
return
|
|
981
|
-
a("div",
|
|
982
|
-
|
|
984
|
+
const e = _("FmSearch"), d = _("FmButton"), y = _("FmSnackbar");
|
|
985
|
+
return v(), V("div", null, [
|
|
986
|
+
a("div", mo, [
|
|
987
|
+
C(e, {
|
|
983
988
|
class: "mt-4",
|
|
984
989
|
modelValue: o(k).searchValue,
|
|
985
990
|
"onUpdate:modelValue": [
|
|
@@ -989,13 +994,13 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
989
994
|
placeholder: "Search",
|
|
990
995
|
collapsible: ""
|
|
991
996
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
992
|
-
|
|
997
|
+
C(d, {
|
|
993
998
|
icon: "ios_share",
|
|
994
999
|
variant: "tertiary",
|
|
995
1000
|
onClick: p
|
|
996
1001
|
})
|
|
997
1002
|
]),
|
|
998
|
-
Pe(
|
|
1003
|
+
Pe(C(y, {
|
|
999
1004
|
"z-index": 0,
|
|
1000
1005
|
class: "!max-w-full my-16",
|
|
1001
1006
|
title: "Info",
|
|
@@ -1006,9 +1011,9 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
1006
1011
|
action: "Refresh",
|
|
1007
1012
|
onOnAction: G
|
|
1008
1013
|
}, null, 512), [
|
|
1009
|
-
[
|
|
1014
|
+
[Re, o(K)]
|
|
1010
1015
|
]),
|
|
1011
|
-
|
|
1016
|
+
C(ft, {
|
|
1012
1017
|
loading: o(k).isLoading,
|
|
1013
1018
|
"row-data": o(T),
|
|
1014
1019
|
"row-count": o(k).totalRows,
|
|
@@ -1020,11 +1025,11 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
1020
1025
|
onSortChange: o(E),
|
|
1021
1026
|
onPageChange: t[2] || (t[2] = (m) => o(S)({ pageSize: m.pageSize, pageIndex: m.pageIndex })),
|
|
1022
1027
|
onRowClick: t[3] || (t[3] = (m) => {
|
|
1023
|
-
var
|
|
1024
|
-
B.value = m.original, (
|
|
1028
|
+
var h;
|
|
1029
|
+
B.value = m.original, (h = o(N)) == null || h.showSheet();
|
|
1025
1030
|
})
|
|
1026
1031
|
}, null, 8, ["loading", "row-data", "row-count", "page-count", "page-index", "page-size", "onSortChange"]),
|
|
1027
|
-
o(B) ? (
|
|
1032
|
+
o(B) ? (v(), j(co, {
|
|
1028
1033
|
key: 0,
|
|
1029
1034
|
ref_key: "sheetRef",
|
|
1030
1035
|
ref: N,
|
|
@@ -1036,5 +1041,5 @@ const Ct = { class: "flex flex-col" }, St = { key: 1 }, _t = { class: "flex flex
|
|
|
1036
1041
|
}
|
|
1037
1042
|
});
|
|
1038
1043
|
export {
|
|
1039
|
-
|
|
1044
|
+
Bo as default
|
|
1040
1045
|
};
|