@feedmepos/mf-payment 1.8.6-dev → 1.8.6
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-bFCBTzI5.js → Actions.vue_vue_type_script_setup_true_lang-CVd887uW.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DJhZ930J.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CTfdDeo-.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-B9_rq-fq.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-kbpe44vU.js} +2 -2
- package/dist/{Chargeback-eF_MfNB7.js → Chargeback-CcuvSbrA.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-DByI68Y0.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DfRNwTv8.js} +1 -1
- package/dist/{OnboardForm-OqVz2dnj.js → OnboardForm-BV16nrnb.js} +6 -6
- package/dist/{OnboardForm-CgVlJEWP.js → OnboardForm-Rl88SE_H.js} +6 -6
- package/dist/{OnboardSubmission-BeWkvADJ.js → OnboardSubmission-DUcGNqZh.js} +6 -6
- package/dist/{OnboardSubmission-CmcuvrEy.js → OnboardSubmission-YijjU0zY.js} +3 -3
- package/dist/{PayoutAccount-BU-bT1wE.js → PayoutAccount-BeHx_1OX.js} +5 -5
- package/dist/{PayoutAccount-Q0bzSdXR.js → PayoutAccount-DQwFZJ6m.js} +7 -7
- package/dist/{PayoutAccountSetting-CZqZdZyS.js → PayoutAccountSetting-DNMZoESm.js} +609 -679
- package/dist/{Restaurant-BLLbK64j.js → Restaurant-DR13a2cg.js} +4 -4
- package/dist/{RestaurantSetting-BC_sm9bJ.js → RestaurantSetting-B2weOYrU.js} +81 -156
- package/dist/{Settlement-CphuhaDs.js → Settlement-D7tHzgVa.js} +3 -3
- package/dist/{Settlement-B7dzQTAr.js → Settlement-k40Q2Yu2.js} +188 -181
- package/dist/{SettlementTransactions-CTFl-1pu.js → SettlementTransactions-DDSqdqXn.js} +5 -5
- package/dist/{SettlementTransactions-oCyokbLZ.js → SettlementTransactions-DQTLeVbn.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-DZH1tqmy.js → Status.vue_vue_type_script_setup_true_lang-DXDw0QJo.js} +1 -1
- package/dist/{Terminal-ubk78mmt.js → Terminal-C7Jli9yt.js} +5 -5
- package/dist/{TerminalSetting-CqS9pECq.js → TerminalSetting-D1XQ6hi6.js} +461 -472
- package/dist/{Transaction-BgLMHX2L.js → Transaction-BT-sO9R_.js} +11 -11
- package/dist/{Transaction-BxNWr_TR.js → Transaction-DzMoFH_T.js} +10 -10
- package/dist/{TransactionOld-jrctGUYY.js → TransactionOld-BasDL_U-.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-Hribmsrm.js → TransactionStatus.vue_vue_type_script_setup_true_lang-B0aJ876b.js} +1 -1
- package/dist/{app-GiML6ZLl.js → app-DwppBYkj.js} +567 -576
- package/dist/app.js +1 -1
- package/dist/assets-CxA6b1Rm.js +92 -0
- package/dist/{grafana-B9Tf8La5.js → grafana-DgAK77DK.js} +1 -1
- package/dist/{index-CxK7NPc7.js → index-6lmaZ5Vz.js} +1 -1
- package/dist/{index-BAva71bK.js → index-BMLa0NYv.js} +1 -1
- package/dist/{index-B5NyE5Fd.js → index-BoOKT87S.js} +1 -1
- package/dist/{index-DNBtefZH.js → index-CKl_n27v.js} +1 -1
- package/dist/{index-XzGHDL9B.js → index-COXIfCsK.js} +2 -2
- package/dist/{index-BfYobGKt.js → index-CQzH1Uyx.js} +2771 -2820
- package/dist/{index-PCquuCgs.js → index-C_F82jsF.js} +1 -1
- package/dist/{index-CVTjXEZI.js → index-_j4Dlizn.js} +1 -1
- package/dist/{index-D1EHLc-D.js → index-cISc370A.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-3kFL7AhX.js → index.vue_vue_type_script_setup_true_lang-BbI8uR31.js} +1 -1
- package/dist/{onboard-submission-y3QA70dW.js → onboard-submission-DKt2Khj9.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-BtaeptEJ.js → payout-account-C9Lm4Y7Z.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +32 -44
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +12 -12
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +12 -12
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +12 -12
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +32 -44
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +36 -48
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +36 -48
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +32 -44
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +32 -44
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +36 -48
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- 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 +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.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 +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
- 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 +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.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/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +30 -30
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +30 -30
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +64 -88
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +48 -48
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +24 -24
- package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
- package/package.json +2 -2
- package/dist/assets-8qJRwo68.js +0 -93
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +0 -41
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +0 -48
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as x,
|
|
2
|
-
import { u as q } from "./index-
|
|
1
|
+
import { defineComponent as x, resolveComponent as k, openBlock as $, createBlock as N, ref as A, computed as j, createElementBlock as B, Fragment as G, unref as e, withDirectives as Q, vShow as W, createCommentVNode as E, createVNode as p, h as L, watch as D, createElementVNode as m, withCtx as S, toDisplayString as b, createTextVNode as T, onMounted as z, renderList as X, isRef as U } from "vue";
|
|
2
|
+
import { u as q } from "./index-CQzH1Uyx.js";
|
|
3
3
|
import { h as Y } from "./moment-h96o7c8I.js";
|
|
4
|
-
import { useCoreStore as H, useI18n as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { s as
|
|
7
|
-
import { useDialog as
|
|
4
|
+
import { useCoreStore as H, useI18n as M } from "@feedmepos/mf-common";
|
|
5
|
+
import { _ as Z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
|
|
6
|
+
import { s as P } from "./index-C_F82jsF.js";
|
|
7
|
+
import { useDialog as ee } from "@feedmepos/ui-library";
|
|
8
8
|
import { d as g } from "./dinero-CIVmXLL-.js";
|
|
9
9
|
import { _ as J } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
|
|
10
|
-
import { useRouter as
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { _ as
|
|
14
|
-
import { p as
|
|
15
|
-
const
|
|
10
|
+
import { useRouter as te } from "vue-router";
|
|
11
|
+
import { u as ae } from "./index-BMLa0NYv.js";
|
|
12
|
+
import { _ as ne } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
|
13
|
+
import { _ as oe } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-CDjdQf-E.js";
|
|
14
|
+
import { p as le } from "./index-cISc370A.js";
|
|
15
|
+
const se = /* @__PURE__ */ x({
|
|
16
16
|
__name: "InvoiceStatus",
|
|
17
17
|
props: {
|
|
18
18
|
data: {}
|
|
@@ -22,14 +22,19 @@ const re = /* @__PURE__ */ x({
|
|
|
22
22
|
function c() {
|
|
23
23
|
return n.data && n.data !== "" ? "#66BB6A" : "#EF5350";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return n.data && n.data !== "" ? "
|
|
25
|
+
function i() {
|
|
26
|
+
return n.data && n.data !== "" ? "check" : "close";
|
|
27
27
|
}
|
|
28
|
-
return (d, r) =>
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
return (d, r) => {
|
|
29
|
+
const F = k("FmIcon");
|
|
30
|
+
return $(), N(F, {
|
|
31
|
+
name: i(),
|
|
32
|
+
color: c(),
|
|
33
|
+
size: "lg"
|
|
34
|
+
}, null, 8, ["name", "color"]);
|
|
35
|
+
};
|
|
31
36
|
}
|
|
32
|
-
}),
|
|
37
|
+
}), re = /* @__PURE__ */ x({
|
|
33
38
|
__name: "SettlementTable",
|
|
34
39
|
props: {
|
|
35
40
|
data: {
|
|
@@ -43,7 +48,7 @@ const re = /* @__PURE__ */ x({
|
|
|
43
48
|
},
|
|
44
49
|
emits: ["row-click"],
|
|
45
50
|
setup(v, { emit: n }) {
|
|
46
|
-
const { currentCountry: c, currentBusiness:
|
|
51
|
+
const { currentCountry: c, currentBusiness: i, namespace: d } = H(), { t: r } = M(), F = A(!0), _ = v, y = n, o = A(""), t = [
|
|
47
52
|
{
|
|
48
53
|
header: () => r("payment.settlements.table.id"),
|
|
49
54
|
accessorKey: "id",
|
|
@@ -79,9 +84,9 @@ const re = /* @__PURE__ */ x({
|
|
|
79
84
|
{
|
|
80
85
|
header: () => r("payment.settlements.table.invoice_status"),
|
|
81
86
|
accessorKey: "invoiceId",
|
|
82
|
-
cell: ({ cell: u }) => L(
|
|
87
|
+
cell: ({ cell: u }) => L(se, { data: u.getValue() })
|
|
83
88
|
}
|
|
84
|
-
],
|
|
89
|
+
], f = j(() => _.data.map((u) => ({
|
|
85
90
|
id: u._id,
|
|
86
91
|
bank: u.beneficiaryBank.name,
|
|
87
92
|
accountNo: u.beneficiaryBank.accountNumber,
|
|
@@ -90,20 +95,20 @@ const re = /* @__PURE__ */ x({
|
|
|
90
95
|
fee: g(u.totalFee).toFormat("$0.00"),
|
|
91
96
|
payout: g(u.totalPayout).toFormat("$0.00"),
|
|
92
97
|
invoiceId: u.invoiceId
|
|
93
|
-
}))),
|
|
94
|
-
var
|
|
98
|
+
}))), w = () => {
|
|
99
|
+
var R;
|
|
95
100
|
let u = "https://license.feedme.cc/invoices";
|
|
96
101
|
d.value === "dev" && (u = "https://license.feedmedev.cc/invoices");
|
|
97
|
-
const
|
|
98
|
-
businessId: ((
|
|
102
|
+
const h = new URLSearchParams({
|
|
103
|
+
businessId: ((R = i.value) == null ? void 0 : R._id) ?? "",
|
|
99
104
|
country: c.value ?? "MY"
|
|
100
105
|
});
|
|
101
|
-
open(`${u}?${
|
|
106
|
+
open(`${u}?${h.toString()}`, "_blank");
|
|
102
107
|
};
|
|
103
|
-
return (u,
|
|
104
|
-
const
|
|
105
|
-
return
|
|
106
|
-
e(c) === "MY" ?
|
|
108
|
+
return (u, h) => {
|
|
109
|
+
const R = k("FmSnackbar"), l = k("FmTable");
|
|
110
|
+
return $(), B(G, null, [
|
|
111
|
+
e(c) === "MY" ? Q(($(), N(R, {
|
|
107
112
|
key: 0,
|
|
108
113
|
class: "mb-10",
|
|
109
114
|
title: e(r)("payment.settlements.invoice.title"),
|
|
@@ -111,24 +116,24 @@ const re = /* @__PURE__ */ x({
|
|
|
111
116
|
action: e(r)("payment.settlements.invoice.action"),
|
|
112
117
|
variant: "info",
|
|
113
118
|
dismissable: "",
|
|
114
|
-
onOnDismiss:
|
|
115
|
-
onOnAction:
|
|
119
|
+
onOnDismiss: h[0] || (h[0] = (s) => F.value = !1),
|
|
120
|
+
onOnAction: w
|
|
116
121
|
}, null, 8, ["title", "description", "action"])), [
|
|
117
|
-
[
|
|
122
|
+
[W, F.value]
|
|
118
123
|
]) : E("", !0),
|
|
119
124
|
p(l, {
|
|
120
125
|
modelValue: o.value,
|
|
121
|
-
"onUpdate:modelValue":
|
|
122
|
-
"row-data":
|
|
126
|
+
"onUpdate:modelValue": h[1] || (h[1] = (s) => o.value = s),
|
|
127
|
+
"row-data": f.value,
|
|
123
128
|
"shrink-at": !1,
|
|
124
129
|
"column-defs": t,
|
|
125
130
|
loading: _.loading,
|
|
126
|
-
onRowClick:
|
|
131
|
+
onRowClick: h[2] || (h[2] = (s) => y("row-click", _.data.at(s.index)))
|
|
127
132
|
}, null, 8, ["modelValue", "row-data", "loading"])
|
|
128
133
|
], 64);
|
|
129
134
|
};
|
|
130
135
|
}
|
|
131
|
-
}),
|
|
136
|
+
}), ue = /* @__PURE__ */ x({
|
|
132
137
|
__name: "FiuuSettlementTable",
|
|
133
138
|
props: {
|
|
134
139
|
data: {
|
|
@@ -142,11 +147,11 @@ const re = /* @__PURE__ */ x({
|
|
|
142
147
|
},
|
|
143
148
|
emits: ["row-click"],
|
|
144
149
|
setup(v, { emit: n }) {
|
|
145
|
-
const { t: c } =
|
|
150
|
+
const { t: c } = M(), i = v, d = n, r = A(""), F = [
|
|
146
151
|
{
|
|
147
152
|
header: () => c("payment.settlements.table.id"),
|
|
148
153
|
accessorKey: "id",
|
|
149
|
-
cell: ({ cell:
|
|
154
|
+
cell: ({ cell: y }) => L(J, { data: y.getValue() })
|
|
150
155
|
},
|
|
151
156
|
{
|
|
152
157
|
header: () => c("payment.settlements.table.bank"),
|
|
@@ -179,34 +184,35 @@ const re = /* @__PURE__ */ x({
|
|
|
179
184
|
header: () => c("payment.settlements.table.settlement_amount"),
|
|
180
185
|
accessorKey: "payout"
|
|
181
186
|
}
|
|
182
|
-
], _ = j(() =>
|
|
183
|
-
id:
|
|
184
|
-
bank:
|
|
185
|
-
accountNo:
|
|
186
|
-
transactionAt: Y(
|
|
187
|
+
], _ = j(() => i.data.map((y) => ({
|
|
188
|
+
id: y.summary.referenceNo,
|
|
189
|
+
bank: y.summary.bank.name,
|
|
190
|
+
accountNo: y.summary.bank.accountNo,
|
|
191
|
+
transactionAt: Y(y.summary.completedAt).format(
|
|
187
192
|
"YYYY-MM-DD"
|
|
188
193
|
),
|
|
189
|
-
amount: g(
|
|
190
|
-
|
|
191
|
-
|
|
194
|
+
amount: g(y.summary.amount).toFormat("$0.00"),
|
|
195
|
+
refund: g(y.summary.refund).toFormat("$0.00"),
|
|
196
|
+
fee: g(y.summary.commission).toFormat("$0.00"),
|
|
197
|
+
payout: g(y.summary.payout).toFormat("$0.00")
|
|
192
198
|
})));
|
|
193
|
-
return (
|
|
199
|
+
return (y, o) => {
|
|
194
200
|
const t = k("FmTable");
|
|
195
|
-
return
|
|
201
|
+
return $(), N(t, {
|
|
196
202
|
modelValue: r.value,
|
|
197
|
-
"onUpdate:modelValue": o[0] || (o[0] = (
|
|
203
|
+
"onUpdate:modelValue": o[0] || (o[0] = (f) => r.value = f),
|
|
198
204
|
"row-data": _.value,
|
|
199
205
|
"shrink-at": !1,
|
|
200
|
-
"column-defs":
|
|
201
|
-
loading:
|
|
202
|
-
onRowClick: o[1] || (o[1] = (
|
|
206
|
+
"column-defs": F,
|
|
207
|
+
loading: i.loading,
|
|
208
|
+
onRowClick: o[1] || (o[1] = (f) => d("row-click", i.data.at(f.index)))
|
|
203
209
|
}, null, 8, ["modelValue", "row-data", "loading"]);
|
|
204
210
|
};
|
|
205
211
|
}
|
|
206
|
-
}),
|
|
212
|
+
}), me = {
|
|
207
213
|
id: "fiuu-settlement-dialog",
|
|
208
214
|
class: "flex mb-6"
|
|
209
|
-
},
|
|
215
|
+
}, ie = { class: "my-6 w-[240px]" }, ce = /* @__PURE__ */ x({
|
|
210
216
|
__name: "FiuuSettlementTransactions",
|
|
211
217
|
props: {
|
|
212
218
|
settlement: {
|
|
@@ -215,13 +221,13 @@ const re = /* @__PURE__ */ x({
|
|
|
215
221
|
}
|
|
216
222
|
},
|
|
217
223
|
setup(v) {
|
|
218
|
-
const { t: n } =
|
|
224
|
+
const { t: n } = M(), i = A(
|
|
219
225
|
v.settlement.record.map((o) => (Object.assign(o, {
|
|
220
226
|
__localAmount: g(o.amount).toFormat("0.00"),
|
|
221
227
|
__localComission: g(o.commission).toFormat("0.00"),
|
|
222
228
|
__localNetAMount: g(o.netAmount).toFormat("0.00")
|
|
223
229
|
}), o))
|
|
224
|
-
), d = A(
|
|
230
|
+
), d = A(i.value), r = A(""), F = [
|
|
225
231
|
{
|
|
226
232
|
header: () => n("payment.settlements.dialog.fiuu.id"),
|
|
227
233
|
accessorKey: "referenceNo"
|
|
@@ -254,42 +260,42 @@ const re = /* @__PURE__ */ x({
|
|
|
254
260
|
cell: ({ cell: o }) => g(o.getValue()).toFormat("$0.00")
|
|
255
261
|
}
|
|
256
262
|
], _ = A("");
|
|
257
|
-
let
|
|
263
|
+
let y;
|
|
258
264
|
return D(_, async () => {
|
|
259
|
-
|
|
265
|
+
y && clearTimeout(y), y = setTimeout(() => {
|
|
260
266
|
var o = new RegExp(_.value, "i");
|
|
261
|
-
d.value =
|
|
262
|
-
const
|
|
263
|
-
return o.test(
|
|
267
|
+
d.value = i.value.filter((t) => {
|
|
268
|
+
const f = JSON.stringify(t);
|
|
269
|
+
return o.test(f);
|
|
264
270
|
});
|
|
265
271
|
}, 700);
|
|
266
272
|
}), (o, t) => {
|
|
267
|
-
const
|
|
268
|
-
return
|
|
269
|
-
|
|
273
|
+
const f = k("FmCardHeader"), w = k("FmCardSection"), u = k("FmCard"), h = k("FmSearch"), R = k("FmTable");
|
|
274
|
+
return $(), B(G, null, [
|
|
275
|
+
m("div", me, [
|
|
270
276
|
p(u, {
|
|
271
277
|
horizontal: "",
|
|
272
278
|
class: "flex-1 p-6",
|
|
273
279
|
variant: "elevated"
|
|
274
280
|
}, {
|
|
275
281
|
default: S(() => [
|
|
276
|
-
p(
|
|
282
|
+
p(w, { class: "flex flex-col gap-16 justify-between" }, {
|
|
277
283
|
default: S(() => [
|
|
278
|
-
p(
|
|
284
|
+
p(f, {
|
|
279
285
|
class: "p-0",
|
|
280
286
|
title: e(n)("payment.settlements.dialog.info.transaction.title"),
|
|
281
287
|
subtitle: ""
|
|
282
288
|
}, null, 8, ["title"]),
|
|
283
|
-
p(
|
|
289
|
+
p(w, { class: "p-0" }, {
|
|
284
290
|
default: S(() => [
|
|
285
|
-
|
|
286
|
-
T(": " +
|
|
287
|
-
t[2] || (t[2] =
|
|
288
|
-
|
|
289
|
-
T(": " +
|
|
290
|
-
t[3] || (t[3] =
|
|
291
|
-
|
|
292
|
-
T(": " +
|
|
291
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.transaction.for")), 1),
|
|
292
|
+
T(": " + b(v.settlement.summary.group) + " ", 1),
|
|
293
|
+
t[2] || (t[2] = m("br", null, null, -1)),
|
|
294
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.transaction.reference")), 1),
|
|
295
|
+
T(": " + b(v.settlement.summary.referenceNo), 1),
|
|
296
|
+
t[3] || (t[3] = m("br", null, null, -1)),
|
|
297
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.transaction.count")), 1),
|
|
298
|
+
T(": " + b(i.value.length), 1)
|
|
293
299
|
]),
|
|
294
300
|
_: 1
|
|
295
301
|
})
|
|
@@ -305,23 +311,23 @@ const re = /* @__PURE__ */ x({
|
|
|
305
311
|
variant: "elevated"
|
|
306
312
|
}, {
|
|
307
313
|
default: S(() => [
|
|
308
|
-
p(
|
|
314
|
+
p(w, { class: "flex flex-col gap-16 justify-between" }, {
|
|
309
315
|
default: S(() => [
|
|
310
|
-
p(
|
|
316
|
+
p(f, {
|
|
311
317
|
class: "p-0",
|
|
312
318
|
title: e(n)("payment.settlements.dialog.info.bank.title"),
|
|
313
319
|
subtitle: ""
|
|
314
320
|
}, null, 8, ["title"]),
|
|
315
|
-
p(
|
|
321
|
+
p(w, { class: "p-0" }, {
|
|
316
322
|
default: S(() => [
|
|
317
|
-
|
|
318
|
-
T(": " +
|
|
319
|
-
t[4] || (t[4] =
|
|
320
|
-
|
|
321
|
-
T(": " +
|
|
322
|
-
t[5] || (t[5] =
|
|
323
|
-
|
|
324
|
-
T(": " +
|
|
323
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.bank.for")), 1),
|
|
324
|
+
T(": " + b(v.settlement.summary.bank.name), 1),
|
|
325
|
+
t[4] || (t[4] = m("br", null, null, -1)),
|
|
326
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.bank.name")), 1),
|
|
327
|
+
T(": " + b(v.settlement.summary.bank.holderName), 1),
|
|
328
|
+
t[5] || (t[5] = m("br", null, null, -1)),
|
|
329
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.bank.number")), 1),
|
|
330
|
+
T(": " + b(v.settlement.summary.bank.accountNo), 1)
|
|
325
331
|
]),
|
|
326
332
|
_: 1
|
|
327
333
|
})
|
|
@@ -337,25 +343,26 @@ const re = /* @__PURE__ */ x({
|
|
|
337
343
|
variant: "elevated"
|
|
338
344
|
}, {
|
|
339
345
|
default: S(() => [
|
|
340
|
-
p(
|
|
346
|
+
p(w, { class: "flex flex-col gap-16 justify-between" }, {
|
|
341
347
|
default: S(() => [
|
|
342
|
-
p(
|
|
348
|
+
p(f, {
|
|
343
349
|
class: "p-0",
|
|
344
350
|
title: e(n)("payment.settlements.dialog.info.payout.title"),
|
|
345
351
|
subtitle: ""
|
|
346
352
|
}, null, 8, ["title"]),
|
|
347
|
-
p(
|
|
353
|
+
p(w, { class: "p-0" }, {
|
|
348
354
|
default: S(() => [
|
|
349
|
-
|
|
350
|
-
T(": " +
|
|
351
|
-
t[6] || (t[6] =
|
|
352
|
-
|
|
353
|
-
T(": " +
|
|
354
|
-
t[7] || (t[7] =
|
|
355
|
-
|
|
356
|
-
T(": " +
|
|
357
|
-
|
|
358
|
-
|
|
355
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.payout.amount")), 1),
|
|
356
|
+
T(": " + b(e(g)(v.settlement.summary.amount).toFormat("$0.00")), 1),
|
|
357
|
+
t[6] || (t[6] = m("br", null, null, -1)),
|
|
358
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.payout.fee")), 1),
|
|
359
|
+
T(": " + b(e(g)(v.settlement.summary.commission).toFormat("$0.00")), 1),
|
|
360
|
+
t[7] || (t[7] = m("br", null, null, -1)),
|
|
361
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.payout.refund")), 1),
|
|
362
|
+
T(": " + b(e(g)(v.settlement.summary.refund).toFormat("$0.00")) + " ", 1),
|
|
363
|
+
t[8] || (t[8] = m("br", null, null, -1)),
|
|
364
|
+
m("b", null, b(e(n)("payment.settlements.dialog.info.payout.payout")), 1),
|
|
365
|
+
T(": " + b(e(g)(v.settlement.summary.payout).toFormat("$0.00")), 1)
|
|
359
366
|
]),
|
|
360
367
|
_: 1
|
|
361
368
|
})
|
|
@@ -366,27 +373,27 @@ const re = /* @__PURE__ */ x({
|
|
|
366
373
|
_: 1
|
|
367
374
|
})
|
|
368
375
|
]),
|
|
369
|
-
|
|
370
|
-
p(
|
|
376
|
+
m("div", ie, [
|
|
377
|
+
p(h, {
|
|
371
378
|
modelValue: _.value,
|
|
372
379
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => _.value = l),
|
|
373
380
|
placeholder: e(n)("payment.settlements.dialog.search")
|
|
374
381
|
}, null, 8, ["modelValue", "placeholder"])
|
|
375
382
|
]),
|
|
376
|
-
p(
|
|
383
|
+
p(R, {
|
|
377
384
|
modelValue: r.value,
|
|
378
385
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => r.value = l),
|
|
379
386
|
"shrink-at": !1,
|
|
380
387
|
"row-data": d.value,
|
|
381
|
-
"column-defs":
|
|
388
|
+
"column-defs": F
|
|
382
389
|
}, null, 8, ["modelValue", "row-data"])
|
|
383
390
|
], 64);
|
|
384
391
|
};
|
|
385
392
|
}
|
|
386
|
-
}),
|
|
393
|
+
}), de = {
|
|
387
394
|
key: 1,
|
|
388
395
|
class: "inline-flex"
|
|
389
|
-
},
|
|
396
|
+
}, pe = { class: "relative" }, ye = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, fe = /* @__PURE__ */ x({
|
|
390
397
|
__name: "SettlementSelector",
|
|
391
398
|
props: {
|
|
392
399
|
id: {},
|
|
@@ -394,50 +401,50 @@ const re = /* @__PURE__ */ x({
|
|
|
394
401
|
},
|
|
395
402
|
emits: ["update:id", "update:by"],
|
|
396
403
|
setup(v, { emit: n }) {
|
|
397
|
-
const c = v,
|
|
404
|
+
const c = v, i = n, { t: d } = M(), { currentBusiness: r, readRestaurants: F } = H(), { isLoading: _, startAsyncCall: y } = q(!0), o = A([]), t = A(), f = A(""), w = A([]);
|
|
398
405
|
let u;
|
|
399
|
-
D(
|
|
406
|
+
D(f, async () => {
|
|
400
407
|
u && clearTimeout(u), u = setTimeout(() => {
|
|
401
|
-
var l = new RegExp(
|
|
402
|
-
|
|
403
|
-
const
|
|
404
|
-
return l.test(
|
|
408
|
+
var l = new RegExp(f.value, "i");
|
|
409
|
+
w.value = o.value.filter((s) => {
|
|
410
|
+
const V = JSON.stringify(s);
|
|
411
|
+
return l.test(V);
|
|
405
412
|
});
|
|
406
413
|
}, 700);
|
|
407
414
|
}), D(t, () => {
|
|
408
415
|
var l, s;
|
|
409
|
-
|
|
416
|
+
i("update:id", (l = t.value) == null ? void 0 : l.value), i("update:by", (s = t.value) == null ? void 0 : s.by);
|
|
410
417
|
});
|
|
411
|
-
async function
|
|
412
|
-
return
|
|
418
|
+
async function h() {
|
|
419
|
+
return y(async () => {
|
|
413
420
|
try {
|
|
414
|
-
let l = await
|
|
421
|
+
let l = await le.readBusinessPayoutAccounts();
|
|
415
422
|
return l.length === 0 ? void 0 : l;
|
|
416
423
|
} catch {
|
|
417
424
|
return [];
|
|
418
425
|
}
|
|
419
426
|
});
|
|
420
427
|
}
|
|
421
|
-
async function
|
|
428
|
+
async function R() {
|
|
422
429
|
_.value = !0;
|
|
423
430
|
const l = [];
|
|
424
|
-
let s = await
|
|
431
|
+
let s = await h();
|
|
425
432
|
l.push(
|
|
426
433
|
...(s || []).filter((a) => a.store.event !== "ORDERING").map((a) => {
|
|
427
|
-
var
|
|
434
|
+
var K, I, O, C;
|
|
428
435
|
return {
|
|
429
436
|
by: "PAYOUT_ACCOUNT",
|
|
430
437
|
value: a.store.id,
|
|
431
438
|
prefix: d("payment.components.payout_account"),
|
|
432
439
|
type: "Payout Account - " + a.store.event,
|
|
433
|
-
label: ((
|
|
434
|
-
chipLabel: "Marketing: " + (((C = (
|
|
440
|
+
label: ((I = (K = a.ref) == null ? void 0 : K.profile) == null ? void 0 : I.name) ?? a.ref.name,
|
|
441
|
+
chipLabel: "Marketing: " + (((C = (O = a.ref) == null ? void 0 : O.profile) == null ? void 0 : C.name) ?? a.ref.name)
|
|
435
442
|
};
|
|
436
443
|
})
|
|
437
444
|
);
|
|
438
|
-
const
|
|
445
|
+
const V = await F();
|
|
439
446
|
l.push(
|
|
440
|
-
...(
|
|
447
|
+
...(V || []).filter((a) => a.managable).map((a) => ({
|
|
441
448
|
by: "RESTAURANT",
|
|
442
449
|
value: a._id,
|
|
443
450
|
prefix: d("payment.components.restaurant"),
|
|
@@ -445,15 +452,15 @@ const re = /* @__PURE__ */ x({
|
|
|
445
452
|
label: a.profile.name + " (" + (a.profile.code ?? "--") + ")",
|
|
446
453
|
chipLabel: "Restaurant: " + a.profile.name + " (" + (a.profile.code ?? "--") + ")"
|
|
447
454
|
}))
|
|
448
|
-
), o.value = l,
|
|
455
|
+
), o.value = l, w.value = o.value, t.value = l.find((a) => a.value === c.id && a.by === c.by) ?? l[0], _.value = !1;
|
|
449
456
|
}
|
|
450
|
-
return z(
|
|
451
|
-
const
|
|
452
|
-
return e(_) ? (
|
|
457
|
+
return z(R), D(r, R), (l, s) => {
|
|
458
|
+
const V = k("FmCircularProgress"), a = k("FmChip"), K = k("FmSearch"), I = k("FmMenuItem"), O = k("FmMenu");
|
|
459
|
+
return e(_) ? ($(), N(V, {
|
|
453
460
|
key: 0,
|
|
454
461
|
size: "md"
|
|
455
|
-
})) : (
|
|
456
|
-
p(
|
|
462
|
+
})) : ($(), B("div", de, [
|
|
463
|
+
p(O, { "close-on-click": !0 }, {
|
|
457
464
|
"menu-button": S(() => {
|
|
458
465
|
var C;
|
|
459
466
|
return [
|
|
@@ -461,21 +468,21 @@ const re = /* @__PURE__ */ x({
|
|
|
461
468
|
icon: "account_box",
|
|
462
469
|
label: ((C = t.value) == null ? void 0 : C.chipLabel) ?? e(d)("payment.components.select"),
|
|
463
470
|
removable: !!t.value,
|
|
464
|
-
onChipClosed: s[0] || (s[0] = (
|
|
471
|
+
onChipClosed: s[0] || (s[0] = (Fe) => t.value = void 0)
|
|
465
472
|
}, null, 8, ["label", "removable"])
|
|
466
473
|
];
|
|
467
474
|
}),
|
|
468
475
|
default: S(() => [
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
p(
|
|
472
|
-
"model-value":
|
|
473
|
-
"onUpdate:modelValue": s[1] || (s[1] = (C) =>
|
|
476
|
+
m("div", pe, [
|
|
477
|
+
m("div", ye, [
|
|
478
|
+
p(K, {
|
|
479
|
+
"model-value": f.value,
|
|
480
|
+
"onUpdate:modelValue": s[1] || (s[1] = (C) => f.value = C),
|
|
474
481
|
placeholder: e(d)("payment.components.select")
|
|
475
482
|
}, null, 8, ["model-value", "placeholder"])
|
|
476
483
|
]),
|
|
477
|
-
|
|
478
|
-
(
|
|
484
|
+
m("div", null, [
|
|
485
|
+
($(!0), B(G, null, X(w.value, (C) => ($(), N(I, {
|
|
479
486
|
key: C.value,
|
|
480
487
|
label: C.label,
|
|
481
488
|
sublabel: C.type,
|
|
@@ -489,10 +496,10 @@ const re = /* @__PURE__ */ x({
|
|
|
489
496
|
]));
|
|
490
497
|
};
|
|
491
498
|
}
|
|
492
|
-
}),
|
|
499
|
+
}), be = { class: "flex justify-between items-center mb-6" }, ve = { class: "flex space-x-8 items-center" }, _e = { class: "flex space-x-4 self-center" }, ge = { class: "mb-6" }, Me = /* @__PURE__ */ x({
|
|
493
500
|
__name: "Settlement",
|
|
494
501
|
setup(v) {
|
|
495
|
-
const n =
|
|
502
|
+
const n = te(), { tab: c, dateRange: i, id: d, by: r } = ae({
|
|
496
503
|
id: "",
|
|
497
504
|
by: "",
|
|
498
505
|
tab: "feedme",
|
|
@@ -500,66 +507,66 @@ const re = /* @__PURE__ */ x({
|
|
|
500
507
|
startDate: Y().startOf("day").format("YYYY-MM-DD"),
|
|
501
508
|
endDate: Y().endOf("day").format("YYYY-MM-DD")
|
|
502
509
|
}
|
|
503
|
-
}), { t:
|
|
504
|
-
async function
|
|
505
|
-
const l = await
|
|
506
|
-
start:
|
|
507
|
-
end:
|
|
510
|
+
}), { t: F } = M(), { isLoading: _, startAsyncCall: y } = q(!0), o = ee(), t = A([]), f = A([]);
|
|
511
|
+
async function w() {
|
|
512
|
+
const l = await P.readBusinessSettlements({
|
|
513
|
+
start: i.value.startDate,
|
|
514
|
+
end: i.value.endDate,
|
|
508
515
|
event: r.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
|
|
509
516
|
id: d.value
|
|
510
517
|
});
|
|
511
518
|
t.value = l;
|
|
512
519
|
}
|
|
513
520
|
async function u() {
|
|
514
|
-
const l = await
|
|
515
|
-
start:
|
|
516
|
-
end:
|
|
521
|
+
const l = await P.readBusinessRMSSettlements({
|
|
522
|
+
start: i.value.startDate,
|
|
523
|
+
end: i.value.endDate,
|
|
517
524
|
event: r.value === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
|
|
518
525
|
id: d.value
|
|
519
526
|
});
|
|
520
|
-
|
|
527
|
+
f.value = l;
|
|
521
528
|
}
|
|
522
|
-
async function
|
|
529
|
+
async function h() {
|
|
523
530
|
if (!d.value || d.value === "") {
|
|
524
|
-
_.value = !1, t.value = [],
|
|
531
|
+
_.value = !1, t.value = [], f.value = [];
|
|
525
532
|
return;
|
|
526
533
|
}
|
|
527
|
-
await
|
|
534
|
+
await y(async () => Promise.all([w(), u()]));
|
|
528
535
|
}
|
|
529
|
-
async function
|
|
536
|
+
async function R(l) {
|
|
530
537
|
const s = Y(l.summary.completedAt).format("YYYY/MM/DD");
|
|
531
538
|
o.open({
|
|
532
|
-
title: `${
|
|
533
|
-
subTitle: `${
|
|
539
|
+
title: `${F("payment.settlements.dialog.title")} (${l.summary.referenceNo})`,
|
|
540
|
+
subTitle: `${F("payment.settlements.dialog.date")}: ${s}`,
|
|
534
541
|
minWidth: "90%",
|
|
535
542
|
primaryActions: { text: "Close", close: !0 },
|
|
536
|
-
contentComponent:
|
|
543
|
+
contentComponent: ce,
|
|
537
544
|
contentComponentProps: { settlement: l }
|
|
538
545
|
});
|
|
539
546
|
}
|
|
540
|
-
return z(
|
|
541
|
-
const
|
|
542
|
-
return
|
|
543
|
-
title: e(
|
|
544
|
-
description: e(
|
|
547
|
+
return z(h), D([d, i], h), (l, s) => {
|
|
548
|
+
const V = k("FmTabs");
|
|
549
|
+
return $(), N(Z, {
|
|
550
|
+
title: e(F)("payment.settlements.title"),
|
|
551
|
+
description: e(F)("payment.settlements.description"),
|
|
545
552
|
loading: !1
|
|
546
553
|
}, {
|
|
547
554
|
default: S(() => [
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
p(
|
|
555
|
+
m("div", be, [
|
|
556
|
+
m("div", ve, [
|
|
557
|
+
p(fe, {
|
|
551
558
|
id: e(d),
|
|
552
|
-
"onUpdate:id": s[0] || (s[0] = (a) =>
|
|
559
|
+
"onUpdate:id": s[0] || (s[0] = (a) => U(d) ? d.value = a : null),
|
|
553
560
|
by: e(r),
|
|
554
|
-
"onUpdate:by": s[1] || (s[1] = (a) =>
|
|
561
|
+
"onUpdate:by": s[1] || (s[1] = (a) => U(r) ? r.value = a : null)
|
|
555
562
|
}, null, 8, ["id", "by"]),
|
|
556
|
-
p(
|
|
557
|
-
modelValue: e(
|
|
558
|
-
"onUpdate:modelValue": s[2] || (s[2] = (a) =>
|
|
563
|
+
p(oe, {
|
|
564
|
+
modelValue: e(i),
|
|
565
|
+
"onUpdate:modelValue": s[2] || (s[2] = (a) => U(i) ? i.value = a : null)
|
|
559
566
|
}, null, 8, ["modelValue"])
|
|
560
567
|
]),
|
|
561
|
-
|
|
562
|
-
p(
|
|
568
|
+
m("div", _e, [
|
|
569
|
+
p(ne, {
|
|
563
570
|
button: {
|
|
564
571
|
appendIcon: "file_download",
|
|
565
572
|
variant: "primary",
|
|
@@ -567,20 +574,20 @@ const re = /* @__PURE__ */ x({
|
|
|
567
574
|
},
|
|
568
575
|
handler: async () => {
|
|
569
576
|
const a = {
|
|
570
|
-
start: e(
|
|
571
|
-
end: e(
|
|
577
|
+
start: e(i).startDate,
|
|
578
|
+
end: e(i).endDate,
|
|
572
579
|
event: e(r) === "PAYOUT_ACCOUNT" ? "MARKETING" : "ORDERING",
|
|
573
580
|
id: e(d)
|
|
574
581
|
};
|
|
575
|
-
e(c) === "fiuu" ? await e(
|
|
582
|
+
e(c) === "fiuu" ? await e(P).downloadBusinessRMSSettlementReport(a) : await e(P).downloadBusinessSettlementReport(a);
|
|
576
583
|
}
|
|
577
584
|
}, null, 8, ["handler"])
|
|
578
585
|
])
|
|
579
586
|
]),
|
|
580
|
-
|
|
581
|
-
p(
|
|
587
|
+
m("div", ge, [
|
|
588
|
+
p(V, {
|
|
582
589
|
modelValue: e(c),
|
|
583
|
-
"onUpdate:modelValue": s[3] || (s[3] = (a) =>
|
|
590
|
+
"onUpdate:modelValue": s[3] || (s[3] = (a) => U(c) ? c.value = a : null),
|
|
584
591
|
items: [
|
|
585
592
|
{
|
|
586
593
|
label: "FeedMe",
|
|
@@ -595,13 +602,13 @@ const re = /* @__PURE__ */ x({
|
|
|
595
602
|
]
|
|
596
603
|
}, null, 8, ["modelValue"])
|
|
597
604
|
]),
|
|
598
|
-
e(c) === "fiuu" ? (
|
|
605
|
+
e(c) === "fiuu" ? ($(), N(ue, {
|
|
599
606
|
key: 0,
|
|
600
607
|
loading: e(_),
|
|
601
|
-
data:
|
|
602
|
-
onRowClick:
|
|
608
|
+
data: f.value,
|
|
609
|
+
onRowClick: R
|
|
603
610
|
}, null, 8, ["loading", "data"])) : E("", !0),
|
|
604
|
-
e(c) === "feedme" ? (
|
|
611
|
+
e(c) === "feedme" ? ($(), N(re, {
|
|
605
612
|
key: 1,
|
|
606
613
|
loading: e(_),
|
|
607
614
|
data: t.value,
|
|
@@ -619,5 +626,5 @@ const re = /* @__PURE__ */ x({
|
|
|
619
626
|
}
|
|
620
627
|
});
|
|
621
628
|
export {
|
|
622
|
-
|
|
629
|
+
Me as default
|
|
623
630
|
};
|