@feedmepos/mf-connect 0.1.0-beta.53 → 0.1.0-beta.55
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-Ds0tta-W.js → Analytic-Cdl0pynD.js} +11 -11
- package/dist/{App-y5wxjtku.js → App-Cnr64Lkk.js} +6 -6
- package/dist/{AuditLogs-jVbVVyAb.js → AuditLogs-CbPMSX9v.js} +9 -9
- package/dist/{Bin-EiD9mNYl.js → Bin-DSGVW9Rd.js} +8 -8
- package/dist/{Broadcast-BzfYPJwA.js → Broadcast-BlsfmZxM.js} +55 -54
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-S9FXEGMY.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-C-zyS5Yd.js} +6 -6
- package/dist/{Card-CKqRyNuC.js → Card-CTQMV02i.js} +15 -15
- package/dist/Collections-0VfEfRph.js +459 -0
- package/dist/{Credit-BYde55tV.js → Credit-7WLpk0id.js} +42 -41
- package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js → DateRangeChip.vue_vue_type_script_setup_true_lang-Bj7cctC5.js} +48 -45
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-B5A8_SKV.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-BLyfWn8e.js} +28 -28
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CZh54sxJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Fel3csSF.js} +6 -6
- package/dist/{Experience-BDHVOAzP.js → Experience-Dsf_yMPc.js} +39 -38
- package/dist/{Game-D5YOyYL6.js → Game-C0daKd0H.js} +45 -44
- package/dist/{Index-Dt40DwP9.js → Index-BLbMFwMR.js} +10 -10
- package/dist/{Marketing-Bf-zFz9z.js → Marketing-CcM5HLi_.js} +6 -6
- package/dist/{Member-CSfZ3bjG.js → Member-BV6DSKaw.js} +4 -4
- package/dist/{MemberList-B6uUNxLF.js → MemberList-BFtAGHHd.js} +24 -24
- package/dist/{MemberTransactions-Lff73C-p.js → MemberTransactions-CVNSMv_t.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-D1H9cg1C.js → MessageInput.vue_vue_type_script_setup_true_lang-DxbMCyo8.js} +2 -2
- package/dist/{Mission-BfFOjuIA.js → Mission-Z0EcE915.js} +36 -35
- package/dist/{Overview-CWH9Bj4k.js → Overview-9lXRD7J5.js} +17 -17
- package/dist/{Point-DkIIKUTy.js → Point-CBJhnR7X.js} +49 -48
- package/dist/{Promotion-Bs83Qcgf.js → Promotion-yiRkaM4L.js} +33 -32
- package/dist/{Record-CIrRLS-G.js → Record-DIgik8LD.js} +7 -7
- package/dist/{Reward-gt3nOqPY.js → Reward-DalahbaW.js} +15 -15
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CUeeE-Hy.js → RewardGroup.vue_vue_type_script_setup_true_lang-D6WHN9Id.js} +11 -11
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-DjlxIxPV.js → RuleGroup.vue_vue_type_script_setup_true_lang-QOn6FTeY.js} +12 -12
- package/dist/{Segment-BatkkJMx.js → Segment-CDPyd_7N.js} +14 -14
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-P-OHdI1b.js → SelectItems.vue_vue_type_script_setup_true_lang-C-l2Y0wn.js} +2 -2
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Dmw3Ua4W.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-x6xbj4im.js} +3 -3
- package/dist/{Setting-BquuIuO-.js → Setting-BwmJyvOe.js} +10 -10
- package/dist/{Store-xPSiWyzc.js → Store-DB9L-P8I.js} +188 -184
- package/dist/{StoreRewards-BGOp7fFU.js → StoreRewards-B9FcoAr0.js} +13 -13
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Dip5TvVQ.js → StoreTransactions.vue_vue_type_script_setup_true_lang-FrpJ3Yhg.js} +127 -124
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-9fr_ghEe.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BEKI69h6.js} +1 -1
- package/dist/{Tier-Cy0nb7nm.js → Tier-8WWTqwXM.js} +19 -19
- package/dist/{Title-e7o6NB4D.js → Title-DjiDAkxK.js} +19 -19
- package/dist/{Transaction-CAlhdf7s.js → Transaction-Du_mUxcJ.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-5I5c2bse.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-WQEFqGjy.js} +6 -6
- package/dist/{Voucher-CNkVPW0p.js → Voucher-Bgq2qWdj.js} +44 -43
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CLrpO1vV.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CZjwMNeo.js} +10 -10
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DTGfUQOt.js → ZodTextField.vue_vue_type_script_setup_true_lang-DHF2ZM8V.js} +1 -1
- package/dist/{app-B9kwYRaf.js → app-D5m2qGR1.js} +30 -30
- package/dist/{app-CwjQW2av.js → app-MZHo8G1N.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DpWZTdB5.js → business-CuIAPmif.js} +1 -1
- package/dist/{campaign-C0i8L0kd.js → campaign-BGymleSq.js} +2 -2
- package/dist/{campaign-BfoaaEQD.js → campaign-BahEO0au.js} +12 -12
- package/dist/{campaign.enum-Dafd1FVd.js → campaign.enum-LlXtNI93.js} +1 -1
- package/dist/{campaign.fn-BnveqmRa.js → campaign.fn-B3LYYJFX.js} +29 -29
- package/dist/{collectible.enum-ByYase0A.js → collectible.enum-CfHBgbSi.js} +1 -1
- package/dist/{collection.fn-DoDvtLpC.js → collection.fn--2KJ1YxN.js} +2 -2
- package/dist/{dto-WRjmFrfA.js → dto-D2kQA5rh.js} +4 -4
- package/dist/{effect-8vUDqhjn.js → effect-bKVmYG7L.js} +1 -1
- package/dist/{email-addresses-CmpIupHQ.js → email-addresses-DR3mJFRu.js} +1 -1
- package/dist/{export-D5V2w6NT.js → export-CZiBn9tM.js} +3 -3
- package/dist/{helper-O_XVmheZ.js → helper-x72XN1Zs.js} +1 -1
- package/dist/{index-DBlWM9M2.js → index-B10vPRJ9.js} +1 -1
- package/dist/{index-DmPen3ik.js → index-B5_m2dP-.js} +6 -6
- package/dist/{index-CiaBjRyN.js → index-BA8ebNuu.js} +1 -1
- package/dist/{index-BSi-3ZKv.js → index-Bo9j1rpg.js} +2 -2
- package/dist/{index-B_es_G1y.js → index-CDEf_3FP.js} +1155 -1113
- package/dist/{index-BxMw-97Y.js → index-CNJf_nPS.js} +1 -1
- package/dist/{index-Ck3CSnDV.js → index-D7boIVNC.js} +1 -1
- package/dist/{index-fkMOPROn.js → index-DBqwXvjC.js} +3 -3
- package/dist/{index-COJem__Y.js → index-DF-4Oy9D.js} +3 -3
- package/dist/{index-AIhUNoCH.js → index-Dqly8Usi.js} +1 -1
- package/dist/{index-C8iwiKBL.js → index-PXpfFFLc.js} +1 -1
- package/dist/{index-DAKhWupM.js → index-vyW90fOo.js} +1 -1
- package/dist/{index.esm2017-CR2ozJhL.js → index.esm2017-DDc3mvNM.js} +1 -1
- package/dist/{loading-CoPjpwr_.js → loading-CCf3hZNc.js} +1 -1
- package/dist/{membership-DfK6LvzX.js → membership-Dqgxv3Vr.js} +3 -3
- package/dist/{money-BMWdczNZ.js → money-BRaaQ5Ny.js} +1 -1
- package/dist/{number-RoHZMLf4.js → number--SFBsDSw.js} +1 -1
- package/dist/objectid-CuJvifug.js +145 -0
- package/dist/{plugins-Djltfdbf.js → plugins-BpdUIW93.js} +4 -4
- package/dist/{reward-DDht6IgD.js → reward-DDr0IEz9.js} +1 -1
- package/dist/{rule-FKnlDZrl.js → rule-ClLOK6VV.js} +3 -3
- package/dist/{rule-builder-DN9Z65qr.js → rule-builder-Dj60XfsC.js} +1 -1
- package/dist/{template-_deCCxVQ.js → template-BzqqemHf.js} +4 -4
- package/dist/{trigger-DnMqlhsD.js → trigger-DX0hhh5t.js} +4 -4
- package/dist/{user-C9doToN3.js → user-CxLw8DVX.js} +1 -1
- package/dist/{vue-i18n-8j4jiaET.js → vue-i18n-D5RfnNXZ.js} +355 -355
- package/dist/{xlsx-Bb8iqOxg.js → xlsx-Dd-iiJiV.js} +1 -1
- package/package.json +2 -2
- package/dist/Collections-BmKNa3Fe.js +0 -449
- package/dist/objectid-nsRQA3Jm.js +0 -145
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as q, ref as A, computed as K, h as n, resolveComponent as
|
|
1
|
+
import { defineComponent as q, ref as A, computed as K, h as n, resolveComponent as M, openBlock as F, createBlock as X, unref as s, isRef as me, withCtx as J, createElementVNode as h, createVNode as S, createElementBlock as O, Fragment as H, renderList as Q, toDisplayString as $, createTextVNode as de, resolveDynamicComponent as pe, watch as Z, onBeforeMount as fe, onMounted as ge } from "vue";
|
|
2
2
|
import { components as v, useDialog as ye } from "@feedmepos/ui-library";
|
|
3
|
-
import { p as ee } from "./index-
|
|
4
|
-
import { a as W, c as he, p as ve } from "./plugins-
|
|
3
|
+
import { p as ee } from "./index-CDEf_3FP.js";
|
|
4
|
+
import { a as W, c as he, p as ve } from "./plugins-BpdUIW93.js";
|
|
5
5
|
import { s as be } from "./index-Dbd4WA4r.js";
|
|
6
|
-
import { h as
|
|
7
|
-
import { _ as G, a as ae } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { h as w } from "./moment-BWErdI6_.js";
|
|
7
|
+
import { _ as G, a as ae } from "./DateRangeChip.vue_vue_type_script_setup_true_lang-Bj7cctC5.js";
|
|
8
8
|
import { s as z } from "./index-CsaQJMAR.js";
|
|
9
|
-
import { f as j } from "./number
|
|
10
|
-
import { u as te } from "./business-
|
|
9
|
+
import { f as j } from "./number--SFBsDSw.js";
|
|
10
|
+
import { u as te } from "./business-CuIAPmif.js";
|
|
11
11
|
import { u as oe, _ as ne } from "./usePagination-BeF5K3M7.js";
|
|
12
|
-
import { g as re } from "./user-
|
|
13
|
-
import { B as se, e as le } from "./export-
|
|
14
|
-
import { u as ie } from "./campaign-
|
|
15
|
-
import "./index-
|
|
16
|
-
import "./index-
|
|
17
|
-
import "./index-
|
|
18
|
-
import "./index-
|
|
19
|
-
import "./index-
|
|
20
|
-
import { u as _e } from "./vue-i18n-
|
|
21
|
-
import { o as
|
|
12
|
+
import { g as re } from "./user-CxLw8DVX.js";
|
|
13
|
+
import { B as se, e as le } from "./export-CZiBn9tM.js";
|
|
14
|
+
import { u as ie } from "./campaign-BGymleSq.js";
|
|
15
|
+
import "./index-D7boIVNC.js";
|
|
16
|
+
import "./index-B5_m2dP-.js";
|
|
17
|
+
import "./index-Bo9j1rpg.js";
|
|
18
|
+
import "./index-B10vPRJ9.js";
|
|
19
|
+
import "./index-DF-4Oy9D.js";
|
|
20
|
+
import { u as _e } from "./vue-i18n-D5RfnNXZ.js";
|
|
21
|
+
import { o as k } from "./objectId-dwaoBfJX.js";
|
|
22
22
|
import { useRouter as Se } from "vue-router";
|
|
23
|
-
import { t as L } from "./index-
|
|
24
|
-
import { R as B } from "./app-
|
|
25
|
-
import { u as xe } from "./loading-
|
|
23
|
+
import { t as L } from "./index-BA8ebNuu.js";
|
|
24
|
+
import { R as B } from "./app-D5m2qGR1.js";
|
|
25
|
+
import { u as xe } from "./loading-CCf3hZNc.js";
|
|
26
26
|
import { useCoreStore as we } from "@feedmepos/mf-common";
|
|
27
|
-
import { m as Te } from "./index-
|
|
27
|
+
import { m as Te } from "./index-PXpfFFLc.js";
|
|
28
28
|
function Re(m) {
|
|
29
29
|
let p = "";
|
|
30
30
|
switch (m) {
|
|
@@ -56,10 +56,10 @@ function Re(m) {
|
|
|
56
56
|
return p;
|
|
57
57
|
}
|
|
58
58
|
function Ce(m) {
|
|
59
|
-
var p,
|
|
59
|
+
var p, T, c, x, _, D;
|
|
60
60
|
switch ((p = m == null ? void 0 : m.pf_collectible) == null ? void 0 : p.type) {
|
|
61
61
|
case "VOUCHER":
|
|
62
|
-
return `${(
|
|
62
|
+
return `${(T = m.pf_collectible) == null ? void 0 : T.type} (${(c = m.pf_collectible) == null ? void 0 : c.name})`;
|
|
63
63
|
case "TITLE":
|
|
64
64
|
return `${(x = m.pf_collectible) == null ? void 0 : x.type} (${(_ = m.pf_collectible) == null ? void 0 : _.name})`;
|
|
65
65
|
case "POINT":
|
|
@@ -91,21 +91,21 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
91
91
|
__name: "TransactionDetailSheet",
|
|
92
92
|
setup(m, { expose: p }) {
|
|
93
93
|
_e();
|
|
94
|
-
const
|
|
95
|
-
function D(d,
|
|
96
|
-
|
|
94
|
+
const T = A(!1), c = A(), x = ie(), _ = te();
|
|
95
|
+
function D(d, o) {
|
|
96
|
+
T.value = d, c.value = o ?? null;
|
|
97
97
|
}
|
|
98
98
|
const u = K(() => {
|
|
99
|
-
var d,
|
|
99
|
+
var d, o;
|
|
100
100
|
return j(
|
|
101
|
-
((
|
|
101
|
+
((o = c.value) == null ? void 0 : o.expiryAmount.reduce(
|
|
102
102
|
(e, l) => e + l.amount,
|
|
103
103
|
((d = c.value) == null ? void 0 : d.amount) ?? 0
|
|
104
104
|
)) ?? 0,
|
|
105
105
|
2
|
|
106
106
|
);
|
|
107
107
|
}), C = K(() => {
|
|
108
|
-
var d,
|
|
108
|
+
var d, o, e, l, r;
|
|
109
109
|
return c.value ? [
|
|
110
110
|
{
|
|
111
111
|
label: "Transaction ID",
|
|
@@ -113,7 +113,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
label: "Date/Time",
|
|
116
|
-
value:
|
|
116
|
+
value: w(k(c.value._id.toString())).format(
|
|
117
117
|
"D MMM YYYY, hh:mmA"
|
|
118
118
|
)
|
|
119
119
|
},
|
|
@@ -140,51 +140,51 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
label: "User",
|
|
143
|
-
value: (e = (
|
|
143
|
+
value: (e = (o = c.value) == null ? void 0 : o.pf_user) == null ? void 0 : e.name
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
label: "Phone Number",
|
|
147
147
|
value: (r = (l = c.value) == null ? void 0 : l.pf_user) == null ? void 0 : r.phoneNumber
|
|
148
148
|
}
|
|
149
149
|
] : [];
|
|
150
|
-
}),
|
|
150
|
+
}), P = K(() => {
|
|
151
151
|
var l, r, b, f;
|
|
152
152
|
if (!c.value) return [];
|
|
153
|
-
const d = [],
|
|
154
|
-
if (
|
|
155
|
-
const
|
|
156
|
-
(N) => N._id === (
|
|
153
|
+
const d = [], o = (l = c.value) == null ? void 0 : l.metadata, e = c.value;
|
|
154
|
+
if (o != null && o.campaign) {
|
|
155
|
+
const R = x.campaigns.all.find(
|
|
156
|
+
(N) => N._id === (o == null ? void 0 : o.campaign)
|
|
157
157
|
);
|
|
158
|
-
if (!
|
|
158
|
+
if (!R) return;
|
|
159
159
|
d.push({
|
|
160
160
|
label: "Campaign",
|
|
161
|
-
value:
|
|
161
|
+
value: R.name
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
return
|
|
164
|
+
return o != null && o.remark && d.push({
|
|
165
165
|
label: "Remark",
|
|
166
|
-
value:
|
|
166
|
+
value: o.remark
|
|
167
167
|
}), (r = c.value) != null && r.ref.startsWith("bill_") && d.push({
|
|
168
168
|
label: "Bill Number",
|
|
169
169
|
value: (b = c.value) == null ? void 0 : b.ref,
|
|
170
170
|
copy: () => {
|
|
171
|
-
var
|
|
172
|
-
return W((
|
|
171
|
+
var R;
|
|
172
|
+
return W((R = c.value) == null ? void 0 : R.ref);
|
|
173
173
|
}
|
|
174
|
-
}),
|
|
174
|
+
}), o != null && o.location && d.push({
|
|
175
175
|
label: "Location",
|
|
176
176
|
value: (f = _.locations.find(
|
|
177
|
-
(
|
|
177
|
+
(R) => R._id.toString() === (o == null ? void 0 : o.location)
|
|
178
178
|
)) == null ? void 0 : f.name
|
|
179
179
|
}), e.source === ee.enum.STORE && d.push({
|
|
180
180
|
label: "Store Transaction",
|
|
181
181
|
value: e.ref
|
|
182
|
-
}),
|
|
182
|
+
}), o != null && o.originTransaction && d.push({
|
|
183
183
|
label: "Parent Transaction",
|
|
184
|
-
value:
|
|
185
|
-
}),
|
|
184
|
+
value: o.originTransaction
|
|
185
|
+
}), o != null && o.referral_count && d.push({
|
|
186
186
|
label: "Referral Count",
|
|
187
|
-
value:
|
|
187
|
+
value: o.referral_count
|
|
188
188
|
}), e.refunded && d.push({
|
|
189
189
|
label: "Refunded From",
|
|
190
190
|
value: e.refundedFrom
|
|
@@ -192,19 +192,19 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
192
192
|
});
|
|
193
193
|
return p({
|
|
194
194
|
showSheet: D
|
|
195
|
-
}), (d,
|
|
196
|
-
const e =
|
|
195
|
+
}), (d, o) => {
|
|
196
|
+
const e = M("FmButton"), l = M("FmSideSheet");
|
|
197
197
|
return F(), X(l, {
|
|
198
198
|
"max-width": 560,
|
|
199
|
-
modelValue: s(
|
|
200
|
-
"onUpdate:modelValue":
|
|
199
|
+
modelValue: s(T),
|
|
200
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => me(T) ? T.value = r : null),
|
|
201
201
|
header: "Transaction Details"
|
|
202
202
|
}, {
|
|
203
203
|
"side-sheet-footer": J(() => [
|
|
204
204
|
h("div", Me, [
|
|
205
205
|
S(e, {
|
|
206
206
|
label: "Close",
|
|
207
|
-
onClick:
|
|
207
|
+
onClick: o[0] || (o[0] = (r) => D(!1)),
|
|
208
208
|
variant: "tertiary"
|
|
209
209
|
})
|
|
210
210
|
])
|
|
@@ -224,9 +224,9 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
224
224
|
de($(r.accessorFn ? r.accessorFn() : r.value) + " ", 1),
|
|
225
225
|
(F(), X(pe(r.component)))
|
|
226
226
|
], 8, Ne),
|
|
227
|
-
|
|
227
|
+
o[2] || (o[2] = h("hr", { class: "mt-3" }, null, -1))
|
|
228
228
|
]))), 128)),
|
|
229
|
-
(F(!0), O(H, null, Q(s(
|
|
229
|
+
(F(!0), O(H, null, Q(s(P), (r) => (F(), O("div", {
|
|
230
230
|
key: r.label,
|
|
231
231
|
class: "flex flex-col gap-4"
|
|
232
232
|
}, [
|
|
@@ -235,7 +235,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
235
235
|
class: "text-fm-color-typo-secondary fm-typo-en-body-md-400 hover:underline",
|
|
236
236
|
onClick: r.copy
|
|
237
237
|
}, $(r.accessorFn ? r.accessorFn() : r.value), 9, ke),
|
|
238
|
-
|
|
238
|
+
o[3] || (o[3] = h("hr", { class: "mt-3" }, null, -1))
|
|
239
239
|
]))), 128))
|
|
240
240
|
])
|
|
241
241
|
])
|
|
@@ -252,14 +252,14 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
252
252
|
}
|
|
253
253
|
},
|
|
254
254
|
setup(m) {
|
|
255
|
-
const p = te(),
|
|
255
|
+
const p = te(), T = ie(), c = Se(), x = m, _ = A(!1), D = [
|
|
256
256
|
{
|
|
257
257
|
header: "Transaction ID",
|
|
258
258
|
accessorKey: "_id",
|
|
259
259
|
meta: {
|
|
260
260
|
maxWidth: "100px"
|
|
261
261
|
},
|
|
262
|
-
cell(
|
|
262
|
+
cell(t) {
|
|
263
263
|
return n("div", { class: "flex items-center" }, [
|
|
264
264
|
n(v.FmIcon, {
|
|
265
265
|
name: "content_copy",
|
|
@@ -267,13 +267,13 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
267
267
|
size: "sm",
|
|
268
268
|
class: "cursor-pointer mr-4",
|
|
269
269
|
onClick: (a) => {
|
|
270
|
-
a.preventDefault(), a.stopPropagation(), W(
|
|
270
|
+
a.preventDefault(), a.stopPropagation(), W(t.row.original._id.toString());
|
|
271
271
|
}
|
|
272
272
|
}),
|
|
273
273
|
n(
|
|
274
274
|
"div",
|
|
275
275
|
{ class: "pr-2 text-ellipsis overflow-hidden" },
|
|
276
|
-
|
|
276
|
+
t.row.original._id.toString()
|
|
277
277
|
)
|
|
278
278
|
]);
|
|
279
279
|
},
|
|
@@ -282,22 +282,25 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
282
282
|
{
|
|
283
283
|
header: "Created at",
|
|
284
284
|
accessorKey: "_id",
|
|
285
|
-
accessorFn: (
|
|
285
|
+
accessorFn: (t) => w(k(t._id.toString())),
|
|
286
|
+
cell: (t) => w(k(t.row.original._id.toString())).format(
|
|
287
|
+
"D MMM YYYY, hh:mmA"
|
|
288
|
+
),
|
|
286
289
|
enableSorting: !0
|
|
287
290
|
},
|
|
288
291
|
{
|
|
289
292
|
header: "Amount",
|
|
290
293
|
// accessorKey: 'totalAmount',
|
|
291
294
|
enableSorting: !1,
|
|
292
|
-
cell(
|
|
293
|
-
var y, i, I,
|
|
295
|
+
cell(t) {
|
|
296
|
+
var y, i, I, V;
|
|
294
297
|
const a = j(
|
|
295
|
-
|
|
298
|
+
t.row.original.expiryAmount.reduce(
|
|
296
299
|
(Y, U) => Y + U.amount,
|
|
297
|
-
|
|
300
|
+
t.row.original.amount ?? 0
|
|
298
301
|
),
|
|
299
302
|
2
|
|
300
|
-
), g = (i = (y =
|
|
303
|
+
), g = (i = (y = t.row.original.expiryAmount) == null ? void 0 : y[0]) != null && i.expiredAt ? w((V = (I = t.row.original.expiryAmount) == null ? void 0 : I[0]) == null ? void 0 : V.expiredAt).format(
|
|
301
304
|
"D MMM YYYY"
|
|
302
305
|
) : "";
|
|
303
306
|
return n("div", { class: "flex items-center" }, [
|
|
@@ -312,7 +315,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
312
315
|
a
|
|
313
316
|
),
|
|
314
317
|
n("div", { class: "flex items-center" }, [
|
|
315
|
-
|
|
318
|
+
t.row.original.expiryAmount.length > 0 ? n(
|
|
316
319
|
v.FmTooltip,
|
|
317
320
|
{
|
|
318
321
|
content: `Expired on ${g}`
|
|
@@ -332,12 +335,12 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
332
335
|
{
|
|
333
336
|
header: "Type",
|
|
334
337
|
accessorKey: "pf_collectible.type",
|
|
335
|
-
accessorFn: (
|
|
338
|
+
accessorFn: (t) => E.formattedType(t),
|
|
336
339
|
meta: {
|
|
337
340
|
maxWidth: "200px"
|
|
338
341
|
},
|
|
339
|
-
cell(
|
|
340
|
-
const a = E.formattedType(
|
|
342
|
+
cell(t) {
|
|
343
|
+
const a = E.formattedType(t.row.original);
|
|
341
344
|
return n("div", { class: "flex items-center" }, [
|
|
342
345
|
n("div", { class: "truncate text-ellipsis" }, a),
|
|
343
346
|
a.length > 20 ? n(
|
|
@@ -360,24 +363,24 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
360
363
|
{
|
|
361
364
|
header: "Source",
|
|
362
365
|
accessorKey: "source",
|
|
363
|
-
cell(
|
|
366
|
+
cell(t) {
|
|
364
367
|
var a;
|
|
365
368
|
return n("div", { class: "flex items-center gap-4" }, [
|
|
366
369
|
n(
|
|
367
370
|
"div",
|
|
368
371
|
{ class: "truncate text-ellipsis" },
|
|
369
|
-
z(E.getReason(
|
|
372
|
+
z(E.getReason(t.row.original.source))
|
|
370
373
|
),
|
|
371
|
-
...(a =
|
|
374
|
+
...(a = t.row.original.metadata) != null && a.campaign ? [
|
|
372
375
|
n(
|
|
373
376
|
v.FmTooltip,
|
|
374
377
|
{
|
|
375
378
|
get content() {
|
|
376
379
|
var g;
|
|
377
|
-
return (g =
|
|
380
|
+
return (g = T.campaigns.all.find(
|
|
378
381
|
(y) => {
|
|
379
382
|
var i;
|
|
380
|
-
return y._id === ((i =
|
|
383
|
+
return y._id === ((i = t.row.original.metadata) == null ? void 0 : i.campaign);
|
|
381
384
|
}
|
|
382
385
|
)) == null ? void 0 : g.name;
|
|
383
386
|
}
|
|
@@ -389,10 +392,10 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
389
392
|
size: "sm",
|
|
390
393
|
onClick: async (g) => {
|
|
391
394
|
g.preventDefault(), g.stopPropagation();
|
|
392
|
-
const y =
|
|
395
|
+
const y = T.campaigns.all.find(
|
|
393
396
|
(i) => {
|
|
394
397
|
var I;
|
|
395
|
-
return i._id === ((I =
|
|
398
|
+
return i._id === ((I = t.row.original.metadata) == null ? void 0 : I.campaign);
|
|
396
399
|
}
|
|
397
400
|
);
|
|
398
401
|
if (y)
|
|
@@ -433,30 +436,30 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
433
436
|
{
|
|
434
437
|
header: "User",
|
|
435
438
|
accessorKey: "pf_user.name",
|
|
436
|
-
cell(
|
|
437
|
-
return re(
|
|
439
|
+
cell(t) {
|
|
440
|
+
return re(t.row.original.pf_user);
|
|
438
441
|
}
|
|
439
442
|
},
|
|
440
443
|
{
|
|
441
444
|
header: "Phone No.",
|
|
442
445
|
accessorKey: "pf_user.phoneNumber",
|
|
443
|
-
accessorFn: (
|
|
446
|
+
accessorFn: (t) => {
|
|
444
447
|
var a;
|
|
445
|
-
return ((a =
|
|
448
|
+
return ((a = t == null ? void 0 : t.pf_user) == null ? void 0 : a.phoneNumber) || "";
|
|
446
449
|
}
|
|
447
450
|
},
|
|
448
451
|
{
|
|
449
|
-
accessorFn: (
|
|
452
|
+
accessorFn: (t) => t.ref,
|
|
450
453
|
header: "References",
|
|
451
454
|
accessorKey: "ref",
|
|
452
|
-
cell(
|
|
455
|
+
cell(t) {
|
|
453
456
|
var a, g;
|
|
454
457
|
return n("div", { class: "flex items-center justify-between gap-4" }, [
|
|
455
458
|
n("div", { class: "flex items-center" }, [
|
|
456
|
-
(a =
|
|
459
|
+
(a = t.row.original.metadata) != null && a.remark ? n(
|
|
457
460
|
v.FmTooltip,
|
|
458
461
|
{
|
|
459
|
-
content: (g =
|
|
462
|
+
content: (g = t.row.original.metadata) == null ? void 0 : g.remark
|
|
460
463
|
},
|
|
461
464
|
[
|
|
462
465
|
n(v.FmIcon, {
|
|
@@ -468,7 +471,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
468
471
|
]
|
|
469
472
|
) : n("div")
|
|
470
473
|
]),
|
|
471
|
-
n("div", { class: "flex-1" },
|
|
474
|
+
n("div", { class: "flex-1" }, t.row.original.ref)
|
|
472
475
|
]);
|
|
473
476
|
}
|
|
474
477
|
}
|
|
@@ -477,11 +480,11 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
477
480
|
"pf_collectible.type": [],
|
|
478
481
|
"metadata.location": [],
|
|
479
482
|
dateRange: {
|
|
480
|
-
startDate:
|
|
481
|
-
endDate:
|
|
483
|
+
startDate: w().subtract(7, "day").toISOString(),
|
|
484
|
+
endDate: w().endOf("day").toISOString()
|
|
482
485
|
},
|
|
483
486
|
source: []
|
|
484
|
-
}), { tableMeta: C, rowData:
|
|
487
|
+
}), { tableMeta: C, rowData: P, onSort: d, debouncedFetchData: o, onSearch: e } = oe(async (t) => {
|
|
485
488
|
const a = {
|
|
486
489
|
...u.value,
|
|
487
490
|
user: x.user,
|
|
@@ -489,7 +492,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
489
492
|
start: new Date(u.value.dateRange.startDate).toISOString(),
|
|
490
493
|
end: new Date(u.value.dateRange.endDate).toISOString()
|
|
491
494
|
}
|
|
492
|
-
}, g = await L.readAll(
|
|
495
|
+
}, g = await L.readAll(t, a);
|
|
493
496
|
return {
|
|
494
497
|
resources: g.resources.map((y) => {
|
|
495
498
|
const i = l.value.find((I) => I._id === y.ref);
|
|
@@ -497,18 +500,18 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
497
500
|
}),
|
|
498
501
|
meta: g.meta
|
|
499
502
|
};
|
|
500
|
-
}), l = A([]), r = ee.options.map((
|
|
503
|
+
}), l = A([]), r = ee.options.map((t) => ({ label: z(E.getReason(t)), value: t })), b = p.locations.map((t) => ({ label: t.name, value: t._id }));
|
|
501
504
|
Z(
|
|
502
505
|
u,
|
|
503
506
|
() => {
|
|
504
|
-
|
|
507
|
+
o();
|
|
505
508
|
},
|
|
506
509
|
{ deep: !0 }
|
|
507
510
|
);
|
|
508
511
|
async function f() {
|
|
509
512
|
try {
|
|
510
513
|
_.value = !0;
|
|
511
|
-
const
|
|
514
|
+
const t = {
|
|
512
515
|
...u.value,
|
|
513
516
|
user: x.user,
|
|
514
517
|
dateRange: {
|
|
@@ -518,12 +521,12 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
518
521
|
};
|
|
519
522
|
await le({
|
|
520
523
|
exporter: new De(),
|
|
521
|
-
readFunction: (a) => L.readAll(a,
|
|
524
|
+
readFunction: (a) => L.readAll(a, t),
|
|
522
525
|
transformRecord: (a) => {
|
|
523
|
-
var g, y, i, I,
|
|
526
|
+
var g, y, i, I, V, Y, U;
|
|
524
527
|
return {
|
|
525
528
|
TransactionID: a._id,
|
|
526
|
-
CreatedAt:
|
|
529
|
+
CreatedAt: w(k(a._id.toString())).format(
|
|
527
530
|
"D MMM YYYY, hh:mmA"
|
|
528
531
|
),
|
|
529
532
|
Amount: j(
|
|
@@ -533,10 +536,10 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
533
536
|
),
|
|
534
537
|
2
|
|
535
538
|
),
|
|
536
|
-
ExpiredAt: (y = (g = a.expiryAmount) == null ? void 0 : g[0]) != null && y.expiredAt ?
|
|
539
|
+
ExpiredAt: (y = (g = a.expiryAmount) == null ? void 0 : g[0]) != null && y.expiredAt ? w((I = (i = a.expiryAmount) == null ? void 0 : i[0]) == null ? void 0 : I.expiredAt).format("D MMM YYYY") : "",
|
|
537
540
|
Type: E.formattedType(a),
|
|
538
541
|
Source: z(E.getReason(a.source)),
|
|
539
|
-
User: ((
|
|
542
|
+
User: ((V = a.pf_user) == null ? void 0 : V.name) || "",
|
|
540
543
|
"Phone No.": ((Y = a.pf_user) == null ? void 0 : Y.phoneNumber) || "",
|
|
541
544
|
References: a.ref,
|
|
542
545
|
Remark: ((U = a.metadata) == null ? void 0 : U.remark) || ""
|
|
@@ -544,21 +547,21 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
544
547
|
},
|
|
545
548
|
filename: "transactions"
|
|
546
549
|
});
|
|
547
|
-
} catch (
|
|
548
|
-
console.error(
|
|
550
|
+
} catch (t) {
|
|
551
|
+
console.error(t);
|
|
549
552
|
} finally {
|
|
550
553
|
_.value = !1;
|
|
551
554
|
}
|
|
552
555
|
}
|
|
553
|
-
const
|
|
554
|
-
function N(
|
|
556
|
+
const R = A(null);
|
|
557
|
+
function N(t) {
|
|
555
558
|
var a;
|
|
556
|
-
console.log(
|
|
559
|
+
console.log(t), (a = R.value) == null || a.showSheet(!0, t.original);
|
|
557
560
|
}
|
|
558
561
|
return fe(async () => {
|
|
559
|
-
await p.readLocations(), await
|
|
560
|
-
}), (
|
|
561
|
-
const g =
|
|
562
|
+
await p.readLocations(), await T.read(), await o();
|
|
563
|
+
}), (t, a) => {
|
|
564
|
+
const g = M("FmSearch"), y = M("FmButton");
|
|
562
565
|
return F(), O(H, null, [
|
|
563
566
|
h("div", null, [
|
|
564
567
|
h("div", Ve, [
|
|
@@ -619,8 +622,8 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
619
622
|
endDate: s(u).dateRange.endDate
|
|
620
623
|
},
|
|
621
624
|
"onUpdate:modelValue": a[4] || (a[4] = (i) => s(u).dateRange = {
|
|
622
|
-
startDate: s(
|
|
623
|
-
endDate: s(
|
|
625
|
+
startDate: s(w)(i.startDate).startOf("d").toISOString(),
|
|
626
|
+
endDate: s(w)(i.endDate).endOf("d").toISOString()
|
|
624
627
|
})
|
|
625
628
|
}, null, 8, ["model-value"])
|
|
626
629
|
]),
|
|
@@ -641,7 +644,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
641
644
|
]),
|
|
642
645
|
S(ne, {
|
|
643
646
|
loading: s(C).isLoading,
|
|
644
|
-
"row-data": s(
|
|
647
|
+
"row-data": s(P),
|
|
645
648
|
"row-count": s(C).totalRows,
|
|
646
649
|
"column-defs": D.filter(
|
|
647
650
|
(i) => !x.user || i.header !== "User" && i.header !== "Phone No."
|
|
@@ -651,7 +654,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
651
654
|
"page-size": s(C).pageSize,
|
|
652
655
|
"shrink-at": !1,
|
|
653
656
|
onSortChange: s(d),
|
|
654
|
-
onPageChange: a[6] || (a[6] = (i) => s(
|
|
657
|
+
onPageChange: a[6] || (a[6] = (i) => s(o)({
|
|
655
658
|
pageSize: i.pageSize,
|
|
656
659
|
pageIndex: i.pageIndex
|
|
657
660
|
})),
|
|
@@ -660,7 +663,7 @@ const Fe = { class: "space-y-24 pr-12" }, Ee = { class: "w-full space-y-16" }, A
|
|
|
660
663
|
]),
|
|
661
664
|
S(Pe, {
|
|
662
665
|
ref_key: "transactionDetailSheet",
|
|
663
|
-
ref:
|
|
666
|
+
ref: R
|
|
664
667
|
}, null, 512)
|
|
665
668
|
], 64);
|
|
666
669
|
};
|
|
@@ -676,7 +679,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
676
679
|
}
|
|
677
680
|
},
|
|
678
681
|
setup(m) {
|
|
679
|
-
const p = m, { minor:
|
|
682
|
+
const p = m, { minor: T } = xe;
|
|
680
683
|
ye();
|
|
681
684
|
const c = [
|
|
682
685
|
{
|
|
@@ -701,7 +704,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
701
704
|
},
|
|
702
705
|
{
|
|
703
706
|
header: "Created at",
|
|
704
|
-
accessorFn: (e) =>
|
|
707
|
+
accessorFn: (e) => w(k(e._id.toString())).format("D MMM YYYY, hh:mmA"),
|
|
705
708
|
enableSorting: !0
|
|
706
709
|
},
|
|
707
710
|
{
|
|
@@ -821,10 +824,10 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
821
824
|
], x = A({
|
|
822
825
|
searchValue: "",
|
|
823
826
|
dateRange: {
|
|
824
|
-
startDate:
|
|
825
|
-
endDate:
|
|
827
|
+
startDate: w().subtract(7, "day").toISOString(),
|
|
828
|
+
endDate: w().toISOString()
|
|
826
829
|
}
|
|
827
|
-
}), { tableMeta: _, rowData: D, onSort: u, debouncedFetchData: C, onSearch:
|
|
830
|
+
}), { tableMeta: _, rowData: D, onSort: u, debouncedFetchData: C, onSearch: P } = oe(async (e) => {
|
|
828
831
|
const l = {
|
|
829
832
|
...x.value.dateRange,
|
|
830
833
|
user: p.user
|
|
@@ -837,7 +840,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
837
840
|
"Refund Store Transaction",
|
|
838
841
|
"Confirm",
|
|
839
842
|
"Cancel"
|
|
840
|
-
) && await
|
|
843
|
+
) && await T(
|
|
841
844
|
async () => {
|
|
842
845
|
var r;
|
|
843
846
|
await Te.refundStoreTransaction({
|
|
@@ -860,17 +863,17 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
860
863
|
), ge(async () => {
|
|
861
864
|
await C();
|
|
862
865
|
});
|
|
863
|
-
const
|
|
866
|
+
const o = async () => le({
|
|
864
867
|
exporter: new Be(),
|
|
865
868
|
readFunction: (e) => L.readStoreTransactions(e, {
|
|
866
869
|
...x.value.dateRange,
|
|
867
870
|
user: p.user
|
|
868
871
|
}),
|
|
869
872
|
transformRecord: (e) => {
|
|
870
|
-
var l, r, b, f,
|
|
873
|
+
var l, r, b, f, R, N;
|
|
871
874
|
return {
|
|
872
875
|
TransactionId: ((l = e._id) == null ? void 0 : l.toString()) || "",
|
|
873
|
-
CreatedAt:
|
|
876
|
+
CreatedAt: w(k(e._id.toString())).format(
|
|
874
877
|
"DD/MM/YYYY HH:mm:ss"
|
|
875
878
|
),
|
|
876
879
|
Bundle: e.bundle.name || "",
|
|
@@ -878,7 +881,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
878
881
|
PaymentType: ((r = e.paymentType) == null ? void 0 : r.type) || "N/A",
|
|
879
882
|
PaymentExtra: ((b = e.paymentType) == null ? void 0 : b.extra) || "",
|
|
880
883
|
User: ((f = e.pf_member) == null ? void 0 : f.name) || "",
|
|
881
|
-
PhoneNumber: ((
|
|
884
|
+
PhoneNumber: ((R = e.pf_member) == null ? void 0 : R.phoneNumber) || "",
|
|
882
885
|
Status: e.status || "",
|
|
883
886
|
RefundReason: ((N = e == null ? void 0 : e.refund) == null ? void 0 : N.reason) || ""
|
|
884
887
|
};
|
|
@@ -886,7 +889,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
886
889
|
filename: "store-transactions"
|
|
887
890
|
});
|
|
888
891
|
return (e, l) => {
|
|
889
|
-
const r =
|
|
892
|
+
const r = M("FmSearch"), b = M("FmButton");
|
|
890
893
|
return F(), O("div", null, [
|
|
891
894
|
h("div", ze, [
|
|
892
895
|
h("div", Le, [
|
|
@@ -900,7 +903,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
900
903
|
modelValue: s(_).searchValue,
|
|
901
904
|
"onUpdate:modelValue": [
|
|
902
905
|
l[1] || (l[1] = (f) => s(_).searchValue = f),
|
|
903
|
-
s(
|
|
906
|
+
s(P)
|
|
904
907
|
],
|
|
905
908
|
placeholder: "Search",
|
|
906
909
|
collapsible: ""
|
|
@@ -908,7 +911,7 @@ const ze = { class: "flex items-center justify-between" }, Le = { class: "flex g
|
|
|
908
911
|
S(b, {
|
|
909
912
|
icon: "ios_share",
|
|
910
913
|
variant: "tertiary",
|
|
911
|
-
onClick:
|
|
914
|
+
onClick: o
|
|
912
915
|
})
|
|
913
916
|
])
|
|
914
917
|
]),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as N, ref as C, computed as L, watch as E, resolveComponent as g, openBlock as o, createElementBlock as i, Fragment as y, toDisplayString as I, createCommentVNode as A, createElementVNode as M, createVNode as v, unref as u, renderList as S, createBlock as b, isRef as U, withCtx as F } from "vue";
|
|
2
|
-
import { u as T } from "./business-
|
|
2
|
+
import { u as T } from "./business-CuIAPmif.js";
|
|
3
3
|
function j(l, s, n) {
|
|
4
4
|
return l.some(
|
|
5
5
|
n instanceof Function ? n : (a) => a === s
|