@feedmepos/mf-connect 0.1.63-prod → 0.1.65-prod
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-CG3hA6fW.js → Analytic-C5DE9NQJ.js} +27 -28
- package/dist/{App-CQUFVNES.js → App-DgEd6GLa.js} +7 -7
- package/dist/{Bin-whBityJo.js → Bin-DyWpGeoP.js} +8 -8
- package/dist/{Broadcast-BRgmIWF2.js → Broadcast-eqjJulx4.js} +10 -11
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DfATb_0G.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BfgttR2V.js} +6 -6
- package/dist/{Card-BgIT9bSV.js → Card-hFexO-iT.js} +16 -16
- package/dist/{Collections-DgBll2HL.js → Collections-BtBugjnH.js} +179 -165
- package/dist/{Credit-FVqQqTve.js → Credit-98wQjJxS.js} +10 -11
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-CIApefkS.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-IrMeqHYK.js} +31 -31
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CVRvxR02.js → EffectSheet.vue_vue_type_style_index_0_lang-QM5-F282.js} +6 -6
- package/dist/{Experience-C23g_MfA.js → Experience-eVl9fAYr.js} +27 -28
- package/dist/{Game-CqbQTIqS.js → Game-C1oQthuo.js} +11 -12
- package/dist/{Index-D32I90Uf.js → Index-BACzirfP.js} +10 -10
- package/dist/{Marketing-ApmF9GMZ.js → Marketing-BOuh3JQF.js} +6 -6
- package/dist/{Member-p-MDnwdo.js → Member-DHcw5SAF.js} +10 -10
- package/dist/{MemberList-CWS216Oq.js → MemberList-BNVIjVXb.js} +25 -25
- package/dist/{MemberTransactions-1NaCYExP.js → MemberTransactions-DMpNrtT4.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-Ds28eMF3.js → MessageInput.vue_vue_type_script_setup_true_lang-MYkwax61.js} +7 -7
- package/dist/{Mission-D2EklQ6k.js → Mission-O9thc-xh.js} +19 -20
- package/dist/{Overview-Q2_jChHL.js → Overview-DYDTEJpf.js} +18 -18
- package/dist/{Point-D7IFoiQ5.js → Point-AoMfVDyc.js} +10 -11
- package/dist/{Promotion-BMKAj_VJ.js → Promotion-Bdmmnd5n.js} +11 -12
- package/dist/{Queue-CckukUf2.js → Queue-C59v4zpR.js} +10 -10
- package/dist/{Record-sjJx9Rxr.js → Record-DJimfMy6.js} +8 -8
- package/dist/{Reward-C33_2GAs.js → Reward-DoRA5oe0.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-4Ah1HGJW.js → RewardGroup.vue_vue_type_script_setup_true_lang-ys_Vh6MC.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CpDZBVmB.js → RuleGroup.vue_vue_type_script_setup_true_lang-ClQbIu9q.js} +13 -13
- package/dist/{Segment-CR4_Y82e.js → Segment-B1bvEg9R.js} +22 -22
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-CDZw5i96.js → SelectItems.vue_vue_type_script_setup_true_lang-BKdjRWtr.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-pW_AdLpP.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CDOOVRwr.js} +11 -11
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-BS62Yf0v.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CvZRK_DV.js} +3 -3
- package/dist/{Setting-D4RTLzZM.js → Setting-puwRxs7w.js} +12 -12
- package/dist/{SettingAdvertisements-Cc9IMI41.js → SettingAdvertisements-D0e9lyCy.js} +65 -63
- package/dist/Store-BSbLeEpY.js +1924 -0
- package/dist/{StoreRewards-CzrZS5Au.js → StoreRewards-DDtlg3wU.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Ci3xQrAn.js → StoreTransactions.vue_vue_type_script_setup_true_lang-xWPIvf68.js} +361 -343
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DG7dPhv0.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-6gvUWrB_.js} +1 -1
- package/dist/{Tier-9-iKsHxM.js → Tier-C3ZY5wI7.js} +97 -98
- package/dist/{Title-C6TY3BbS.js → Title-D9FHvMc0.js} +27 -28
- package/dist/{Transaction-BGxgNf0y.js → Transaction-hopVsT0g.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-xiH9sxVn.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CsL3d7xM.js} +6 -6
- package/dist/{Voucher-Cdh0PqeF.js → Voucher-D1WfKPnA.js} +132 -117
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BRw2nedI.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BCorf-T-.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-D6En5sRQ.js → ZodTextField.vue_vue_type_script_setup_true_lang-fp4U_C6t.js} +1 -1
- package/dist/{app-DIFcDSPz.js → app-BOEkcROx.js} +1 -1
- package/dist/{app-qOoNoXsj.js → app-VcIY7uz8.js} +496 -454
- package/dist/app.js +1 -1
- package/dist/{business-D8WOIwU3.js → business-CxrnbBG7.js} +1 -1
- package/dist/{campaign-B5Zcg5dG.js → campaign-DOOGvk7s.js} +9 -9
- package/dist/campaign-OdVtlvIh.js +213 -0
- package/dist/{campaign.enum-BVGqtpbT.js → campaign.enum-jzknDWsU.js} +1 -1
- package/dist/{campaign.fn-BJksX0lC.js → campaign.fn-C8KE-0gy.js} +40 -40
- package/dist/{collectible.enum-CDt5sCg-.js → collectible.enum-GH2dIJq0.js} +1 -1
- package/dist/{collection.fn-BmkwrIEt.js → collection.fn-BAhwf5Jh.js} +2 -2
- package/dist/{dto-BazhL1Wz.js → dto-B7m1l1UL.js} +4 -4
- package/dist/{effect-CERxlyga.js → effect-Cu0scI-k.js} +1 -1
- package/dist/{email-addresses-XWcL2s8u.js → email-addresses-C0c1x8Vz.js} +1 -1
- package/dist/{export-Ctk6xkHX.js → export-BR2VkJmz.js} +3 -3
- package/dist/{helper-C36sBB0k.js → helper-DNkQl8J2.js} +1 -1
- package/dist/{index-CYHzkVmf.js → index-BsQsj910.js} +3 -3
- package/dist/{index-BHPj_XYw.js → index-ByfJpxsf.js} +4 -4
- package/dist/{index-B9gRFG1Q.js → index-C23lCiVv.js} +1 -1
- package/dist/{index-Dz55oJOD.js → index-CO55xRbh.js} +530 -523
- package/dist/{index-D-cA3r-f.js → index-C_rW5Zzv.js} +1 -1
- package/dist/{index-1xCqie-s.js → index-CszV-kA7.js} +1 -1
- package/dist/{index-COJnc6ip.js → index-DWMboOMi.js} +1 -1
- package/dist/{index-Dr1iOdke.js → index-Dfi4M9Ap.js} +112 -104
- package/dist/{index-BSdS5JkE.js → index-DlgPQvBd.js} +1 -1
- package/dist/{index-BGirRSvf.js → index-Drvx6WWC.js} +1 -1
- package/dist/{index-Ctu4ZSkP.js → index-RkjhZsEw.js} +1 -1
- package/dist/{index-BhcuNARt.js → index-WCOWzb_D.js} +3 -3
- package/dist/{index-BAjS-mNm.js → index-WY8Y3SjU.js} +3 -3
- package/dist/{index.esm2017-CwEbNcAn.js → index.esm2017-DBFvix-C.js} +1 -1
- package/dist/{loading-DsAWzrAU.js → loading-DfP4ZQcW.js} +1 -1
- package/dist/{membership-CIWA-YIz.js → membership-CiLwVV-2.js} +3 -3
- package/dist/{money-B8_RYpfI.js → money-B92Ui9aH.js} +1 -1
- package/dist/{number-ClNyxrPX.js → number-CHYDMZpy.js} +1 -1
- package/dist/{objectid-B7Hb21TR.js → objectid-CsToJ4hH.js} +6 -6
- package/dist/{plugins-BaCcQwW_.js → plugins-GAf1L8Pd.js} +2 -2
- package/dist/{reward-Br3L7Y4x.js → reward-FLVXCKuH.js} +1 -1
- package/dist/{rule-CELh8Paa.js → rule-BHV4bC-1.js} +3 -3
- package/dist/{rule-builder-Dw3JpYy8.js → rule-builder-5WcDxoUM.js} +1 -1
- package/dist/{template-BIOneLeZ.js → template-C-y0046H.js} +4 -4
- package/dist/{timezone-Jr40C0YQ.js → timezone-Bdf9qSCF.js} +1 -1
- package/dist/{trigger-Bl_yRkKF.js → trigger-CjZQ4Gch.js} +4 -4
- package/dist/{user-C3J0hjK-.js → user-C5qgJUwB.js} +1 -1
- package/dist/{vue-i18n-DbCbvmTz.js → vue-i18n-6i4pn5bC.js} +99 -99
- package/dist/{xlsx-ClGRNHcc.js → xlsx-C4iuxJ6i.js} +166 -166
- package/package.json +1 -1
- package/dist/Store-BTE44D1j.js +0 -1842
- package/dist/campaign-IEgssyOs.js +0 -94
- package/dist/index-DTvC-nBb.js +0 -124
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as ee, useModel as
|
|
2
|
-
import { components as
|
|
3
|
-
import { r as oe } from "./index-
|
|
4
|
-
import "./index-
|
|
5
|
-
import { s as
|
|
1
|
+
import { defineComponent as H, mergeModels as ee, useModel as ye, computed as U, onMounted as ae, watch as Q, resolveComponent as O, openBlock as E, createBlock as q, withCtx as W, createVNode as R, unref as n, ref as M, h as r, isRef as he, createElementVNode as x, createElementBlock as V, Fragment as X, renderList as te, toDisplayString as L, createTextVNode as ve, resolveDynamicComponent as be, onBeforeMount as _e } from "vue";
|
|
2
|
+
import { components as b, useDialog as Se } from "@feedmepos/ui-library";
|
|
3
|
+
import { r as oe } from "./index-ByfJpxsf.js";
|
|
4
|
+
import "./index-WY8Y3SjU.js";
|
|
5
|
+
import { s as xe } from "./index-DlgPQvBd.js";
|
|
6
6
|
import { h as y } from "./moment-D7p2TMB-.js";
|
|
7
7
|
import { _ as j } from "./FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js";
|
|
8
8
|
import { s as K } from "./index-CuvNtC_M.js";
|
|
9
|
-
import { f as J } from "./number-
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import { a as Z, c as
|
|
13
|
-
import { g as
|
|
14
|
-
import { B as ie, e as ce } from "./export-
|
|
15
|
-
import { u as ue } from "./campaign-
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import { u as
|
|
9
|
+
import { f as J } from "./number-CHYDMZpy.js";
|
|
10
|
+
import { u as ne } from "./business-CxrnbBG7.js";
|
|
11
|
+
import { u as re, _ as se } from "./usePagination-Ds-cuHop.js";
|
|
12
|
+
import { a as Z, c as we, p as De } from "./plugins-GAf1L8Pd.js";
|
|
13
|
+
import { g as le } from "./user-C5qgJUwB.js";
|
|
14
|
+
import { B as ie, e as ce } from "./export-BR2VkJmz.js";
|
|
15
|
+
import { u as ue } from "./campaign-OdVtlvIh.js";
|
|
16
|
+
import "./index-DWMboOMi.js";
|
|
17
|
+
import "./index-CO55xRbh.js";
|
|
18
|
+
import "./index-Dfi4M9Ap.js";
|
|
19
|
+
import "./index-RkjhZsEw.js";
|
|
20
|
+
import "./index-WCOWzb_D.js";
|
|
21
|
+
import { u as me } from "./vue-i18n-6i4pn5bC.js";
|
|
22
22
|
import { o as P } from "./objectId-dwaoBfJX.js";
|
|
23
|
-
import { useRouter as
|
|
24
|
-
import { t as G } from "./index-
|
|
25
|
-
import { R as z } from "./app-
|
|
26
|
-
import { u as
|
|
23
|
+
import { useRouter as Re } from "vue-router";
|
|
24
|
+
import { t as G } from "./index-Drvx6WWC.js";
|
|
25
|
+
import { R as z } from "./app-VcIY7uz8.js";
|
|
26
|
+
import { u as Ce } from "./loading-DfP4ZQcW.js";
|
|
27
27
|
import { useCoreStore as Te } from "@feedmepos/mf-common";
|
|
28
|
-
import { m as
|
|
29
|
-
function Ie(
|
|
28
|
+
import { m as Fe } from "./index-CszV-kA7.js";
|
|
29
|
+
function Ie(m) {
|
|
30
30
|
let f = "";
|
|
31
|
-
switch (
|
|
31
|
+
switch (m) {
|
|
32
32
|
case "PORTAL":
|
|
33
33
|
f = "ADMIN";
|
|
34
34
|
break;
|
|
@@ -51,40 +51,40 @@ function Ie(u) {
|
|
|
51
51
|
f = "COUNTER REDEEM";
|
|
52
52
|
break;
|
|
53
53
|
default:
|
|
54
|
-
f =
|
|
54
|
+
f = m;
|
|
55
55
|
break;
|
|
56
56
|
}
|
|
57
57
|
return f;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
var f,
|
|
61
|
-
switch ((f =
|
|
59
|
+
function Ee(m) {
|
|
60
|
+
var f, S, u, d, _, C;
|
|
61
|
+
switch ((f = m == null ? void 0 : m.pf_collectible) == null ? void 0 : f.type) {
|
|
62
62
|
case "VOUCHER":
|
|
63
|
-
return `${(
|
|
63
|
+
return `${(S = m.pf_collectible) == null ? void 0 : S.type} (${(u = m.pf_collectible) == null ? void 0 : u.name})`;
|
|
64
64
|
case "TITLE":
|
|
65
|
-
return `${(
|
|
65
|
+
return `${(d = m.pf_collectible) == null ? void 0 : d.type} (${(_ = m.pf_collectible) == null ? void 0 : _.name})`;
|
|
66
66
|
case "POINT":
|
|
67
67
|
return "Experience";
|
|
68
68
|
case "COIN":
|
|
69
69
|
return "Point";
|
|
70
70
|
default:
|
|
71
|
-
return
|
|
71
|
+
return xe((C = m == null ? void 0 : m.pf_collectible) == null ? void 0 : C.type);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
switch (
|
|
74
|
+
function Ne(m) {
|
|
75
|
+
switch (m) {
|
|
76
76
|
case "ONLINE":
|
|
77
77
|
return "Online";
|
|
78
78
|
case "COIN":
|
|
79
79
|
return "Point";
|
|
80
80
|
default:
|
|
81
|
-
return
|
|
81
|
+
return m;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const N = {
|
|
85
85
|
getReason: Ie,
|
|
86
|
-
formattedType:
|
|
87
|
-
formattedPaymentType:
|
|
86
|
+
formattedType: Ee,
|
|
87
|
+
formattedPaymentType: Ne
|
|
88
88
|
}, k = "YYYY-MM-DD", de = /* @__PURE__ */ H({
|
|
89
89
|
__name: "DateRangeChip",
|
|
90
90
|
props: /* @__PURE__ */ ee({
|
|
@@ -103,31 +103,31 @@ const E = {
|
|
|
103
103
|
dateRangeModifiers: {}
|
|
104
104
|
}),
|
|
105
105
|
emits: /* @__PURE__ */ ee(["update:model-value"], ["update:dateRange"]),
|
|
106
|
-
setup(
|
|
107
|
-
const
|
|
108
|
-
startDate:
|
|
109
|
-
endDate:
|
|
106
|
+
setup(m, { emit: f }) {
|
|
107
|
+
const S = m, u = f, d = ye(m, "dateRange"), _ = U(() => d.value ? `${C.value.startDate ?? "Start"} - ${C.value.endDate ?? "End"}` : "No dates selected."), C = U(() => ({
|
|
108
|
+
startDate: d.value.startDate ? y(d.value.startDate).format(k) : void 0,
|
|
109
|
+
endDate: d.value.endDate ? y(d.value.endDate).format(k) : void 0
|
|
110
110
|
}));
|
|
111
111
|
return ae(() => {
|
|
112
|
-
|
|
113
|
-
startDate:
|
|
114
|
-
endDate:
|
|
112
|
+
d.value = {
|
|
113
|
+
startDate: S.modelValue.startDate ? y(S.modelValue.startDate).format(k) : void 0,
|
|
114
|
+
endDate: S.modelValue.endDate ? y(S.modelValue.endDate).format(k) : void 0
|
|
115
115
|
};
|
|
116
116
|
}), Q(
|
|
117
|
-
() =>
|
|
117
|
+
() => d.value,
|
|
118
118
|
() => {
|
|
119
|
-
|
|
119
|
+
u("update:model-value", C.value);
|
|
120
120
|
}
|
|
121
|
-
), (
|
|
122
|
-
const
|
|
123
|
-
return
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue":
|
|
121
|
+
), (A, c) => {
|
|
122
|
+
const T = O("FmChip"), p = O("FmDateRangePicker");
|
|
123
|
+
return E(), q(p, {
|
|
124
|
+
modelValue: d.value,
|
|
125
|
+
"onUpdate:modelValue": c[0] || (c[0] = (o) => d.value = o),
|
|
126
126
|
"show-predefined-range": ""
|
|
127
127
|
}, {
|
|
128
128
|
"trigger-button": W(() => [
|
|
129
|
-
|
|
130
|
-
label:
|
|
129
|
+
R(T, {
|
|
130
|
+
label: n(_),
|
|
131
131
|
icon: "calendar_month",
|
|
132
132
|
"right-icon": "keyboard_arrow_down",
|
|
133
133
|
class: "text-fm-color-neutral-gray-400 cursor-pointer"
|
|
@@ -138,35 +138,35 @@ const E = {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
-
class
|
|
141
|
+
class Oe extends ie {
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const Ae = { class: "space-y-24 pr-12" }, Me = { class: "w-full space-y-16" }, ke = { class: "fm-typo-en-body-lg-600" }, Ve = ["onClick"], Pe = { class: "fm-typo-en-body-lg-600" }, Ye = ["onClick"], Ue = { class: "flex items-center gap-8" }, $e = /* @__PURE__ */ H({
|
|
144
144
|
__name: "TransactionDetailSheet",
|
|
145
|
-
setup(
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
function
|
|
149
|
-
|
|
145
|
+
setup(m, { expose: f }) {
|
|
146
|
+
me();
|
|
147
|
+
const S = M(!1), u = M(), d = ue(), _ = ne();
|
|
148
|
+
function C(p, o) {
|
|
149
|
+
S.value = p, u.value = o ?? null;
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
var p,
|
|
151
|
+
const A = U(() => {
|
|
152
|
+
var p, o;
|
|
153
153
|
return J(
|
|
154
|
-
((
|
|
155
|
-
(e,
|
|
156
|
-
((p =
|
|
154
|
+
((o = u.value) == null ? void 0 : o.expiryAmount.reduce(
|
|
155
|
+
(e, l) => e + l.amount,
|
|
156
|
+
((p = u.value) == null ? void 0 : p.amount) ?? 0
|
|
157
157
|
)) ?? 0,
|
|
158
158
|
2
|
|
159
159
|
);
|
|
160
|
-
}),
|
|
161
|
-
var p,
|
|
162
|
-
return
|
|
160
|
+
}), c = U(() => {
|
|
161
|
+
var p, o, e, l, s;
|
|
162
|
+
return u.value ? [
|
|
163
163
|
{
|
|
164
164
|
label: "Transaction ID",
|
|
165
|
-
value: (p =
|
|
165
|
+
value: (p = u.value) == null ? void 0 : p._id
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
label: "Date/Time",
|
|
169
|
-
value: y(P(
|
|
169
|
+
value: y(P(u.value._id.toString())).format(
|
|
170
170
|
"D MMM YYYY, hh:mmA"
|
|
171
171
|
)
|
|
172
172
|
},
|
|
@@ -177,118 +177,118 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
177
177
|
{
|
|
178
178
|
class: [
|
|
179
179
|
"pr-2",
|
|
180
|
-
+
|
|
180
|
+
+A.value > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
|
|
181
181
|
]
|
|
182
182
|
},
|
|
183
|
-
|
|
183
|
+
A.value
|
|
184
184
|
)
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
label: "Type",
|
|
188
|
-
value:
|
|
188
|
+
value: N.formattedType(u.value)
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
label: "Source",
|
|
192
|
-
value: K(
|
|
192
|
+
value: K(N.getReason(u.value.source))
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
label: "User",
|
|
196
|
-
value: (e = (
|
|
196
|
+
value: (e = (o = u.value) == null ? void 0 : o.pf_user) == null ? void 0 : e.name
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
label: "Phone Number",
|
|
200
|
-
value: (
|
|
200
|
+
value: (s = (l = u.value) == null ? void 0 : l.pf_user) == null ? void 0 : s.phoneNumber
|
|
201
201
|
}
|
|
202
202
|
] : [];
|
|
203
|
-
}),
|
|
204
|
-
var
|
|
205
|
-
if (!
|
|
206
|
-
const p = [],
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
(
|
|
203
|
+
}), T = U(() => {
|
|
204
|
+
var l, s, w, g;
|
|
205
|
+
if (!u.value) return [];
|
|
206
|
+
const p = [], o = (l = u.value) == null ? void 0 : l.metadata, e = u.value;
|
|
207
|
+
if (o != null && o.campaign) {
|
|
208
|
+
const D = d.campaigns.all.find(
|
|
209
|
+
(F) => F._id === (o == null ? void 0 : o.campaign)
|
|
210
210
|
);
|
|
211
|
-
if (!
|
|
211
|
+
if (!D) return;
|
|
212
212
|
p.push({
|
|
213
213
|
label: "Campaign",
|
|
214
|
-
value:
|
|
214
|
+
value: D.name
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
return
|
|
217
|
+
return o != null && o.remark && p.push({
|
|
218
218
|
label: "Remark",
|
|
219
|
-
value:
|
|
220
|
-
}), (
|
|
219
|
+
value: o.remark
|
|
220
|
+
}), (s = u.value) != null && s.ref.startsWith("bill_") && p.push({
|
|
221
221
|
label: "Bill Number",
|
|
222
|
-
value: (w =
|
|
222
|
+
value: (w = u.value) == null ? void 0 : w.ref,
|
|
223
223
|
copy: () => {
|
|
224
|
-
var
|
|
225
|
-
return Z((
|
|
224
|
+
var D;
|
|
225
|
+
return Z((D = u.value) == null ? void 0 : D.ref);
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
227
|
+
}), o != null && o.location && p.push({
|
|
228
228
|
label: "Location",
|
|
229
229
|
value: (g = _.locations.find(
|
|
230
|
-
(
|
|
230
|
+
(D) => D._id.toString() === (o == null ? void 0 : o.location)
|
|
231
231
|
)) == null ? void 0 : g.name
|
|
232
232
|
}), e.source === oe.enum.STORE && p.push({
|
|
233
233
|
label: "Store Transaction",
|
|
234
234
|
value: e.ref
|
|
235
|
-
}),
|
|
235
|
+
}), o != null && o.originTransaction && p.push({
|
|
236
236
|
label: "Parent Transaction",
|
|
237
|
-
value:
|
|
238
|
-
}),
|
|
237
|
+
value: o.originTransaction
|
|
238
|
+
}), o != null && o.referral_count && p.push({
|
|
239
239
|
label: "Referral Count",
|
|
240
|
-
value:
|
|
241
|
-
}), e.
|
|
240
|
+
value: o.referral_count
|
|
241
|
+
}), e.refundedFrom && p.push({
|
|
242
242
|
label: "Refunded From",
|
|
243
243
|
value: e.refundedFrom
|
|
244
244
|
}), p;
|
|
245
245
|
});
|
|
246
246
|
return f({
|
|
247
|
-
showSheet:
|
|
248
|
-
}), (p,
|
|
249
|
-
const e =
|
|
250
|
-
return
|
|
247
|
+
showSheet: C
|
|
248
|
+
}), (p, o) => {
|
|
249
|
+
const e = O("FmButton"), l = O("FmSideSheet");
|
|
250
|
+
return E(), q(l, {
|
|
251
251
|
"max-width": 560,
|
|
252
|
-
modelValue:
|
|
253
|
-
"onUpdate:modelValue":
|
|
252
|
+
modelValue: n(S),
|
|
253
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => he(S) ? S.value = s : null),
|
|
254
254
|
header: "Transaction Details"
|
|
255
255
|
}, {
|
|
256
256
|
"side-sheet-footer": W(() => [
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
x("div", Ue, [
|
|
258
|
+
R(e, {
|
|
259
259
|
label: "Close",
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: o[0] || (o[0] = (s) => C(!1)),
|
|
261
261
|
variant: "tertiary"
|
|
262
262
|
})
|
|
263
263
|
])
|
|
264
264
|
]),
|
|
265
265
|
default: W(() => [
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
(
|
|
269
|
-
key:
|
|
266
|
+
x("div", Ae, [
|
|
267
|
+
x("div", Me, [
|
|
268
|
+
(E(!0), V(X, null, te(n(c), (s) => (E(), V("div", {
|
|
269
|
+
key: s.label,
|
|
270
270
|
class: "flex flex-col gap-4"
|
|
271
271
|
}, [
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
x("div", ke, L(s.label), 1),
|
|
273
|
+
x("div", {
|
|
274
274
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400 hover:underline",
|
|
275
|
-
onClick:
|
|
275
|
+
onClick: s.copy
|
|
276
276
|
}, [
|
|
277
|
-
|
|
278
|
-
(
|
|
279
|
-
], 8,
|
|
280
|
-
|
|
277
|
+
ve(L(s.accessorFn ? s.accessorFn() : s.value) + " ", 1),
|
|
278
|
+
(E(), q(be(s.component)))
|
|
279
|
+
], 8, Ve),
|
|
280
|
+
o[2] || (o[2] = x("hr", { class: "mt-3" }, null, -1))
|
|
281
281
|
]))), 128)),
|
|
282
|
-
(
|
|
283
|
-
key:
|
|
282
|
+
(E(!0), V(X, null, te(n(T), (s) => (E(), V("div", {
|
|
283
|
+
key: s.label,
|
|
284
284
|
class: "flex flex-col gap-4"
|
|
285
285
|
}, [
|
|
286
|
-
|
|
287
|
-
|
|
286
|
+
x("div", Pe, L(s.label), 1),
|
|
287
|
+
x("div", {
|
|
288
288
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400 hover:underline",
|
|
289
|
-
onClick:
|
|
290
|
-
}, L(
|
|
291
|
-
|
|
289
|
+
onClick: s.copy
|
|
290
|
+
}, L(s.accessorFn ? s.accessorFn() : s.value), 9, Ye),
|
|
291
|
+
o[3] || (o[3] = x("hr", { class: "mt-3" }, null, -1))
|
|
292
292
|
]))), 128))
|
|
293
293
|
])
|
|
294
294
|
])
|
|
@@ -297,36 +297,36 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
297
297
|
}, 8, ["modelValue"]);
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
|
-
}),
|
|
300
|
+
}), Be = { class: "hidden xs:flex items-center justify-end" }, Le = { class: "flex items-center justify-between" }, ze = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, Ke = { class: "xs:hidden" }, wt = /* @__PURE__ */ H({
|
|
301
301
|
__name: "CollectionTransactions",
|
|
302
302
|
props: {
|
|
303
303
|
user: {
|
|
304
304
|
type: String
|
|
305
305
|
}
|
|
306
306
|
},
|
|
307
|
-
setup(
|
|
308
|
-
const f =
|
|
307
|
+
setup(m) {
|
|
308
|
+
const { t: f } = me(), S = ne(), u = ue(), d = Re(), _ = m, C = M(!1), A = [
|
|
309
309
|
{
|
|
310
310
|
header: "Transaction ID",
|
|
311
311
|
accessorKey: "_id",
|
|
312
312
|
meta: {
|
|
313
313
|
maxWidth: "100px"
|
|
314
314
|
},
|
|
315
|
-
cell(
|
|
315
|
+
cell(a) {
|
|
316
316
|
return r("div", { class: "flex items-center" }, [
|
|
317
|
-
r(
|
|
317
|
+
r(b.FmIcon, {
|
|
318
318
|
name: "content_copy",
|
|
319
319
|
outline: !0,
|
|
320
320
|
size: "sm",
|
|
321
321
|
class: "cursor-pointer mr-4",
|
|
322
322
|
onClick: (t) => {
|
|
323
|
-
t.preventDefault(), t.stopPropagation(), Z(
|
|
323
|
+
t.preventDefault(), t.stopPropagation(), Z(a.row.original._id.toString());
|
|
324
324
|
}
|
|
325
325
|
}),
|
|
326
326
|
r(
|
|
327
327
|
"div",
|
|
328
328
|
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
329
|
-
|
|
329
|
+
a.row.original._id.toString()
|
|
330
330
|
)
|
|
331
331
|
]);
|
|
332
332
|
},
|
|
@@ -335,8 +335,8 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
335
335
|
{
|
|
336
336
|
header: "Created at",
|
|
337
337
|
accessorKey: "_id",
|
|
338
|
-
accessorFn: (
|
|
339
|
-
cell: (
|
|
338
|
+
accessorFn: (a) => y(P(a._id.toString())),
|
|
339
|
+
cell: (a) => y(P(a.row.original._id.toString())).format(
|
|
340
340
|
"D MMM YYYY, hh:mmA"
|
|
341
341
|
),
|
|
342
342
|
enableSorting: !0
|
|
@@ -345,15 +345,15 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
345
345
|
header: "Amount",
|
|
346
346
|
// accessorKey: 'totalAmount',
|
|
347
347
|
enableSorting: !1,
|
|
348
|
-
cell(
|
|
348
|
+
cell(a) {
|
|
349
349
|
var v, i, I, Y;
|
|
350
350
|
const t = J(
|
|
351
|
-
|
|
351
|
+
a.row.original.expiryAmount.reduce(
|
|
352
352
|
($, B) => $ + B.amount,
|
|
353
|
-
|
|
353
|
+
a.row.original.amount ?? 0
|
|
354
354
|
),
|
|
355
355
|
2
|
|
356
|
-
), h = (i = (v =
|
|
356
|
+
), h = (i = (v = a.row.original.expiryAmount) == null ? void 0 : v[0]) != null && i.expiredAt ? y((Y = (I = a.row.original.expiryAmount) == null ? void 0 : I[0]) == null ? void 0 : Y.expiredAt).format(
|
|
357
357
|
"D MMM YYYY"
|
|
358
358
|
) : "";
|
|
359
359
|
return r("div", { class: "flex items-center" }, [
|
|
@@ -368,13 +368,13 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
368
368
|
t
|
|
369
369
|
),
|
|
370
370
|
r("div", { class: "flex items-center" }, [
|
|
371
|
-
|
|
372
|
-
|
|
371
|
+
a.row.original.expiryAmount.length > 0 ? r(
|
|
372
|
+
b.FmTooltip,
|
|
373
373
|
{
|
|
374
374
|
content: `Expired on ${h}`
|
|
375
375
|
},
|
|
376
376
|
[
|
|
377
|
-
r(
|
|
377
|
+
r(b.FmIcon, {
|
|
378
378
|
name: "info",
|
|
379
379
|
outline: !0,
|
|
380
380
|
size: "sm"
|
|
@@ -388,21 +388,21 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
388
388
|
{
|
|
389
389
|
header: "Type",
|
|
390
390
|
accessorKey: "pf_collectible.type",
|
|
391
|
-
accessorFn: (
|
|
391
|
+
accessorFn: (a) => N.formattedType(a),
|
|
392
392
|
meta: {
|
|
393
393
|
maxWidth: "200px"
|
|
394
394
|
},
|
|
395
|
-
cell(
|
|
396
|
-
const t =
|
|
395
|
+
cell(a) {
|
|
396
|
+
const t = N.formattedType(a.row.original);
|
|
397
397
|
return r("div", { class: "flex items-center" }, [
|
|
398
398
|
r("div", { class: "truncate text-ellipsis" }, t),
|
|
399
399
|
t.length > 20 ? r(
|
|
400
|
-
|
|
400
|
+
b.FmTooltip,
|
|
401
401
|
{
|
|
402
402
|
content: t
|
|
403
403
|
},
|
|
404
404
|
[
|
|
405
|
-
r(
|
|
405
|
+
r(b.FmIcon, {
|
|
406
406
|
name: "info",
|
|
407
407
|
color: "primary",
|
|
408
408
|
outline: !0,
|
|
@@ -416,39 +416,39 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
416
416
|
{
|
|
417
417
|
header: "Source",
|
|
418
418
|
accessorKey: "source",
|
|
419
|
-
cell(
|
|
419
|
+
cell(a) {
|
|
420
420
|
var t;
|
|
421
421
|
return r("div", { class: "flex items-center gap-4" }, [
|
|
422
422
|
r(
|
|
423
423
|
"div",
|
|
424
424
|
{ class: "truncate text-ellipsis" },
|
|
425
|
-
K(
|
|
425
|
+
K(N.getReason(a.row.original.source))
|
|
426
426
|
),
|
|
427
|
-
...(t =
|
|
427
|
+
...(t = a.row.original.metadata) != null && t.campaign ? [
|
|
428
428
|
r(
|
|
429
|
-
|
|
429
|
+
b.FmTooltip,
|
|
430
430
|
{
|
|
431
431
|
get content() {
|
|
432
432
|
var h;
|
|
433
|
-
return (h =
|
|
433
|
+
return (h = u.campaigns.all.find(
|
|
434
434
|
(v) => {
|
|
435
435
|
var i;
|
|
436
|
-
return v._id === ((i =
|
|
436
|
+
return v._id === ((i = a.row.original.metadata) == null ? void 0 : i.campaign);
|
|
437
437
|
}
|
|
438
438
|
)) == null ? void 0 : h.name;
|
|
439
439
|
}
|
|
440
440
|
},
|
|
441
441
|
[
|
|
442
|
-
r(
|
|
442
|
+
r(b.FmIcon, {
|
|
443
443
|
name: "info",
|
|
444
444
|
color: "primary",
|
|
445
445
|
size: "sm",
|
|
446
446
|
onClick: async (h) => {
|
|
447
447
|
h.preventDefault(), h.stopPropagation();
|
|
448
|
-
const v =
|
|
448
|
+
const v = u.campaigns.all.find(
|
|
449
449
|
(i) => {
|
|
450
450
|
var I;
|
|
451
|
-
return i._id === ((I =
|
|
451
|
+
return i._id === ((I = a.row.original.metadata) == null ? void 0 : I.campaign);
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
454
|
if (v)
|
|
@@ -456,24 +456,24 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
456
456
|
case "VOUCHER":
|
|
457
457
|
case "PROMOTION":
|
|
458
458
|
case "BROADCAST":
|
|
459
|
-
await
|
|
459
|
+
await d.push({
|
|
460
460
|
name: z[`$connect-CAMPAIGN_${v.type}`]
|
|
461
461
|
});
|
|
462
462
|
break;
|
|
463
463
|
case "GAME":
|
|
464
464
|
case "CREDIT":
|
|
465
465
|
case "MISSION":
|
|
466
|
-
await
|
|
466
|
+
await d.push({
|
|
467
467
|
name: z[`$connect-PROGRAM_${v.type}`]
|
|
468
468
|
});
|
|
469
469
|
break;
|
|
470
470
|
case "POINT":
|
|
471
|
-
await
|
|
471
|
+
await d.push({
|
|
472
472
|
name: z["$connect-PROGRAM_EXPERIENCE"]
|
|
473
473
|
});
|
|
474
474
|
break;
|
|
475
475
|
case "COIN":
|
|
476
|
-
await
|
|
476
|
+
await d.push({
|
|
477
477
|
name: z["$connect-PROGRAM_POINT"]
|
|
478
478
|
});
|
|
479
479
|
break;
|
|
@@ -489,33 +489,46 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
489
489
|
{
|
|
490
490
|
header: "User",
|
|
491
491
|
accessorKey: "pf_user.name",
|
|
492
|
-
cell(
|
|
493
|
-
return
|
|
492
|
+
cell(a) {
|
|
493
|
+
return le(a.row.original.pf_user);
|
|
494
494
|
}
|
|
495
495
|
},
|
|
496
496
|
{
|
|
497
497
|
header: "Phone No.",
|
|
498
498
|
accessorKey: "pf_user.phoneNumber",
|
|
499
|
-
accessorFn: (
|
|
499
|
+
accessorFn: (a) => {
|
|
500
500
|
var t;
|
|
501
|
-
return ((t =
|
|
501
|
+
return ((t = a == null ? void 0 : a.pf_user) == null ? void 0 : t.phoneNumber) || "";
|
|
502
502
|
}
|
|
503
503
|
},
|
|
504
504
|
{
|
|
505
|
-
|
|
505
|
+
header: "Status",
|
|
506
|
+
id: "status",
|
|
507
|
+
enableSorting: !1,
|
|
508
|
+
cell(a) {
|
|
509
|
+
const t = !!a.row.original.refunded;
|
|
510
|
+
return r(b.FmChip, {
|
|
511
|
+
label: f(t ? "connect.transaction.refunded" : "connect.transaction.completed"),
|
|
512
|
+
variant: "plain",
|
|
513
|
+
class: t ? "text-fm-color-typo-warning bg-fm-color-system-warning-100" : "text-fm-color-typo-success bg-fm-color-system-success-100"
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
accessorFn: (a) => a.ref,
|
|
506
519
|
header: "References",
|
|
507
520
|
accessorKey: "ref",
|
|
508
|
-
cell(
|
|
521
|
+
cell(a) {
|
|
509
522
|
var t, h;
|
|
510
523
|
return r("div", { class: "flex items-center justify-between gap-4" }, [
|
|
511
524
|
r("div", { class: "flex items-center" }, [
|
|
512
|
-
(t =
|
|
513
|
-
|
|
525
|
+
(t = a.row.original.metadata) != null && t.remark ? r(
|
|
526
|
+
b.FmTooltip,
|
|
514
527
|
{
|
|
515
|
-
content: (h =
|
|
528
|
+
content: (h = a.row.original.metadata) == null ? void 0 : h.remark
|
|
516
529
|
},
|
|
517
530
|
[
|
|
518
|
-
r(
|
|
531
|
+
r(b.FmIcon, {
|
|
519
532
|
name: "info",
|
|
520
533
|
class: "pl-2",
|
|
521
534
|
outline: !0,
|
|
@@ -524,11 +537,11 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
524
537
|
]
|
|
525
538
|
) : r("div")
|
|
526
539
|
]),
|
|
527
|
-
r("div", { class: "flex-1" },
|
|
540
|
+
r("div", { class: "flex-1" }, a.row.original.ref)
|
|
528
541
|
]);
|
|
529
542
|
}
|
|
530
543
|
}
|
|
531
|
-
],
|
|
544
|
+
], c = M({
|
|
532
545
|
search: "",
|
|
533
546
|
"pf_collectible.type": [],
|
|
534
547
|
"metadata.location": [],
|
|
@@ -537,15 +550,15 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
537
550
|
endDate: y().endOf("day").toISOString()
|
|
538
551
|
},
|
|
539
552
|
source: []
|
|
540
|
-
}), { tableMeta:
|
|
553
|
+
}), { tableMeta: T, rowData: p, onSort: o, debouncedFetchData: e, onSearch: l } = re(async (a) => {
|
|
541
554
|
const t = {
|
|
542
|
-
...
|
|
543
|
-
user:
|
|
555
|
+
...c.value,
|
|
556
|
+
user: _.user,
|
|
544
557
|
dateRange: {
|
|
545
|
-
start: new Date(
|
|
546
|
-
end: new Date(
|
|
558
|
+
start: new Date(c.value.dateRange.startDate).toISOString(),
|
|
559
|
+
end: new Date(c.value.dateRange.endDate).toISOString()
|
|
547
560
|
}
|
|
548
|
-
}, h = await G.readAll(
|
|
561
|
+
}, h = await G.readAll(a, t);
|
|
549
562
|
return {
|
|
550
563
|
resources: h.resources.map((v) => {
|
|
551
564
|
const i = s.value.find((I) => I._id === v.ref);
|
|
@@ -553,28 +566,28 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
553
566
|
}),
|
|
554
567
|
meta: h.meta
|
|
555
568
|
};
|
|
556
|
-
}), s =
|
|
569
|
+
}), s = M([]), w = oe.options.map((a) => ({ label: K(N.getReason(a)), value: a })), g = S.locations.map((a) => ({ label: a.name, value: a._id }));
|
|
557
570
|
Q(
|
|
558
|
-
|
|
571
|
+
c,
|
|
559
572
|
() => {
|
|
560
|
-
|
|
573
|
+
e();
|
|
561
574
|
},
|
|
562
575
|
{ deep: !0 }
|
|
563
576
|
);
|
|
564
|
-
async function
|
|
577
|
+
async function D() {
|
|
565
578
|
try {
|
|
566
|
-
|
|
567
|
-
const
|
|
568
|
-
...
|
|
569
|
-
user:
|
|
579
|
+
C.value = !0;
|
|
580
|
+
const a = {
|
|
581
|
+
...c.value,
|
|
582
|
+
user: _.user,
|
|
570
583
|
dateRange: {
|
|
571
|
-
start: new Date(
|
|
572
|
-
end: new Date(
|
|
584
|
+
start: new Date(c.value.dateRange.startDate).toISOString(),
|
|
585
|
+
end: new Date(c.value.dateRange.endDate).toISOString()
|
|
573
586
|
}
|
|
574
587
|
};
|
|
575
588
|
await ce({
|
|
576
|
-
exporter: new
|
|
577
|
-
readFunction: (t) => G.readAll(t,
|
|
589
|
+
exporter: new Oe(),
|
|
590
|
+
readFunction: (t) => G.readAll(t, a),
|
|
578
591
|
transformRecord: (t) => {
|
|
579
592
|
var h, v, i, I, Y, $, B;
|
|
580
593
|
return {
|
|
@@ -584,14 +597,14 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
584
597
|
),
|
|
585
598
|
Amount: J(
|
|
586
599
|
t.expiryAmount.reduce(
|
|
587
|
-
(
|
|
600
|
+
(fe, ge) => fe + ge.amount,
|
|
588
601
|
t.amount ?? 0
|
|
589
602
|
),
|
|
590
603
|
2
|
|
591
604
|
),
|
|
592
605
|
ExpiredAt: (v = (h = t.expiryAmount) == null ? void 0 : h[0]) != null && v.expiredAt ? y((I = (i = t.expiryAmount) == null ? void 0 : i[0]) == null ? void 0 : I.expiredAt).format("D MMM YYYY") : "",
|
|
593
|
-
Type:
|
|
594
|
-
Source: K(
|
|
606
|
+
Type: N.formattedType(t),
|
|
607
|
+
Source: K(N.getReason(t.source)),
|
|
595
608
|
User: ((Y = t.pf_user) == null ? void 0 : Y.name) || "",
|
|
596
609
|
"Phone No.": (($ = t.pf_user) == null ? void 0 : $.phoneNumber) || "",
|
|
597
610
|
References: t.ref,
|
|
@@ -600,53 +613,53 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
600
613
|
},
|
|
601
614
|
filename: "transactions"
|
|
602
615
|
});
|
|
603
|
-
} catch (
|
|
604
|
-
console.error(
|
|
616
|
+
} catch (a) {
|
|
617
|
+
console.error(a);
|
|
605
618
|
} finally {
|
|
606
|
-
|
|
619
|
+
C.value = !1;
|
|
607
620
|
}
|
|
608
621
|
}
|
|
609
|
-
const
|
|
610
|
-
function
|
|
622
|
+
const F = M(null);
|
|
623
|
+
function pe(a) {
|
|
611
624
|
var t;
|
|
612
|
-
console.log(
|
|
625
|
+
console.log(a), (t = F.value) == null || t.showSheet(!0, a.original);
|
|
613
626
|
}
|
|
614
|
-
return
|
|
615
|
-
await
|
|
616
|
-
}), (
|
|
617
|
-
const h =
|
|
618
|
-
return
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
627
|
+
return _e(async () => {
|
|
628
|
+
await S.readLocations(), await u.read(), await e();
|
|
629
|
+
}), (a, t) => {
|
|
630
|
+
const h = O("FmSearch"), v = O("FmButton");
|
|
631
|
+
return E(), V(X, null, [
|
|
632
|
+
x("div", null, [
|
|
633
|
+
x("div", Be, [
|
|
634
|
+
R(h, {
|
|
622
635
|
class: "hidden xs:flex border-b border-fm-color-neutral-gray-100",
|
|
623
|
-
modelValue:
|
|
624
|
-
"onUpdate:modelValue": t[0] || (t[0] = (i) =>
|
|
636
|
+
modelValue: n(c).search,
|
|
637
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => n(c).search = i),
|
|
625
638
|
placeholder: "Search",
|
|
626
639
|
collapsible: ""
|
|
627
640
|
}, null, 8, ["modelValue"]),
|
|
628
|
-
|
|
641
|
+
R(v, {
|
|
629
642
|
icon: "ios_share",
|
|
630
643
|
variant: "tertiary",
|
|
631
|
-
onClick:
|
|
644
|
+
onClick: D
|
|
632
645
|
})
|
|
633
646
|
]),
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
647
|
+
x("div", Le, [
|
|
648
|
+
x("div", ze, [
|
|
649
|
+
R(j, {
|
|
637
650
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
638
651
|
"right-icon": "keyboard_arrow_down",
|
|
639
|
-
modelValue:
|
|
640
|
-
"onUpdate:modelValue": t[1] || (t[1] = (i) =>
|
|
652
|
+
modelValue: n(c)["metadata.location"],
|
|
653
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => n(c)["metadata.location"] = i),
|
|
641
654
|
icon: "storefront",
|
|
642
655
|
"show-item-label": !0,
|
|
643
|
-
items:
|
|
656
|
+
items: n(g)
|
|
644
657
|
}, null, 8, ["modelValue", "items"]),
|
|
645
|
-
|
|
658
|
+
R(j, {
|
|
646
659
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
647
660
|
"right-icon": "keyboard_arrow_down",
|
|
648
|
-
modelValue:
|
|
649
|
-
"onUpdate:modelValue": t[2] || (t[2] = (i) =>
|
|
661
|
+
modelValue: n(c)["pf_collectible.type"],
|
|
662
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => n(c)["pf_collectible.type"] = i),
|
|
650
663
|
label: "Type: ",
|
|
651
664
|
"show-item-label": !0,
|
|
652
665
|
items: [
|
|
@@ -660,81 +673,81 @@ const Ne = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, M
|
|
|
660
673
|
{ label: "Stamp", value: "STAMP" }
|
|
661
674
|
]
|
|
662
675
|
}, null, 8, ["modelValue"]),
|
|
663
|
-
|
|
676
|
+
R(j, {
|
|
664
677
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
665
678
|
"right-icon": "keyboard_arrow_down",
|
|
666
|
-
modelValue:
|
|
667
|
-
"onUpdate:modelValue": t[3] || (t[3] = (i) =>
|
|
679
|
+
modelValue: n(c).source,
|
|
680
|
+
"onUpdate:modelValue": t[3] || (t[3] = (i) => n(c).source = i),
|
|
668
681
|
label: "Source: ",
|
|
669
682
|
"show-item-label": !0,
|
|
670
|
-
items:
|
|
683
|
+
items: n(w)
|
|
671
684
|
}, null, 8, ["modelValue", "items"]),
|
|
672
|
-
|
|
685
|
+
R(de, {
|
|
673
686
|
"model-value": {
|
|
674
|
-
startDate:
|
|
675
|
-
endDate:
|
|
687
|
+
startDate: n(c).dateRange.startDate,
|
|
688
|
+
endDate: n(c).dateRange.endDate
|
|
676
689
|
},
|
|
677
|
-
"onUpdate:modelValue": t[4] || (t[4] = (i) =>
|
|
678
|
-
startDate:
|
|
679
|
-
endDate:
|
|
690
|
+
"onUpdate:modelValue": t[4] || (t[4] = (i) => n(c).dateRange = {
|
|
691
|
+
startDate: n(y)(i.startDate).startOf("d").toISOString(),
|
|
692
|
+
endDate: n(y)(i.endDate).endOf("d").toISOString()
|
|
680
693
|
})
|
|
681
694
|
}, null, 8, ["model-value"])
|
|
682
695
|
]),
|
|
683
|
-
|
|
696
|
+
R(h, {
|
|
684
697
|
class: "xs:hidden",
|
|
685
|
-
modelValue:
|
|
686
|
-
"onUpdate:modelValue": t[5] || (t[5] = (i) =>
|
|
698
|
+
modelValue: n(c).search,
|
|
699
|
+
"onUpdate:modelValue": t[5] || (t[5] = (i) => n(c).search = i),
|
|
687
700
|
placeholder: "Search",
|
|
688
701
|
collapsible: ""
|
|
689
702
|
}, null, 8, ["modelValue"]),
|
|
690
|
-
|
|
691
|
-
|
|
703
|
+
x("div", Ke, [
|
|
704
|
+
R(v, {
|
|
692
705
|
icon: "ios_share",
|
|
693
706
|
variant: "tertiary",
|
|
694
|
-
onClick:
|
|
707
|
+
onClick: D
|
|
695
708
|
})
|
|
696
709
|
])
|
|
697
710
|
]),
|
|
698
|
-
|
|
699
|
-
loading:
|
|
700
|
-
"row-data":
|
|
701
|
-
"row-count":
|
|
702
|
-
"column-defs":
|
|
703
|
-
(i) => !
|
|
711
|
+
R(se, {
|
|
712
|
+
loading: n(T).isLoading,
|
|
713
|
+
"row-data": n(p),
|
|
714
|
+
"row-count": n(T).totalRows,
|
|
715
|
+
"column-defs": A.filter(
|
|
716
|
+
(i) => !_.user || i.header !== "User" && i.header !== "Phone No."
|
|
704
717
|
),
|
|
705
|
-
"page-count":
|
|
706
|
-
"page-index":
|
|
707
|
-
"page-size":
|
|
718
|
+
"page-count": n(T).pageCount,
|
|
719
|
+
"page-index": n(T).pageIndex,
|
|
720
|
+
"page-size": n(T).pageSize,
|
|
708
721
|
"shrink-at": !1,
|
|
709
|
-
onSortChange:
|
|
710
|
-
onPageChange: t[6] || (t[6] = (i) =>
|
|
722
|
+
onSortChange: n(o),
|
|
723
|
+
onPageChange: t[6] || (t[6] = (i) => n(e)({
|
|
711
724
|
pageSize: i.pageSize,
|
|
712
725
|
pageIndex: i.pageIndex
|
|
713
726
|
})),
|
|
714
|
-
onRowClick:
|
|
727
|
+
onRowClick: pe
|
|
715
728
|
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "page-count", "page-index", "page-size", "onSortChange"])
|
|
716
729
|
]),
|
|
717
|
-
|
|
730
|
+
R($e, {
|
|
718
731
|
ref_key: "transactionDetailSheet",
|
|
719
|
-
ref:
|
|
732
|
+
ref: F
|
|
720
733
|
}, null, 512)
|
|
721
734
|
], 64);
|
|
722
735
|
};
|
|
723
736
|
}
|
|
724
737
|
});
|
|
725
|
-
class
|
|
738
|
+
class Ge extends ie {
|
|
726
739
|
}
|
|
727
|
-
const
|
|
740
|
+
const He = { class: "flex items-center justify-between" }, je = { class: "flex gap-8 items-center" }, qe = { class: "flex gap-8 items-center xs:hidden" }, Dt = /* @__PURE__ */ H({
|
|
728
741
|
__name: "StoreTransactions",
|
|
729
742
|
props: {
|
|
730
743
|
user: {
|
|
731
744
|
type: String
|
|
732
745
|
}
|
|
733
746
|
},
|
|
734
|
-
setup(
|
|
735
|
-
const f =
|
|
736
|
-
|
|
737
|
-
const
|
|
747
|
+
setup(m) {
|
|
748
|
+
const f = m, { minor: S } = Ce;
|
|
749
|
+
Se();
|
|
750
|
+
const u = [
|
|
738
751
|
{
|
|
739
752
|
header: "Transaction ID",
|
|
740
753
|
meta: {
|
|
@@ -742,13 +755,13 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
742
755
|
},
|
|
743
756
|
cell(e) {
|
|
744
757
|
return r("div", { class: "flex items-center" }, [
|
|
745
|
-
r(
|
|
758
|
+
r(b.FmIcon, {
|
|
746
759
|
name: "content_copy",
|
|
747
760
|
outline: !0,
|
|
748
761
|
size: "sm",
|
|
749
762
|
class: "cursor-pointer mr-4 shrink-0",
|
|
750
|
-
onClick: (
|
|
751
|
-
|
|
763
|
+
onClick: (l) => {
|
|
764
|
+
l.preventDefault(), l.stopPropagation(), Z(e.row.original._id.toString());
|
|
752
765
|
}
|
|
753
766
|
}),
|
|
754
767
|
r("div", { class: "truncate" }, e.row.original._id.toString())
|
|
@@ -771,20 +784,20 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
771
784
|
{
|
|
772
785
|
header: "Payment Type",
|
|
773
786
|
accessorFn: (e) => {
|
|
774
|
-
var
|
|
775
|
-
return ((
|
|
787
|
+
var l;
|
|
788
|
+
return ((l = e.paymentType) == null ? void 0 : l.type) ?? "N/A";
|
|
776
789
|
},
|
|
777
790
|
cell(e) {
|
|
778
|
-
var
|
|
791
|
+
var l, s;
|
|
779
792
|
return r("div", { class: "flex items-center gap-4" }, [
|
|
780
793
|
r("div", { class: "flex items-center" }, [
|
|
781
|
-
((
|
|
782
|
-
|
|
794
|
+
((l = e.row.original.paymentType) == null ? void 0 : l.type) == "ONLINE" && e.row.original.paymentType.extra ? r(
|
|
795
|
+
b.FmTooltip,
|
|
783
796
|
{
|
|
784
797
|
content: e.row.original.paymentType.extra
|
|
785
798
|
},
|
|
786
799
|
[
|
|
787
|
-
r(
|
|
800
|
+
r(b.FmIcon, {
|
|
788
801
|
name: "info",
|
|
789
802
|
outline: !0,
|
|
790
803
|
size: "sm"
|
|
@@ -795,14 +808,14 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
795
808
|
r(
|
|
796
809
|
"div",
|
|
797
810
|
{ class: "flex-1" },
|
|
798
|
-
((
|
|
811
|
+
((s = e.row.original.paymentType) == null ? void 0 : s.type) ?? "N/A"
|
|
799
812
|
)
|
|
800
813
|
]);
|
|
801
814
|
}
|
|
802
815
|
},
|
|
803
816
|
{
|
|
804
817
|
header: "User",
|
|
805
|
-
cell: (e) =>
|
|
818
|
+
cell: (e) => le(e.row.original.pf_member)
|
|
806
819
|
},
|
|
807
820
|
{
|
|
808
821
|
header: "Phone No.",
|
|
@@ -812,26 +825,31 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
812
825
|
header: "Status",
|
|
813
826
|
// accessorFn: (u) => u.status,
|
|
814
827
|
cell(e) {
|
|
815
|
-
var
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
828
|
+
var w, g, D, F;
|
|
829
|
+
const l = e.row.original.status, s = {
|
|
830
|
+
COMPLETED: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
831
|
+
REFUNDED: "text-fm-color-typo-warning bg-fm-color-system-warning-100"
|
|
832
|
+
};
|
|
833
|
+
return r("div", { class: "flex items-center gap-4" }, [
|
|
834
|
+
r(b.FmChip, {
|
|
835
|
+
label: we.title(l),
|
|
836
|
+
variant: "plain",
|
|
837
|
+
class: s[l] ?? ""
|
|
838
|
+
}),
|
|
839
|
+
(g = (w = e.row.original) == null ? void 0 : w.refund) != null && g.reason ? r(
|
|
840
|
+
b.FmTooltip,
|
|
841
|
+
{
|
|
842
|
+
content: (F = (D = e.row.original) == null ? void 0 : D.refund) == null ? void 0 : F.reason
|
|
843
|
+
},
|
|
844
|
+
[
|
|
845
|
+
r(b.FmIcon, {
|
|
846
|
+
name: "info",
|
|
847
|
+
color: "primary",
|
|
848
|
+
outline: !0,
|
|
849
|
+
size: "sm"
|
|
850
|
+
})
|
|
851
|
+
]
|
|
852
|
+
) : null
|
|
835
853
|
]);
|
|
836
854
|
}
|
|
837
855
|
},
|
|
@@ -846,9 +864,9 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
846
864
|
{
|
|
847
865
|
id: "action",
|
|
848
866
|
cell(e) {
|
|
849
|
-
const
|
|
850
|
-
return
|
|
851
|
-
|
|
867
|
+
const l = e.row.original, s = l.status === "COMPLETED" && !l.refund && l.source == "ADMIN";
|
|
868
|
+
return s ? r(
|
|
869
|
+
b.FmMenu,
|
|
852
870
|
{
|
|
853
871
|
placement: "bottom-end",
|
|
854
872
|
onClick: (w) => {
|
|
@@ -856,17 +874,17 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
856
874
|
}
|
|
857
875
|
},
|
|
858
876
|
{
|
|
859
|
-
"menu-button": () => r(
|
|
877
|
+
"menu-button": () => r(b.FmButton, {
|
|
860
878
|
icon: "settings",
|
|
861
879
|
variant: "tertiary",
|
|
862
|
-
if:
|
|
880
|
+
if: s
|
|
863
881
|
}),
|
|
864
882
|
default: () => [
|
|
865
|
-
r(
|
|
883
|
+
r(b.FmMenuItem, {
|
|
866
884
|
label: "Refund",
|
|
867
885
|
sublabel: "Refund this transaction",
|
|
868
886
|
onClick: async (w) => {
|
|
869
|
-
w.stopPropagation(), await p(
|
|
887
|
+
w.stopPropagation(), await p(l);
|
|
870
888
|
}
|
|
871
889
|
})
|
|
872
890
|
]
|
|
@@ -874,32 +892,32 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
874
892
|
) : r("div");
|
|
875
893
|
}
|
|
876
894
|
}
|
|
877
|
-
],
|
|
895
|
+
], d = M({
|
|
878
896
|
searchValue: "",
|
|
879
897
|
dateRange: {
|
|
880
898
|
startDate: y().subtract(7, "day").toISOString(),
|
|
881
899
|
endDate: y().toISOString()
|
|
882
900
|
}
|
|
883
|
-
}), { tableMeta: _, rowData:
|
|
884
|
-
const
|
|
885
|
-
...
|
|
901
|
+
}), { tableMeta: _, rowData: C, onSort: A, debouncedFetchData: c, onSearch: T } = re(async (e) => {
|
|
902
|
+
const l = {
|
|
903
|
+
...d.value.dateRange,
|
|
886
904
|
user: f.user
|
|
887
905
|
};
|
|
888
|
-
return await G.readStoreTransactions(e,
|
|
906
|
+
return await G.readStoreTransactions(e, l);
|
|
889
907
|
});
|
|
890
908
|
async function p(e) {
|
|
891
|
-
await
|
|
909
|
+
await De.confirm(
|
|
892
910
|
"Are you sure you want to refund this transaction?",
|
|
893
911
|
"Refund Store Transaction",
|
|
894
912
|
"Confirm",
|
|
895
913
|
"Cancel"
|
|
896
|
-
) && await
|
|
914
|
+
) && await S(
|
|
897
915
|
async () => {
|
|
898
|
-
var
|
|
899
|
-
await
|
|
916
|
+
var s;
|
|
917
|
+
await Fe.refundStoreTransaction({
|
|
900
918
|
id: e._id,
|
|
901
|
-
reason: `ADMIN:${(
|
|
902
|
-
}), await
|
|
919
|
+
reason: `ADMIN:${(s = Te().sessionUser) == null ? void 0 : s.name}`
|
|
920
|
+
}), await c();
|
|
903
921
|
},
|
|
904
922
|
{
|
|
905
923
|
message: "Refunding transaction...",
|
|
@@ -908,80 +926,80 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
908
926
|
);
|
|
909
927
|
}
|
|
910
928
|
Q(
|
|
911
|
-
|
|
929
|
+
d,
|
|
912
930
|
() => {
|
|
913
|
-
|
|
931
|
+
c();
|
|
914
932
|
},
|
|
915
933
|
{ deep: !0 }
|
|
916
934
|
), ae(async () => {
|
|
917
|
-
await
|
|
935
|
+
await c();
|
|
918
936
|
});
|
|
919
|
-
const
|
|
920
|
-
exporter: new
|
|
937
|
+
const o = async () => ce({
|
|
938
|
+
exporter: new Ge(),
|
|
921
939
|
readFunction: (e) => G.readStoreTransactions(e, {
|
|
922
|
-
...
|
|
940
|
+
...d.value.dateRange,
|
|
923
941
|
user: f.user
|
|
924
942
|
}),
|
|
925
943
|
transformRecord: (e) => {
|
|
926
|
-
var
|
|
944
|
+
var l, s, w, g, D, F;
|
|
927
945
|
return {
|
|
928
|
-
TransactionId: ((
|
|
946
|
+
TransactionId: ((l = e._id) == null ? void 0 : l.toString()) || "",
|
|
929
947
|
CreatedAt: y(P(e._id.toString())).format(
|
|
930
948
|
"DD/MM/YYYY HH:mm:ss"
|
|
931
949
|
),
|
|
932
950
|
Bundle: e.bundle.name || "",
|
|
933
951
|
Location: e.location ? e.pf_location[0].name : "Online Store",
|
|
934
|
-
PaymentType: ((
|
|
952
|
+
PaymentType: ((s = e.paymentType) == null ? void 0 : s.type) || "N/A",
|
|
935
953
|
PaymentExtra: ((w = e.paymentType) == null ? void 0 : w.extra) || "",
|
|
936
954
|
User: ((g = e.pf_member) == null ? void 0 : g.name) || "",
|
|
937
|
-
PhoneNumber: ((
|
|
955
|
+
PhoneNumber: ((D = e.pf_member) == null ? void 0 : D.phoneNumber) || "",
|
|
938
956
|
Status: e.status || "",
|
|
939
|
-
RefundReason: ((
|
|
957
|
+
RefundReason: ((F = e == null ? void 0 : e.refund) == null ? void 0 : F.reason) || "",
|
|
940
958
|
Ref: (e == null ? void 0 : e.ref) || ""
|
|
941
959
|
};
|
|
942
960
|
},
|
|
943
961
|
filename: "store-transactions"
|
|
944
962
|
});
|
|
945
|
-
return (e,
|
|
946
|
-
const
|
|
947
|
-
return
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
modelValue:
|
|
952
|
-
"onUpdate:modelValue":
|
|
963
|
+
return (e, l) => {
|
|
964
|
+
const s = O("FmSearch"), w = O("FmButton");
|
|
965
|
+
return E(), V("div", null, [
|
|
966
|
+
x("div", He, [
|
|
967
|
+
x("div", je, [
|
|
968
|
+
R(de, {
|
|
969
|
+
modelValue: n(d).dateRange,
|
|
970
|
+
"onUpdate:modelValue": l[0] || (l[0] = (g) => n(d).dateRange = g)
|
|
953
971
|
}, null, 8, ["modelValue"])
|
|
954
972
|
]),
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
modelValue:
|
|
973
|
+
x("div", qe, [
|
|
974
|
+
R(s, {
|
|
975
|
+
modelValue: n(_).searchValue,
|
|
958
976
|
"onUpdate:modelValue": [
|
|
959
|
-
|
|
960
|
-
|
|
977
|
+
l[1] || (l[1] = (g) => n(_).searchValue = g),
|
|
978
|
+
n(T)
|
|
961
979
|
],
|
|
962
980
|
placeholder: "Search",
|
|
963
981
|
collapsible: ""
|
|
964
982
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
965
|
-
|
|
983
|
+
R(w, {
|
|
966
984
|
icon: "ios_share",
|
|
967
985
|
variant: "tertiary",
|
|
968
|
-
onClick:
|
|
986
|
+
onClick: o
|
|
969
987
|
})
|
|
970
988
|
])
|
|
971
989
|
]),
|
|
972
|
-
|
|
973
|
-
loading:
|
|
974
|
-
"row-data":
|
|
975
|
-
"row-count":
|
|
976
|
-
"column-defs":
|
|
990
|
+
R(se, {
|
|
991
|
+
loading: n(_).isLoading,
|
|
992
|
+
"row-data": n(C),
|
|
993
|
+
"row-count": n(_).totalRows,
|
|
994
|
+
"column-defs": u.filter(
|
|
977
995
|
(g) => !f.user || g.header !== "User" && g.header !== "Phone No."
|
|
978
996
|
),
|
|
979
|
-
"page-count":
|
|
980
|
-
"page-index":
|
|
981
|
-
"page-size":
|
|
997
|
+
"page-count": n(_).pageCount,
|
|
998
|
+
"page-index": n(_).pageIndex,
|
|
999
|
+
"page-size": n(_).pageSize,
|
|
982
1000
|
"shrink-at": !1,
|
|
983
|
-
onSortChange:
|
|
984
|
-
onPageChange:
|
|
1001
|
+
onSortChange: n(A),
|
|
1002
|
+
onPageChange: l[2] || (l[2] = (g) => n(c)({
|
|
985
1003
|
pageSize: g.pageSize,
|
|
986
1004
|
pageIndex: g.pageIndex
|
|
987
1005
|
}))
|
|
@@ -991,6 +1009,6 @@ const Ge = { class: "flex items-center justify-between" }, He = { class: "flex g
|
|
|
991
1009
|
}
|
|
992
1010
|
});
|
|
993
1011
|
export {
|
|
994
|
-
|
|
995
|
-
|
|
1012
|
+
wt as _,
|
|
1013
|
+
Dt as a
|
|
996
1014
|
};
|