@feedmepos/mf-payment 1.4.47 → 1.5.0
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-sYaYPQ_s.js → Actions.vue_vue_type_script_setup_true_lang-DGbH2LsQ.js} +43 -43
- package/dist/{AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js → AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js} +13 -13
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js +47 -0
- package/dist/{Chargeback-BftBez0p.js → Chargeback-19afdT_4.js} +83 -83
- package/dist/{DateRangePicker.vue_vue_type_script_setup_true_lang-XZ7OzGau.js → DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js} +1 -1
- package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-CzwG5dCO.js +77 -0
- package/dist/Forbidden-CSTZjebc.js +38 -0
- package/dist/Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js +45 -0
- package/dist/{OnboardForm-DURv3s6I.js → OnboardForm-DHU4ObZ0.js} +363 -347
- package/dist/{OnboardForm-Bk5eHmN0.js → OnboardForm-DodpwAN3.js} +596 -528
- package/dist/{OnboardSubmission-BOiXSkVB.js → OnboardSubmission-B-leoVPo.js} +4 -4
- package/dist/{OnboardSubmission-Bjf_EOKq.js → OnboardSubmission-Dj8AGb69.js} +8 -8
- package/dist/PDFViewer-DgyyGDHl.js +23209 -0
- package/dist/{PayoutAccount-Ban4QG9e.js → PayoutAccount-D7hkn2Nh.js} +341 -312
- package/dist/{PayoutAccount-D-oQ4vID.js → PayoutAccount-DrKTDnEx.js} +75 -75
- package/dist/{PayoutAccountSetting-YYswVooL.js → PayoutAccountSetting-BC0ANAqY.js} +281 -266
- package/dist/{Restaurant-26r7Q01z.js → Restaurant-ZiTHtFZJ.js} +79 -79
- package/dist/{RestaurantSelector.vue_vue_type_script_setup_true_lang-Bzj_sdSY.js → RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js} +3 -3
- package/dist/{RestaurantSetting-D1APrvzM.js → RestaurantSetting-M1jYaGwx.js} +5 -5
- package/dist/{SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js → SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js} +5 -5
- package/dist/{Settlement-CWX5RKwL.js → Settlement-Cj2W8VfH.js} +7 -7
- package/dist/{Settlement-Ix55QLVB.js → Settlement-D_nmqYEC.js} +12 -15
- package/dist/{SettlementTransactions-DYAlKO__.js → SettlementTransactions-Ch9jeQU6.js} +99 -99
- package/dist/{SettlementTransactions-BIodJ6DN.js → SettlementTransactions-DK1ONvn6.js} +55 -55
- package/dist/{Status.vue_vue_type_script_setup_true_lang-B5iI3OiL.js → Status.vue_vue_type_script_setup_true_lang-BP5m6Vic.js} +9 -9
- package/dist/Terminal-CoPPPePw.js +1135 -0
- package/dist/{TerminalSetting-BiaGvysm.js → TerminalSetting-PWs1fyFe.js} +549 -425
- package/dist/{Transaction-D51QiCaP.js → Transaction-BirTp8t6.js} +82 -82
- package/dist/{Transaction-ouagKBic.js → Transaction-CegzBK7m.js} +65 -65
- package/dist/{TransactionOld-CCzonxUD.js → TransactionOld-DqGMuWvL.js} +9 -9
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/api/document/index.d.ts +4 -0
- package/dist/{app-COvZzQVV.js → app-O6x_RyMi.js} +401 -465
- package/dist/app.js +1 -1
- package/dist/{assets--JQWdCl5.js → assets-DtwUojcS.js} +1 -1
- package/dist/components/AdminLayout.vue.d.ts +3 -3
- package/dist/components/AutoCopyCell.vue.d.ts +1 -1
- package/dist/components/DocumentViewer.vue.d.ts +16 -0
- package/dist/components/ImagePreview.vue.d.ts +3 -3
- package/dist/components/Layout.vue.d.ts +3 -3
- package/dist/components/PDFViewer.vue.d.ts +4 -4
- package/dist/components/RestaurantSelector.vue.d.ts +1 -1
- package/dist/components/RouteCell.vue.d.ts +1 -1
- package/dist/{grafana-22PXAn1O.js → grafana-fZyobMgN.js} +1 -1
- package/dist/{index-B0uA-O38.js → index--K2ipr4H.js} +7 -7
- package/dist/{index-cCTvH31Z.js → index-BJNCcdvT.js} +22132 -24859
- package/dist/{index-Blb5YaYR.js → index-C-YBwRQp.js} +3 -3
- package/dist/{index-Ctn4LFui.js → index-CMN40t8e.js} +1 -1
- package/dist/{index-DR0voetw.js → index-CbONxZz2.js} +17 -13
- package/dist/{index-BLyx8ZQr.js → index-CtkwL_6R.js} +1 -1
- package/dist/{index-B9kHmV6p.js → index-D69RnDa7.js} +19 -19
- package/dist/index-_u7l8cO3.js +27 -0
- package/dist/{index-B0-Kn6Mw.js → index-eLZ3BErV.js} +12 -12
- package/dist/{index.vue_vue_type_script_setup_true_lang-NUicoOT2.js → index.vue_vue_type_script_setup_true_lang-zxkA_YTt.js} +50 -50
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/{Forbidden-Dqw0MqyC.js → no-data-BRmo6XOO.js} +2 -35
- package/dist/package.json +12 -6
- package/dist/{payout-account-DQZ0J8Ds.js → payout-account-DbgXMpEF.js} +78 -77
- package/dist/plugins.d.ts +1 -5
- package/dist/stores/payoutAccount.d.ts +16 -16
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{validator-D5jtpt9A.js → validator-DzjyJnvv.js} +842 -763
- package/dist/views/Forbidden.vue.d.ts +1 -1
- package/dist/views/admin/chargeback/cell/Actions.vue.d.ts +1 -1
- package/dist/views/admin/onboard-submission/cell/SignatureBoard.vue.d.ts +2 -1
- package/dist/views/admin/onboard-submission/cell/UploadButton.vue.d.ts +3 -2
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +17 -17
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +17 -17
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +17 -17
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +22 -22
- package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +1 -1
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.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/cell/LogButton.vue.d.ts +1 -1
- package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +118 -244
- 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 +6 -6
- 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/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +28 -8
- package/dist/views/admin/terminal/cell/Actions.vue.d.ts +1 -1
- package/dist/views/admin/terminal/cell/ID.vue.d.ts +1 -1
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +29 -9
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +29 -9
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +250 -0
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +28 -8
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +28 -8
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/dist/views/admin/transaction/cell/BillSeqNumber.vue.d.ts +1 -1
- package/dist/views/onboard-submission/cell/SignatureBoard.vue.d.ts +2 -1
- package/dist/views/onboard-submission/cell/UploadButton.vue.d.ts +6 -5
- package/dist/views/payout-account/PayoutAccountDialog.vue.d.ts +2 -2
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +68 -68
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +34 -34
- package/dist/views/transaction/cell/Actions.vue.d.ts +1 -1
- package/dist/views/transaction/cell/BillSeqNumber.vue.d.ts +1 -1
- package/package.json +26 -20
- package/dist/AutoCopyCell.vue_vue_type_script_setup_true_lang-DP8STuAT.js +0 -47
- package/dist/Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js +0 -45
- package/dist/PDFViewer-DHKBD99J.js +0 -22433
- package/dist/Terminal-CrM7EzkM.js +0 -1095
- package/dist/plugins-DuKITasE.js +0 -1366
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { e as
|
|
1
|
+
import { defineComponent as i, resolveComponent as a, openBlock as r, createBlock as l, normalizeClass as w, withCtx as c, createElementVNode as p, toDisplayString as h, unref as f, createElementBlock as _, createVNode as b, Fragment as F, renderList as T } from "vue";
|
|
2
|
+
import { e as m } from "./index-BJNCcdvT.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
|
-
import { g as
|
|
5
|
-
const C = /* @__PURE__ */
|
|
4
|
+
import { g as x, a as y } from "./assets-DtwUojcS.js";
|
|
5
|
+
const C = /* @__PURE__ */ i({
|
|
6
6
|
__name: "Status",
|
|
7
7
|
props: {
|
|
8
8
|
row: {},
|
|
9
9
|
data: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
11
|
+
setup(n) {
|
|
12
|
+
const e = n;
|
|
13
13
|
function s() {
|
|
14
|
-
return
|
|
14
|
+
return e.data === m.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : e.data === m.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : e.data === m.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
|
|
15
15
|
}
|
|
16
|
-
return (
|
|
16
|
+
return (o, d) => {
|
|
17
17
|
const u = a("FmBadge");
|
|
18
18
|
return r(), l(u, {
|
|
19
19
|
inline: "",
|
|
20
20
|
class: w(s())
|
|
21
21
|
}, {
|
|
22
|
-
default:
|
|
23
|
-
|
|
22
|
+
default: c(() => [
|
|
23
|
+
p("div", null, h(n.data), 1)
|
|
24
24
|
]),
|
|
25
25
|
_: 1
|
|
26
26
|
}, 8, ["class"]);
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), A = ["src"], M = /* @__PURE__ */ i({
|
|
30
30
|
__name: "Gateway",
|
|
31
31
|
props: {
|
|
32
32
|
row: {},
|
|
33
33
|
data: {}
|
|
34
34
|
},
|
|
35
|
-
setup(
|
|
36
|
-
return (
|
|
37
|
-
const
|
|
38
|
-
return r(), l(
|
|
35
|
+
setup(n) {
|
|
36
|
+
return (e, s) => {
|
|
37
|
+
const o = a("FmTooltip");
|
|
38
|
+
return r(), l(o, {
|
|
39
39
|
variant: "plain",
|
|
40
40
|
placement: "top",
|
|
41
41
|
content: n.row.original.gateway,
|
|
42
42
|
"hide-arrow": !0
|
|
43
43
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
|
|
44
|
+
default: c(() => [
|
|
45
|
+
p("img", {
|
|
46
46
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
47
|
-
src: f(
|
|
48
|
-
}, null, 8,
|
|
47
|
+
src: f(x)(n.row.original.gateway)
|
|
48
|
+
}, null, 8, A)
|
|
49
49
|
]),
|
|
50
50
|
_: 1
|
|
51
51
|
}, 8, ["content"]);
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
54
|
+
}), N = ["src"], P = /* @__PURE__ */ i({
|
|
55
55
|
__name: "Method",
|
|
56
56
|
props: {
|
|
57
57
|
row: {},
|
|
58
58
|
data: {}
|
|
59
59
|
},
|
|
60
|
-
setup(
|
|
61
|
-
return (
|
|
62
|
-
const
|
|
63
|
-
return r(), l(
|
|
60
|
+
setup(n) {
|
|
61
|
+
return (e, s) => {
|
|
62
|
+
const o = a("FmTooltip");
|
|
63
|
+
return r(), l(o, {
|
|
64
64
|
variant: "plain",
|
|
65
65
|
placement: "top",
|
|
66
66
|
content: n.row.original.method.issuer,
|
|
67
67
|
"hide-arrow": !0
|
|
68
68
|
}, {
|
|
69
|
-
default:
|
|
70
|
-
|
|
69
|
+
default: c(() => [
|
|
70
|
+
p("img", {
|
|
71
71
|
class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
|
|
72
|
-
src: f(
|
|
73
|
-
}, null, 8,
|
|
72
|
+
src: f(y)(n.row.original.method.issuer, n.row.original.method.variant)
|
|
73
|
+
}, null, 8, N)
|
|
74
74
|
]),
|
|
75
75
|
_: 1
|
|
76
76
|
}, 8, ["content"]);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
}), q = /* @__PURE__ */
|
|
79
|
+
}), q = /* @__PURE__ */ i({
|
|
80
80
|
__name: "Actions",
|
|
81
81
|
props: {
|
|
82
82
|
onAction: { type: Function },
|
|
83
83
|
transaction: {}
|
|
84
84
|
},
|
|
85
|
-
setup(
|
|
86
|
-
const
|
|
87
|
-
|
|
85
|
+
setup(n) {
|
|
86
|
+
const e = [
|
|
87
|
+
n.transaction.flags.query && {
|
|
88
88
|
label: "Query",
|
|
89
89
|
sublabel: "Perform transaction status inquriy",
|
|
90
90
|
icon: "question_answer",
|
|
91
91
|
action: "query"
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
n.transaction.flags.refund && {
|
|
94
94
|
label: "Refund",
|
|
95
95
|
sublabel: "Perform transaction refund request",
|
|
96
96
|
icon: "request_page",
|
|
97
97
|
action: "refund"
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
n.transaction.flags.notify && {
|
|
100
100
|
label: "Notify",
|
|
101
101
|
sublabel: "Perform webhook notification for transaction",
|
|
102
102
|
icon: "webhook",
|
|
@@ -109,25 +109,25 @@ const C = /* @__PURE__ */ c({
|
|
|
109
109
|
action: "history"
|
|
110
110
|
}
|
|
111
111
|
];
|
|
112
|
-
return (s,
|
|
113
|
-
const
|
|
114
|
-
return r(),
|
|
115
|
-
onClick:
|
|
112
|
+
return (s, o) => {
|
|
113
|
+
const d = a("FmIcon"), u = a("FmMenuItem"), g = a("FmMenu");
|
|
114
|
+
return r(), _("div", {
|
|
115
|
+
onClick: o[0] || (o[0] = (t) => {
|
|
116
116
|
t.stopPropagation();
|
|
117
117
|
})
|
|
118
118
|
}, [
|
|
119
119
|
b(g, null, {
|
|
120
|
-
"menu-button":
|
|
121
|
-
b(
|
|
120
|
+
"menu-button": c(() => [
|
|
121
|
+
b(d, { name: "settings" })
|
|
122
122
|
]),
|
|
123
|
-
default:
|
|
124
|
-
(r(!0),
|
|
123
|
+
default: c(() => [
|
|
124
|
+
(r(!0), _(F, null, T(e.filter((t) => !!t), (t) => (r(), l(u, {
|
|
125
125
|
selectable: !0,
|
|
126
126
|
key: t.label,
|
|
127
127
|
sublabel: t.sublabel,
|
|
128
128
|
label: t.label,
|
|
129
129
|
icon: t.icon,
|
|
130
|
-
onclick: () =>
|
|
130
|
+
onclick: () => n.onAction(t.action)
|
|
131
131
|
}, null, 8, ["sublabel", "label", "icon", "onclick"]))), 128))
|
|
132
132
|
]),
|
|
133
133
|
_: 1
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as i, resolveComponent as t, openBlock as o, createElementBlock as n, createVNode as c, createElementVNode as r, renderSlot as m } from "vue";
|
|
2
2
|
import "@feedmepos/ui-library";
|
|
3
|
-
const
|
|
3
|
+
const d = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex items-center justify-center min-h-[80vh]"
|
|
6
|
-
},
|
|
6
|
+
}, u = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "m-6"
|
|
9
|
-
},
|
|
9
|
+
}, k = { class: "bg-white fm-corner-radius-md p-6" }, f = /* @__PURE__ */ i({
|
|
10
10
|
__name: "AdminLayout",
|
|
11
11
|
props: {
|
|
12
12
|
loading: { type: Boolean },
|
|
@@ -15,20 +15,20 @@ const m = {
|
|
|
15
15
|
businessFilter: { type: Boolean },
|
|
16
16
|
restaurantFilter: { type: Boolean }
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
return (
|
|
20
|
-
const
|
|
21
|
-
return e.loading ? (
|
|
22
|
-
s
|
|
23
|
-
])) : (
|
|
24
|
-
|
|
18
|
+
setup(e) {
|
|
19
|
+
return (a, p) => {
|
|
20
|
+
const s = t("FmCircularProgress"), l = t("FmPageHead");
|
|
21
|
+
return e.loading ? (o(), n("div", d, [
|
|
22
|
+
c(s, { size: "xxl" })
|
|
23
|
+
])) : (o(), n("div", u, [
|
|
24
|
+
c(l, {
|
|
25
25
|
class: "flex-grow mb-6",
|
|
26
26
|
title: e.title,
|
|
27
27
|
"back-button": !!e.onBack,
|
|
28
28
|
"onClick:back": e.onBack
|
|
29
29
|
}, null, 8, ["title", "back-button", "onClick:back"]),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
r("div", k, [
|
|
31
|
+
m(a.$slots, "default")
|
|
32
32
|
])
|
|
33
33
|
]));
|
|
34
34
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent as d, computed as u, resolveComponent as C, openBlock as c, createElementBlock as s, createVNode as f, createElementVNode as x, toDisplayString as i, createCommentVNode as y } from "vue";
|
|
2
|
+
import { c as b } from "./clipboard-4jh1WteU.js";
|
|
3
|
+
import { useSnackbar as k } from "@feedmepos/ui-library";
|
|
4
|
+
const _ = { key: 0 }, I = /* @__PURE__ */ d({
|
|
5
|
+
__name: "AutoCopyCell",
|
|
6
|
+
props: {
|
|
7
|
+
data: {},
|
|
8
|
+
extra: {},
|
|
9
|
+
truncate: {}
|
|
10
|
+
},
|
|
11
|
+
setup(o) {
|
|
12
|
+
const t = o, r = k(), l = u(() => {
|
|
13
|
+
if (!t.truncate)
|
|
14
|
+
return t.data;
|
|
15
|
+
const n = t.truncate.startChars || 8, e = t.truncate.endChars || 8, a = n + e + 3;
|
|
16
|
+
return t.data.length <= a ? t.data : `${t.data.slice(0, n)}...${t.data.slice(-e)}`;
|
|
17
|
+
});
|
|
18
|
+
function p() {
|
|
19
|
+
try {
|
|
20
|
+
b(t.data), r.open({ title: "Text copied to clipboard." }, 1e3);
|
|
21
|
+
} catch {
|
|
22
|
+
r.open({ title: "Clipboard API incompatible." }, 1e3);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (n, e) => {
|
|
26
|
+
const a = C("FmIcon");
|
|
27
|
+
return c(), s("div", {
|
|
28
|
+
class: "flex",
|
|
29
|
+
onClick: e[0] || (e[0] = (m) => {
|
|
30
|
+
m.stopPropagation(), p();
|
|
31
|
+
})
|
|
32
|
+
}, [
|
|
33
|
+
f(a, {
|
|
34
|
+
class: "mr-4 self-center",
|
|
35
|
+
name: "content_copy",
|
|
36
|
+
size: "sm",
|
|
37
|
+
outline: ""
|
|
38
|
+
}),
|
|
39
|
+
x("span", null, i(l.value), 1),
|
|
40
|
+
o.extra ? (c(), s("span", _, i(" " + o.extra), 1)) : y("", !0)
|
|
41
|
+
]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
I as _
|
|
47
|
+
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
1
|
+
import { defineComponent as D, ref as k, onMounted as P, resolveComponent as d, openBlock as v, createBlock as B, withCtx as F, createVNode as c, unref as g, createElementVNode as _, createElementBlock as Y, Fragment as U, renderList as K, watch as M, isRef as R, h as S } from "vue";
|
|
2
|
+
import { t as V } from "./index--K2ipr4H.js";
|
|
3
3
|
import { h as b } from "./moment-h96o7c8I.js";
|
|
4
|
-
import "./index-
|
|
5
|
-
import { d as
|
|
6
|
-
import { u as q } from "./index-
|
|
7
|
-
import { _ as O } from "./AdminLayout.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import "./index-BJNCcdvT.js";
|
|
5
|
+
import { d as A } from "./dinero-CIVmXLL-.js";
|
|
6
|
+
import { u as q } from "./index-CtkwL_6R.js";
|
|
7
|
+
import { _ as O } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
|
|
8
8
|
import { _ as N } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
9
9
|
import { useDialogChild as $, useSnackbar as x, useDialog as E } from "@feedmepos/ui-library";
|
|
10
|
-
import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { _ as z } from "./index.vue_vue_type_script_setup_true_lang-
|
|
12
|
-
import { _ as
|
|
13
|
-
import { r as G } from "./index-
|
|
14
|
-
import { z as C, a as
|
|
15
|
-
import { u as
|
|
16
|
-
function
|
|
10
|
+
import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
|
|
11
|
+
import { _ as z } from "./index.vue_vue_type_script_setup_true_lang-zxkA_YTt.js";
|
|
12
|
+
import { _ as T } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-I9eO197f.js";
|
|
13
|
+
import { r as G } from "./index-CMN40t8e.js";
|
|
14
|
+
import { z as C, a as I, s as H } from "./validator-DzjyJnvv.js";
|
|
15
|
+
import { u as w } from "./error-K1CakhA9.js";
|
|
16
|
+
function L(a) {
|
|
17
17
|
return {
|
|
18
|
-
id:
|
|
19
|
-
restaurant:
|
|
20
|
-
payId:
|
|
21
|
-
createdAt: b(
|
|
22
|
-
canSettleAt: b(
|
|
23
|
-
method:
|
|
24
|
-
gateway:
|
|
25
|
-
status:
|
|
26
|
-
payFor:
|
|
27
|
-
group:
|
|
28
|
-
seqNumber:
|
|
29
|
-
chargeBackReason:
|
|
30
|
-
fdoAmount:
|
|
18
|
+
id: a._id,
|
|
19
|
+
restaurant: a.restaurant || "",
|
|
20
|
+
payId: a.payId || "-",
|
|
21
|
+
createdAt: b(a.createdAt).format("YYYY-MM-DD HH:mm:ss"),
|
|
22
|
+
canSettleAt: b(a.canSettleAt).format("YYYY-MM-DD"),
|
|
23
|
+
method: a.method,
|
|
24
|
+
gateway: a.gateway,
|
|
25
|
+
status: a.status,
|
|
26
|
+
payFor: a.payFor,
|
|
27
|
+
group: a.group || "-",
|
|
28
|
+
seqNumber: a.seqNumber || "-",
|
|
29
|
+
chargeBackReason: a.chargeBackReason || "-",
|
|
30
|
+
fdoAmount: a.amount,
|
|
31
31
|
// Show chargeback amount as positive value
|
|
32
|
-
amount:
|
|
33
|
-
fee:
|
|
34
|
-
payout:
|
|
35
|
-
settlement:
|
|
32
|
+
amount: A(a.amount).multiply(-1).toFormat("$0.00"),
|
|
33
|
+
fee: A(a.fee).toFormat("$0.00"),
|
|
34
|
+
payout: A(a.payout).toFormat("$0.00"),
|
|
35
|
+
settlement: a.settlement || ""
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
38
|
+
function Q(a) {
|
|
39
|
+
return a.map(L);
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const W = { class: "flex justify-end mb-2" }, J = /* @__PURE__ */ D({
|
|
42
42
|
__name: "CreateChargebackDialog",
|
|
43
|
-
setup(
|
|
43
|
+
setup(a) {
|
|
44
44
|
const u = $(), m = k(), o = k({
|
|
45
45
|
restaurant: "",
|
|
46
46
|
payId: "",
|
|
47
47
|
amount: "",
|
|
48
48
|
reason: ""
|
|
49
49
|
}), s = k([]), i = async (f = "") => {
|
|
50
|
-
const
|
|
50
|
+
const t = await G.readRestaurantWithPagination({
|
|
51
51
|
limit: 20,
|
|
52
52
|
skip: 0,
|
|
53
53
|
sortBy: "name",
|
|
54
54
|
search: f,
|
|
55
55
|
descending: !1
|
|
56
56
|
});
|
|
57
|
-
s.value =
|
|
57
|
+
s.value = t.resources.map((p) => ({
|
|
58
58
|
label: p.profile.name,
|
|
59
59
|
value: p._id
|
|
60
60
|
}));
|
|
@@ -68,7 +68,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
68
68
|
chargeBackReason: o.value.reason
|
|
69
69
|
}), u.emitAction("primary");
|
|
70
70
|
};
|
|
71
|
-
return (f,
|
|
71
|
+
return (f, t) => {
|
|
72
72
|
const p = d("FmSelect"), y = d("FmTextField"), e = d("FmTextarea"), n = d("FmButton"), l = d("FmForm");
|
|
73
73
|
return v(), B(l, {
|
|
74
74
|
ref_key: "form",
|
|
@@ -79,24 +79,24 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
79
79
|
default: F(() => [
|
|
80
80
|
c(p, {
|
|
81
81
|
modelValue: o.value.restaurant,
|
|
82
|
-
"onUpdate:modelValue":
|
|
82
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => o.value.restaurant = r),
|
|
83
83
|
label: "Restaurant",
|
|
84
84
|
"label-mark": "required",
|
|
85
85
|
searchable: "",
|
|
86
86
|
placeholder: "Select Restaurant",
|
|
87
87
|
items: s.value,
|
|
88
|
-
rules: g(C)(g(
|
|
88
|
+
rules: g(C)(g(I).string().min(1, "Restaurant is required")),
|
|
89
89
|
onSearch: i
|
|
90
90
|
}, null, 8, ["modelValue", "items", "rules"]),
|
|
91
91
|
c(y, {
|
|
92
92
|
modelValue: o.value.payId,
|
|
93
|
-
"onUpdate:modelValue":
|
|
93
|
+
"onUpdate:modelValue": t[1] || (t[1] = (r) => o.value.payId = r),
|
|
94
94
|
label: "Pay ID",
|
|
95
95
|
placeholder: "Enter Pay ID (optional)"
|
|
96
96
|
}, null, 8, ["modelValue"]),
|
|
97
97
|
c(y, {
|
|
98
98
|
modelValue: o.value.amount,
|
|
99
|
-
"onUpdate:modelValue":
|
|
99
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => o.value.amount = r),
|
|
100
100
|
label: "Amount",
|
|
101
101
|
type: "number",
|
|
102
102
|
step: "0.01",
|
|
@@ -105,18 +105,18 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
105
105
|
decimal: 2,
|
|
106
106
|
min: 0.01,
|
|
107
107
|
rules: g(C)(
|
|
108
|
-
g(
|
|
108
|
+
g(I).string().min(1, "Amount is required").transform((r) => Number.parseFloat(r)).refine((r) => !isNaN(r) && r > 0, { message: "Amount must be greater than 0" }).refine((r) => Math.round(r * 100) / 100 === r, { message: "Amount can only have maximum of 2 decimal places" })
|
|
109
109
|
)
|
|
110
110
|
}, null, 8, ["modelValue", "rules"]),
|
|
111
111
|
c(e, {
|
|
112
112
|
modelValue: o.value.reason,
|
|
113
|
-
"onUpdate:modelValue":
|
|
113
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => o.value.reason = r),
|
|
114
114
|
label: "Reason",
|
|
115
115
|
placeholder: "Enter chargeback reason",
|
|
116
116
|
"label-mark": "required",
|
|
117
|
-
rules: g(C)(g(
|
|
117
|
+
rules: g(C)(g(I).string().trim().min(1, "Reason is required"))
|
|
118
118
|
}, null, 8, ["modelValue", "rules"]),
|
|
119
|
-
_("div",
|
|
119
|
+
_("div", W, [
|
|
120
120
|
c(n, {
|
|
121
121
|
type: "submit",
|
|
122
122
|
variant: "primary",
|
|
@@ -128,15 +128,15 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
128
128
|
}, 512);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
}),
|
|
131
|
+
}), X = { class: "flex justify-end gap-12 mt-24 mb-2" }, Z = /* @__PURE__ */ D({
|
|
132
132
|
__name: "UpdateChargebackDialog",
|
|
133
133
|
props: {
|
|
134
134
|
chargebackId: {},
|
|
135
135
|
currentDate: {}
|
|
136
136
|
},
|
|
137
|
-
setup(
|
|
138
|
-
const u =
|
|
139
|
-
(
|
|
137
|
+
setup(a) {
|
|
138
|
+
const u = a, { emitData: m, emitAction: o } = $(), s = k(b(u.currentDate).format("YYYY-MM-DD")), i = H().refine(
|
|
139
|
+
(t) => b(t).startOf("day").isSameOrAfter(b().startOf("day")),
|
|
140
140
|
{ message: "Date cannot be in the past" }
|
|
141
141
|
), h = C(i), f = () => {
|
|
142
142
|
i.safeParse(s.value).success && (m({
|
|
@@ -144,7 +144,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
144
144
|
canSettleAt: b(s.value).toISOString()
|
|
145
145
|
}), o("primary"));
|
|
146
146
|
};
|
|
147
|
-
return (
|
|
147
|
+
return (t, p) => {
|
|
148
148
|
const y = d("FmSimpleDatePicker"), e = d("FmFormGroup"), n = d("FmButton");
|
|
149
149
|
return v(), Y(U, null, [
|
|
150
150
|
c(e, {
|
|
@@ -163,7 +163,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
163
163
|
]),
|
|
164
164
|
_: 1
|
|
165
165
|
}, 8, ["modelValue"]),
|
|
166
|
-
_("div",
|
|
166
|
+
_("div", X, [
|
|
167
167
|
c(n, {
|
|
168
168
|
label: "Submit",
|
|
169
169
|
variant: "primary",
|
|
@@ -173,27 +173,27 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
173
173
|
], 64);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
}),
|
|
176
|
+
}), ee = /* @__PURE__ */ D({
|
|
177
177
|
__name: "Actions",
|
|
178
178
|
props: {
|
|
179
179
|
onAction: { type: Function },
|
|
180
180
|
chargeback: {}
|
|
181
181
|
},
|
|
182
|
-
setup(
|
|
182
|
+
setup(a) {
|
|
183
183
|
const m = [
|
|
184
184
|
{
|
|
185
185
|
label: "Update",
|
|
186
186
|
sublabel: "Update chargeback transaction",
|
|
187
187
|
icon: "edit",
|
|
188
188
|
action: "update",
|
|
189
|
-
disabled: !!
|
|
189
|
+
disabled: !!a.chargeback.settlement
|
|
190
190
|
}
|
|
191
191
|
];
|
|
192
192
|
return (o, s) => {
|
|
193
193
|
const i = d("FmIcon"), h = d("FmMenuItem"), f = d("FmMenu");
|
|
194
194
|
return v(), Y("div", {
|
|
195
|
-
onClick: s[0] || (s[0] = (
|
|
196
|
-
|
|
195
|
+
onClick: s[0] || (s[0] = (t) => {
|
|
196
|
+
t.stopPropagation();
|
|
197
197
|
})
|
|
198
198
|
}, [
|
|
199
199
|
c(f, null, {
|
|
@@ -201,14 +201,14 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
201
201
|
c(i, { name: "settings" })
|
|
202
202
|
]),
|
|
203
203
|
default: F(() => [
|
|
204
|
-
(v(), Y(U, null, K(m, (
|
|
204
|
+
(v(), Y(U, null, K(m, (t) => c(h, {
|
|
205
205
|
selectable: !0,
|
|
206
|
-
key:
|
|
207
|
-
sublabel:
|
|
208
|
-
label:
|
|
209
|
-
icon:
|
|
210
|
-
disabled:
|
|
211
|
-
onclick:
|
|
206
|
+
key: t.label,
|
|
207
|
+
sublabel: t.sublabel,
|
|
208
|
+
label: t.label,
|
|
209
|
+
icon: t.icon,
|
|
210
|
+
disabled: t.disabled,
|
|
211
|
+
onclick: t.disabled ? void 0 : () => a.onAction(t.action)
|
|
212
212
|
}, null, 8, ["sublabel", "label", "icon", "disabled", "onclick"])), 64))
|
|
213
213
|
]),
|
|
214
214
|
_: 1
|
|
@@ -216,9 +216,9 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
216
216
|
]);
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
}),
|
|
219
|
+
}), ae = { class: "flex justify-between mb-6 items-center" }, te = { class: "flex space-x-4" }, re = { class: "flex space-x-4 self-center" }, oe = { class: "mb-6" }, ke = /* @__PURE__ */ D({
|
|
220
220
|
__name: "Chargeback",
|
|
221
|
-
setup(
|
|
221
|
+
setup(a) {
|
|
222
222
|
const u = k(), { dateRange: m, searchKey: o } = q({
|
|
223
223
|
searchKey: "",
|
|
224
224
|
dateRange: {
|
|
@@ -226,7 +226,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
226
226
|
endDate: b().endOf("day").format("YYYY-MM-DD")
|
|
227
227
|
}
|
|
228
228
|
}), s = x(), i = E(), h = async (e, n) => {
|
|
229
|
-
const l = await
|
|
229
|
+
const l = await V.readChargebackTransactions({
|
|
230
230
|
start: b(m.value.startDate).startOf("day").toISOString(),
|
|
231
231
|
end: b(m.value.endDate).endOf("day").toISOString(),
|
|
232
232
|
limit: e,
|
|
@@ -234,7 +234,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
234
234
|
search: o.value
|
|
235
235
|
});
|
|
236
236
|
return {
|
|
237
|
-
data:
|
|
237
|
+
data: Q(l.data),
|
|
238
238
|
meta: l.meta
|
|
239
239
|
};
|
|
240
240
|
};
|
|
@@ -249,16 +249,16 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
249
249
|
(e = u.value) == null || e.reset();
|
|
250
250
|
}, 700);
|
|
251
251
|
});
|
|
252
|
-
const
|
|
252
|
+
const t = async () => {
|
|
253
253
|
i.open({
|
|
254
254
|
title: "Create Chargeback",
|
|
255
255
|
closeButton: !0,
|
|
256
256
|
overlay: !0,
|
|
257
|
-
contentComponent:
|
|
257
|
+
contentComponent: J
|
|
258
258
|
}).onPrimary(async (e) => {
|
|
259
259
|
var n;
|
|
260
260
|
try {
|
|
261
|
-
await
|
|
261
|
+
await V.createChargebackTransaction(e), (n = u.value) == null || n.reset(), s.open({
|
|
262
262
|
type: "success",
|
|
263
263
|
message: "Chargeback created successfully"
|
|
264
264
|
}), i.close();
|
|
@@ -266,7 +266,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
266
266
|
s.open({
|
|
267
267
|
type: "error",
|
|
268
268
|
title: "Failed to create chargeback",
|
|
269
|
-
message:
|
|
269
|
+
message: w(l)
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
272
|
});
|
|
@@ -275,7 +275,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
275
275
|
title: "Update Chargeback",
|
|
276
276
|
closeButton: !0,
|
|
277
277
|
overlay: !0,
|
|
278
|
-
contentComponent:
|
|
278
|
+
contentComponent: Z,
|
|
279
279
|
contentComponentProps: {
|
|
280
280
|
chargebackId: e.id,
|
|
281
281
|
currentDate: e.canSettleAt
|
|
@@ -283,7 +283,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
283
283
|
}).onPrimary(async (n) => {
|
|
284
284
|
var l;
|
|
285
285
|
try {
|
|
286
|
-
await
|
|
286
|
+
await V.updateChargebackTransaction(n), (l = u.value) == null || l.reset(), s.open({
|
|
287
287
|
type: "success",
|
|
288
288
|
message: "Chargeback updated successfully"
|
|
289
289
|
}), i.close();
|
|
@@ -291,7 +291,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
291
291
|
s.open({
|
|
292
292
|
type: "error",
|
|
293
293
|
title: "Failed to update chargeback date",
|
|
294
|
-
message:
|
|
294
|
+
message: w(r)
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
});
|
|
@@ -299,7 +299,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
299
299
|
{
|
|
300
300
|
header: () => "Transaction ID",
|
|
301
301
|
accessorKey: "id",
|
|
302
|
-
cell: ({ cell: e }) =>
|
|
302
|
+
cell: ({ cell: e }) => S(T, {
|
|
303
303
|
data: e.getValue(),
|
|
304
304
|
truncate: { startChars: 8, endChars: 8 }
|
|
305
305
|
})
|
|
@@ -307,7 +307,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
307
307
|
{
|
|
308
308
|
header: () => "Restaurant",
|
|
309
309
|
accessorKey: "restaurant",
|
|
310
|
-
cell: ({ cell: e }) =>
|
|
310
|
+
cell: ({ cell: e }) => S(T, {
|
|
311
311
|
data: e.getValue(),
|
|
312
312
|
truncate: { startChars: 8, endChars: 8 }
|
|
313
313
|
})
|
|
@@ -353,7 +353,7 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
353
353
|
{
|
|
354
354
|
header: () => "Actions",
|
|
355
355
|
accessorKey: "id",
|
|
356
|
-
cell: ({ row: e }) =>
|
|
356
|
+
cell: ({ row: e }) => S(ee, {
|
|
357
357
|
chargeback: e.original,
|
|
358
358
|
onAction: (n) => {
|
|
359
359
|
n === "update" && p(e.original);
|
|
@@ -368,8 +368,8 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
368
368
|
loading: !1
|
|
369
369
|
}, {
|
|
370
370
|
default: F(() => [
|
|
371
|
-
_("div",
|
|
372
|
-
_("div",
|
|
371
|
+
_("div", ae, [
|
|
372
|
+
_("div", te, [
|
|
373
373
|
c(l, {
|
|
374
374
|
"model-value": g(o),
|
|
375
375
|
"onUpdate:modelValue": n[0] || (n[0] = (r) => R(o) ? o.value = r : null),
|
|
@@ -378,18 +378,18 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
378
378
|
placeholder: "Search Chargebacks ..."
|
|
379
379
|
}, null, 8, ["model-value"])
|
|
380
380
|
]),
|
|
381
|
-
_("div",
|
|
381
|
+
_("div", re, [
|
|
382
382
|
c(N, {
|
|
383
383
|
button: {
|
|
384
384
|
appendIcon: "add",
|
|
385
385
|
variant: "primary",
|
|
386
386
|
label: "Create"
|
|
387
387
|
},
|
|
388
|
-
handler:
|
|
388
|
+
handler: t
|
|
389
389
|
})
|
|
390
390
|
])
|
|
391
391
|
]),
|
|
392
|
-
_("div",
|
|
392
|
+
_("div", oe, [
|
|
393
393
|
c(j, {
|
|
394
394
|
modelValue: g(m),
|
|
395
395
|
"onUpdate:modelValue": n[1] || (n[1] = (r) => R(m) ? m.value = r : null)
|
|
@@ -409,5 +409,5 @@ const Q = { class: "flex justify-end mb-2" }, W = /* @__PURE__ */ S({
|
|
|
409
409
|
}
|
|
410
410
|
});
|
|
411
411
|
export {
|
|
412
|
-
|
|
412
|
+
ke as default
|
|
413
413
|
};
|