@feedmepos/mf-connect 0.1.0-beta.3 → 0.1.0-beta.30
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-DLez3H4H.js +424 -0
- package/dist/{App-gzbM97vW.js → App-dkNRyYLR.js} +397 -384
- package/dist/{Broadcast-BwYZkTs0.js → Broadcast-DlAaBitD.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BtpiGQEs.js} +8 -8
- package/dist/Card-JpWEjzjP.js +897 -0
- package/dist/{Collections-Df6tlo8S.js → Collections-D5hUfDJo.js} +4 -4
- package/dist/{Credit-BPel8vA9.js → Credit-v3KdCFwT.js} +14 -14
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CE2Ar-Ll.js +2198 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js → EffectSheet.vue_vue_type_style_index_0_lang-C12m8EXP.js} +8 -8
- package/dist/{Experience-CPpz1Zwx.js → Experience-9A41fyZO.js} +8 -8
- package/dist/{Game-ByLblISC.js → Game-l1tUsePJ.js} +15 -15
- package/dist/Index-rF6OzGw_.js +255 -0
- package/dist/Marketing-6zS-6CS3.js +20070 -0
- package/dist/{Member-CCc_FEZY.js → Member-B5jPh0DM.js} +4 -4
- package/dist/MemberList-c2P1lToO.js +1045 -0
- package/dist/{MemberTransactions-DD5ahSbY.js → MemberTransactions-BiwAZyCP.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js → MessageInput.vue_vue_type_script_setup_true_lang-CYVOCazs.js} +2 -2
- package/dist/{Mission-VH4057I-.js → Mission-BM7abR6J.js} +98 -86
- package/dist/Overview-Drjb4oAW.js +1024 -0
- package/dist/{Point-Bu3IlpH4.js → Point-BP9YezdW.js} +23 -23
- package/dist/{Promotion-B45AOHis.js → Promotion-DiqlNOWk.js} +53 -47
- package/dist/Record-DJ2A1L-C.js +209 -0
- package/dist/Reward-DN6z6LXf.js +411 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CcbzCFUg.js +151 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CFD10xnG.js +1639 -0
- package/dist/Segment-Cm48eZrS.js +567 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-6XokSm7W.js +181 -0
- package/dist/{Setting-CF09eRQJ.js → Setting-3jXUi2cS.js} +8 -8
- package/dist/Store-Csditfe8.js +1745 -0
- package/dist/{StoreRewards-0iGExjqQ.js → StoreRewards-DOMxpeaj.js} +12 -12
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Csoobxol.js +957 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C8UhKTgD.js} +1 -1
- package/dist/{Tier-IaeWe7rM.js → Tier-BmhQYaPz.js} +318 -306
- package/dist/{Title-DD67Zxh5.js → Title-BJV4yLCu.js} +199 -183
- package/dist/{Transaction-BsPDnLzB.js → Transaction-DB81PNYL.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-wyCBPQRj.js +130 -0
- package/dist/{Voucher-M7JfcKo0.js → Voucher-B8nnAIUZ.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-B4zIOBh0.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js → ZodTextField.vue_vue_type_script_setup_true_lang-DvfcNsj9.js} +1 -1
- package/dist/{app-DwujUNP-.js → app-BYTkNtdY.js} +1 -1
- package/dist/{app-HFICF0vL.js → app-sD3N1iqR.js} +1285 -1283
- package/dist/app.js +1 -1
- package/dist/{business-BaF1QJXa.js → business-B6OFKNz4.js} +1 -1
- package/dist/{campaign-CTDtmAE9.js → campaign-DhumfBC6.js} +2 -2
- package/dist/collectible.enum-4Gywgj__.js +19 -0
- package/dist/{collection.fn-DMW03W4R.js → collection.fn-D-uexOQL.js} +2 -2
- package/dist/{dto-gpaNZHzQ.js → dto-b9jcbMWA.js} +78 -86
- package/dist/{effect-CBUmtwet.js → effect-CBN4vtSi.js} +9 -9
- package/dist/email-addresses-BqgJVUoG.js +705 -0
- package/dist/{export-Bdh_PbsW.js → export-D1kS_vMc.js} +3 -3
- package/dist/{helper-Cu9elRvl.js → helper-SbkTJZDm.js} +1 -1
- package/dist/index-BBBSm4kr.js +54 -0
- package/dist/index-BIs-Ed1-.js +29000 -0
- package/dist/{index-ogzk-Mj4.js → index-CBwwTcb5.js} +1 -1
- package/dist/{index-At6yms5t.js → index-CHg2swyg.js} +30 -26
- package/dist/index-Cd94xjeo.js +38 -0
- package/dist/{index-CArqG03W.js → index-Cehc8dyz.js} +39 -35
- package/dist/index-CsaQJMAR.js +66 -0
- package/dist/{index-CtH2S49l.js → index-CxBG7i3n.js} +203 -195
- package/dist/{index-DrGrOgZB.js → index-DgJVPeks.js} +13 -1
- package/dist/{index-NXiDu42U.js → index-Dp-5hs3q.js} +1 -1
- package/dist/{index-Crw-Vgo5.js → index-DtX7V_mF.js} +1500 -1479
- package/dist/index-Hhxoo_Eg.js +1067 -0
- package/dist/{index-Ch6XwPzF.js → index-OCIxZJKd.js} +1 -1
- package/dist/{index-Dfdg2Q3E.js → index-wJ5e3mQa.js} +1 -1
- package/dist/{index.esm2017-CeJpvUbA.js → index.esm2017-Bl1OPd9N.js} +33 -33
- package/dist/{loading-Cn8ml_vy.js → loading-BghJIv3w.js} +591 -597
- package/dist/{membership-CX4AKMlH.js → membership-D532uzUJ.js} +51 -43
- package/dist/money-BJmDeENN.js +15 -0
- package/dist/number-E_LdkU9a.js +12 -0
- package/dist/objectid-DSB8jlsT.js +145 -0
- package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
- package/dist/reward-CiTzAsCd.js +36 -0
- package/dist/{rule-Cv83Y59R.js → rule-0MEHUef9.js} +180 -177
- package/dist/{rule-builder-Dew4yB5Q.js → rule-builder-BQZN0Bi4.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{template-CSnbgM1o.js → template-2xDKWfij.js} +5 -5
- package/dist/trigger-BFmJQkCL.js +114 -0
- package/dist/user-B_diJ-ER.js +54 -0
- package/dist/{vue-i18n-CNH_IhVd.js → vue-i18n-D0S05G9j.js} +408 -408
- package/dist/{xlsx-D4DUZHix.js → xlsx-9pjTnN_k.js} +1 -1
- package/package.json +8 -7
- package/dist/Analytic-BC5BA6pN.js +0 -622
- package/dist/Card-CBYQGKwY.js +0 -825
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js +0 -2809
- package/dist/Marketing-D0vm80e_.js +0 -316
- package/dist/MemberList-CrnipE9y.js +0 -1733
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js +0 -1753
- package/dist/Segment-ZWsp48aC.js +0 -437
- package/dist/Store-B_G6Dhmq.js +0 -1511
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js +0 -890
- package/dist/index-8MaN7rez.js +0 -762
- package/dist/index-BjdHxGDn.js +0 -298
- package/dist/index-CuvNtC_M.js +0 -61
- package/dist/index-RP0XOPRL.js +0 -29193
- package/dist/money-BTejgvKu.js +0 -15
- package/dist/number-Cen5TucC.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-At6yms5t.js";
|
|
4
|
-
import { a as te } from "./loading-Cn8ml_vy.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-Cen5TucC.js";
|
|
9
|
-
import { u as be } from "./business-BaF1QJXa.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-Bdh_PbsW.js";
|
|
13
|
-
import { u as he } from "./campaign-CTDtmAE9.js";
|
|
14
|
-
import "./index-Dfdg2Q3E.js";
|
|
15
|
-
import { useRouter as ve } from "vue-router";
|
|
16
|
-
import { R as V } from "./app-HFICF0vL.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-RP0XOPRL.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
|
-
};
|