@feedmepos/mf-connect 0.1.107-prod → 0.1.109-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/{App-DuigPXid.js → App-Cr2e5Bu8.js} +8 -8
- package/dist/{Bin-wmGUmgFg.js → Bin-CPs21i0x.js} +8 -8
- package/dist/{Broadcast-Tu0PqJkP.js → Broadcast-B5V5DblI.js} +10 -10
- package/dist/{CampaignAnalytic-Bg2SjiCp.js → CampaignAnalytic-6pSwEK-x.js} +7 -7
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang--wYqVfPe.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-FaY2V_Ro.js} +6 -6
- package/dist/{Card-DPVA0wq0.js → Card-BgaT0ETq.js} +18 -18
- package/dist/{Collections-uOxpqGmn.js → Collections-BSwnR6AK.js} +9 -9
- package/dist/{Credit-Cs7u8vM0.js → Credit-IWiS-XVf.js} +11 -11
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-4gpFcQar.js → DateRangeChip.vue_vue_type_script_setup_true_lang-heZT2KoY.js} +1 -1
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLdYQ7eP.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-Eu5PnBJd.js} +32 -32
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-3PB0t0lc.js → EffectSheet.vue_vue_type_style_index_0_lang-D8W2S3E_.js} +6 -6
- package/dist/{Experience-Ct6QFwz1.js → Experience-28jPmz3-.js} +11 -11
- package/dist/{FileSaver.min-C6JXYRfA.js → FileSaver.min-BerNj05B.js} +1 -1
- package/dist/{Game-BodDlLRb.js → Game-Cfc-dc-1.js} +12 -12
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DEHokvlH.js → ImageInput.vue_vue_type_script_setup_true_lang-B78wrI09.js} +1 -1
- package/dist/{Index-B-Rm_SA3.js → Index-Bbj54y5I.js} +10 -10
- package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-D_39zT5g.js → LocationPicker.vue_vue_type_script_setup_true_lang-B6jhenK2.js} +1 -1
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CNZU-toj.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CVIWbyce.js} +1 -1
- package/dist/{LoyaltyDashboard-DOhWKlQT.js → LoyaltyDashboard-h2rGZ5yc.js} +13 -13
- package/dist/{MainLayout-Div0Ifbr.js → MainLayout-Dvjj1RNm.js} +3 -3
- package/dist/{Marketing-BGmAa3Wq.js → Marketing-CTSt8Mkc.js} +4 -4
- package/dist/{MarketingMaterialEdit-BTbn6EQ1.js → MarketingMaterialEdit-CEFmfYbJ.js} +6 -6
- package/dist/{Member-iJKcVfkn.js → Member-BFI1o6bf.js} +155 -150
- package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-CbvIaaJK.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-BAXoTYda.js} +22 -22
- package/dist/{MemberImportHistory-rBMu-X14.js → MemberImportHistory-BlvBxzMa.js} +7 -7
- package/dist/{MemberList-15Wrhtz1.js → MemberList-DVDlqPGq.js} +14 -14
- package/dist/{MemberTransactions-H9EoSASv.js → MemberTransactions-w-FhSif7.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-oAKhB57l.js → MessageInput.vue_vue_type_script_setup_true_lang-Jm-cIbaQ.js} +10 -10
- package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-99fjAv0f.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DQAlxnbr.js} +1 -1
- package/dist/{Mission-CnqeKt1K.js → Mission-DzwWQDBf.js} +12 -12
- package/dist/{Overview-CGTBqGMM.js → Overview-B1lJFIoj.js} +4 -4
- package/dist/{Overview-DzveuuPX.js → Overview-DBgSWfmd.js} +18 -18
- package/dist/{Point-qmantkda.js → Point-AceCn3ML.js} +11 -11
- package/dist/{Promotion-DkPE71x4.js → Promotion-Dp3JYoFP.js} +12 -12
- package/dist/{Queue-Dfr3jZJh.js → Queue-CN-3Vw1y.js} +10 -10
- package/dist/{Record-Bj7zfU1X.js → Record-DtgUCY4K.js} +9 -9
- package/dist/{Review-DXcsfa_V.js → Review-C_fgkPbz.js} +2 -2
- package/dist/{ReviewFacebookCallback-Cu8qzWxe.js → ReviewFacebookCallback-gv_HTyfy.js} +5 -5
- package/dist/{ReviewGoogleCallback-739y4ROq.js → ReviewGoogleCallback-Cdq572-x.js} +5 -5
- package/dist/{Reward-CYPj-4BG.js → Reward-B92IzZwu.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DEvVJqrI.js → RewardGroup.vue_vue_type_script_setup_true_lang-D57YzG-c.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CVYdnHgY.js → RuleGroup.vue_vue_type_script_setup_true_lang-BP1p1CvJ.js} +13 -13
- package/dist/{Segment-tuXhaLDj.js → Segment-DmhD0xNx.js} +24 -24
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CllRcY9i.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-z4giwktx.js} +12 -12
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-CvbmoN2K.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-B4zyLh8s.js} +4 -4
- package/dist/{Setting-DiGF2JTg.js → Setting-CtmbOHlW.js} +14 -14
- package/dist/{SettingAdvertisements-Crt46_bj.js → SettingAdvertisements-DOE4gIpv.js} +12 -12
- package/dist/{Settings-BSMkvJ9x.js → Settings-DQphKeIi.js} +5 -5
- package/dist/{Store-BeadR4FJ.js → Store-BPT9mMks.js} +22 -21
- package/dist/{StoreRewards-Bh7U4sUh.js → StoreRewards-4RkZhC06.js} +15 -15
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-MeeFU7H1.js → StoreTransactions.vue_vue_type_script_setup_true_lang-m-nyS7Vc.js} +301 -301
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B052xtFY.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BghGigbR.js} +2 -2
- package/dist/{Tier-h8QwdPKk.js → Tier-BfIH8OTC.js} +22 -22
- package/dist/{Title-UvtKb5IZ.js → Title-BFmhe8GE.js} +21 -21
- package/dist/{Transaction-Cv0P9CHP.js → Transaction-CO4IkSZw.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-C3RJYBrf.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-I2UncpBG.js} +6 -6
- package/dist/{Voucher-CXOdrhKD.js → Voucher-Ix-mS4l3.js} +13 -13
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-miMXjaTZ.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DqbWuoSM.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DlJV5eqB.js → ZodTextField.vue_vue_type_script_setup_true_lang-tCxd0Qvu.js} +2 -2
- package/dist/{app-DKDGuWFD.js → app-BrVru8Am.js} +58 -58
- package/dist/app.js +1 -1
- package/dist/{business-Djy3MgTS.js → business-8rTrmHhO.js} +1 -1
- package/dist/{campaign-DT_XNrRE.js → campaign-Cwi8i2ie.js} +2 -2
- package/dist/{campaign-DF1yA41f.js → campaign-DTzR6t5u.js} +8 -8
- package/dist/{campaign.enum-CKrzkV8d.js → campaign.enum-eRR_rF29.js} +1 -1
- package/dist/{campaign.fn-Co8emx7p.js → campaign.fn-CcgAGGDu.js} +84 -84
- package/dist/{collectible.enum-Cn0-bWpY.js → collectible.enum-D8k5uFiD.js} +1 -1
- package/dist/{collection.fn-DfjskxAc.js → collection.fn-D3DjUX2v.js} +2 -2
- package/dist/{effect-Cds2Nb7A.js → effect-D_LH9hGr.js} +1 -1
- package/dist/{email-addresses-DYHM8mU3.js → email-addresses-_OLDygJY.js} +2 -2
- package/dist/{export-CrtBYF49.js → export-DbnY6G7D.js} +3 -3
- package/dist/{helper-DM02G8fJ.js → helper-BdD756Ff.js} +1 -1
- package/dist/{index-Bl7C54EE.js → index-6mL6Poui.js} +1 -1
- package/dist/{index-BYQgwPVy.js → index-BCq3XJpz.js} +3 -3
- package/dist/{index-CjmPyI1h.js → index-BNTVYeN5.js} +1 -1
- package/dist/{index-CVurB_vp.js → index-Bft0WncY.js} +2 -2
- package/dist/{index-CVXYpdac.js → index-C5rHyn6D.js} +1 -1
- package/dist/{index-DzE3kj83.js → index-CXiX43dl.js} +1 -1
- package/dist/{index-BvBdwpAV.js → index-CYbUD5PB.js} +6 -6
- package/dist/{index-DPwIsln6.js → index-CttwG1wW.js} +875 -812
- package/dist/{index-CbX76msc.js → index-DDLuYE9q.js} +3 -3
- package/dist/{index-Bru8-OmZ.js → index-DDxD_Es8.js} +1 -1
- package/dist/{index-BgkjVHg-.js → index-DGJvTxlt.js} +2 -2
- package/dist/{index-BRmrhIET.js → index-DL0i80oo.js} +2 -2
- package/dist/{index-D89iJi8T.js → index-DUElqn0t.js} +1 -1
- package/dist/{index-CwvDxi6T.js → index-DW8GG9Zb.js} +3 -3
- package/dist/{index-CVgIrpV8.js → index-RyTZwsRN.js} +1 -1
- package/dist/{index-TgWY9_Bm.js → index-_sqIavnH.js} +6 -6
- package/dist/{index.esm2017-DRjNsm67.js → index.esm2017-DqPahYR3.js} +1 -1
- package/dist/{loading-yhiKctnV.js → loading-XYXHlXle.js} +1 -1
- package/dist/{lodash-D7qXM8TP.js → lodash-sN1bIg6x.js} +1 -1
- package/dist/{member-import-Cf-_vQNF.js → member-import-CAv5JsOJ.js} +1 -1
- package/dist/{membership-B9N4VTdR.js → membership-D22LlDAg.js} +3 -3
- package/dist/{money-BXi5r9A7.js → money-Dv2tro6A.js} +1 -1
- package/dist/{number-Db1dqE3x.js → number-CN5e1FKF.js} +1 -1
- package/dist/{objectid-_8go5tK0.js → objectid-B72BpH3C.js} +9 -9
- package/dist/{plugins-BN5q9V90.js → plugins-Db4Ct8dp.js} +3 -3
- package/dist/{reward-DB6-B-qg.js → reward-td7a4aZL.js} +1 -1
- package/dist/{rule-DtgGkK_4.js → rule-DeXz2lOm.js} +3 -3
- package/dist/{rule-builder-CxgnssrA.js → rule-builder-771B-tdS.js} +1 -1
- package/dist/{template-DEucygM0.js → template-vFuosA3a.js} +7 -7
- package/dist/{timezone-BV9B19i6.js → timezone-cOY9dfx9.js} +1 -1
- package/dist/transaction.fn-BOI8yTps.js +71 -0
- package/dist/{trigger-DIe1ZaIS.js → trigger-CgbQY8gO.js} +5 -5
- package/dist/{useMarketingMaterialActions-_55bwf7s.js → useMarketingMaterialActions-B3nXr72P.js} +3 -3
- package/dist/{usePagination-CgkM9gMf.js → usePagination-NdeYOHaa.js} +1 -1
- package/dist/{user-fmvrAvEj.js → user-DohLjcz0.js} +1 -1
- package/dist/{vue-i18n-Dnns89xp.js → vue-i18n-bG0uSpC9.js} +252 -252
- package/dist/{xlsx-DI0I1Sfn.js → xlsx-vpRLp5-4.js} +584 -584
- package/dist/{zod-DbCt8Ake.js → zod-CXLjFDla.js} +1 -1
- package/package.json +1 -1
- package/dist/transaction.fn-CaIyPRrw.js +0 -64
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { components as v, useDialog as
|
|
3
|
-
import { s as
|
|
4
|
-
import "./index-
|
|
5
|
-
import { T as
|
|
6
|
-
import { h as
|
|
1
|
+
import { ref as M, defineComponent as J, computed as W, h as l, resolveComponent as Y, openBlock as P, createBlock as te, unref as s, isRef as ve, withCtx as oe, createElementVNode as x, createVNode as C, createElementBlock as O, Fragment as Q, renderList as ne, toDisplayString as K, createTextVNode as xe, resolveDynamicComponent as Se, watch as re, onBeforeMount as be, onMounted as _e } from "vue";
|
|
2
|
+
import { components as v, useDialog as we } from "@feedmepos/ui-library";
|
|
3
|
+
import { s as se } from "./index-CttwG1wW.js";
|
|
4
|
+
import "./index-DDLuYE9q.js";
|
|
5
|
+
import { T as A } from "./transaction.fn-BOI8yTps.js";
|
|
6
|
+
import { h as T } from "./moment-D7p2TMB-.js";
|
|
7
7
|
import { _ as H } from "./FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as le } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-heZT2KoY.js";
|
|
9
9
|
import { s as j } from "./index-CuvNtC_M.js";
|
|
10
|
-
import { f as X } from "./number-
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { c as Z, p as
|
|
14
|
-
import { g as
|
|
15
|
-
import { B as
|
|
16
|
-
import { u as
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import "./index-
|
|
21
|
-
import { u as
|
|
22
|
-
import { o as
|
|
23
|
-
import { u as
|
|
24
|
-
import { w as
|
|
25
|
-
import { useRouter as
|
|
26
|
-
import { t as q } from "./index-
|
|
27
|
-
import { R as G } from "./app-
|
|
28
|
-
import { useCoreStore as
|
|
29
|
-
import { c as
|
|
30
|
-
import { m as
|
|
31
|
-
const
|
|
10
|
+
import { f as X } from "./number-CN5e1FKF.js";
|
|
11
|
+
import { u as ie } from "./business-8rTrmHhO.js";
|
|
12
|
+
import { _ as ce, u as Ce } from "./usePagination-NdeYOHaa.js";
|
|
13
|
+
import { c as Z, p as Te } from "./plugins-Db4Ct8dp.js";
|
|
14
|
+
import { g as ue } from "./user-DohLjcz0.js";
|
|
15
|
+
import { B as me, e as Re } from "./export-DbnY6G7D.js";
|
|
16
|
+
import { u as de } from "./campaign-Cwi8i2ie.js";
|
|
17
|
+
import "./index-BNTVYeN5.js";
|
|
18
|
+
import "./index-BCq3XJpz.js";
|
|
19
|
+
import "./index-_sqIavnH.js";
|
|
20
|
+
import "./index-DW8GG9Zb.js";
|
|
21
|
+
import { u as pe } from "./vue-i18n-bG0uSpC9.js";
|
|
22
|
+
import { o as z } from "./objectId-dwaoBfJX.js";
|
|
23
|
+
import { u as fe } from "./loading-XYXHlXle.js";
|
|
24
|
+
import { w as Ie } from "./xlsx-vpRLp5-4.js";
|
|
25
|
+
import { useRouter as Fe } from "vue-router";
|
|
26
|
+
import { t as q } from "./index-6mL6Poui.js";
|
|
27
|
+
import { R as G } from "./app-BrVru8Am.js";
|
|
28
|
+
import { useCoreStore as De } from "@feedmepos/mf-common";
|
|
29
|
+
import { c as Ne } from "./string-Gcy5IM_H.js";
|
|
30
|
+
import { m as Ae } from "./index-DUElqn0t.js";
|
|
31
|
+
const Me = (_) => {
|
|
32
32
|
if (_.startsWith("_") || _.includes("."))
|
|
33
33
|
return _;
|
|
34
34
|
for (const w of ["pf_user_", "pf_collectible_"])
|
|
@@ -36,8 +36,8 @@ const Ee = (_) => {
|
|
|
36
36
|
return `${w.slice(0, -1)}.${_.slice(w.length).replace(new RegExp("_", "g"), ".")}`;
|
|
37
37
|
return _.replace(new RegExp("_", "g"), ".");
|
|
38
38
|
};
|
|
39
|
-
function
|
|
40
|
-
const c =
|
|
39
|
+
function Ee(_, w = { key: "_id", descending: !0 }) {
|
|
40
|
+
const c = M({
|
|
41
41
|
pageCount: 1,
|
|
42
42
|
searchValue: "",
|
|
43
43
|
pageIndex: 0,
|
|
@@ -45,80 +45,80 @@ function ke(_, w = { key: "_id", descending: !0 }) {
|
|
|
45
45
|
isLoading: !1,
|
|
46
46
|
pageSize: 10,
|
|
47
47
|
hasNext: !1
|
|
48
|
-
}), u =
|
|
49
|
-
function
|
|
50
|
-
|
|
48
|
+
}), u = M(w), S = M([]), h = M([void 0]);
|
|
49
|
+
function I() {
|
|
50
|
+
h.value = [void 0], c.value.pageIndex = 0, c.value.pageCount = 1, c.value.hasNext = !1;
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const p =
|
|
56
|
-
c.value.isLoading = !0, c.value.pageSize =
|
|
52
|
+
const E = async (t = {}) => {
|
|
53
|
+
const o = t.pageSize ?? c.value.pageSize, y = o !== c.value.pageSize;
|
|
54
|
+
y && I();
|
|
55
|
+
const p = y ? 0 : Math.max(t.pageIndex ?? c.value.pageIndex, 0), f = p === 0 || !!h.value[p] ? p : c.value.pageIndex, V = h.value[f];
|
|
56
|
+
c.value.isLoading = !0, c.value.pageSize = o, S.value = [];
|
|
57
57
|
try {
|
|
58
58
|
const N = await _({
|
|
59
|
-
limit:
|
|
59
|
+
limit: o,
|
|
60
60
|
sortBy: u.value.key,
|
|
61
61
|
descending: u.value.descending,
|
|
62
62
|
search: c.value.searchValue,
|
|
63
|
-
...
|
|
63
|
+
...V ? { cursor: V } : {}
|
|
64
64
|
});
|
|
65
|
-
S.value = N.resources, c.value.pageIndex =
|
|
65
|
+
S.value = N.resources, c.value.pageIndex = f, c.value.totalRows = N.resources.length, c.value.hasNext = N.meta.hasNext, c.value.pageCount = f + (N.meta.hasNext ? 2 : 1), N.meta.nextCursor ? h.value[f + 1] = N.meta.nextCursor : h.value.splice(f + 1);
|
|
66
66
|
} catch (N) {
|
|
67
67
|
console.error("Error fetching data:", N), c.value.hasNext = !1;
|
|
68
68
|
} finally {
|
|
69
69
|
c.value.isLoading = !1;
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
let
|
|
73
|
-
const m = (
|
|
74
|
-
d =
|
|
75
|
-
|
|
72
|
+
let R, d;
|
|
73
|
+
const m = (t) => (R && clearTimeout(R), d && d(), new Promise((o) => {
|
|
74
|
+
d = o, R = setTimeout(async () => {
|
|
75
|
+
R = void 0, d = void 0, await E(t), o();
|
|
76
76
|
}, 200);
|
|
77
77
|
}));
|
|
78
78
|
return {
|
|
79
79
|
tableMeta: c,
|
|
80
80
|
rowData: S,
|
|
81
81
|
sortBy: u,
|
|
82
|
-
pageCursors:
|
|
83
|
-
resetCursorState:
|
|
84
|
-
fetchData:
|
|
82
|
+
pageCursors: h,
|
|
83
|
+
resetCursorState: I,
|
|
84
|
+
fetchData: E,
|
|
85
85
|
debouncedFetchData: m,
|
|
86
|
-
onSort: async (
|
|
87
|
-
|
|
88
|
-
key:
|
|
89
|
-
descending:
|
|
90
|
-
} : u.value = w,
|
|
86
|
+
onSort: async (t) => {
|
|
87
|
+
t.length ? u.value = {
|
|
88
|
+
key: Me(t[0].id),
|
|
89
|
+
descending: t[0].desc
|
|
90
|
+
} : u.value = w, I(), await m({
|
|
91
91
|
pageIndex: 0,
|
|
92
92
|
pageSize: c.value.pageSize
|
|
93
93
|
});
|
|
94
94
|
},
|
|
95
|
-
onSearch: () => (
|
|
95
|
+
onSearch: () => (I(), m({
|
|
96
96
|
pageIndex: 0,
|
|
97
97
|
pageSize: c.value.pageSize
|
|
98
98
|
}))
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
class
|
|
101
|
+
class ke extends me {
|
|
102
102
|
}
|
|
103
|
-
const
|
|
103
|
+
const Pe = { class: "space-y-24 pr-12" }, Ve = { class: "w-full space-y-16" }, Oe = { class: "fm-typo-en-body-lg-600" }, ze = ["onClick"], Ye = { class: "fm-typo-en-body-lg-600" }, Ue = ["onClick"], $e = { class: "flex items-center gap-8" }, Be = /* @__PURE__ */ J({
|
|
104
104
|
__name: "TransactionDetailSheet",
|
|
105
105
|
setup(_, { expose: w }) {
|
|
106
|
-
|
|
107
|
-
const c =
|
|
108
|
-
function
|
|
109
|
-
c.value = m, u.value =
|
|
106
|
+
pe();
|
|
107
|
+
const c = M(!1), u = M(), S = de(), h = ie();
|
|
108
|
+
function I(m, n) {
|
|
109
|
+
c.value = m, u.value = n ?? null;
|
|
110
110
|
}
|
|
111
|
-
const
|
|
112
|
-
var m,
|
|
111
|
+
const E = W(() => {
|
|
112
|
+
var m, n;
|
|
113
113
|
return X(
|
|
114
|
-
((
|
|
115
|
-
(e,
|
|
114
|
+
((n = u.value) == null ? void 0 : n.expiryAmount.reduce(
|
|
115
|
+
(e, t) => e + t.amount,
|
|
116
116
|
((m = u.value) == null ? void 0 : m.amount) ?? 0
|
|
117
117
|
)) ?? 0,
|
|
118
118
|
2
|
|
119
119
|
);
|
|
120
|
-
}),
|
|
121
|
-
var m,
|
|
120
|
+
}), R = W(() => {
|
|
121
|
+
var m, n, e, t, o;
|
|
122
122
|
return u.value ? [
|
|
123
123
|
{
|
|
124
124
|
label: "Transaction ID",
|
|
@@ -126,7 +126,7 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
label: "Date/Time",
|
|
129
|
-
value:
|
|
129
|
+
value: T(z(u.value._id.toString())).format(
|
|
130
130
|
"D MMM YYYY, hh:mmA"
|
|
131
131
|
)
|
|
132
132
|
},
|
|
@@ -137,118 +137,118 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
137
137
|
{
|
|
138
138
|
class: [
|
|
139
139
|
"pr-2",
|
|
140
|
-
+
|
|
140
|
+
+E.value > 0 ? "text-fm-color-system-success-300" : "text-fm-color-system-error-300"
|
|
141
141
|
]
|
|
142
142
|
},
|
|
143
|
-
|
|
143
|
+
E.value
|
|
144
144
|
)
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
label: "Type",
|
|
148
|
-
value:
|
|
148
|
+
value: A.formattedType(u.value)
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
label: "Source",
|
|
152
|
-
value: j(
|
|
152
|
+
value: j(A.getReason(u.value.source))
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
label: "User",
|
|
156
|
-
value: (e = (
|
|
156
|
+
value: (e = (n = u.value) == null ? void 0 : n.pf_user) == null ? void 0 : e.name
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
159
|
label: "Phone Number",
|
|
160
|
-
value: (
|
|
160
|
+
value: (o = (t = u.value) == null ? void 0 : t.pf_user) == null ? void 0 : o.phoneNumber
|
|
161
161
|
}
|
|
162
162
|
] : [];
|
|
163
163
|
}), d = W(() => {
|
|
164
|
-
var o,
|
|
164
|
+
var o, y, p, D;
|
|
165
165
|
if (!u.value) return [];
|
|
166
|
-
const m = [],
|
|
167
|
-
if (
|
|
168
|
-
const
|
|
169
|
-
(
|
|
166
|
+
const m = [], n = (o = u.value) == null ? void 0 : o.metadata, e = u.value;
|
|
167
|
+
if (n != null && n.campaign) {
|
|
168
|
+
const f = S.campaigns.all.find(
|
|
169
|
+
(V) => V._id === (n == null ? void 0 : n.campaign)
|
|
170
170
|
);
|
|
171
|
-
|
|
172
|
-
m.push({
|
|
171
|
+
f && m.push({
|
|
173
172
|
label: "Campaign",
|
|
174
|
-
value:
|
|
173
|
+
value: f.name
|
|
175
174
|
});
|
|
176
175
|
}
|
|
177
|
-
|
|
176
|
+
const t = A.formattedRemark(e);
|
|
177
|
+
return t && m.push({
|
|
178
178
|
label: "Remark",
|
|
179
|
-
value: t
|
|
180
|
-
}), (
|
|
179
|
+
value: t
|
|
180
|
+
}), (y = u.value) != null && y.ref.startsWith("bill_") && m.push({
|
|
181
181
|
label: "Bill Number",
|
|
182
|
-
value: (
|
|
182
|
+
value: (p = u.value) == null ? void 0 : p.ref,
|
|
183
183
|
copy: () => {
|
|
184
|
-
var
|
|
185
|
-
return Z((
|
|
184
|
+
var f;
|
|
185
|
+
return Z((f = u.value) == null ? void 0 : f.ref);
|
|
186
186
|
}
|
|
187
|
-
}),
|
|
187
|
+
}), n != null && n.location && m.push({
|
|
188
188
|
label: "Location",
|
|
189
|
-
value: (
|
|
190
|
-
(
|
|
191
|
-
)) == null ? void 0 :
|
|
192
|
-
}), e.source ===
|
|
189
|
+
value: (D = h.locations.find(
|
|
190
|
+
(f) => f._id.toString() === (n == null ? void 0 : n.location)
|
|
191
|
+
)) == null ? void 0 : D.name
|
|
192
|
+
}), e.source === se.enum.STORE && m.push({
|
|
193
193
|
label: "Store Transaction",
|
|
194
194
|
value: e.ref
|
|
195
|
-
}),
|
|
195
|
+
}), n != null && n.originTransaction && m.push({
|
|
196
196
|
label: "Parent Transaction",
|
|
197
|
-
value:
|
|
198
|
-
}),
|
|
197
|
+
value: n.originTransaction
|
|
198
|
+
}), n != null && n.referral_count && m.push({
|
|
199
199
|
label: "Referral Count",
|
|
200
|
-
value:
|
|
200
|
+
value: n.referral_count
|
|
201
201
|
}), e.refundedFrom && m.push({
|
|
202
202
|
label: "Refunded From",
|
|
203
203
|
value: e.refundedFrom
|
|
204
204
|
}), m;
|
|
205
205
|
});
|
|
206
206
|
return w({
|
|
207
|
-
showSheet:
|
|
208
|
-
}), (m,
|
|
209
|
-
const e =
|
|
210
|
-
return
|
|
207
|
+
showSheet: I
|
|
208
|
+
}), (m, n) => {
|
|
209
|
+
const e = Y("FmButton"), t = Y("FmSideSheet");
|
|
210
|
+
return P(), te(t, {
|
|
211
211
|
"max-width": 560,
|
|
212
212
|
modelValue: s(c),
|
|
213
|
-
"onUpdate:modelValue":
|
|
213
|
+
"onUpdate:modelValue": n[1] || (n[1] = (o) => ve(c) ? c.value = o : null),
|
|
214
214
|
header: "Transaction Details"
|
|
215
215
|
}, {
|
|
216
|
-
"side-sheet-footer":
|
|
217
|
-
x("div",
|
|
218
|
-
|
|
216
|
+
"side-sheet-footer": oe(() => [
|
|
217
|
+
x("div", $e, [
|
|
218
|
+
C(e, {
|
|
219
219
|
label: "Close",
|
|
220
|
-
onClick:
|
|
220
|
+
onClick: n[0] || (n[0] = (o) => I(!1)),
|
|
221
221
|
variant: "tertiary"
|
|
222
222
|
})
|
|
223
223
|
])
|
|
224
224
|
]),
|
|
225
|
-
default:
|
|
226
|
-
x("div",
|
|
227
|
-
x("div",
|
|
228
|
-
(
|
|
229
|
-
key:
|
|
225
|
+
default: oe(() => [
|
|
226
|
+
x("div", Pe, [
|
|
227
|
+
x("div", Ve, [
|
|
228
|
+
(P(!0), O(Q, null, ne(s(R), (o) => (P(), O("div", {
|
|
229
|
+
key: o.label,
|
|
230
230
|
class: "flex flex-col gap-4"
|
|
231
231
|
}, [
|
|
232
|
-
x("div",
|
|
232
|
+
x("div", Oe, K(o.label), 1),
|
|
233
233
|
x("div", {
|
|
234
234
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400 hover:underline",
|
|
235
|
-
onClick:
|
|
235
|
+
onClick: o.copy
|
|
236
236
|
}, [
|
|
237
|
-
|
|
238
|
-
(
|
|
239
|
-
], 8,
|
|
240
|
-
|
|
237
|
+
xe(K(o.accessorFn ? o.accessorFn() : o.value) + " ", 1),
|
|
238
|
+
(P(), te(Se(o.component)))
|
|
239
|
+
], 8, ze),
|
|
240
|
+
n[2] || (n[2] = x("hr", { class: "mt-3" }, null, -1))
|
|
241
241
|
]))), 128)),
|
|
242
|
-
(
|
|
243
|
-
key:
|
|
242
|
+
(P(!0), O(Q, null, ne(s(d), (o) => (P(), O("div", {
|
|
243
|
+
key: o.label,
|
|
244
244
|
class: "flex flex-col gap-4"
|
|
245
245
|
}, [
|
|
246
|
-
x("div",
|
|
246
|
+
x("div", Ye, K(o.label), 1),
|
|
247
247
|
x("div", {
|
|
248
248
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400 hover:underline",
|
|
249
|
-
onClick:
|
|
250
|
-
}, K(
|
|
251
|
-
|
|
249
|
+
onClick: o.copy
|
|
250
|
+
}, K(o.accessorFn ? o.accessorFn() : o.value), 9, Ue),
|
|
251
|
+
n[3] || (n[3] = x("hr", { class: "mt-3" }, null, -1))
|
|
252
252
|
]))), 128))
|
|
253
253
|
])
|
|
254
254
|
])
|
|
@@ -257,7 +257,7 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
257
257
|
}, 8, ["modelValue"]);
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
}),
|
|
260
|
+
}), Le = { class: "hidden xs:!flex items-center justify-end" }, Ke = { class: "flex items-center justify-between" }, Ge = { class: "flex gap-8 items-center w-full overflow-x-scroll" }, We = { class: "xs:hidden" }, Ia = /* @__PURE__ */ J({
|
|
261
261
|
__name: "CollectionTransactions",
|
|
262
262
|
props: {
|
|
263
263
|
user: {
|
|
@@ -265,7 +265,7 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
265
265
|
}
|
|
266
266
|
},
|
|
267
267
|
setup(_) {
|
|
268
|
-
const { t: w } =
|
|
268
|
+
const { t: w } = pe(), c = ie(), u = de(), S = Fe(), h = _, I = M(!1), { minor: E } = fe, R = [
|
|
269
269
|
{
|
|
270
270
|
header: "Transaction ID",
|
|
271
271
|
accessorKey: "_id",
|
|
@@ -295,8 +295,8 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
295
295
|
{
|
|
296
296
|
header: "Created at",
|
|
297
297
|
accessorKey: "_id",
|
|
298
|
-
accessorFn: (a) =>
|
|
299
|
-
cell: (a) =>
|
|
298
|
+
accessorFn: (a) => T(z(a._id.toString())),
|
|
299
|
+
cell: (a) => T(z(a.row.original._id.toString())).format(
|
|
300
300
|
"D MMM YYYY, hh:mmA"
|
|
301
301
|
),
|
|
302
302
|
enableSorting: !0
|
|
@@ -306,14 +306,14 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
306
306
|
// accessorKey: 'totalAmount',
|
|
307
307
|
enableSorting: !1,
|
|
308
308
|
cell(a) {
|
|
309
|
-
var
|
|
309
|
+
var g, i, k, U;
|
|
310
310
|
const r = X(
|
|
311
311
|
a.row.original.expiryAmount.reduce(
|
|
312
312
|
($, B) => $ + B.amount,
|
|
313
313
|
a.row.original.amount ?? 0
|
|
314
314
|
),
|
|
315
315
|
2
|
|
316
|
-
),
|
|
316
|
+
), b = (i = (g = a.row.original.expiryAmount) == null ? void 0 : g[0]) != null && i.expiredAt ? T((U = (k = a.row.original.expiryAmount) == null ? void 0 : k[0]) == null ? void 0 : U.expiredAt).format(
|
|
317
317
|
"D MMM YYYY"
|
|
318
318
|
) : "";
|
|
319
319
|
return l("div", { class: "flex items-center" }, [
|
|
@@ -331,7 +331,7 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
331
331
|
a.row.original.expiryAmount.length > 0 ? l(
|
|
332
332
|
v.FmTooltip,
|
|
333
333
|
{
|
|
334
|
-
content: `Expired on ${
|
|
334
|
+
content: `Expired on ${b}`
|
|
335
335
|
},
|
|
336
336
|
[
|
|
337
337
|
l(v.FmIcon, {
|
|
@@ -348,12 +348,12 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
348
348
|
{
|
|
349
349
|
header: "Type",
|
|
350
350
|
accessorKey: "pf_collectible.type",
|
|
351
|
-
accessorFn: (a) =>
|
|
351
|
+
accessorFn: (a) => A.formattedType(a),
|
|
352
352
|
meta: {
|
|
353
353
|
maxWidth: "200px"
|
|
354
354
|
},
|
|
355
355
|
cell(a) {
|
|
356
|
-
const r =
|
|
356
|
+
const r = A.formattedType(a.row.original);
|
|
357
357
|
return l("div", { class: "flex items-center" }, [
|
|
358
358
|
l("div", { class: "truncate text-ellipsis" }, r),
|
|
359
359
|
r.length > 20 ? l(
|
|
@@ -382,20 +382,20 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
382
382
|
l(
|
|
383
383
|
"div",
|
|
384
384
|
{ class: "truncate text-ellipsis" },
|
|
385
|
-
j(
|
|
385
|
+
j(A.getReason(a.row.original.source))
|
|
386
386
|
),
|
|
387
387
|
...(r = a.row.original.metadata) != null && r.campaign ? [
|
|
388
388
|
l(
|
|
389
389
|
v.FmTooltip,
|
|
390
390
|
{
|
|
391
391
|
get content() {
|
|
392
|
-
var
|
|
393
|
-
return (
|
|
394
|
-
(
|
|
392
|
+
var b;
|
|
393
|
+
return (b = u.campaigns.all.find(
|
|
394
|
+
(g) => {
|
|
395
395
|
var i;
|
|
396
|
-
return
|
|
396
|
+
return g._id === ((i = a.row.original.metadata) == null ? void 0 : i.campaign);
|
|
397
397
|
}
|
|
398
|
-
)) == null ? void 0 :
|
|
398
|
+
)) == null ? void 0 : b.name;
|
|
399
399
|
}
|
|
400
400
|
},
|
|
401
401
|
[
|
|
@@ -403,28 +403,28 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
403
403
|
name: "info",
|
|
404
404
|
color: "primary",
|
|
405
405
|
size: "sm",
|
|
406
|
-
onClick: async (
|
|
407
|
-
|
|
408
|
-
const
|
|
406
|
+
onClick: async (b) => {
|
|
407
|
+
b.preventDefault(), b.stopPropagation();
|
|
408
|
+
const g = u.campaigns.all.find(
|
|
409
409
|
(i) => {
|
|
410
|
-
var
|
|
411
|
-
return i._id === ((
|
|
410
|
+
var k;
|
|
411
|
+
return i._id === ((k = a.row.original.metadata) == null ? void 0 : k.campaign);
|
|
412
412
|
}
|
|
413
413
|
);
|
|
414
|
-
if (
|
|
415
|
-
switch (
|
|
414
|
+
if (g)
|
|
415
|
+
switch (g.type) {
|
|
416
416
|
case "VOUCHER":
|
|
417
417
|
case "PROMOTION":
|
|
418
418
|
case "BROADCAST":
|
|
419
419
|
await S.push({
|
|
420
|
-
name: G[`$connect-CAMPAIGN_${
|
|
420
|
+
name: G[`$connect-CAMPAIGN_${g.type}`]
|
|
421
421
|
});
|
|
422
422
|
break;
|
|
423
423
|
case "GAME":
|
|
424
424
|
case "CREDIT":
|
|
425
425
|
case "MISSION":
|
|
426
426
|
await S.push({
|
|
427
|
-
name: G[`$connect-PROGRAM_${
|
|
427
|
+
name: G[`$connect-PROGRAM_${g.type}`]
|
|
428
428
|
});
|
|
429
429
|
break;
|
|
430
430
|
case "POINT":
|
|
@@ -450,7 +450,7 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
450
450
|
header: "User",
|
|
451
451
|
accessorKey: "pf_user.name",
|
|
452
452
|
cell(a) {
|
|
453
|
-
return
|
|
453
|
+
return ue(a.row.original.pf_user);
|
|
454
454
|
}
|
|
455
455
|
},
|
|
456
456
|
{
|
|
@@ -479,13 +479,13 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
479
479
|
header: "References",
|
|
480
480
|
accessorKey: "ref",
|
|
481
481
|
cell(a) {
|
|
482
|
-
|
|
482
|
+
const r = A.formattedRemark(a.row.original);
|
|
483
483
|
return l("div", { class: "flex items-center justify-between gap-4" }, [
|
|
484
484
|
l("div", { class: "flex items-center" }, [
|
|
485
|
-
|
|
485
|
+
r ? l(
|
|
486
486
|
v.FmTooltip,
|
|
487
487
|
{
|
|
488
|
-
content:
|
|
488
|
+
content: r
|
|
489
489
|
},
|
|
490
490
|
[
|
|
491
491
|
l(v.FmIcon, {
|
|
@@ -501,96 +501,96 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
501
501
|
]);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
], d =
|
|
504
|
+
], d = M({
|
|
505
505
|
search: "",
|
|
506
506
|
"pf_collectible.type": [],
|
|
507
507
|
"metadata.location": [],
|
|
508
508
|
dateRange: {
|
|
509
|
-
startDate:
|
|
510
|
-
endDate:
|
|
509
|
+
startDate: T().subtract(7, "day").toISOString(),
|
|
510
|
+
endDate: T().endOf("day").toISOString()
|
|
511
511
|
},
|
|
512
512
|
source: []
|
|
513
513
|
}), m = () => ({
|
|
514
514
|
...d.value,
|
|
515
|
-
user:
|
|
515
|
+
user: h.user,
|
|
516
516
|
dateRange: {
|
|
517
517
|
start: new Date(d.value.dateRange.startDate).toISOString(),
|
|
518
518
|
end: new Date(d.value.dateRange.endDate).toISOString()
|
|
519
519
|
}
|
|
520
520
|
}), {
|
|
521
|
-
tableMeta:
|
|
521
|
+
tableMeta: n,
|
|
522
522
|
rowData: e,
|
|
523
|
-
onSort:
|
|
524
|
-
debouncedFetchData:
|
|
525
|
-
resetCursorState:
|
|
526
|
-
} =
|
|
523
|
+
onSort: t,
|
|
524
|
+
debouncedFetchData: o,
|
|
525
|
+
resetCursorState: y
|
|
526
|
+
} = Ee(async (a) => {
|
|
527
527
|
const r = await q.readAllCursor(
|
|
528
528
|
a,
|
|
529
529
|
m()
|
|
530
530
|
);
|
|
531
531
|
return {
|
|
532
|
-
resources: r.resources.map((
|
|
533
|
-
const
|
|
534
|
-
return { ...
|
|
532
|
+
resources: r.resources.map((b) => {
|
|
533
|
+
const g = p.value.find((i) => i._id === b.ref);
|
|
534
|
+
return { ...b, ref: (g == null ? void 0 : g.seqNumber) || b.ref };
|
|
535
535
|
}),
|
|
536
536
|
meta: r.meta
|
|
537
537
|
};
|
|
538
|
-
}), p =
|
|
538
|
+
}), p = M([]), D = se.options.map((a) => ({ label: j(A.getReason(a)), value: a })), f = W(
|
|
539
539
|
() => c.locations.map((a) => ({ label: a.name, value: a._id }))
|
|
540
540
|
);
|
|
541
|
-
|
|
541
|
+
re(
|
|
542
542
|
d,
|
|
543
543
|
() => {
|
|
544
|
-
|
|
544
|
+
y(), o({ pageIndex: 0 });
|
|
545
545
|
},
|
|
546
546
|
{ deep: !0 }
|
|
547
547
|
);
|
|
548
|
-
async function
|
|
548
|
+
async function V() {
|
|
549
549
|
try {
|
|
550
|
-
|
|
551
|
-
const a = new
|
|
552
|
-
await
|
|
550
|
+
I.value = !0;
|
|
551
|
+
const a = new ke(), r = m(), b = 1e3;
|
|
552
|
+
await E(
|
|
553
553
|
async () => {
|
|
554
|
-
var
|
|
555
|
-
let
|
|
554
|
+
var k, U, $, B, ee, ae;
|
|
555
|
+
let g, i = !0;
|
|
556
556
|
for (; i; ) {
|
|
557
557
|
const L = await q.readAllCursor(
|
|
558
558
|
{
|
|
559
|
-
limit:
|
|
559
|
+
limit: b,
|
|
560
560
|
sortBy: "_id",
|
|
561
561
|
descending: !1,
|
|
562
|
-
...
|
|
562
|
+
...g ? { cursor: g } : {}
|
|
563
563
|
},
|
|
564
564
|
r
|
|
565
565
|
);
|
|
566
566
|
if (!L.resources.length)
|
|
567
567
|
break;
|
|
568
|
-
for (const
|
|
568
|
+
for (const F of L.resources)
|
|
569
569
|
a.addRecord({
|
|
570
|
-
TransactionID:
|
|
571
|
-
CreatedAt:
|
|
570
|
+
TransactionID: F._id,
|
|
571
|
+
CreatedAt: T(z(F._id.toString())).format(
|
|
572
572
|
"D MMM YYYY, hh:mmA"
|
|
573
573
|
),
|
|
574
574
|
Amount: X(
|
|
575
|
-
|
|
576
|
-
(
|
|
577
|
-
|
|
575
|
+
F.expiryAmount.reduce(
|
|
576
|
+
(he, ye) => he + ye.amount,
|
|
577
|
+
F.amount ?? 0
|
|
578
578
|
),
|
|
579
579
|
2
|
|
580
580
|
),
|
|
581
|
-
ExpiredAt: (U = (
|
|
581
|
+
ExpiredAt: (U = (k = F.expiryAmount) == null ? void 0 : k[0]) != null && U.expiredAt ? T((B = ($ = F.expiryAmount) == null ? void 0 : $[0]) == null ? void 0 : B.expiredAt).format(
|
|
582
582
|
"D MMM YYYY"
|
|
583
583
|
) : "",
|
|
584
|
-
Type:
|
|
585
|
-
Source: j(
|
|
586
|
-
User: ((ee =
|
|
587
|
-
"Phone No.": ((ae =
|
|
588
|
-
References:
|
|
589
|
-
Remark: (
|
|
584
|
+
Type: A.formattedType(F),
|
|
585
|
+
Source: j(A.getReason(F.source)),
|
|
586
|
+
User: ((ee = F.pf_user) == null ? void 0 : ee.name) || "",
|
|
587
|
+
"Phone No.": ((ae = F.pf_user) == null ? void 0 : ae.phoneNumber) || "",
|
|
588
|
+
References: F.ref,
|
|
589
|
+
Remark: A.formattedRemark(F)
|
|
590
590
|
});
|
|
591
|
-
|
|
591
|
+
g = L.meta.nextCursor ?? void 0, i = L.meta.hasNext && !!g;
|
|
592
592
|
}
|
|
593
|
-
await
|
|
593
|
+
await Ie(
|
|
594
594
|
a.buildExcel(),
|
|
595
595
|
`transactions-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
|
|
596
596
|
{
|
|
@@ -608,46 +608,46 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
608
608
|
} catch (a) {
|
|
609
609
|
console.error(a);
|
|
610
610
|
} finally {
|
|
611
|
-
|
|
611
|
+
I.value = !1;
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
const N =
|
|
615
|
-
function
|
|
614
|
+
const N = M(null);
|
|
615
|
+
function ge(a) {
|
|
616
616
|
var r;
|
|
617
617
|
console.log(a), (r = N.value) == null || r.showSheet(!0, a.original);
|
|
618
618
|
}
|
|
619
|
-
return
|
|
620
|
-
await c.readLocations(), await u.read(), await
|
|
619
|
+
return be(async () => {
|
|
620
|
+
await c.readLocations(), await u.read(), await o();
|
|
621
621
|
}), (a, r) => {
|
|
622
|
-
const
|
|
623
|
-
return
|
|
622
|
+
const b = Y("FmSearch"), g = Y("FmButton");
|
|
623
|
+
return P(), O(Q, null, [
|
|
624
624
|
x("div", null, [
|
|
625
|
-
x("div",
|
|
626
|
-
|
|
625
|
+
x("div", Le, [
|
|
626
|
+
C(b, {
|
|
627
627
|
class: "hidden xs:!flex border-b border-fm-color-neutral-gray-100",
|
|
628
628
|
modelValue: s(d).search,
|
|
629
629
|
"onUpdate:modelValue": r[0] || (r[0] = (i) => s(d).search = i),
|
|
630
630
|
placeholder: "Search",
|
|
631
631
|
collapsible: ""
|
|
632
632
|
}, null, 8, ["modelValue"]),
|
|
633
|
-
|
|
633
|
+
C(g, {
|
|
634
634
|
icon: "ios_share",
|
|
635
635
|
variant: "tertiary",
|
|
636
|
-
onClick:
|
|
636
|
+
onClick: V
|
|
637
637
|
})
|
|
638
638
|
]),
|
|
639
|
-
x("div",
|
|
640
|
-
x("div",
|
|
641
|
-
|
|
639
|
+
x("div", Ke, [
|
|
640
|
+
x("div", Ge, [
|
|
641
|
+
C(H, {
|
|
642
642
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
643
643
|
"right-icon": "keyboard_arrow_down",
|
|
644
644
|
modelValue: s(d)["metadata.location"],
|
|
645
645
|
"onUpdate:modelValue": r[1] || (r[1] = (i) => s(d)["metadata.location"] = i),
|
|
646
646
|
icon: "storefront",
|
|
647
647
|
"show-item-label": !0,
|
|
648
|
-
items: s(
|
|
648
|
+
items: s(f)
|
|
649
649
|
}, null, 8, ["modelValue", "items"]),
|
|
650
|
-
|
|
650
|
+
C(H, {
|
|
651
651
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
652
652
|
"right-icon": "keyboard_arrow_down",
|
|
653
653
|
modelValue: s(d)["pf_collectible.type"],
|
|
@@ -665,63 +665,63 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
665
665
|
{ label: "Stamp", value: "STAMP" }
|
|
666
666
|
]
|
|
667
667
|
}, null, 8, ["modelValue"]),
|
|
668
|
-
|
|
668
|
+
C(H, {
|
|
669
669
|
class: "cursor-pointer text-fm-color-neutral-gray-400",
|
|
670
670
|
"right-icon": "keyboard_arrow_down",
|
|
671
671
|
modelValue: s(d).source,
|
|
672
672
|
"onUpdate:modelValue": r[3] || (r[3] = (i) => s(d).source = i),
|
|
673
673
|
label: "Source: ",
|
|
674
674
|
"show-item-label": !0,
|
|
675
|
-
items: s(
|
|
675
|
+
items: s(D)
|
|
676
676
|
}, null, 8, ["modelValue", "items"]),
|
|
677
|
-
|
|
677
|
+
C(le, {
|
|
678
678
|
"model-value": {
|
|
679
679
|
startDate: s(d).dateRange.startDate,
|
|
680
680
|
endDate: s(d).dateRange.endDate
|
|
681
681
|
},
|
|
682
682
|
"onUpdate:modelValue": r[4] || (r[4] = (i) => s(d).dateRange = {
|
|
683
|
-
startDate: s(
|
|
684
|
-
endDate: s(
|
|
683
|
+
startDate: s(T)(i.startDate).startOf("d").toISOString(),
|
|
684
|
+
endDate: s(T)(i.endDate).endOf("d").toISOString()
|
|
685
685
|
})
|
|
686
686
|
}, null, 8, ["model-value"])
|
|
687
687
|
]),
|
|
688
|
-
|
|
688
|
+
C(b, {
|
|
689
689
|
class: "xs:hidden",
|
|
690
690
|
modelValue: s(d).search,
|
|
691
691
|
"onUpdate:modelValue": r[5] || (r[5] = (i) => s(d).search = i),
|
|
692
692
|
placeholder: "Search",
|
|
693
693
|
collapsible: ""
|
|
694
694
|
}, null, 8, ["modelValue"]),
|
|
695
|
-
x("div",
|
|
696
|
-
|
|
695
|
+
x("div", We, [
|
|
696
|
+
C(g, {
|
|
697
697
|
icon: "ios_share",
|
|
698
698
|
variant: "tertiary",
|
|
699
|
-
onClick:
|
|
699
|
+
onClick: V
|
|
700
700
|
})
|
|
701
701
|
])
|
|
702
702
|
]),
|
|
703
|
-
|
|
704
|
-
loading: s(
|
|
703
|
+
C(ce, {
|
|
704
|
+
loading: s(n).isLoading,
|
|
705
705
|
"row-data": s(e),
|
|
706
|
-
"row-count": s(
|
|
707
|
-
"column-defs":
|
|
708
|
-
(i) => !
|
|
706
|
+
"row-count": s(n).totalRows,
|
|
707
|
+
"column-defs": R.filter(
|
|
708
|
+
(i) => !h.user || i.header !== "User" && i.header !== "Phone No."
|
|
709
709
|
),
|
|
710
|
-
"page-count": s(
|
|
711
|
-
"page-index": s(
|
|
712
|
-
"page-size": s(
|
|
710
|
+
"page-count": s(n).pageCount,
|
|
711
|
+
"page-index": s(n).pageIndex,
|
|
712
|
+
"page-size": s(n).pageSize,
|
|
713
713
|
"shrink-at": !1,
|
|
714
714
|
"pagination-mode": "cursor",
|
|
715
|
-
"has-next": s(
|
|
716
|
-
onSortChange: s(
|
|
717
|
-
onPageChange: r[6] || (r[6] = (i) => s(
|
|
715
|
+
"has-next": s(n).hasNext,
|
|
716
|
+
onSortChange: s(t),
|
|
717
|
+
onPageChange: r[6] || (r[6] = (i) => s(o)({
|
|
718
718
|
pageSize: i.pageSize,
|
|
719
719
|
pageIndex: i.pageIndex
|
|
720
720
|
})),
|
|
721
|
-
onRowClick:
|
|
721
|
+
onRowClick: ge
|
|
722
722
|
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "page-count", "page-index", "page-size", "has-next", "onSortChange"])
|
|
723
723
|
]),
|
|
724
|
-
|
|
724
|
+
C(Be, {
|
|
725
725
|
ref_key: "transactionDetailSheet",
|
|
726
726
|
ref: N
|
|
727
727
|
}, null, 512)
|
|
@@ -729,9 +729,9 @@ const Ve = { class: "space-y-24 pr-12" }, Oe = { class: "w-full space-y-16" }, z
|
|
|
729
729
|
};
|
|
730
730
|
}
|
|
731
731
|
});
|
|
732
|
-
class
|
|
732
|
+
class je extends me {
|
|
733
733
|
}
|
|
734
|
-
const
|
|
734
|
+
const qe = { class: "flex items-center justify-between" }, He = { class: "flex gap-8 items-center" }, Qe = { class: "flex gap-8 items-center xs:hidden" }, Fa = /* @__PURE__ */ J({
|
|
735
735
|
__name: "StoreTransactions",
|
|
736
736
|
props: {
|
|
737
737
|
user: {
|
|
@@ -739,8 +739,8 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
741
|
setup(_) {
|
|
742
|
-
const w = _, { minor: c } =
|
|
743
|
-
|
|
742
|
+
const w = _, { minor: c } = fe;
|
|
743
|
+
we();
|
|
744
744
|
const u = [
|
|
745
745
|
{
|
|
746
746
|
header: "Transaction ID",
|
|
@@ -754,8 +754,8 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
754
754
|
outline: !0,
|
|
755
755
|
size: "sm",
|
|
756
756
|
class: "cursor-pointer mr-4 shrink-0",
|
|
757
|
-
onClick: (
|
|
758
|
-
|
|
757
|
+
onClick: (t) => {
|
|
758
|
+
t.preventDefault(), t.stopPropagation(), Z(e.row.original._id.toString());
|
|
759
759
|
}
|
|
760
760
|
}),
|
|
761
761
|
l("div", { class: "truncate" }, e.row.original._id.toString())
|
|
@@ -764,7 +764,7 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
764
764
|
},
|
|
765
765
|
{
|
|
766
766
|
header: "Created at",
|
|
767
|
-
accessorFn: (e) =>
|
|
767
|
+
accessorFn: (e) => T(z(e._id.toString())).format("D MMM YYYY, hh:mmA"),
|
|
768
768
|
enableSorting: !0
|
|
769
769
|
},
|
|
770
770
|
{
|
|
@@ -778,14 +778,14 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
778
778
|
{
|
|
779
779
|
header: "Payment Type",
|
|
780
780
|
accessorFn: (e) => {
|
|
781
|
-
var
|
|
782
|
-
return ((
|
|
781
|
+
var t;
|
|
782
|
+
return ((t = e.paymentType) == null ? void 0 : t.type) ?? "N/A";
|
|
783
783
|
},
|
|
784
784
|
cell(e) {
|
|
785
|
-
var
|
|
785
|
+
var t, o;
|
|
786
786
|
return l("div", { class: "flex items-center gap-4" }, [
|
|
787
787
|
l("div", { class: "flex items-center" }, [
|
|
788
|
-
((
|
|
788
|
+
((t = e.row.original.paymentType) == null ? void 0 : t.type) == "ONLINE" && e.row.original.paymentType.extra ? l(
|
|
789
789
|
v.FmTooltip,
|
|
790
790
|
{
|
|
791
791
|
content: e.row.original.paymentType.extra
|
|
@@ -802,14 +802,14 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
802
802
|
l(
|
|
803
803
|
"div",
|
|
804
804
|
{ class: "flex-1" },
|
|
805
|
-
((
|
|
805
|
+
((o = e.row.original.paymentType) == null ? void 0 : o.type) ?? "N/A"
|
|
806
806
|
)
|
|
807
807
|
]);
|
|
808
808
|
}
|
|
809
809
|
},
|
|
810
810
|
{
|
|
811
811
|
header: "User",
|
|
812
|
-
cell: (e) =>
|
|
812
|
+
cell: (e) => ue(e.row.original.pf_member)
|
|
813
813
|
},
|
|
814
814
|
{
|
|
815
815
|
header: "Phone No.",
|
|
@@ -819,21 +819,21 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
819
819
|
header: "Status",
|
|
820
820
|
// accessorFn: (u) => u.status,
|
|
821
821
|
cell(e) {
|
|
822
|
-
var
|
|
823
|
-
const
|
|
822
|
+
var y, p, D, f;
|
|
823
|
+
const t = e.row.original.status, o = {
|
|
824
824
|
COMPLETED: "text-fm-color-typo-success bg-fm-color-system-success-100",
|
|
825
825
|
REFUNDED: "text-fm-color-typo-warning bg-fm-color-system-warning-100"
|
|
826
826
|
};
|
|
827
827
|
return l("div", { class: "flex items-center gap-4" }, [
|
|
828
828
|
l(v.FmChip, {
|
|
829
|
-
label:
|
|
829
|
+
label: Ne.title(t),
|
|
830
830
|
variant: "plain",
|
|
831
|
-
class:
|
|
831
|
+
class: o[t] ?? ""
|
|
832
832
|
}),
|
|
833
|
-
(p = (
|
|
833
|
+
(p = (y = e.row.original) == null ? void 0 : y.refund) != null && p.reason ? l(
|
|
834
834
|
v.FmTooltip,
|
|
835
835
|
{
|
|
836
|
-
content: (
|
|
836
|
+
content: (f = (D = e.row.original) == null ? void 0 : D.refund) == null ? void 0 : f.reason
|
|
837
837
|
},
|
|
838
838
|
[
|
|
839
839
|
l(v.FmIcon, {
|
|
@@ -858,27 +858,27 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
858
858
|
{
|
|
859
859
|
id: "action",
|
|
860
860
|
cell(e) {
|
|
861
|
-
const
|
|
862
|
-
return
|
|
861
|
+
const t = e.row.original, o = t.status === "COMPLETED" && !t.refund && t.source == "ADMIN";
|
|
862
|
+
return o ? l(
|
|
863
863
|
v.FmMenu,
|
|
864
864
|
{
|
|
865
865
|
placement: "bottom-end",
|
|
866
|
-
onClick: (
|
|
867
|
-
|
|
866
|
+
onClick: (y) => {
|
|
867
|
+
y.stopPropagation();
|
|
868
868
|
}
|
|
869
869
|
},
|
|
870
870
|
{
|
|
871
871
|
"menu-button": () => l(v.FmButton, {
|
|
872
872
|
icon: "settings",
|
|
873
873
|
variant: "tertiary",
|
|
874
|
-
if:
|
|
874
|
+
if: o
|
|
875
875
|
}),
|
|
876
876
|
default: () => [
|
|
877
877
|
l(v.FmMenuItem, {
|
|
878
878
|
label: "Refund",
|
|
879
879
|
sublabel: "Refund this transaction",
|
|
880
|
-
onClick: async (
|
|
881
|
-
|
|
880
|
+
onClick: async (y) => {
|
|
881
|
+
y.stopPropagation(), await m(t);
|
|
882
882
|
}
|
|
883
883
|
})
|
|
884
884
|
]
|
|
@@ -886,32 +886,32 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
886
886
|
) : l("div");
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
], S =
|
|
889
|
+
], S = M({
|
|
890
890
|
searchValue: "",
|
|
891
891
|
dateRange: {
|
|
892
|
-
startDate:
|
|
893
|
-
endDate:
|
|
892
|
+
startDate: T().subtract(7, "day").toISOString(),
|
|
893
|
+
endDate: T().toISOString()
|
|
894
894
|
}
|
|
895
|
-
}), { tableMeta:
|
|
896
|
-
const
|
|
895
|
+
}), { tableMeta: h, rowData: I, onSort: E, debouncedFetchData: R, onSearch: d } = Ce(async (e) => {
|
|
896
|
+
const t = {
|
|
897
897
|
...S.value.dateRange,
|
|
898
898
|
user: w.user
|
|
899
899
|
};
|
|
900
|
-
return await q.readStoreTransactions(e,
|
|
900
|
+
return await q.readStoreTransactions(e, t);
|
|
901
901
|
});
|
|
902
902
|
async function m(e) {
|
|
903
|
-
await
|
|
903
|
+
await Te.confirm(
|
|
904
904
|
"Are you sure you want to refund this transaction?",
|
|
905
905
|
"Refund Store Transaction",
|
|
906
906
|
"Confirm",
|
|
907
907
|
"Cancel"
|
|
908
908
|
) && await c(
|
|
909
909
|
async () => {
|
|
910
|
-
var
|
|
911
|
-
await
|
|
910
|
+
var o;
|
|
911
|
+
await Ae.refundStoreTransaction({
|
|
912
912
|
id: e._id,
|
|
913
|
-
reason: `ADMIN:${(
|
|
914
|
-
}), await
|
|
913
|
+
reason: `ADMIN:${(o = De().sessionUser) == null ? void 0 : o.name}`
|
|
914
|
+
}), await R();
|
|
915
915
|
},
|
|
916
916
|
{
|
|
917
917
|
message: "Refunding transaction...",
|
|
@@ -919,81 +919,81 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
919
919
|
}
|
|
920
920
|
);
|
|
921
921
|
}
|
|
922
|
-
|
|
922
|
+
re(
|
|
923
923
|
S,
|
|
924
924
|
() => {
|
|
925
|
-
|
|
925
|
+
R();
|
|
926
926
|
},
|
|
927
927
|
{ deep: !0 }
|
|
928
|
-
),
|
|
929
|
-
await
|
|
928
|
+
), _e(async () => {
|
|
929
|
+
await R();
|
|
930
930
|
});
|
|
931
|
-
const
|
|
932
|
-
exporter: new
|
|
931
|
+
const n = async () => Re({
|
|
932
|
+
exporter: new je(),
|
|
933
933
|
readFunction: (e) => q.readStoreTransactions(e, {
|
|
934
934
|
...S.value.dateRange,
|
|
935
935
|
user: w.user
|
|
936
936
|
}),
|
|
937
937
|
transformRecord: (e) => {
|
|
938
|
-
var
|
|
938
|
+
var t, o, y, p, D, f;
|
|
939
939
|
return {
|
|
940
|
-
TransactionId: ((
|
|
941
|
-
CreatedAt:
|
|
940
|
+
TransactionId: ((t = e._id) == null ? void 0 : t.toString()) || "",
|
|
941
|
+
CreatedAt: T(z(e._id.toString())).format(
|
|
942
942
|
"DD/MM/YYYY HH:mm:ss"
|
|
943
943
|
),
|
|
944
944
|
Bundle: e.bundle.name || "",
|
|
945
945
|
Location: e.location ? e.pf_location[0].name : "Online Store",
|
|
946
|
-
PaymentType: ((
|
|
947
|
-
PaymentExtra: ((
|
|
946
|
+
PaymentType: ((o = e.paymentType) == null ? void 0 : o.type) || "N/A",
|
|
947
|
+
PaymentExtra: ((y = e.paymentType) == null ? void 0 : y.extra) || "",
|
|
948
948
|
User: ((p = e.pf_member) == null ? void 0 : p.name) || "",
|
|
949
|
-
PhoneNumber: ((
|
|
949
|
+
PhoneNumber: ((D = e.pf_member) == null ? void 0 : D.phoneNumber) || "",
|
|
950
950
|
Status: e.status || "",
|
|
951
|
-
RefundReason: ((
|
|
951
|
+
RefundReason: ((f = e == null ? void 0 : e.refund) == null ? void 0 : f.reason) || "",
|
|
952
952
|
Ref: (e == null ? void 0 : e.ref) || ""
|
|
953
953
|
};
|
|
954
954
|
},
|
|
955
955
|
filename: "store-transactions"
|
|
956
956
|
});
|
|
957
|
-
return (e,
|
|
958
|
-
const
|
|
959
|
-
return
|
|
960
|
-
x("div",
|
|
961
|
-
x("div",
|
|
962
|
-
|
|
957
|
+
return (e, t) => {
|
|
958
|
+
const o = Y("FmSearch"), y = Y("FmButton");
|
|
959
|
+
return P(), O("div", null, [
|
|
960
|
+
x("div", qe, [
|
|
961
|
+
x("div", He, [
|
|
962
|
+
C(le, {
|
|
963
963
|
modelValue: s(S).dateRange,
|
|
964
|
-
"onUpdate:modelValue":
|
|
964
|
+
"onUpdate:modelValue": t[0] || (t[0] = (p) => s(S).dateRange = p)
|
|
965
965
|
}, null, 8, ["modelValue"])
|
|
966
966
|
]),
|
|
967
|
-
x("div",
|
|
968
|
-
|
|
969
|
-
modelValue: s(
|
|
967
|
+
x("div", Qe, [
|
|
968
|
+
C(o, {
|
|
969
|
+
modelValue: s(h).searchValue,
|
|
970
970
|
"onUpdate:modelValue": [
|
|
971
|
-
|
|
971
|
+
t[1] || (t[1] = (p) => s(h).searchValue = p),
|
|
972
972
|
s(d)
|
|
973
973
|
],
|
|
974
974
|
placeholder: "Search",
|
|
975
975
|
collapsible: ""
|
|
976
976
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
977
|
-
|
|
977
|
+
C(y, {
|
|
978
978
|
icon: "ios_share",
|
|
979
979
|
variant: "tertiary",
|
|
980
|
-
onClick:
|
|
980
|
+
onClick: n
|
|
981
981
|
})
|
|
982
982
|
])
|
|
983
983
|
]),
|
|
984
|
-
|
|
985
|
-
loading: s(
|
|
986
|
-
"row-data": s(
|
|
987
|
-
"row-count": s(
|
|
984
|
+
C(ce, {
|
|
985
|
+
loading: s(h).isLoading,
|
|
986
|
+
"row-data": s(I),
|
|
987
|
+
"row-count": s(h).totalRows,
|
|
988
988
|
"column-defs": u.filter(
|
|
989
989
|
(p) => !w.user || p.header !== "User" && p.header !== "Phone No."
|
|
990
990
|
),
|
|
991
|
-
"page-count": s(
|
|
992
|
-
"page-index": s(
|
|
993
|
-
"page-size": s(
|
|
991
|
+
"page-count": s(h).pageCount,
|
|
992
|
+
"page-index": s(h).pageIndex,
|
|
993
|
+
"page-size": s(h).pageSize,
|
|
994
994
|
"shrink-at": !1,
|
|
995
|
-
onSortChange: s(
|
|
996
|
-
onPageChange:
|
|
995
|
+
onSortChange: s(E),
|
|
996
|
+
onPageChange: t[2] || (t[2] = (p) => s(R)({
|
|
997
997
|
pageSize: p.pageSize,
|
|
998
998
|
pageIndex: p.pageIndex
|
|
999
999
|
}))
|
|
@@ -1003,6 +1003,6 @@ const He = { class: "flex items-center justify-between" }, Qe = { class: "flex g
|
|
|
1003
1003
|
}
|
|
1004
1004
|
});
|
|
1005
1005
|
export {
|
|
1006
|
-
|
|
1007
|
-
|
|
1006
|
+
Ia as _,
|
|
1007
|
+
Fa as a
|
|
1008
1008
|
};
|