@feedmepos/mf-payment 1.5.76-dev → 1.5.77
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/{Actions.vue_vue_type_script_setup_true_lang-BBWoxxpE.js → Actions.vue_vue_type_script_setup_true_lang-D_PoXVbz.js} +1 -1
- package/dist/{Chargeback-7jLLq3BR.js → Chargeback-CzwL8PJv.js} +7 -7
- package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-BNVnvrVY.js → DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js} +1 -1
- package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-KebV8Zws.js +94 -0
- package/dist/Forbidden-1aaq-Ilm.js +38 -0
- package/dist/{OnboardForm-D_FIXmPB.js → OnboardForm-C6LuVVyr.js} +6 -6
- package/dist/{OnboardForm-BN0ILsGU.js → OnboardForm-DZeWRzRD.js} +482 -554
- package/dist/{OnboardSubmission-CjObMzjr.js → OnboardSubmission-C2BYK2p1.js} +27 -27
- package/dist/OnboardSubmission-DvWwQFy6.js +222 -0
- package/dist/{PayoutAccount-BdfuqSaf.js → PayoutAccount-BMQZ5bOZ.js} +5 -5
- package/dist/{PayoutAccount-BpSQ2zQk.js → PayoutAccount-VbRd7cmv.js} +102 -101
- package/dist/PayoutAccountSetting-DzzABgzs.js +1765 -0
- package/dist/{Restaurant-BeasTCBN.js → Restaurant-4cO60aVP.js} +4 -4
- package/dist/{RestaurantSetting-DwRraruD.js → RestaurantSetting-Bvk0dnCI.js} +243 -325
- package/dist/{Settlement-CDQ4mC52.js → Settlement-CklF8pz7.js} +4 -4
- package/dist/{Settlement-CFfl02X_.js → Settlement-Cme1wMB-.js} +5 -5
- package/dist/{SettlementTransactions-Bt_v-aI6.js → SettlementTransactions-3F4EOoyz.js} +4 -4
- package/dist/{SettlementTransactions-BXeYz_iy.js → SettlementTransactions-DD285bSJ.js} +4 -4
- package/dist/{Status.vue_vue_type_script_setup_true_lang-Cq8LBhUh.js → Status.vue_vue_type_script_setup_true_lang-CUnCf_fx.js} +1 -1
- package/dist/{Terminal-Bdra-49r.js → Terminal-CK6ULW6U.js} +6 -6
- package/dist/{TerminalSetting-CzjDu4A_.js → TerminalSetting-CEQG3OV6.js} +712 -887
- package/dist/{TextInputDialog.vue_vue_type_script_setup_true_lang-D8W8_SO2.js → TextInputDialog.vue_vue_type_script_setup_true_lang-BvGYVca0.js} +1 -1
- package/dist/Transaction-D-Z3zRd7.js +517 -0
- package/dist/{Transaction-BG3RCxYv.js → Transaction-DjzWqLtN.js} +102 -99
- package/dist/TransactionOld-BXjA15Dd.js +314 -0
- package/dist/api/onboard-submission/index.d.ts +1 -3
- package/dist/api/terminal/index.d.ts +0 -1
- package/dist/app-CEy5Ojtg.js +7661 -0
- package/dist/app.d.ts +1 -96
- package/dist/app.js +4 -5
- package/dist/{assets-DhWdwOH7.js → assets-DIbq1BVX.js} +79 -81
- package/dist/{grafana-DJDzzJ9q.js → grafana-B0iQmK6j.js} +1 -1
- package/dist/{index-BbaDzW6B.js → index-B0L21J1j.js} +1 -1
- package/dist/{index-BpwmbLR4.js → index-BHCs_NnD.js} +1 -1
- package/dist/{index-C2X36PPH.js → index-BkQ7t3F6.js} +1 -1
- package/dist/{index-DugLDgA_.js → index-C80a7-Ks.js} +1 -1
- package/dist/{index-DgtoLJuf.js → index-C_Y5Sfc9.js} +1 -1
- package/dist/{index-BL_cPUhX.js → index-CnN_MV2-.js} +9 -24
- package/dist/{index-DqBHy3Py.js → index-CxnWUe_K.js} +3 -3
- package/dist/{index-DbCpzLPM.js → index-D0j1LZAB.js} +9264 -9427
- package/dist/index-XTdSN6CV.js +60 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-Bl9xUvgx.js → index.vue_vue_type_script_setup_true_lang-BksGFeSf.js} +1 -1
- package/dist/main.d.ts +0 -1
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DTcwQ5Qj.js → no-data-BRmo6XOO.js} +2 -92
- package/dist/package.json +3 -4
- package/dist/{payout-account-C0AWMnuX.js → payout-account-B7OikYn5.js} +37 -37
- package/dist/softspace-D9cEyOQT.js +4 -0
- package/dist/stores/payoutAccount.d.ts +34 -44
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{validator-DzjyJnvv.js → validator-CTlVogBQ.js} +1 -0
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +16 -16
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +34 -44
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +54 -64
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +54 -64
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +34 -44
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +43 -44
- package/dist/views/admin/payout-account/tabs/SettlementEditDialog.vue.d.ts +56 -0
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +54 -64
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +24 -24
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +2 -2
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +68 -88
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +84 -84
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +42 -42
- package/dist/views/settlement/SettlementTable.vue.d.ts +24 -24
- package/dist/views/transaction/TransactionTable.vue.d.ts +2 -2
- package/package.json +3 -4
- package/dist/OnboardSubmission-hDMAGRnx.js +0 -446
- package/dist/PayoutAccountSetting-Bj3ayBnW.js +0 -1502
- package/dist/Transaction-C3Le6Ig-.js +0 -507
- package/dist/TransactionOld-BXbn3NQy.js +0 -313
- package/dist/app-DEJ_hAvw.js +0 -9156
- package/dist/composable/async-poller/index.d.ts +0 -22
- package/dist/index-MdV54cWO.js +0 -58
- package/dist/index-RripfGVB.js +0 -63
- package/dist/tyro-BovmsorS.js +0 -5
- package/dist/utils/permission.d.ts +0 -1
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +0 -81
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +0 -39
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +0 -48
- package/dist/views/admin/terminal/tabs/useTyroSoftposGateway.d.ts +0 -12
- package/dist/views/onboard-submission/tyro-submission-polling.d.ts +0 -27
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as _, ref as b, resolveComponent as l, openBlock as x, createBlock as y, withCtx as V, createVNode as r, unref as s, createElementVNode as v } from "vue";
|
|
2
2
|
import { useDialogChild as g } from "@feedmepos/ui-library";
|
|
3
|
-
import { s as m, z as C } from "./validator-
|
|
3
|
+
import { s as m, z as C } from "./validator-CTlVogBQ.js";
|
|
4
4
|
const T = { class: "flex justify-end mb-2" }, j = /* @__PURE__ */ _({
|
|
5
5
|
__name: "TextInputDialog",
|
|
6
6
|
props: {
|
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { defineComponent as G, ref as C, watch as V, onMounted as H, resolveComponent as h, unref as n, openBlock as P, createBlock as w, createElementBlock as O, createVNode as y, withCtx as B, createElementVNode as F, Fragment as W, renderList as X, createTextVNode as Z, toDisplayString as ee, onBeforeUnmount as te, isRef as D, h as x } from "vue";
|
|
2
|
+
import { t as U } from "./index-BHCs_NnD.js";
|
|
3
|
+
import { h as z } from "./moment-h96o7c8I.js";
|
|
4
|
+
import { useI18n as J, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as ae } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { t as ne, b as re, _ as oe } from "./assets-DIbq1BVX.js";
|
|
7
|
+
import { u as se } from "./index-BkQ7t3F6.js";
|
|
8
|
+
import { _ as le } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
|
+
import { _ as ie } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
|
|
10
|
+
import { _ as ce } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
|
|
11
|
+
import { p as ue } from "./index-C80a7-Ks.js";
|
|
12
|
+
import { t as me } from "./index-XTdSN6CV.js";
|
|
13
|
+
import { u as de, p as R } from "./index-D0j1LZAB.js";
|
|
14
|
+
import { useSnackbar as pe, useDialog as ye } from "@feedmepos/ui-library";
|
|
15
|
+
import { _ as fe, a as _e, b as ge } from "./Actions.vue_vue_type_script_setup_true_lang-D_PoXVbz.js";
|
|
16
|
+
import { g as ve } from "./grafana-B0iQmK6j.js";
|
|
17
|
+
import { w as j } from "./Modal-DB8M9o1T.js";
|
|
18
|
+
import { u as q } from "./error-K1CakhA9.js";
|
|
19
|
+
import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-BksGFeSf.js";
|
|
20
|
+
import { u as Te, a as he } from "./index-BwdnN4a2.js";
|
|
21
|
+
const Ae = {
|
|
22
|
+
key: 1,
|
|
23
|
+
class: "inline-flex"
|
|
24
|
+
}, Se = { class: "relative" }, Ne = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, Ee = /* @__PURE__ */ G({
|
|
25
|
+
__name: "SourceSelector",
|
|
26
|
+
props: {
|
|
27
|
+
id: {},
|
|
28
|
+
by: {},
|
|
29
|
+
excludePayoutAccount: { type: Boolean },
|
|
30
|
+
excludeOrderingPayoutAccount: { type: Boolean },
|
|
31
|
+
excludeMarketingPayoutAccount: { type: Boolean },
|
|
32
|
+
excludeRestaurant: { type: Boolean },
|
|
33
|
+
excludeDevice: { type: Boolean }
|
|
34
|
+
},
|
|
35
|
+
emits: ["update:id", "update:by"],
|
|
36
|
+
setup(M, { emit: f }) {
|
|
37
|
+
const g = M, m = f, { t: r } = J(), { currentBusiness: K, readRestaurants: b } = Q(), { isLoading: d, startAsyncCall: v } = de(!0), p = C([]), u = C(), _ = C(""), T = C([]);
|
|
38
|
+
let A;
|
|
39
|
+
V(_, async () => {
|
|
40
|
+
A && clearTimeout(A), A = setTimeout(() => {
|
|
41
|
+
var l = new RegExp(_.value, "i");
|
|
42
|
+
T.value = p.value.filter((o) => {
|
|
43
|
+
const a = JSON.stringify(o);
|
|
44
|
+
return l.test(a);
|
|
45
|
+
});
|
|
46
|
+
}, 700);
|
|
47
|
+
}), V(u, () => {
|
|
48
|
+
var l, o;
|
|
49
|
+
m("update:id", (l = u.value) == null ? void 0 : l.value), m("update:by", (o = u.value) == null ? void 0 : o.by);
|
|
50
|
+
});
|
|
51
|
+
async function L() {
|
|
52
|
+
return v(async () => {
|
|
53
|
+
try {
|
|
54
|
+
let l = await ue.readBusinessPayoutAccounts();
|
|
55
|
+
return l.length === 0 ? [] : l;
|
|
56
|
+
} catch {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
async function Y() {
|
|
62
|
+
return v(async () => {
|
|
63
|
+
try {
|
|
64
|
+
let l = await me.getBusinessTerminals();
|
|
65
|
+
return l.length === 0 ? [] : l;
|
|
66
|
+
} catch {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
async function k() {
|
|
72
|
+
d.value = !0;
|
|
73
|
+
const l = [];
|
|
74
|
+
if (!g.excludePayoutAccount) {
|
|
75
|
+
let o = await L();
|
|
76
|
+
g.excludeMarketingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "MARKETING")), g.excludeOrderingPayoutAccount && (o = o == null ? void 0 : o.filter((a) => a.store.event !== "ORDERING")), l.push(
|
|
77
|
+
...(o || []).map((a) => {
|
|
78
|
+
var I, S, N, E;
|
|
79
|
+
return {
|
|
80
|
+
by: "PAYOUT_ACCOUNT",
|
|
81
|
+
value: a._id,
|
|
82
|
+
prefix: r("payment.components.payout_account"),
|
|
83
|
+
type: "Payout Account - " + a.store.event,
|
|
84
|
+
label: ((S = (I = a.ref) == null ? void 0 : I.profile) == null ? void 0 : S.name) ?? a.ref.name,
|
|
85
|
+
chipLabel: "Payout Account: " + (((E = (N = a.ref) == null ? void 0 : N.profile) == null ? void 0 : E.name) ?? a.ref.name)
|
|
86
|
+
};
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
if (!g.excludeRestaurant) {
|
|
91
|
+
const o = await b();
|
|
92
|
+
l.push(
|
|
93
|
+
...(o || []).map((a) => ({
|
|
94
|
+
by: "RESTAURANT",
|
|
95
|
+
value: a._id,
|
|
96
|
+
prefix: r("payment.components.restaurant"),
|
|
97
|
+
type: "Restaurant",
|
|
98
|
+
label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
|
|
99
|
+
chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
|
|
100
|
+
}))
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
if (!g.excludeDevice) {
|
|
104
|
+
const o = await Y();
|
|
105
|
+
l.push(
|
|
106
|
+
...(o || []).map((a) => ({
|
|
107
|
+
by: "DEVICE",
|
|
108
|
+
value: a._id,
|
|
109
|
+
prefix: r("payment.components.device"),
|
|
110
|
+
type: "Device - " + a.deviceType,
|
|
111
|
+
label: a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name,
|
|
112
|
+
chipLabel: a.deviceType + ": " + (a.deviceType === "TERMINAL" ? a.name : a.restaurant.profile.name)
|
|
113
|
+
}))
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
p.value = l, T.value = p.value, d.value = !1;
|
|
117
|
+
}
|
|
118
|
+
return H(k), V(K, k), (l, o) => {
|
|
119
|
+
const a = h("FmCircularProgress"), I = h("FmChip"), S = h("FmSearch"), N = h("FmMenuItem"), E = h("FmMenu");
|
|
120
|
+
return n(d) ? (P(), w(a, {
|
|
121
|
+
key: 0,
|
|
122
|
+
size: "md"
|
|
123
|
+
})) : (P(), O("div", Ae, [
|
|
124
|
+
y(E, { "close-on-click": !0 }, {
|
|
125
|
+
"menu-button": B(() => {
|
|
126
|
+
var e;
|
|
127
|
+
return [
|
|
128
|
+
y(I, {
|
|
129
|
+
icon: "account_box",
|
|
130
|
+
label: ((e = u.value) == null ? void 0 : e.chipLabel) ?? n(r)("payment.components.select"),
|
|
131
|
+
removable: !!u.value,
|
|
132
|
+
onChipClosed: o[0] || (o[0] = (t) => u.value = void 0)
|
|
133
|
+
}, null, 8, ["label", "removable"])
|
|
134
|
+
];
|
|
135
|
+
}),
|
|
136
|
+
default: B(() => [
|
|
137
|
+
F("div", Se, [
|
|
138
|
+
F("div", Ne, [
|
|
139
|
+
y(S, {
|
|
140
|
+
"model-value": _.value,
|
|
141
|
+
"onUpdate:modelValue": o[1] || (o[1] = (e) => _.value = e),
|
|
142
|
+
placeholder: n(r)("payment.components.select")
|
|
143
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
144
|
+
]),
|
|
145
|
+
F("div", null, [
|
|
146
|
+
(P(!0), O(W, null, X(T.value, (e) => (P(), w(N, {
|
|
147
|
+
key: e.value,
|
|
148
|
+
label: e.label,
|
|
149
|
+
sublabel: e.type,
|
|
150
|
+
onClick: () => u.value = e
|
|
151
|
+
}, null, 8, ["label", "sublabel", "onClick"]))), 128))
|
|
152
|
+
])
|
|
153
|
+
])
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})
|
|
157
|
+
]));
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
}), Fe = { class: "flex items-center gap-1" }, Ie = /* @__PURE__ */ G({
|
|
161
|
+
__name: "BillSeqNumber",
|
|
162
|
+
props: {
|
|
163
|
+
row: {},
|
|
164
|
+
data: {}
|
|
165
|
+
},
|
|
166
|
+
setup(M) {
|
|
167
|
+
return (f, g) => {
|
|
168
|
+
const m = h("FmIcon");
|
|
169
|
+
return P(), O("span", Fe, [
|
|
170
|
+
Z(ee(M.row.original.seqNumber) + " ", 1),
|
|
171
|
+
y(m, {
|
|
172
|
+
size: "md",
|
|
173
|
+
name: "check",
|
|
174
|
+
color: "#16a34a"
|
|
175
|
+
})
|
|
176
|
+
]);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
}), De = { class: "flex justify-between mb-6 items-center" }, xe = { class: "flex space-x-8 items-start" }, Re = { class: "flex space-x-4 self-center" }, Ce = { class: "flex space-x-12 mb-6" }, Xe = /* @__PURE__ */ G({
|
|
180
|
+
__name: "Transaction",
|
|
181
|
+
setup(M) {
|
|
182
|
+
var N, E;
|
|
183
|
+
const f = pe(), g = ye(), { sessionUser: m } = Q(), { t: r } = J(), { getBillLink: K } = he(), b = C(), { dateRange: d, searchKey: v, status: p, id: u, by: _ } = se({
|
|
184
|
+
by: "",
|
|
185
|
+
id: "",
|
|
186
|
+
searchKey: "",
|
|
187
|
+
status: [R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS],
|
|
188
|
+
dateRange: {
|
|
189
|
+
startDate: z().startOf("day").format("YYYY-MM-DD"),
|
|
190
|
+
endDate: z().endOf("day").format("YYYY-MM-DD")
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
let T;
|
|
194
|
+
const A = () => {
|
|
195
|
+
T && (clearTimeout(T), T = void 0);
|
|
196
|
+
}, {
|
|
197
|
+
promptSuggestion: L,
|
|
198
|
+
closeSuggestion: Y
|
|
199
|
+
} = Te({
|
|
200
|
+
searchKey: v,
|
|
201
|
+
dateRange: d,
|
|
202
|
+
onBeforeApply: A
|
|
203
|
+
});
|
|
204
|
+
V(v, () => {
|
|
205
|
+
A(), L(), T = setTimeout(() => {
|
|
206
|
+
var e;
|
|
207
|
+
return (e = b.value) == null ? void 0 : e.reset();
|
|
208
|
+
}, 700);
|
|
209
|
+
}), V([d, p, u, _], () => {
|
|
210
|
+
var e;
|
|
211
|
+
(e = b.value) == null || e.reset();
|
|
212
|
+
}), te(() => {
|
|
213
|
+
A(), Y();
|
|
214
|
+
});
|
|
215
|
+
const k = [
|
|
216
|
+
{
|
|
217
|
+
label: "Success",
|
|
218
|
+
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.SUCCESS
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: "Refunded",
|
|
222
|
+
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
label: "Process",
|
|
226
|
+
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
label: "Pending Settlement",
|
|
230
|
+
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING_SETTLEMENT
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
label: "Failed",
|
|
234
|
+
value: R.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
async function l(e, t) {
|
|
238
|
+
var s;
|
|
239
|
+
try {
|
|
240
|
+
const c = await U.refetchTransaction({
|
|
241
|
+
transactionId: e.id
|
|
242
|
+
});
|
|
243
|
+
(s = b.value) == null || s.replaceData(t, c), f.open({
|
|
244
|
+
type: "success",
|
|
245
|
+
title: "Transaction queried and updated successfully."
|
|
246
|
+
});
|
|
247
|
+
} catch (c) {
|
|
248
|
+
f.open({
|
|
249
|
+
type: "error",
|
|
250
|
+
title: "Fail to query transaction.",
|
|
251
|
+
message: q(c)
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
async function o(e, t) {
|
|
256
|
+
j(
|
|
257
|
+
g,
|
|
258
|
+
"Refund Transaction",
|
|
259
|
+
"Are you sure to refund transaction? This action cannot be revert!",
|
|
260
|
+
async () => {
|
|
261
|
+
var s;
|
|
262
|
+
try {
|
|
263
|
+
const c = await U.refundTransaction({
|
|
264
|
+
transactionId: e.id,
|
|
265
|
+
reason: "portal transaction refund",
|
|
266
|
+
amount: e.fdoAmount
|
|
267
|
+
});
|
|
268
|
+
(s = b.value) == null || s.replaceData(t, c), f.open({
|
|
269
|
+
type: "success",
|
|
270
|
+
title: "Transaction refund request initiated."
|
|
271
|
+
});
|
|
272
|
+
} catch (c) {
|
|
273
|
+
f.open({
|
|
274
|
+
type: "error",
|
|
275
|
+
title: "Fail to request refund transaction.",
|
|
276
|
+
message: q(c)
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
async function a(e, t) {
|
|
283
|
+
j(
|
|
284
|
+
g,
|
|
285
|
+
"Notify Transaction",
|
|
286
|
+
"Are you sure to perform notify transaction?",
|
|
287
|
+
async () => {
|
|
288
|
+
try {
|
|
289
|
+
await U.renotifyTransaction(e.id), f.open({
|
|
290
|
+
type: "success",
|
|
291
|
+
title: "Transaction notify successfully."
|
|
292
|
+
});
|
|
293
|
+
} catch (s) {
|
|
294
|
+
f.open({
|
|
295
|
+
type: "error",
|
|
296
|
+
title: "Fail to notify transaction.",
|
|
297
|
+
message: q(s)
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
async function I(e, t) {
|
|
304
|
+
const s = ve(
|
|
305
|
+
[
|
|
306
|
+
{
|
|
307
|
+
type: "span",
|
|
308
|
+
queryKey: "transaction.id",
|
|
309
|
+
queryValue: e.id
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
e.transactionAt
|
|
313
|
+
);
|
|
314
|
+
window.open(s, "_blank");
|
|
315
|
+
}
|
|
316
|
+
C("");
|
|
317
|
+
const S = [
|
|
318
|
+
{
|
|
319
|
+
header: () => r("payment.transactions.table.id"),
|
|
320
|
+
accessorKey: "id",
|
|
321
|
+
cell: ({ cell: e, row: t }) => {
|
|
322
|
+
var s, c;
|
|
323
|
+
return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.transactionId ? t.original.id + `
|
|
324
|
+
ID: ` + t.original.transactionId : t.original.id;
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
header: () => r("payment.transactions.table.pay_id"),
|
|
329
|
+
accessorKey: "payId",
|
|
330
|
+
cell: ({ cell: e, row: t }) => {
|
|
331
|
+
const s = K(t.original);
|
|
332
|
+
return s ? x(
|
|
333
|
+
"a",
|
|
334
|
+
{
|
|
335
|
+
href: s,
|
|
336
|
+
class: "text-blue-600 underline"
|
|
337
|
+
},
|
|
338
|
+
e.getValue()
|
|
339
|
+
) : e.getValue();
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
header: () => r("payment.transactions.table.gateway_id"),
|
|
344
|
+
accessorKey: "gatewayTransactionId"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
header: () => r("payment.transactions.table.bill_seq"),
|
|
348
|
+
accessorKey: "seqNumber",
|
|
349
|
+
cell: ({ cell: e, row: t }) => t.original.seqNumberBinded ? x(Ie, { row: t, data: e.getValue() }) : t.original.seqNumber
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
header: () => r("payment.transactions.table.gateway"),
|
|
353
|
+
accessorKey: "gateway",
|
|
354
|
+
meta: {
|
|
355
|
+
textAlign: "center"
|
|
356
|
+
},
|
|
357
|
+
cell: ({ cell: e, row: t }) => t.original.gateway ? x(fe, { row: t, data: e.getValue() }) : ""
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
header: () => r("payment.transactions.table.method"),
|
|
361
|
+
accessorKey: "method",
|
|
362
|
+
meta: {
|
|
363
|
+
textAlign: "center"
|
|
364
|
+
},
|
|
365
|
+
cell: ({ cell: e, row: t }) => t.original.method ? x(_e, { row: t, data: e.getValue() }) : ""
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
header: () => r("payment.transactions.table.type"),
|
|
369
|
+
accessorKey: "payFor",
|
|
370
|
+
meta: {
|
|
371
|
+
textAlign: "center"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
header: () => r("payment.transactions.table.status"),
|
|
376
|
+
accessorKey: "status",
|
|
377
|
+
cell: ({ cell: e }) => x(oe, { data: e.getValue() })
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
header: () => r("payment.transactions.table.restaurant"),
|
|
381
|
+
accessorKey: "restaurantId"
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
header: () => r("payment.transactions.table.source"),
|
|
385
|
+
accessorKey: "source",
|
|
386
|
+
cell: ({ cell: e, row: t }) => `(${t.original.sourceType}) ${t.original.source}`
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
header: () => r("payment.transactions.table.transaction_at"),
|
|
390
|
+
accessorKey: "transactionAt",
|
|
391
|
+
meta: {
|
|
392
|
+
width: "180px"
|
|
393
|
+
},
|
|
394
|
+
cell: ({ cell: e, row: t }) => t.original.status === "REFUNDED" ? t.original.refundedAt : t.original.transactionAt
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
header: () => r("payment.transactions.table.sales_amount"),
|
|
398
|
+
accessorKey: "amount",
|
|
399
|
+
cell: ({ cell: e, row: t }) => {
|
|
400
|
+
var s, c;
|
|
401
|
+
return ((s = m.value) != null && s.role.isStaff || (c = m.value) != null && c.role.isAdmin) && t.original.flags.isDelivery ? t.original.amount + "( " + t.original.gatewayAmount + ")" : t.original.amount;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
];
|
|
405
|
+
return ((N = m.value) != null && N.role.isStaff || (E = m.value) != null && E.role.isAdmin) && S.push({
|
|
406
|
+
header: () => r("payment.transactions.table.actions"),
|
|
407
|
+
accessorKey: "actions",
|
|
408
|
+
cell: ({ row: e }) => x(ge, {
|
|
409
|
+
transaction: e.original,
|
|
410
|
+
onAction: (t) => {
|
|
411
|
+
var s;
|
|
412
|
+
switch (t) {
|
|
413
|
+
case "notify":
|
|
414
|
+
return a(e.original, e.index);
|
|
415
|
+
case "query":
|
|
416
|
+
return l(e.original, e.index);
|
|
417
|
+
case "refund":
|
|
418
|
+
return (s = m.value) != null && s.role.isStaff ? f.open({
|
|
419
|
+
type: "error",
|
|
420
|
+
title: "You are not allowed to refund transaction."
|
|
421
|
+
}) : o(e.original, e.index);
|
|
422
|
+
case "history":
|
|
423
|
+
return I(e.original, e.index);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
})
|
|
427
|
+
}), (e, t) => {
|
|
428
|
+
const s = h("FmSearch"), c = h("FmSelect");
|
|
429
|
+
return P(), w(ae, {
|
|
430
|
+
title: n(r)("payment.transactions.title"),
|
|
431
|
+
description: n(r)("payment.transactions.description"),
|
|
432
|
+
loading: !1
|
|
433
|
+
}, {
|
|
434
|
+
default: B(() => [
|
|
435
|
+
F("div", De, [
|
|
436
|
+
F("div", xe, [
|
|
437
|
+
y(s, {
|
|
438
|
+
"model-value": n(v),
|
|
439
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => D(v) ? v.value = i : null),
|
|
440
|
+
class: "mr-8",
|
|
441
|
+
label: n(r)("payment.transactions.search.title"),
|
|
442
|
+
placeholder: n(r)("payment.transactions.search.placeholder")
|
|
443
|
+
}, null, 8, ["model-value", "label", "placeholder"]),
|
|
444
|
+
y(c, {
|
|
445
|
+
modelValue: n(p),
|
|
446
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => D(p) ? p.value = i : null),
|
|
447
|
+
class: "mr-6 w-[300px]",
|
|
448
|
+
label: n(r)("payment.transactions.status"),
|
|
449
|
+
"label-mark": "required",
|
|
450
|
+
multiselect: "",
|
|
451
|
+
items: k
|
|
452
|
+
}, {
|
|
453
|
+
"prepend-menu": B(() => [
|
|
454
|
+
y(ie, {
|
|
455
|
+
modelValue: n(p),
|
|
456
|
+
"onUpdate:modelValue": t[1] || (t[1] = (i) => D(p) ? p.value = i : null),
|
|
457
|
+
items: k
|
|
458
|
+
}, null, 8, ["modelValue"])
|
|
459
|
+
]),
|
|
460
|
+
_: 1
|
|
461
|
+
}, 8, ["modelValue", "label"])
|
|
462
|
+
]),
|
|
463
|
+
F("div", Re, [
|
|
464
|
+
y(le, {
|
|
465
|
+
button: {
|
|
466
|
+
appendIcon: "file_download",
|
|
467
|
+
variant: "primary",
|
|
468
|
+
label: n(r)("payment.transactions.button.export")
|
|
469
|
+
},
|
|
470
|
+
handler: async () => {
|
|
471
|
+
var $;
|
|
472
|
+
const i = await (($ = b.value) == null ? void 0 : $.allData());
|
|
473
|
+
i != null && await n(U).downloadPortalTransactionReport(
|
|
474
|
+
n(d),
|
|
475
|
+
n(ne)(i)
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
}, null, 8, ["button", "handler"])
|
|
479
|
+
])
|
|
480
|
+
]),
|
|
481
|
+
F("div", Ce, [
|
|
482
|
+
y(Ee, {
|
|
483
|
+
id: n(u),
|
|
484
|
+
"onUpdate:id": t[3] || (t[3] = (i) => D(u) ? u.value = i : null),
|
|
485
|
+
by: n(_),
|
|
486
|
+
"onUpdate:by": t[4] || (t[4] = (i) => D(_) ? _.value = i : null)
|
|
487
|
+
}, null, 8, ["id", "by"]),
|
|
488
|
+
y(ce, {
|
|
489
|
+
modelValue: n(d),
|
|
490
|
+
"onUpdate:modelValue": t[5] || (t[5] = (i) => D(d) ? d.value = i : null)
|
|
491
|
+
}, null, 8, ["modelValue"])
|
|
492
|
+
]),
|
|
493
|
+
y(be, {
|
|
494
|
+
ref_key: "controller",
|
|
495
|
+
ref: b,
|
|
496
|
+
"column-defs": S,
|
|
497
|
+
"rows-defs": n(re),
|
|
498
|
+
paginate: (i, $) => n(U).readTransactionsV2({
|
|
499
|
+
limit: i,
|
|
500
|
+
cursor: $,
|
|
501
|
+
status: n(p),
|
|
502
|
+
by: n(_),
|
|
503
|
+
id: n(u),
|
|
504
|
+
search: n(v),
|
|
505
|
+
start: n(d).startDate,
|
|
506
|
+
end: n(d).endDate
|
|
507
|
+
})
|
|
508
|
+
}, null, 8, ["rows-defs", "paginate"])
|
|
509
|
+
]),
|
|
510
|
+
_: 1
|
|
511
|
+
}, 8, ["title", "description"]);
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
export {
|
|
516
|
+
Xe as default
|
|
517
|
+
};
|