@feedmepos/mf-connect 0.1.0-beta.7 → 0.1.0-beta.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Analytic-DEQUEGlq.js +427 -0
- package/dist/{App-DalxIjTu.js → App-CcoU2SAx.js} +445 -420
- package/dist/AuditLogs-CiB6u06w.js +1886 -0
- package/dist/Bin-C2_1m5RT.js +166 -0
- package/dist/{Broadcast-uMAvsC--.js → Broadcast-TotIXDuJ.js} +56 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-JxbENan8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CixQu3Pr.js} +6 -8
- package/dist/Card-Ce-_xMgS.js +896 -0
- package/dist/Collections-DKva6Doi.js +459 -0
- package/dist/{Credit-QlnatflM.js → Credit-BVUxIJ6C.js} +36 -34
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BKEumoan.js +2181 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BE07lc4M.js → EffectSheet.vue_vue_type_style_index_0_lang-ah4bz-qR.js} +49 -49
- package/dist/{Experience-Czy41ifp.js → Experience-DV3384o0.js} +32 -30
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
- package/dist/Game-DY83ti52.js +278 -0
- package/dist/Index-DEIaZ-2H.js +259 -0
- package/dist/Marketing-C2RwIlrg.js +20071 -0
- package/dist/Member-D4fc-wzd.js +333 -0
- package/dist/MemberList-DSMI6t_D.js +1598 -0
- package/dist/MemberTransactions-wXUlbbRq.js +45 -0
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CtM73bcN.js → MessageInput.vue_vue_type_script_setup_true_lang-DYS0klKm.js} +135 -120
- package/dist/Mission-P_KLDEpg.js +296 -0
- package/dist/Overview-8vc0f1D7.js +1078 -0
- package/dist/{Point-By6ogYy_.js → Point-B4Y0Pq60.js} +55 -53
- package/dist/{Promotion-DKcBr-RI.js → Promotion-C1CbesgZ.js} +65 -57
- package/dist/Queue-BlPA7PNH.js +244 -0
- package/dist/Record-Cl1qXSSk.js +340 -0
- package/dist/Reward-jy6-W1Eh.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-d5JNNNHf.js +150 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DYul_Nu8.js +1640 -0
- package/dist/Segment-B36Nrvxs.js +568 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-jN0xUFNR.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLFTNooB.js +186 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-H_Sehhgf.js +147 -0
- package/dist/Setting-AgQf2X4W.js +1931 -0
- package/dist/Store-D3Mm0pan.js +1841 -0
- package/dist/StoreRewards-L0VLWz8l.js +423 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Zl_cXXSD.js +1028 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-nEdCD6la.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-b4mfueTj.js} +1 -1
- package/dist/{Tier-DvAs0-yx.js → Tier-DQq-375x.js} +327 -318
- package/dist/{Title-B_Trr39o.js → Title-OJxuBvaa.js} +224 -209
- package/dist/{Transaction-DCJw-b3H.js → Transaction-vgsYRfD7.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Cwi0mvC3.js +130 -0
- package/dist/Voucher-BFwLaoxe.js +354 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DNUBaNtJ.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DXkhu8e9.js → ZodTextField.vue_vue_type_script_setup_true_lang-ms40eptZ.js} +1 -1
- package/dist/app-BQFTJ_hE.js +33357 -0
- package/dist/app-D7C3Fxfi.js +7077 -0
- package/dist/app.js +1 -1
- package/dist/{business-BC4-i1cU.js → business-vzpvmTdG.js} +1 -1
- package/dist/{campaign--0_yMbMV.js → campaign-BkxTDfsK.js} +2 -2
- package/dist/campaign-UQ8kMVeC.js +1810 -0
- package/dist/campaign.enum-BdT-e9h9.js +20 -0
- package/dist/campaign.fn-lc4ZhFCU.js +758 -0
- package/dist/collectible.enum-C8kd17Tz.js +19 -0
- package/dist/{collection.fn-3TwPe7aF.js → collection.fn-BIw1Y_tv.js} +2 -2
- package/dist/dto-CwzAhB8x.js +214 -0
- package/dist/{effect-BeR0LK61.js → effect-CJcvLlKG.js} +33 -16
- package/dist/email-addresses-BCJTQPT0.js +705 -0
- package/dist/{export-xeLLhqvh.js → export-URRwle1z.js} +5 -5
- package/dist/{helper-B5iqfKh8.js → helper-DccnE6zn.js} +1 -1
- package/dist/index-BiIZ7X6d.js +29556 -0
- package/dist/{index-CyKZ-SsN.js → index-BsRJ4kVb.js} +1 -1
- package/dist/{index-CU_d8jjU.js → index-C3lpXz_P.js} +1 -1
- package/dist/{index-Ct_wR519.js → index-CFA3EqId.js} +24 -21
- package/dist/{index-DP-dGMJC.js → index-CPRN3irj.js} +2230 -871
- package/dist/index-CaxFS90M.js +56 -0
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/index-D4MX9e5q.js +115 -0
- package/dist/index-DrE9VkxR.js +32 -0
- package/dist/index-EOPRlB9V.js +54 -0
- package/dist/{index-CAn5heDe.js → index-FcxOGFKj.js} +48 -4
- package/dist/{index-Bh-uaaBG.js → index-OScGm4mF.js} +1506 -1480
- package/dist/{index-BOdtpNkP.js → index-ghSGvG-m.js} +266 -173
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/{index.esm2017-5jeDA5Zo.js → index.esm2017-CE1CQHrP.js} +121 -121
- package/dist/loading-B8zghYbj.js +71 -0
- package/dist/{membership-D0nqqWNZ.js → membership-DoJMF2T6.js} +54 -46
- package/dist/money-CTR0rXZw.js +15 -0
- package/dist/number-Bhgz9eFP.js +12 -0
- package/dist/objectid-DdVJrRBw.js +145 -0
- package/dist/{loading-C-JDVajU.js → plugins-B5mQ7CHT.js} +3871 -3943
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-DicsEEHe.js +36 -0
- package/dist/{rule-builder-BXt29Es4.js → rule-builder-BWb4JTrd.js} +1 -1
- package/dist/{rule-Dn_GgBCe.js → rule-s8siRar1.js} +185 -178
- package/dist/style.css +1 -1
- package/dist/{template-D2Oi3dxP.js → template-Qb5ozfLa.js} +5 -5
- package/dist/trigger-Bsb3Kj35.js +144 -0
- package/dist/user-DJ8aHRaM.js +54 -0
- package/dist/{vue-i18n-Dud8fvmw.js → vue-i18n-BG2U7GtN.js} +282 -282
- package/dist/{xlsx-CCRCidY2.js → xlsx-2QxyDFwt.js} +1 -1
- package/package.json +11 -7
- package/dist/Analytic-BMpS6jWb.js +0 -622
- package/dist/Card-DV8-g69L.js +0 -825
- package/dist/Collections-DRafEHT1.js +0 -453
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TDoMehSB.js +0 -2813
- package/dist/Game-CD3zSitz.js +0 -255
- package/dist/Marketing-NNes8z6Q.js +0 -316
- package/dist/Member-CTqBgYuV.js +0 -69
- package/dist/MemberList-B99tS5ce.js +0 -1733
- package/dist/MemberTransactions-D1YCXPOg.js +0 -38
- package/dist/Mission-XbBVKBiE.js +0 -261
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-D1ESqEFO.js +0 -1753
- package/dist/Segment-B8cszL-F.js +0 -437
- package/dist/Setting-aZYABlMW.js +0 -1901
- package/dist/Store-Bx2tyJwe.js +0 -1511
- package/dist/StoreRewards-DTp9G6gw.js +0 -401
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B2W7ly5Z.js +0 -890
- package/dist/Voucher-jqv3ji90.js +0 -490
- package/dist/app-WlcUVbFb.js +0 -5764
- package/dist/app-_w0hjM7u.js +0 -53428
- package/dist/dto-Ns2dLn1B.js +0 -2770
- package/dist/index-BWb9vRCi.js +0 -29193
- package/dist/index-CpU9aqyW.js +0 -206
- package/dist/index-CqO_ZvtD.js +0 -99
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-DsNsA2uX.js +0 -298
- package/dist/index-WAMr3npT.js +0 -762
- package/dist/money-hdbrblud.js +0 -15
- package/dist/number-CRWGOZaW.js +0 -12
- package/dist/user-Bm4KttFq.js +0 -37
|
@@ -1,890 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, ref as A, computed as K, onMounted as G, resolveComponent as D, openBlock as O, createBlock as Y, unref as n, withCtx as U, createVNode as h, normalizeClass as L, createCommentVNode as ue, createElementVNode as T, toDisplayString as X, createElementBlock as H, Fragment as de, renderList as me, mergeModels as J, useModel as pe, watch as W, onBeforeMount as fe, h as o } from "vue";
|
|
2
|
-
import { components as _ } from "@feedmepos/ui-library";
|
|
3
|
-
import { d as ge } from "./index-CpU9aqyW.js";
|
|
4
|
-
import { a as te } from "./loading-C-JDVajU.js";
|
|
5
|
-
import { s as ye } from "./index-Dbd4WA4r.js";
|
|
6
|
-
import { h as v } from "./moment-BWErdI6_.js";
|
|
7
|
-
import { s as j } from "./index-CuvNtC_M.js";
|
|
8
|
-
import { f as Q } from "./number-CRWGOZaW.js";
|
|
9
|
-
import { u as be } from "./business-BC4-i1cU.js";
|
|
10
|
-
import { u as ae, _ as ne } from "./usePagination-BeF5K3M7.js";
|
|
11
|
-
import { g as re } from "./user-Bm4KttFq.js";
|
|
12
|
-
import { B as oe, a as le } from "./export-xeLLhqvh.js";
|
|
13
|
-
import { u as he } from "./campaign--0_yMbMV.js";
|
|
14
|
-
import "./index-CyKZ-SsN.js";
|
|
15
|
-
import { useRouter as ve } from "vue-router";
|
|
16
|
-
import { R as V } from "./app-WlcUVbFb.js";
|
|
17
|
-
import { o as $ } from "./objectId-dwaoBfJX.js";
|
|
18
|
-
import { g as Z, a as _e, S as xe, b as Se } from "./index-BWb9vRCi.js";
|
|
19
|
-
function we(r) {
|
|
20
|
-
let c = "";
|
|
21
|
-
switch (r) {
|
|
22
|
-
case "PORTAL":
|
|
23
|
-
c = "ADMIN";
|
|
24
|
-
break;
|
|
25
|
-
case "BENEFIT":
|
|
26
|
-
c = "MEMBERSHIP";
|
|
27
|
-
break;
|
|
28
|
-
case "ORDER":
|
|
29
|
-
c = "ORDER";
|
|
30
|
-
break;
|
|
31
|
-
case "BILL":
|
|
32
|
-
c = "SPENDING";
|
|
33
|
-
break;
|
|
34
|
-
case "CASHBACK":
|
|
35
|
-
c = "CASHBACK";
|
|
36
|
-
break;
|
|
37
|
-
case "CYCLE":
|
|
38
|
-
c = "EXPIRED";
|
|
39
|
-
break;
|
|
40
|
-
case "COUNTER_CONSUME":
|
|
41
|
-
c = "COUNTER REDEEM";
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
c = r;
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
return c;
|
|
48
|
-
}
|
|
49
|
-
function Ie(r) {
|
|
50
|
-
var c, i, p, u, m, S;
|
|
51
|
-
switch ((c = r == null ? void 0 : r.pf_collectible) == null ? void 0 : c.type) {
|
|
52
|
-
case "VOUCHER":
|
|
53
|
-
return `${(i = r.pf_collectible) == null ? void 0 : i.type} (${(p = r.pf_collectible) == null ? void 0 : p.name})`;
|
|
54
|
-
case "TITLE":
|
|
55
|
-
return `${(u = r.pf_collectible) == null ? void 0 : u.type} (${(m = r.pf_collectible) == null ? void 0 : m.name})`;
|
|
56
|
-
case "POINT":
|
|
57
|
-
return "Experience";
|
|
58
|
-
case "COIN":
|
|
59
|
-
return "Point";
|
|
60
|
-
default:
|
|
61
|
-
return ye((S = r == null ? void 0 : r.pf_collectible) == null ? void 0 : S.type);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
function Re(r) {
|
|
65
|
-
switch (r) {
|
|
66
|
-
case "ONLINE":
|
|
67
|
-
return "Online";
|
|
68
|
-
case "COIN":
|
|
69
|
-
return "Point";
|
|
70
|
-
default:
|
|
71
|
-
return r;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
const k = {
|
|
75
|
-
getReason: we,
|
|
76
|
-
formattedType: Ie,
|
|
77
|
-
formattedPaymentType: Re
|
|
78
|
-
}, Ce = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, q = /* @__PURE__ */ z({
|
|
79
|
-
__name: "FilterChip",
|
|
80
|
-
props: {
|
|
81
|
-
modelValue: {
|
|
82
|
-
type: Array,
|
|
83
|
-
required: !1
|
|
84
|
-
},
|
|
85
|
-
label: {
|
|
86
|
-
type: String,
|
|
87
|
-
required: !1,
|
|
88
|
-
default: ""
|
|
89
|
-
},
|
|
90
|
-
showItemLabel: {
|
|
91
|
-
type: Boolean,
|
|
92
|
-
default: !1
|
|
93
|
-
},
|
|
94
|
-
placement: {
|
|
95
|
-
type: String,
|
|
96
|
-
required: !1,
|
|
97
|
-
default: "bottom-end"
|
|
98
|
-
},
|
|
99
|
-
class: {
|
|
100
|
-
type: String,
|
|
101
|
-
required: !1
|
|
102
|
-
},
|
|
103
|
-
disabled: {
|
|
104
|
-
type: Boolean,
|
|
105
|
-
required: !1
|
|
106
|
-
},
|
|
107
|
-
items: {
|
|
108
|
-
type: Array,
|
|
109
|
-
required: !0
|
|
110
|
-
},
|
|
111
|
-
icon: {
|
|
112
|
-
type: String,
|
|
113
|
-
required: !1
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
emits: ["update:model-value"],
|
|
117
|
-
setup(r, { emit: c }) {
|
|
118
|
-
const i = r, p = c, u = A(!1), m = A({}), S = K(() => {
|
|
119
|
-
if (!m.value || Object.keys(m.value).length == i.items.length)
|
|
120
|
-
return "All";
|
|
121
|
-
{
|
|
122
|
-
const f = Object.keys(m.value).length;
|
|
123
|
-
return `${f > 0 ? f : "None"} selected`;
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
function d(f) {
|
|
127
|
-
m.value[f] ? delete m.value[f] : m.value[f] = !0, p("update:model-value", Object.keys(m.value));
|
|
128
|
-
}
|
|
129
|
-
function w() {
|
|
130
|
-
Object.keys(m.value).length > 0 ? m.value = {} : m.value = i.items.reduce((f, e) => (f[e.value] = !0, f), {}), p("update:model-value", Object.keys(m.value));
|
|
131
|
-
}
|
|
132
|
-
return G(() => {
|
|
133
|
-
m.value = i.modelValue.reduce(
|
|
134
|
-
(f, e) => (f[e] = !0, f),
|
|
135
|
-
{}
|
|
136
|
-
), i.modelValue.length == 0;
|
|
137
|
-
}), (f, e) => {
|
|
138
|
-
const s = D("FmIcon"), x = D("FmChip"), I = D("FmMenuItem"), g = D("FmMenu");
|
|
139
|
-
return O(), Y(g, {
|
|
140
|
-
placement: r.placement || "bottom-end",
|
|
141
|
-
disabled: r.disabled == !0,
|
|
142
|
-
"model-value": n(u),
|
|
143
|
-
onMenuChanged: e[0] || (e[0] = (R) => u.value = R),
|
|
144
|
-
"close-on-click": !1
|
|
145
|
-
}, {
|
|
146
|
-
"menu-button": U(() => [
|
|
147
|
-
h(x, {
|
|
148
|
-
label: r.label,
|
|
149
|
-
class: L(i.class || "text-fm-color-neutral-gray-400 cursor-pointer")
|
|
150
|
-
}, {
|
|
151
|
-
default: U(() => [
|
|
152
|
-
i.icon ? (O(), Y(s, {
|
|
153
|
-
key: 0,
|
|
154
|
-
name: i.icon,
|
|
155
|
-
class: L(i.class),
|
|
156
|
-
outline: "",
|
|
157
|
-
size: "sm"
|
|
158
|
-
}, null, 8, ["name", "class"])) : ue("", !0),
|
|
159
|
-
T("div", Ce, X(i.label) + " " + X(r.showItemLabel ? n(S) : ""), 1),
|
|
160
|
-
h(s, {
|
|
161
|
-
name: n(u) ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
162
|
-
class: L(i.class),
|
|
163
|
-
outline: "",
|
|
164
|
-
size: "sm"
|
|
165
|
-
}, null, 8, ["name", "class"])
|
|
166
|
-
]),
|
|
167
|
-
_: 1
|
|
168
|
-
}, 8, ["label", "class"])
|
|
169
|
-
]),
|
|
170
|
-
default: U(() => [
|
|
171
|
-
h(I, {
|
|
172
|
-
"model-value": Object.keys(n(m)).length === i.items.length,
|
|
173
|
-
label: "All",
|
|
174
|
-
"has-checkbox": !0,
|
|
175
|
-
indeterminate: !0,
|
|
176
|
-
onClick: w
|
|
177
|
-
}, null, 8, ["model-value"]),
|
|
178
|
-
(O(!0), H(de, null, me(i.items ?? [], (R) => (O(), Y(I, {
|
|
179
|
-
key: R.value,
|
|
180
|
-
value: R.value,
|
|
181
|
-
label: R.label,
|
|
182
|
-
"has-checkbox": !0,
|
|
183
|
-
"model-value": n(m)[R.value],
|
|
184
|
-
"onUpdate:modelValue": (F) => d(R.value)
|
|
185
|
-
}, null, 8, ["value", "label", "model-value", "onUpdate:modelValue"]))), 128))
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
}, 8, ["placement", "disabled", "model-value"]);
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
}), P = "YYYY-MM-DD", se = /* @__PURE__ */ z({
|
|
192
|
-
__name: "DateRangeChip",
|
|
193
|
-
props: /* @__PURE__ */ J({
|
|
194
|
-
modelValue: {
|
|
195
|
-
type: Object,
|
|
196
|
-
required: !0
|
|
197
|
-
}
|
|
198
|
-
}, {
|
|
199
|
-
dateRange: {
|
|
200
|
-
type: Object,
|
|
201
|
-
default: () => ({
|
|
202
|
-
startDate: v().subtract(7, "day").format(P),
|
|
203
|
-
endDate: v().endOf("day").format(P)
|
|
204
|
-
})
|
|
205
|
-
},
|
|
206
|
-
dateRangeModifiers: {}
|
|
207
|
-
}),
|
|
208
|
-
emits: /* @__PURE__ */ J(["update:model-value"], ["update:dateRange"]),
|
|
209
|
-
setup(r, { emit: c }) {
|
|
210
|
-
const i = r, p = c, u = pe(r, "dateRange"), m = K(() => u.value ? `${S.value.startDate ?? "Start"} - ${S.value.endDate ?? "End"}` : "No dates selected."), S = K(() => ({
|
|
211
|
-
startDate: u.value.startDate ? v(u.value.startDate).format(P) : void 0,
|
|
212
|
-
endDate: u.value.endDate ? v(u.value.endDate).format(P) : void 0
|
|
213
|
-
}));
|
|
214
|
-
return G(() => {
|
|
215
|
-
u.value = i.modelValue;
|
|
216
|
-
}), W(
|
|
217
|
-
() => u.value,
|
|
218
|
-
() => {
|
|
219
|
-
p("update:model-value", S.value);
|
|
220
|
-
}
|
|
221
|
-
), (d, w) => {
|
|
222
|
-
const f = D("FmChip"), e = D("FmDateRangePicker");
|
|
223
|
-
return O(), Y(e, {
|
|
224
|
-
modelValue: u.value,
|
|
225
|
-
"onUpdate:modelValue": w[0] || (w[0] = (s) => u.value = s),
|
|
226
|
-
"show-predefined-range": ""
|
|
227
|
-
}, {
|
|
228
|
-
"trigger-button": U(() => [
|
|
229
|
-
h(f, {
|
|
230
|
-
label: n(m),
|
|
231
|
-
icon: "calendar_month",
|
|
232
|
-
"right-icon": "keyboard_arrow_down",
|
|
233
|
-
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
234
|
-
}, null, 8, ["label"])
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
}, 8, ["modelValue"]);
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
});
|
|
241
|
-
class De extends oe {
|
|
242
|
-
}
|
|
243
|
-
const ee = () => {
|
|
244
|
-
const r = xe.getBusinessId();
|
|
245
|
-
if (!r) throw new Error("Invalid business ID");
|
|
246
|
-
return Se(`businesses/${r}/transactions`, {
|
|
247
|
-
noIdRequired: !0
|
|
248
|
-
});
|
|
249
|
-
}, B = {
|
|
250
|
-
async readAll(r, c) {
|
|
251
|
-
const i = Z(
|
|
252
|
-
await ee().get("", {
|
|
253
|
-
params: { ...r, ...c }
|
|
254
|
-
})
|
|
255
|
-
);
|
|
256
|
-
return {
|
|
257
|
-
meta: i.meta,
|
|
258
|
-
resources: i.resources
|
|
259
|
-
};
|
|
260
|
-
},
|
|
261
|
-
async readStoreTransactions(r, c) {
|
|
262
|
-
const i = Z(
|
|
263
|
-
await ee().get("/store", {
|
|
264
|
-
params: { ...r, ...c }
|
|
265
|
-
})
|
|
266
|
-
);
|
|
267
|
-
return {
|
|
268
|
-
meta: i.meta,
|
|
269
|
-
resources: i.resources
|
|
270
|
-
};
|
|
271
|
-
},
|
|
272
|
-
async readBills(r, c, i) {
|
|
273
|
-
return (await _e("").get(`/restaurants/${r}/receipt?start=${c}&end=${i}`)).data;
|
|
274
|
-
}
|
|
275
|
-
}, Te = { class: "hidden xs:flex items-center justify-end" }, Oe = { class: "flex items-center justify-between" }, Fe = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, ke = { class: "xs:hidden" }, et = /* @__PURE__ */ z({
|
|
276
|
-
__name: "CollectionTransactions",
|
|
277
|
-
props: {
|
|
278
|
-
user: {
|
|
279
|
-
type: String
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
setup(r) {
|
|
283
|
-
const c = be(), i = he(), p = ve(), u = r, m = A(!1), S = [
|
|
284
|
-
{
|
|
285
|
-
header: "Transaction ID",
|
|
286
|
-
accessorKey: "_id",
|
|
287
|
-
meta: {
|
|
288
|
-
maxWidth: "100px"
|
|
289
|
-
},
|
|
290
|
-
cell(a) {
|
|
291
|
-
return o("div", { class: "flex items-center" }, [
|
|
292
|
-
o(_.FmIcon, {
|
|
293
|
-
name: "content_copy",
|
|
294
|
-
outline: !0,
|
|
295
|
-
size: "sm",
|
|
296
|
-
class: "cursor-pointer mr-4",
|
|
297
|
-
onClick: (t) => {
|
|
298
|
-
t.preventDefault(), t.stopPropagation(), te(a.row.original._id.toString());
|
|
299
|
-
}
|
|
300
|
-
}),
|
|
301
|
-
o(
|
|
302
|
-
"div",
|
|
303
|
-
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
304
|
-
a.row.original._id.toString()
|
|
305
|
-
)
|
|
306
|
-
]);
|
|
307
|
-
},
|
|
308
|
-
enableSorting: !1
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
header: "Created at",
|
|
312
|
-
accessorKey: "_id",
|
|
313
|
-
accessorFn: (a) => v($(a._id.toString())).format("D MMM YYYY, hh:mmA"),
|
|
314
|
-
enableSorting: !0
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
header: "Amount",
|
|
318
|
-
// accessorKey: 'totalAmount',
|
|
319
|
-
enableSorting: !1,
|
|
320
|
-
cell(a) {
|
|
321
|
-
var b, l, C, E;
|
|
322
|
-
const t = Q(
|
|
323
|
-
a.row.original.expiryAmount.reduce(
|
|
324
|
-
(N, M) => N + M.amount,
|
|
325
|
-
a.row.original.amount ?? 0
|
|
326
|
-
),
|
|
327
|
-
2
|
|
328
|
-
), y = (l = (b = a.row.original.expiryAmount) == null ? void 0 : b[0]) != null && l.expiredAt ? v((E = (C = a.row.original.expiryAmount) == null ? void 0 : C[0]) == null ? void 0 : E.expiredAt).format(
|
|
329
|
-
"D MMM YYYY"
|
|
330
|
-
) : "";
|
|
331
|
-
return o("div", { class: "flex items-center" }, [
|
|
332
|
-
o(
|
|
333
|
-
"div",
|
|
334
|
-
{
|
|
335
|
-
class: [
|
|
336
|
-
"pr-2",
|
|
337
|
-
+t > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
|
|
338
|
-
]
|
|
339
|
-
},
|
|
340
|
-
t
|
|
341
|
-
),
|
|
342
|
-
o("div", { class: "flex items-center" }, [
|
|
343
|
-
a.row.original.expiryAmount.length > 0 ? o(
|
|
344
|
-
_.FmTooltip,
|
|
345
|
-
{
|
|
346
|
-
content: `Expired on ${y}`
|
|
347
|
-
},
|
|
348
|
-
[
|
|
349
|
-
o(_.FmIcon, {
|
|
350
|
-
name: "info",
|
|
351
|
-
outline: !0,
|
|
352
|
-
size: "sm"
|
|
353
|
-
})
|
|
354
|
-
]
|
|
355
|
-
) : o("div")
|
|
356
|
-
])
|
|
357
|
-
]);
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
header: "Type",
|
|
362
|
-
accessorKey: "pf_collectible.type",
|
|
363
|
-
accessorFn: (a) => k.formattedType(a),
|
|
364
|
-
meta: {
|
|
365
|
-
maxWidth: "200px"
|
|
366
|
-
},
|
|
367
|
-
cell(a) {
|
|
368
|
-
const t = k.formattedType(a.row.original);
|
|
369
|
-
return o("div", { class: "flex items-center" }, [
|
|
370
|
-
o("div", { class: "truncate text-ellipsis" }, t),
|
|
371
|
-
t.length > 20 ? o(
|
|
372
|
-
_.FmTooltip,
|
|
373
|
-
{
|
|
374
|
-
content: t
|
|
375
|
-
},
|
|
376
|
-
[
|
|
377
|
-
o(_.FmIcon, {
|
|
378
|
-
name: "info",
|
|
379
|
-
outline: !0,
|
|
380
|
-
size: "sm"
|
|
381
|
-
})
|
|
382
|
-
]
|
|
383
|
-
) : null
|
|
384
|
-
]);
|
|
385
|
-
}
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
header: "Source",
|
|
389
|
-
accessorKey: "source",
|
|
390
|
-
cell(a) {
|
|
391
|
-
var t;
|
|
392
|
-
return o("div", { class: "flex items-center gap-4" }, [
|
|
393
|
-
o(
|
|
394
|
-
"div",
|
|
395
|
-
{ class: "truncate text-ellipsis" },
|
|
396
|
-
j(k.getReason(a.row.original.source))
|
|
397
|
-
),
|
|
398
|
-
...(t = a.row.original.metadata) != null && t.campaign ? [
|
|
399
|
-
o(
|
|
400
|
-
_.FmTooltip,
|
|
401
|
-
{
|
|
402
|
-
get content() {
|
|
403
|
-
var y;
|
|
404
|
-
return (y = i.campaigns.all.find(
|
|
405
|
-
(b) => {
|
|
406
|
-
var l;
|
|
407
|
-
return b._id === ((l = a.row.original.metadata) == null ? void 0 : l.campaign);
|
|
408
|
-
}
|
|
409
|
-
)) == null ? void 0 : y.name;
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
[
|
|
413
|
-
o(_.FmIcon, {
|
|
414
|
-
name: "info",
|
|
415
|
-
outline: !0,
|
|
416
|
-
size: "sm",
|
|
417
|
-
onClick: async (y) => {
|
|
418
|
-
y.preventDefault(), y.stopPropagation();
|
|
419
|
-
const b = i.campaigns.all.find(
|
|
420
|
-
(l) => {
|
|
421
|
-
var C;
|
|
422
|
-
return l._id === ((C = a.row.original.metadata) == null ? void 0 : C.campaign);
|
|
423
|
-
}
|
|
424
|
-
);
|
|
425
|
-
if (b)
|
|
426
|
-
switch (b.type) {
|
|
427
|
-
case "VOUCHER":
|
|
428
|
-
case "PROMOTION":
|
|
429
|
-
case "BROADCAST":
|
|
430
|
-
await p.push({
|
|
431
|
-
name: V[`$connect-CAMPAIGN_${b.type}`]
|
|
432
|
-
});
|
|
433
|
-
break;
|
|
434
|
-
case "GAME":
|
|
435
|
-
case "CREDIT":
|
|
436
|
-
case "MISSION":
|
|
437
|
-
await p.push({
|
|
438
|
-
name: V[`$connect-PROGRAM_${b.type}`]
|
|
439
|
-
});
|
|
440
|
-
break;
|
|
441
|
-
case "POINT":
|
|
442
|
-
await p.push({
|
|
443
|
-
name: V["$connect-PROGRAM_EXPERIENCE"]
|
|
444
|
-
});
|
|
445
|
-
break;
|
|
446
|
-
case "COIN":
|
|
447
|
-
await p.push({
|
|
448
|
-
name: V["$connect-PROGRAM_POINT"]
|
|
449
|
-
});
|
|
450
|
-
break;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
})
|
|
454
|
-
]
|
|
455
|
-
)
|
|
456
|
-
] : []
|
|
457
|
-
]);
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
header: "User",
|
|
462
|
-
accessorKey: "pf_user.name",
|
|
463
|
-
cell(a) {
|
|
464
|
-
return re(a.row.original.pf_user);
|
|
465
|
-
}
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
header: "Phone No.",
|
|
469
|
-
accessorKey: "pf_user.phoneNumber",
|
|
470
|
-
accessorFn: (a) => {
|
|
471
|
-
var t;
|
|
472
|
-
return ((t = a == null ? void 0 : a.pf_user) == null ? void 0 : t.phoneNumber) || "";
|
|
473
|
-
}
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
accessorFn: (a) => a.ref,
|
|
477
|
-
header: "References",
|
|
478
|
-
accessorKey: "ref",
|
|
479
|
-
cell(a) {
|
|
480
|
-
var t, y;
|
|
481
|
-
return o("div", { class: "flex items-center justify-between gap-4" }, [
|
|
482
|
-
o("div", { class: "flex items-center" }, [
|
|
483
|
-
(t = a.row.original.metadata) != null && t.remark ? o(
|
|
484
|
-
_.FmTooltip,
|
|
485
|
-
{
|
|
486
|
-
content: (y = a.row.original.metadata) == null ? void 0 : y.remark
|
|
487
|
-
},
|
|
488
|
-
[
|
|
489
|
-
o(_.FmIcon, {
|
|
490
|
-
name: "info",
|
|
491
|
-
outline: !0,
|
|
492
|
-
size: "sm"
|
|
493
|
-
})
|
|
494
|
-
]
|
|
495
|
-
) : o("div")
|
|
496
|
-
]),
|
|
497
|
-
o("div", { class: "flex-1" }, a.row.original.ref)
|
|
498
|
-
]);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
], d = A({
|
|
502
|
-
search: "",
|
|
503
|
-
"pf_collectible.type": [],
|
|
504
|
-
"metadata.location": [],
|
|
505
|
-
dateRange: {
|
|
506
|
-
startDate: v().subtract(7, "day").toISOString(),
|
|
507
|
-
endDate: v().endOf("day").toISOString()
|
|
508
|
-
},
|
|
509
|
-
source: []
|
|
510
|
-
}), { tableMeta: w, rowData: f, onSort: e, debouncedFetchData: s, onSearch: x } = ae(async (a) => {
|
|
511
|
-
const t = {
|
|
512
|
-
...d.value,
|
|
513
|
-
user: u.user,
|
|
514
|
-
dateRange: {
|
|
515
|
-
start: new Date(d.value.dateRange.startDate).toISOString(),
|
|
516
|
-
end: new Date(d.value.dateRange.endDate).toISOString()
|
|
517
|
-
}
|
|
518
|
-
}, y = await B.readAll(a, t);
|
|
519
|
-
return {
|
|
520
|
-
resources: y.resources.map((b) => {
|
|
521
|
-
const l = I.value.find((C) => C._id === b.ref);
|
|
522
|
-
return { ...b, ref: (l == null ? void 0 : l.seqNumber) || b.ref };
|
|
523
|
-
}),
|
|
524
|
-
meta: y.meta
|
|
525
|
-
};
|
|
526
|
-
}), I = A([]), g = ge.options.map((a) => ({ label: j(k.getReason(a)), value: a })), R = c.locations.map((a) => ({ label: a.name, value: a._id }));
|
|
527
|
-
W(
|
|
528
|
-
d,
|
|
529
|
-
() => {
|
|
530
|
-
s();
|
|
531
|
-
},
|
|
532
|
-
{ deep: !0 }
|
|
533
|
-
);
|
|
534
|
-
async function F() {
|
|
535
|
-
try {
|
|
536
|
-
m.value = !0;
|
|
537
|
-
const a = {
|
|
538
|
-
...d.value,
|
|
539
|
-
user: u.user,
|
|
540
|
-
dateRange: {
|
|
541
|
-
start: new Date(d.value.dateRange.startDate).toISOString(),
|
|
542
|
-
end: new Date(d.value.dateRange.endDate).toISOString()
|
|
543
|
-
}
|
|
544
|
-
};
|
|
545
|
-
await le({
|
|
546
|
-
exporter: new De(),
|
|
547
|
-
readFunction: (t) => B.readAll(t, a),
|
|
548
|
-
transformRecord: (t) => {
|
|
549
|
-
var y, b, l, C, E, N, M;
|
|
550
|
-
return {
|
|
551
|
-
TransactionID: t._id,
|
|
552
|
-
CreatedAt: v($(t._id.toString())).format(
|
|
553
|
-
"D MMM YYYY, hh:mmA"
|
|
554
|
-
),
|
|
555
|
-
Amount: Q(
|
|
556
|
-
t.expiryAmount.reduce(
|
|
557
|
-
(ie, ce) => ie + ce.amount,
|
|
558
|
-
t.amount ?? 0
|
|
559
|
-
),
|
|
560
|
-
2
|
|
561
|
-
),
|
|
562
|
-
ExpiredAt: (b = (y = t.expiryAmount) == null ? void 0 : y[0]) != null && b.expiredAt ? v((C = (l = t.expiryAmount) == null ? void 0 : l[0]) == null ? void 0 : C.expiredAt).format("D MMM YYYY") : "",
|
|
563
|
-
Type: k.formattedType(t),
|
|
564
|
-
Source: j(k.getReason(t.source)),
|
|
565
|
-
User: ((E = t.pf_user) == null ? void 0 : E.name) || "",
|
|
566
|
-
"Phone No.": ((N = t.pf_user) == null ? void 0 : N.phoneNumber) || "",
|
|
567
|
-
References: t.ref,
|
|
568
|
-
Remark: ((M = t.metadata) == null ? void 0 : M.remark) || ""
|
|
569
|
-
};
|
|
570
|
-
},
|
|
571
|
-
filename: "transactions"
|
|
572
|
-
});
|
|
573
|
-
} catch (a) {
|
|
574
|
-
console.error(a);
|
|
575
|
-
} finally {
|
|
576
|
-
m.value = !1;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
return fe(async () => {
|
|
580
|
-
await c.readLocations(), await i.read(), await s();
|
|
581
|
-
}), (a, t) => {
|
|
582
|
-
const y = D("FmSearch"), b = D("FmButton");
|
|
583
|
-
return O(), H("div", null, [
|
|
584
|
-
T("div", Te, [
|
|
585
|
-
h(y, {
|
|
586
|
-
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
587
|
-
modelValue: n(d).search,
|
|
588
|
-
"onUpdate:modelValue": t[0] || (t[0] = (l) => n(d).search = l),
|
|
589
|
-
placeholder: "Search",
|
|
590
|
-
collapsible: ""
|
|
591
|
-
}, null, 8, ["modelValue"]),
|
|
592
|
-
h(b, {
|
|
593
|
-
icon: "ios_share",
|
|
594
|
-
variant: "tertiary",
|
|
595
|
-
onClick: F
|
|
596
|
-
})
|
|
597
|
-
]),
|
|
598
|
-
T("div", Oe, [
|
|
599
|
-
T("div", Fe, [
|
|
600
|
-
h(q, {
|
|
601
|
-
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
602
|
-
"right-icon": "keyboard_arrow_down",
|
|
603
|
-
modelValue: n(d)["metadata.location"],
|
|
604
|
-
"onUpdate:modelValue": t[1] || (t[1] = (l) => n(d)["metadata.location"] = l),
|
|
605
|
-
icon: "storefront",
|
|
606
|
-
"show-item-label": !0,
|
|
607
|
-
items: n(R)
|
|
608
|
-
}, null, 8, ["modelValue", "items"]),
|
|
609
|
-
h(q, {
|
|
610
|
-
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
611
|
-
"right-icon": "keyboard_arrow_down",
|
|
612
|
-
modelValue: n(d)["pf_collectible.type"],
|
|
613
|
-
"onUpdate:modelValue": t[2] || (t[2] = (l) => n(d)["pf_collectible.type"] = l),
|
|
614
|
-
label: "Type: ",
|
|
615
|
-
"show-item-label": !0,
|
|
616
|
-
items: [
|
|
617
|
-
{ label: "Point", value: "COIN" },
|
|
618
|
-
{ label: "Credit", value: "CREDIT" },
|
|
619
|
-
{ label: "Voucher", value: "VOUCHER" },
|
|
620
|
-
{ label: "Experience", value: "POINT" },
|
|
621
|
-
{ label: "Tier", value: "TIER" },
|
|
622
|
-
{ label: "Title", value: "TITLE" },
|
|
623
|
-
{ label: "Game", value: "GAME" },
|
|
624
|
-
{ label: "Stamp", value: "STAMP" }
|
|
625
|
-
]
|
|
626
|
-
}, null, 8, ["modelValue"]),
|
|
627
|
-
h(q, {
|
|
628
|
-
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
629
|
-
"right-icon": "keyboard_arrow_down",
|
|
630
|
-
modelValue: n(d).source,
|
|
631
|
-
"onUpdate:modelValue": t[3] || (t[3] = (l) => n(d).source = l),
|
|
632
|
-
label: "Source: ",
|
|
633
|
-
"show-item-label": !0,
|
|
634
|
-
items: n(g)
|
|
635
|
-
}, null, 8, ["modelValue", "items"]),
|
|
636
|
-
h(se, {
|
|
637
|
-
"model-value": {
|
|
638
|
-
startDate: n(d).dateRange.startDate,
|
|
639
|
-
endDate: n(d).dateRange.endDate
|
|
640
|
-
},
|
|
641
|
-
"onUpdate:modelValue": t[4] || (t[4] = (l) => n(d).dateRange = {
|
|
642
|
-
startDate: n(v)(l.startDate).startOf("d").toISOString(),
|
|
643
|
-
endDate: n(v)(l.endDate).endOf("d").toISOString()
|
|
644
|
-
})
|
|
645
|
-
}, null, 8, ["model-value"])
|
|
646
|
-
]),
|
|
647
|
-
h(y, {
|
|
648
|
-
class: "xs:hidden",
|
|
649
|
-
modelValue: n(d).search,
|
|
650
|
-
"onUpdate:modelValue": t[5] || (t[5] = (l) => n(d).search = l),
|
|
651
|
-
placeholder: "Search",
|
|
652
|
-
collapsible: ""
|
|
653
|
-
}, null, 8, ["modelValue"]),
|
|
654
|
-
T("div", ke, [
|
|
655
|
-
h(b, {
|
|
656
|
-
icon: "ios_share",
|
|
657
|
-
variant: "tertiary",
|
|
658
|
-
onClick: F
|
|
659
|
-
})
|
|
660
|
-
])
|
|
661
|
-
]),
|
|
662
|
-
h(ne, {
|
|
663
|
-
loading: n(w).isLoading,
|
|
664
|
-
"row-data": n(f),
|
|
665
|
-
"row-count": n(w).totalRows,
|
|
666
|
-
"column-defs": S.filter(
|
|
667
|
-
(l) => !u.user || l.header !== "User" && l.header !== "Phone No."
|
|
668
|
-
),
|
|
669
|
-
"page-count": n(w).pageCount,
|
|
670
|
-
"page-index": n(w).pageIndex,
|
|
671
|
-
"page-size": n(w).pageSize,
|
|
672
|
-
"shrink-at": !1,
|
|
673
|
-
onSortChange: n(e),
|
|
674
|
-
onPageChange: t[6] || (t[6] = (l) => n(s)({
|
|
675
|
-
pageSize: l.pageSize,
|
|
676
|
-
pageIndex: l.pageIndex
|
|
677
|
-
}))
|
|
678
|
-
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "page-count", "page-index", "page-size", "onSortChange"])
|
|
679
|
-
]);
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
});
|
|
683
|
-
class Ae extends oe {
|
|
684
|
-
}
|
|
685
|
-
const Ee = { class: "flex items-center justify-between" }, Ne = { class: "flex gap-8 items-center" }, Me = { class: "flex gap-8 items-center xs:hidden" }, tt = /* @__PURE__ */ z({
|
|
686
|
-
__name: "StoreTransactions",
|
|
687
|
-
props: {
|
|
688
|
-
user: {
|
|
689
|
-
type: String
|
|
690
|
-
}
|
|
691
|
-
},
|
|
692
|
-
setup(r) {
|
|
693
|
-
const c = r, i = [
|
|
694
|
-
{
|
|
695
|
-
header: "Transaction ID",
|
|
696
|
-
meta: {
|
|
697
|
-
maxWidth: "150px"
|
|
698
|
-
},
|
|
699
|
-
cell(e) {
|
|
700
|
-
return o("div", { class: "flex items-center" }, [
|
|
701
|
-
o(_.FmIcon, {
|
|
702
|
-
name: "content_copy",
|
|
703
|
-
outline: !0,
|
|
704
|
-
size: "sm",
|
|
705
|
-
class: "cursor-pointer mr-4 shrink-0",
|
|
706
|
-
onClick: (s) => {
|
|
707
|
-
s.preventDefault(), s.stopPropagation(), te(e.row.original._id.toString());
|
|
708
|
-
}
|
|
709
|
-
}),
|
|
710
|
-
o("div", { class: "truncate" }, e.row.original._id.toString())
|
|
711
|
-
]);
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
header: "Created at",
|
|
716
|
-
accessorFn: (e) => v($(e._id.toString())).format("D MMM YYYY, hh:mmA"),
|
|
717
|
-
enableSorting: !0
|
|
718
|
-
},
|
|
719
|
-
{
|
|
720
|
-
header: "Bundle",
|
|
721
|
-
accessorFn: (e) => e.bundle.name
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
header: "Location",
|
|
725
|
-
accessorFn: (e) => e.location ? e.pf_location.name : "Online Store"
|
|
726
|
-
},
|
|
727
|
-
{
|
|
728
|
-
header: "Payment Type",
|
|
729
|
-
accessorFn: (e) => {
|
|
730
|
-
var s;
|
|
731
|
-
return ((s = e.paymentType) == null ? void 0 : s.type) ?? "N/A";
|
|
732
|
-
},
|
|
733
|
-
cell(e) {
|
|
734
|
-
var s, x;
|
|
735
|
-
return o("div", { class: "flex items-center gap-4" }, [
|
|
736
|
-
o("div", { class: "flex items-center" }, [
|
|
737
|
-
((s = e.row.original.paymentType) == null ? void 0 : s.type) == "ONLINE" && e.row.original.paymentType.extra ? o(
|
|
738
|
-
_.FmTooltip,
|
|
739
|
-
{
|
|
740
|
-
content: e.row.original.paymentType.extra
|
|
741
|
-
},
|
|
742
|
-
[
|
|
743
|
-
o(_.FmIcon, {
|
|
744
|
-
name: "info",
|
|
745
|
-
outline: !0,
|
|
746
|
-
size: "sm"
|
|
747
|
-
})
|
|
748
|
-
]
|
|
749
|
-
) : o("div")
|
|
750
|
-
]),
|
|
751
|
-
o(
|
|
752
|
-
"div",
|
|
753
|
-
{ class: "flex-1" },
|
|
754
|
-
((x = e.row.original.paymentType) == null ? void 0 : x.type) ?? "N/A"
|
|
755
|
-
)
|
|
756
|
-
]);
|
|
757
|
-
}
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
header: "User",
|
|
761
|
-
cell: (e) => re(e.row.original.pf_member)
|
|
762
|
-
},
|
|
763
|
-
{
|
|
764
|
-
header: "Phone No.",
|
|
765
|
-
accessorFn: (e) => e.pf_member.phoneNumber
|
|
766
|
-
},
|
|
767
|
-
{
|
|
768
|
-
header: "Status",
|
|
769
|
-
// accessorFn: (u) => u.status,
|
|
770
|
-
cell(e) {
|
|
771
|
-
var s, x, I, g;
|
|
772
|
-
return o("div", { class: "flex items-center" }, [
|
|
773
|
-
o("div", e.row.original.status),
|
|
774
|
-
o("div", { class: "flex items-center" }, [
|
|
775
|
-
(x = (s = e.row.original) == null ? void 0 : s.refund) != null && x.reason ? o(
|
|
776
|
-
_.FmTooltip,
|
|
777
|
-
{
|
|
778
|
-
content: (g = (I = e.row.original) == null ? void 0 : I.refund) == null ? void 0 : g.reason
|
|
779
|
-
},
|
|
780
|
-
[
|
|
781
|
-
o(_.FmIcon, {
|
|
782
|
-
name: "info",
|
|
783
|
-
outline: !0,
|
|
784
|
-
size: "sm"
|
|
785
|
-
})
|
|
786
|
-
]
|
|
787
|
-
) : o("div")
|
|
788
|
-
])
|
|
789
|
-
]);
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
], p = A({
|
|
793
|
-
searchValue: "",
|
|
794
|
-
dateRange: {
|
|
795
|
-
startDate: v().subtract(7, "day").toISOString(),
|
|
796
|
-
endDate: v().toISOString()
|
|
797
|
-
}
|
|
798
|
-
}), { tableMeta: u, rowData: m, onSort: S, debouncedFetchData: d, onSearch: w } = ae(async (e) => {
|
|
799
|
-
const s = {
|
|
800
|
-
...p.value.dateRange,
|
|
801
|
-
user: c.user
|
|
802
|
-
};
|
|
803
|
-
return await B.readStoreTransactions(e, s);
|
|
804
|
-
});
|
|
805
|
-
W(
|
|
806
|
-
p,
|
|
807
|
-
() => {
|
|
808
|
-
d();
|
|
809
|
-
},
|
|
810
|
-
{ deep: !0 }
|
|
811
|
-
), G(async () => {
|
|
812
|
-
await d();
|
|
813
|
-
});
|
|
814
|
-
const f = async () => le({
|
|
815
|
-
exporter: new Ae(),
|
|
816
|
-
readFunction: (e) => B.readStoreTransactions(e, {
|
|
817
|
-
...p.value.dateRange,
|
|
818
|
-
user: c.user
|
|
819
|
-
}),
|
|
820
|
-
transformRecord: (e) => {
|
|
821
|
-
var s, x, I, g, R, F;
|
|
822
|
-
return {
|
|
823
|
-
TransactionId: ((s = e._id) == null ? void 0 : s.toString()) || "",
|
|
824
|
-
CreatedAt: v($(e._id.toString())).format(
|
|
825
|
-
"DD/MM/YYYY HH:mm:ss"
|
|
826
|
-
),
|
|
827
|
-
Bundle: e.bundle.name || "",
|
|
828
|
-
Location: e.location ? e.pf_location.name : "Online Store",
|
|
829
|
-
PaymentType: ((x = e.paymentType) == null ? void 0 : x.type) || "N/A",
|
|
830
|
-
PaymentExtra: ((I = e.paymentType) == null ? void 0 : I.extra) || "",
|
|
831
|
-
User: ((g = e.pf_member) == null ? void 0 : g.name) || "",
|
|
832
|
-
PhoneNumber: ((R = e.pf_member) == null ? void 0 : R.phoneNumber) || "",
|
|
833
|
-
Status: e.status || "",
|
|
834
|
-
RefundReason: ((F = e == null ? void 0 : e.refund) == null ? void 0 : F.reason) || ""
|
|
835
|
-
};
|
|
836
|
-
},
|
|
837
|
-
filename: "store-transactions"
|
|
838
|
-
});
|
|
839
|
-
return (e, s) => {
|
|
840
|
-
const x = D("FmSearch"), I = D("FmButton");
|
|
841
|
-
return O(), H("div", null, [
|
|
842
|
-
T("div", Ee, [
|
|
843
|
-
T("div", Ne, [
|
|
844
|
-
h(se, {
|
|
845
|
-
modelValue: n(p).dateRange,
|
|
846
|
-
"onUpdate:modelValue": s[0] || (s[0] = (g) => n(p).dateRange = g)
|
|
847
|
-
}, null, 8, ["modelValue"])
|
|
848
|
-
]),
|
|
849
|
-
T("div", Me, [
|
|
850
|
-
h(x, {
|
|
851
|
-
modelValue: n(u).searchValue,
|
|
852
|
-
"onUpdate:modelValue": [
|
|
853
|
-
s[1] || (s[1] = (g) => n(u).searchValue = g),
|
|
854
|
-
n(w)
|
|
855
|
-
],
|
|
856
|
-
placeholder: "Search",
|
|
857
|
-
collapsible: ""
|
|
858
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
859
|
-
h(I, {
|
|
860
|
-
icon: "ios_share",
|
|
861
|
-
variant: "tertiary",
|
|
862
|
-
onClick: f
|
|
863
|
-
})
|
|
864
|
-
])
|
|
865
|
-
]),
|
|
866
|
-
h(ne, {
|
|
867
|
-
loading: n(u).isLoading,
|
|
868
|
-
"row-data": n(m),
|
|
869
|
-
"row-count": n(u).totalRows,
|
|
870
|
-
"column-defs": i.filter(
|
|
871
|
-
(g) => !c.user || g.header !== "User" && g.header !== "Phone No."
|
|
872
|
-
),
|
|
873
|
-
"page-count": n(u).pageCount,
|
|
874
|
-
"page-index": n(u).pageIndex,
|
|
875
|
-
"page-size": n(u).pageSize,
|
|
876
|
-
"shrink-at": !1,
|
|
877
|
-
onSortChange: n(S),
|
|
878
|
-
onPageChange: s[2] || (s[2] = (g) => n(d)({
|
|
879
|
-
pageSize: g.pageSize,
|
|
880
|
-
pageIndex: g.pageIndex
|
|
881
|
-
}))
|
|
882
|
-
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "page-count", "page-index", "page-size", "onSortChange"])
|
|
883
|
-
]);
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
|
-
});
|
|
887
|
-
export {
|
|
888
|
-
et as _,
|
|
889
|
-
tt as a
|
|
890
|
-
};
|