@feedmepos/mf-payment 1.0.28 → 1.1.0-beta.2
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/{PDFViewer-xrBtzrlR.js → PDFViewer-BQfgFexr.js} +2 -1
- package/dist/{PayoutAccount-QybE7meK.js → PayoutAccount-BpMu58oE.js} +5 -5
- package/dist/{PayoutAccount-C53rv89t.js → PayoutAccount-z-gdodfR.js} +361 -360
- package/dist/PayoutAccountSetting-jZJu4WWL.js +723 -0
- package/dist/{Restaurant-B1ed_oVp.js → Restaurant-DfBX5uPS.js} +56 -54
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js +33 -0
- package/dist/{RestaurantSetting-CKG5jn2J.js → RestaurantSetting-KPtRoif-.js} +3 -3
- package/dist/{Settlement-Fh86ozFD.js → Settlement-DbMQAA0_.js} +9 -8
- package/dist/Settlement-smC2PDKA.js +445 -0
- package/dist/{SettlementTransactions-BSF2Jw-L.js → SettlementTransactions-Bs8Il-GO.js} +14 -14
- package/dist/SettlementTransactions-Cw9DnODr.js +291 -0
- package/dist/{Terminal-BUBkiYYw.js → Terminal-HLOGtr0x.js} +323 -342
- package/dist/{TerminalSetting-CfCa-6pK.js → TerminalSetting-DraCszpQ.js} +27 -27
- package/dist/Transaction-B8cHQbbP.js +250 -0
- package/dist/{Transaction-DWzZ31qR.js → Transaction-_CB4VTT9.js} +123 -105
- package/dist/TransactionOld-BhzUSu5h.js +99 -0
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-UcnQKwQ5.js +304 -0
- package/dist/api/payout/index.d.ts +5 -1
- package/dist/api/terminal/index.d.ts +6 -10
- package/dist/api/transaction/index.d.ts +12 -11
- package/dist/{app-DC4HbItX.js → app-DWRPKvx2.js} +1115 -780
- package/dist/app.d.ts +278 -0
- package/dist/app.js +4 -3
- package/dist/{assets-BySnqkmr.js → assets-BImh8bhR.js} +208 -56
- package/dist/components/SourceSelector.vue.d.ts +12 -0
- package/dist/{grafana-b2ht7XmY.js → grafana-CPOGSE20.js} +2 -2
- package/dist/{index-d3nubgyT.js → index-8eCaI4jI.js} +1 -1
- package/dist/{index-iiG_kivD.js → index-CNZFZxie.js} +8163 -8081
- package/dist/{index-DXV5GQaF.js → index-D5DlMaeB.js} +1 -1
- package/dist/index-DtT3I2PI.js +45 -0
- package/dist/index-DuSw-EaU.js +66 -0
- package/dist/{index-CvJ2nft4.js → index-eznEOmAe.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Du3twb8U.js → index.vue_vue_type_script_setup_true_lang-DNXWZt8k.js} +8 -7
- package/dist/model/payout-account.d.ts +1 -1
- package/dist/model/transaction.d.ts +13 -5
- package/dist/package.json +9 -8
- package/dist/{payout-account-DPdwKVTr.js → payout-account-CjDkY3wf.js} +2 -2
- package/dist/router/index.d.ts +1 -0
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +133 -0
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +133 -0
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +8 -0
- package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +10 -23
- package/dist/views/admin/{terminal-transaction/TerminalTransaction.vue.d.ts → payout-account/tabs/gateway/MacauPassGateway.vue.d.ts} +1 -1
- 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/RevenueMonsterGateway.vue.d.ts +4 -4
- package/dist/views/admin/terminal/Terminal.vue.d.ts +4 -1
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +2 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
- package/dist/views/{admin/terminal-transaction → transaction}/cell/Actions.vue.d.ts +3 -3
- package/package.json +9 -8
- package/dist/PayoutAccountSetting-Zhkm_GN8.js +0 -426
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-p4qddIbp.js +0 -33
- package/dist/Settlement-SeGVEdZj.js +0 -444
- package/dist/SettlementTransactions-CHRsIcoh.js +0 -291
- package/dist/TerminalTransaction-DIM7WO_C.js +0 -589
- package/dist/TerminalTransaction-DQZnx7dy.js +0 -333
- package/dist/Transaction-DRYwBnHK.js +0 -247
- package/dist/TransactionOld-Pj412ujb.js +0 -99
- package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-B3FGhKjA.js +0 -159
- package/dist/components/PayoutAccountSelector.vue.d.ts +0 -23
- package/dist/index-BJpE0YhF.js +0 -52
- package/dist/index-BqzuW2qa.js +0 -40
- package/dist/index-Dwv1hbHU.js +0 -77
- package/dist/transaction-CzLoSCVe.js +0 -136
- package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +0 -50
- package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +0 -52
- package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +0 -2
- package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Method.vue.d.ts +0 -7
- package/dist/views/terminal-transaction/cell/Status.vue.d.ts +0 -7
@@ -0,0 +1,445 @@
|
|
1
|
+
import { defineComponent as C, ref as F, computed as A, resolveComponent as k, openBlock as V, createBlock as S, h as M, watch as B, createElementBlock as j, Fragment as q, createElementVNode as l, createVNode as u, withCtx as b, unref as e, toDisplayString as m, createTextVNode as _, onMounted as z, isRef as T, createCommentVNode as Y } from "vue";
|
2
|
+
import { u as E } from "./index-CNZFZxie.js";
|
3
|
+
import { h as K } from "./moment-h96o7c8I.js";
|
4
|
+
import { useI18n as D, useCoreStore as O } from "@feedmepos/mf-common";
|
5
|
+
import { _ as I } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
+
import { s as N } from "./index-D5DlMaeB.js";
|
7
|
+
import { useDialog as L } from "@feedmepos/ui-library";
|
8
|
+
import { d as c } from "./dinero-CIVmXLL-.js";
|
9
|
+
import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
10
|
+
import { useRouter as H } from "vue-router";
|
11
|
+
import { u as J } from "./index-8eCaI4jI.js";
|
12
|
+
import { _ as Q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
|
13
|
+
import { _ as W } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js";
|
14
|
+
import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
15
|
+
const X = /* @__PURE__ */ C({
|
16
|
+
__name: "SettlementTable",
|
17
|
+
props: {
|
18
|
+
data: {
|
19
|
+
type: Array,
|
20
|
+
required: !0
|
21
|
+
},
|
22
|
+
loading: {
|
23
|
+
type: Boolean,
|
24
|
+
required: !0
|
25
|
+
}
|
26
|
+
},
|
27
|
+
emits: ["row-click"],
|
28
|
+
setup(d, { emit: a }) {
|
29
|
+
const { t: o } = D(), s = d, g = a, f = F(""), x = [
|
30
|
+
{
|
31
|
+
header: () => o("settlements.table.id"),
|
32
|
+
accessorKey: "id",
|
33
|
+
cell: ({ cell: t }) => M(P, { data: t.getValue() })
|
34
|
+
},
|
35
|
+
{
|
36
|
+
header: () => o("settlements.table.bank"),
|
37
|
+
accessorKey: "bank"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
header: () => o("settlements.table.account"),
|
41
|
+
accessorKey: "accountNo"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
header: () => o("settlements.table.created_at"),
|
45
|
+
accessorKey: "transactionAt",
|
46
|
+
meta: {
|
47
|
+
width: "180px"
|
48
|
+
}
|
49
|
+
},
|
50
|
+
{
|
51
|
+
header: () => o("settlements.table.sales_amount"),
|
52
|
+
accessorKey: "amount"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
header: () => o("settlements.table.fee"),
|
56
|
+
accessorKey: "fee"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
header: () => o("settlements.table.settlement_amount"),
|
60
|
+
accessorKey: "payout"
|
61
|
+
}
|
62
|
+
], p = A(() => s.data.map((t) => ({
|
63
|
+
id: t._id,
|
64
|
+
bank: t.beneficiaryBank.name,
|
65
|
+
accountNo: t.beneficiaryBank.accountNumber,
|
66
|
+
transactionAt: K(t.createdAt).format("YYYY-MM-DD"),
|
67
|
+
amount: c(t.totalAmount).toFormat("$0.00"),
|
68
|
+
fee: c(t.totalFee).toFormat("$0.00"),
|
69
|
+
payout: c(t.totalPayout).toFormat("$0.00")
|
70
|
+
})));
|
71
|
+
return (t, r) => {
|
72
|
+
const n = k("FmTable");
|
73
|
+
return V(), S(n, {
|
74
|
+
modelValue: f.value,
|
75
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
76
|
+
"row-data": p.value,
|
77
|
+
"shrink-at": !1,
|
78
|
+
"column-defs": x,
|
79
|
+
loading: s.loading,
|
80
|
+
onRowClick: r[1] || (r[1] = (i) => g("row-click", s.data.at(i.index)))
|
81
|
+
}, null, 8, ["modelValue", "row-data", "loading"]);
|
82
|
+
};
|
83
|
+
}
|
84
|
+
}), Z = /* @__PURE__ */ C({
|
85
|
+
__name: "FiuuSettlementTable",
|
86
|
+
props: {
|
87
|
+
data: {
|
88
|
+
type: Array,
|
89
|
+
required: !0
|
90
|
+
},
|
91
|
+
loading: {
|
92
|
+
type: Boolean,
|
93
|
+
required: !0
|
94
|
+
}
|
95
|
+
},
|
96
|
+
emits: ["row-click"],
|
97
|
+
setup(d, { emit: a }) {
|
98
|
+
const { t: o } = D(), s = d, g = a, f = F(""), x = [
|
99
|
+
{
|
100
|
+
header: () => o("settlements.table.id"),
|
101
|
+
accessorKey: "id",
|
102
|
+
cell: ({ cell: t }) => M(P, { data: t.getValue() })
|
103
|
+
},
|
104
|
+
{
|
105
|
+
header: () => o("settlements.table.bank"),
|
106
|
+
accessorKey: "bank"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
header: () => o("settlements.table.account"),
|
110
|
+
accessorKey: "accountNo"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
header: () => o("settlements.table.created_at"),
|
114
|
+
accessorKey: "transactionAt",
|
115
|
+
meta: {
|
116
|
+
width: "180px"
|
117
|
+
}
|
118
|
+
},
|
119
|
+
{
|
120
|
+
header: () => o("settlements.table.sales_amount"),
|
121
|
+
accessorKey: "amount"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
header: () => o("settlements.table.fee"),
|
125
|
+
accessorKey: "fee"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
header: () => o("settlements.table.settlement_amount"),
|
129
|
+
accessorKey: "payout"
|
130
|
+
}
|
131
|
+
], p = A(() => s.data.map((t) => ({
|
132
|
+
id: t.summary.referenceNo,
|
133
|
+
bank: t.summary.bank.name,
|
134
|
+
accountNo: t.summary.bank.accountNo,
|
135
|
+
transactionAt: K(t.summary.completedAt).format("YYYY-MM-DD"),
|
136
|
+
amount: c(t.summary.amount).toFormat("$0.00"),
|
137
|
+
fee: c(t.summary.commission).toFormat("$0.00"),
|
138
|
+
payout: c(t.summary.payout).toFormat("$0.00")
|
139
|
+
})));
|
140
|
+
return (t, r) => {
|
141
|
+
const n = k("FmTable");
|
142
|
+
return V(), S(n, {
|
143
|
+
modelValue: f.value,
|
144
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
145
|
+
"row-data": p.value,
|
146
|
+
"shrink-at": !1,
|
147
|
+
"column-defs": x,
|
148
|
+
loading: s.loading,
|
149
|
+
onRowClick: r[1] || (r[1] = (i) => g("row-click", s.data.at(i.index)))
|
150
|
+
}, null, 8, ["modelValue", "row-data", "loading"]);
|
151
|
+
};
|
152
|
+
}
|
153
|
+
}), ee = {
|
154
|
+
id: "fiuu-settlement-dialog",
|
155
|
+
class: "flex mb-6"
|
156
|
+
}, te = { class: "my-6 w-[240px]" }, ae = /* @__PURE__ */ C({
|
157
|
+
__name: "FiuuSettlementTransactions",
|
158
|
+
props: {
|
159
|
+
settlement: {
|
160
|
+
type: Object,
|
161
|
+
required: !0
|
162
|
+
}
|
163
|
+
},
|
164
|
+
setup(d) {
|
165
|
+
const { t: a } = D(), o = d, s = F(o.settlement.record), g = F(o.settlement.record), f = F(""), x = [
|
166
|
+
{
|
167
|
+
header: () => a("settlements.dialog.fiuu.id"),
|
168
|
+
accessorKey: "referenceNo"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
header: () => a("settlements.dialog.fiuu.type"),
|
172
|
+
accessorKey: "group"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
header: () => a("settlements.dialog.fiuu.transaction_at"),
|
176
|
+
accessorKey: "completedAt",
|
177
|
+
meta: {
|
178
|
+
width: "180px"
|
179
|
+
}
|
180
|
+
},
|
181
|
+
{
|
182
|
+
header: () => a("settlements.dialog.fiuu.sales_amount"),
|
183
|
+
accessorKey: "amount",
|
184
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
185
|
+
},
|
186
|
+
{
|
187
|
+
header: () => a("settlements.dialog.fiuu.fee"),
|
188
|
+
accessorKey: "commission",
|
189
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
190
|
+
},
|
191
|
+
{
|
192
|
+
header: () => a("settlements.dialog.fiuu.settlement_amount"),
|
193
|
+
accessorKey: "netAmount",
|
194
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
195
|
+
}
|
196
|
+
], p = F("");
|
197
|
+
let t;
|
198
|
+
return B(p, async () => {
|
199
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
200
|
+
var r = new RegExp(p.value, "i");
|
201
|
+
g.value = s.value.filter((n) => {
|
202
|
+
const i = JSON.stringify(n);
|
203
|
+
return r.test(i);
|
204
|
+
});
|
205
|
+
}, 700);
|
206
|
+
}), (r, n) => {
|
207
|
+
const i = k("FmCardHeader"), w = k("FmCardSection"), h = k("FmCard"), R = k("FmSearch"), v = k("FmTable");
|
208
|
+
return V(), j(q, null, [
|
209
|
+
l("div", ee, [
|
210
|
+
u(h, {
|
211
|
+
horizontal: "",
|
212
|
+
class: "flex-1 p-6",
|
213
|
+
variant: "elevated"
|
214
|
+
}, {
|
215
|
+
default: b(() => [
|
216
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
217
|
+
default: b(() => [
|
218
|
+
u(i, {
|
219
|
+
class: "p-0",
|
220
|
+
title: e(a)("settlements.dialog.info.transaction.title"),
|
221
|
+
subtitle: ""
|
222
|
+
}, null, 8, ["title"]),
|
223
|
+
u(w, { class: "p-0" }, {
|
224
|
+
default: b(() => [
|
225
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.for")), 1),
|
226
|
+
_(": " + m(d.settlement.summary.group) + " ", 1),
|
227
|
+
n[2] || (n[2] = l("br", null, null, -1)),
|
228
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.reference")), 1),
|
229
|
+
_(": " + m(d.settlement.summary.referenceNo), 1),
|
230
|
+
n[3] || (n[3] = l("br", null, null, -1)),
|
231
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.count")), 1),
|
232
|
+
_(": " + m(s.value.length), 1)
|
233
|
+
]),
|
234
|
+
_: 1
|
235
|
+
})
|
236
|
+
]),
|
237
|
+
_: 1
|
238
|
+
})
|
239
|
+
]),
|
240
|
+
_: 1
|
241
|
+
}),
|
242
|
+
u(h, {
|
243
|
+
horizontal: "",
|
244
|
+
class: "flex-1 p-6 mx-6",
|
245
|
+
variant: "elevated"
|
246
|
+
}, {
|
247
|
+
default: b(() => [
|
248
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
249
|
+
default: b(() => [
|
250
|
+
u(i, {
|
251
|
+
class: "p-0",
|
252
|
+
title: e(a)("settlements.dialog.info.bank.title"),
|
253
|
+
subtitle: ""
|
254
|
+
}, null, 8, ["title"]),
|
255
|
+
u(w, { class: "p-0" }, {
|
256
|
+
default: b(() => [
|
257
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.for")), 1),
|
258
|
+
_(": " + m(d.settlement.summary.bank.name), 1),
|
259
|
+
n[4] || (n[4] = l("br", null, null, -1)),
|
260
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.name")), 1),
|
261
|
+
_(": " + m(d.settlement.summary.bank.holderName), 1),
|
262
|
+
n[5] || (n[5] = l("br", null, null, -1)),
|
263
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.number")), 1),
|
264
|
+
_(": " + m(d.settlement.summary.bank.accountNo), 1)
|
265
|
+
]),
|
266
|
+
_: 1
|
267
|
+
})
|
268
|
+
]),
|
269
|
+
_: 1
|
270
|
+
})
|
271
|
+
]),
|
272
|
+
_: 1
|
273
|
+
}),
|
274
|
+
u(h, {
|
275
|
+
horizontal: "",
|
276
|
+
class: "flex-1 p-6",
|
277
|
+
variant: "elevated"
|
278
|
+
}, {
|
279
|
+
default: b(() => [
|
280
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
281
|
+
default: b(() => [
|
282
|
+
u(i, {
|
283
|
+
class: "p-0",
|
284
|
+
title: e(a)("settlements.dialog.info.payout.title"),
|
285
|
+
subtitle: ""
|
286
|
+
}, null, 8, ["title"]),
|
287
|
+
u(w, { class: "p-0" }, {
|
288
|
+
default: b(() => [
|
289
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.amount")), 1),
|
290
|
+
_(": " + m(e(c)(d.settlement.summary.amount).toFormat("$0.00")), 1),
|
291
|
+
n[6] || (n[6] = l("br", null, null, -1)),
|
292
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.fee")), 1),
|
293
|
+
_(": " + m(e(c)(d.settlement.summary.commission).toFormat("$0.00")), 1),
|
294
|
+
n[7] || (n[7] = l("br", null, null, -1)),
|
295
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.payout")), 1),
|
296
|
+
_(": " + m(e(c)(d.settlement.summary.payout).toFormat("$0.00")), 1)
|
297
|
+
]),
|
298
|
+
_: 1
|
299
|
+
})
|
300
|
+
]),
|
301
|
+
_: 1
|
302
|
+
})
|
303
|
+
]),
|
304
|
+
_: 1
|
305
|
+
})
|
306
|
+
]),
|
307
|
+
l("div", te, [
|
308
|
+
u(R, {
|
309
|
+
modelValue: p.value,
|
310
|
+
"onUpdate:modelValue": n[0] || (n[0] = (y) => p.value = y),
|
311
|
+
placeholder: e(a)("settlements.dialog.search")
|
312
|
+
}, null, 8, ["modelValue", "placeholder"])
|
313
|
+
]),
|
314
|
+
u(v, {
|
315
|
+
modelValue: f.value,
|
316
|
+
"onUpdate:modelValue": n[1] || (n[1] = (y) => f.value = y),
|
317
|
+
"shrink-at": !1,
|
318
|
+
"search-value": p.value,
|
319
|
+
"row-data": g.value,
|
320
|
+
"column-defs": x
|
321
|
+
}, null, 8, ["modelValue", "search-value", "row-data"])
|
322
|
+
], 64);
|
323
|
+
};
|
324
|
+
}
|
325
|
+
}), ne = { class: "flex justify-between items-center mb-6" }, oe = { class: "flex space-x-8 items-center" }, le = { class: "flex space-x-4 self-center" }, se = { class: "mb-6" }, re = { class: "mb-6" }, Fe = /* @__PURE__ */ C({
|
326
|
+
__name: "Settlement",
|
327
|
+
setup(d) {
|
328
|
+
const a = H(), { tab: o, dateRange: s } = J({
|
329
|
+
tab: "feedme",
|
330
|
+
dateRange: {
|
331
|
+
startDate: K().startOf("day").format("YYYY-MM-DD"),
|
332
|
+
endDate: K().endOf("day").format("YYYY-MM-DD")
|
333
|
+
}
|
334
|
+
}), { t: g } = D(), { isLoading: f, startAsyncCall: x } = E(!0), { currentRestaurant: p } = O(), t = L(), r = F([]), n = F([]);
|
335
|
+
async function i() {
|
336
|
+
const v = await N.readRestaurantSettlements(
|
337
|
+
{
|
338
|
+
start: s.value.startDate,
|
339
|
+
end: s.value.endDate
|
340
|
+
}
|
341
|
+
);
|
342
|
+
r.value = v;
|
343
|
+
}
|
344
|
+
async function w() {
|
345
|
+
const v = await N.readRestaurantRMSSettlements(
|
346
|
+
{
|
347
|
+
start: s.value.startDate,
|
348
|
+
end: s.value.endDate
|
349
|
+
}
|
350
|
+
);
|
351
|
+
n.value = v;
|
352
|
+
}
|
353
|
+
async function h() {
|
354
|
+
await x(async () => Promise.all([
|
355
|
+
i(),
|
356
|
+
w()
|
357
|
+
]));
|
358
|
+
}
|
359
|
+
async function R(v) {
|
360
|
+
t.open({
|
361
|
+
title: `Settlement Transactions (${v.summary.referenceNo})`,
|
362
|
+
minWidth: "90%",
|
363
|
+
primaryActions: { text: "Close", close: !0 },
|
364
|
+
contentComponent: ae,
|
365
|
+
contentComponentProps: { settlement: v }
|
366
|
+
});
|
367
|
+
}
|
368
|
+
return z(h), B([p, s], h), (v, y) => {
|
369
|
+
const U = k("FmTabs");
|
370
|
+
return V(), S(I, {
|
371
|
+
title: e(g)("settlements.title"),
|
372
|
+
description: e(g)("settlements.description"),
|
373
|
+
loading: !1
|
374
|
+
}, {
|
375
|
+
default: b(() => [
|
376
|
+
l("div", ne, [
|
377
|
+
l("div", oe, [
|
378
|
+
u(W)
|
379
|
+
]),
|
380
|
+
l("div", le, [
|
381
|
+
u(Q, {
|
382
|
+
button: {
|
383
|
+
appendIcon: "file_download",
|
384
|
+
variant: "primary",
|
385
|
+
label: "Export"
|
386
|
+
},
|
387
|
+
handler: async () => {
|
388
|
+
await e(N).downloadRestaurantSettlementReport({
|
389
|
+
start: e(s).startDate,
|
390
|
+
end: e(s).endDate
|
391
|
+
});
|
392
|
+
}
|
393
|
+
}, null, 8, ["handler"])
|
394
|
+
])
|
395
|
+
]),
|
396
|
+
l("div", se, [
|
397
|
+
u(G, {
|
398
|
+
modelValue: e(s),
|
399
|
+
"onUpdate:modelValue": y[0] || (y[0] = ($) => T(s) ? s.value = $ : null)
|
400
|
+
}, null, 8, ["modelValue"])
|
401
|
+
]),
|
402
|
+
l("div", re, [
|
403
|
+
u(U, {
|
404
|
+
modelValue: e(o),
|
405
|
+
"onUpdate:modelValue": y[1] || (y[1] = ($) => T(o) ? o.value = $ : null),
|
406
|
+
items: [
|
407
|
+
{
|
408
|
+
label: "FeedMe",
|
409
|
+
value: "feedme",
|
410
|
+
icon: "summarize"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
label: "Fiuu (RMS)",
|
414
|
+
value: "fiuu",
|
415
|
+
icon: "overview"
|
416
|
+
}
|
417
|
+
]
|
418
|
+
}, null, 8, ["modelValue"])
|
419
|
+
]),
|
420
|
+
e(o) === "fiuu" ? (V(), S(Z, {
|
421
|
+
key: 0,
|
422
|
+
loading: e(f),
|
423
|
+
data: n.value,
|
424
|
+
onRowClick: R
|
425
|
+
}, null, 8, ["loading", "data"])) : Y("", !0),
|
426
|
+
e(o) === "feedme" ? (V(), S(X, {
|
427
|
+
key: 1,
|
428
|
+
loading: e(f),
|
429
|
+
data: r.value,
|
430
|
+
onRowClick: y[2] || (y[2] = ($) => e(a).push({
|
431
|
+
name: "mf-payment-settlement-transaction",
|
432
|
+
params: {
|
433
|
+
settlementId: $._id
|
434
|
+
}
|
435
|
+
}))
|
436
|
+
}, null, 8, ["loading", "data"])) : Y("", !0)
|
437
|
+
]),
|
438
|
+
_: 1
|
439
|
+
}, 8, ["title", "description"]);
|
440
|
+
};
|
441
|
+
}
|
442
|
+
});
|
443
|
+
export {
|
444
|
+
Fe as default
|
445
|
+
};
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as
|
2
|
-
import { e as E, u as q } from "./index-
|
1
|
+
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as p, ref as x, onMounted as Y, watch as H, createVNode as n, createTextVNode as i, h as N } from "vue";
|
2
|
+
import { e as E, u as q } from "./index-CNZFZxie.js";
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
4
|
-
import { d as
|
5
|
-
import { g as W, a as X } from "./assets-
|
6
|
-
import { t as P, a as Z } from "./transaction-CzLoSCVe.js";
|
4
|
+
import { d as k } from "./dinero-CIVmXLL-.js";
|
5
|
+
import { g as W, a as X, t as P, b as Z } from "./assets-BImh8bhR.js";
|
7
6
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
7
|
import { useRouter as te } from "vue-router";
|
9
|
-
import { s as ae } from "./index-
|
8
|
+
import { s as ae } from "./index-D5DlMaeB.js";
|
10
9
|
import { u as ne } from "./error-K1CakhA9.js";
|
11
10
|
import { w as oe } from "./Modal-DB8M9o1T.js";
|
12
11
|
const re = /* @__PURE__ */ w({
|
@@ -22,7 +21,7 @@ const re = /* @__PURE__ */ w({
|
|
22
21
|
}
|
23
22
|
return (A, _) => {
|
24
23
|
const b = g("FmBadge");
|
25
|
-
return F(),
|
24
|
+
return F(), B(b, {
|
26
25
|
inline: "",
|
27
26
|
class: G(m())
|
28
27
|
}, {
|
@@ -68,14 +67,14 @@ const re = /* @__PURE__ */ w({
|
|
68
67
|
const m = o;
|
69
68
|
return (A, _) => {
|
70
69
|
const b = g("FmButton");
|
71
|
-
return F(),
|
70
|
+
return F(), B(b, {
|
72
71
|
variant: "plain",
|
73
72
|
"prepend-icon": "delete",
|
74
73
|
onClick: _[0] || (_[0] = () => m("delete"))
|
75
74
|
});
|
76
75
|
};
|
77
76
|
}
|
78
|
-
}), de = { class: "flex mb-6" }, ce = { class: "my-6 w-[240px]" },
|
77
|
+
}), de = { class: "flex mb-6" }, ce = { class: "my-6 w-[240px]" }, Fe = /* @__PURE__ */ w({
|
79
78
|
__name: "SettlementTransactions",
|
80
79
|
props: {
|
81
80
|
settlementId: {
|
@@ -195,7 +194,7 @@ const re = /* @__PURE__ */ w({
|
|
195
194
|
}), (a, e) => {
|
196
195
|
var $;
|
197
196
|
const f = g("FmCardHeader"), v = g("FmCardSection"), C = g("FmCard"), j = g("FmSearch"), z = g("FmTable");
|
198
|
-
return F(),
|
197
|
+
return F(), B(ee, {
|
199
198
|
title: `Settlement Transactions (${($ = s.value) == null ? void 0 : $._id})`,
|
200
199
|
loading: p(m),
|
201
200
|
onBack: p(O).back
|
@@ -290,13 +289,13 @@ const re = /* @__PURE__ */ w({
|
|
290
289
|
var r, d, c;
|
291
290
|
return [
|
292
291
|
e[12] || (e[12] = t("b", null, "Amount", -1)),
|
293
|
-
i(": " + u(p(
|
292
|
+
i(": " + u(p(k)((r = s.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
|
294
293
|
e[13] || (e[13] = t("br", null, null, -1)),
|
295
294
|
e[14] || (e[14] = t("b", null, "Fee", -1)),
|
296
|
-
i(": " + u(p(
|
295
|
+
i(": " + u(p(k)((d = s.value) == null ? void 0 : d.totalFee).toFormat("$0.00")), 1),
|
297
296
|
e[15] || (e[15] = t("br", null, null, -1)),
|
298
297
|
e[16] || (e[16] = t("b", null, "Payout", -1)),
|
299
|
-
i(": " + u(p(
|
298
|
+
i(": " + u(p(k)((c = s.value) == null ? void 0 : c.totalPayout).toFormat("$0.00")), 1)
|
300
299
|
];
|
301
300
|
}),
|
302
301
|
_: 1
|
@@ -318,6 +317,7 @@ const re = /* @__PURE__ */ w({
|
|
318
317
|
n(z, {
|
319
318
|
modelValue: K.value,
|
320
319
|
"onUpdate:modelValue": e[1] || (e[1] = (r) => K.value = r),
|
320
|
+
"shrink-at": !1,
|
321
321
|
"search-value": T.value,
|
322
322
|
"row-data": I.value,
|
323
323
|
"column-defs": U,
|
@@ -330,5 +330,5 @@ const re = /* @__PURE__ */ w({
|
|
330
330
|
}
|
331
331
|
});
|
332
332
|
export {
|
333
|
-
|
333
|
+
Fe as default
|
334
334
|
};
|