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