@feedmepos/mf-payment 1.1.7-beta.5 → 1.1.7-beta.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.
Files changed (32) hide show
  1. package/dist/{PayoutAccount-BM5YRYN9.js → PayoutAccount-1d1J3Mbp.js} +5 -5
  2. package/dist/{PayoutAccount-CnxX2N0l.js → PayoutAccount-DTRSgLrZ.js} +3 -3
  3. package/dist/{PayoutAccountSetting-CYEDbNXl.js → PayoutAccountSetting-DM7pMb0z.js} +3 -3
  4. package/dist/{Restaurant-D_iO5C0m.js → Restaurant-DCJsgh4n.js} +4 -4
  5. package/dist/{RestaurantSetting-CuOT140H.js → RestaurantSetting-DSv0mpiy.js} +3 -3
  6. package/dist/{Settlement-CY8315rQ.js → Settlement-BP4npkfA.js} +3 -3
  7. package/dist/Settlement-Cie3vI3n.js +453 -0
  8. package/dist/{SettlementTransactions-Ci8PF1OX.js → SettlementTransactions-DyXb1ZAw.js} +80 -78
  9. package/dist/{SettlementTransactions-ziCXqaiy.js → SettlementTransactions-bRdkx8o5.js} +68 -66
  10. package/dist/{Terminal-BuOfI_zu.js → Terminal-CDBNFPbr.js} +5 -5
  11. package/dist/{TerminalSetting-CTKfzmft.js → TerminalSetting-pAsMFueM.js} +3 -3
  12. package/dist/{Transaction-et-KevEl.js → Transaction-DqvPuX4W.js} +5 -5
  13. package/dist/{Transaction-Bpa0eDNG.js → Transaction-W8sRSgGc.js} +6 -6
  14. package/dist/{TransactionOld-y5-lkWbc.js → TransactionOld-BOQ6tBqe.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BBtUxiMq.js → TransactionTable.vue_vue_type_script_setup_true_lang-CtjjM2gz.js} +3 -3
  16. package/dist/{app-Bz1GxrfP.js → app-CYglC23K.js} +282 -280
  17. package/dist/app.d.ts +2 -0
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-CFu52OGc.js → assets-G15yB8yl.js} +1 -1
  20. package/dist/{grafana-DR0vcbv7.js → grafana-ByGWVKk3.js} +1 -1
  21. package/dist/{index-C1IEirFI.js → index-BKTCJbdW.js} +1 -1
  22. package/dist/{index-BJF9lPV4.js → index-C13NEGId.js} +1 -1
  23. package/dist/{index-DY-CMDz7.js → index-CtqzAx42.js} +1 -1
  24. package/dist/{index-CM1aljm7.js → index-DXrfVp2-.js} +1 -1
  25. package/dist/{index-CAiA-B0B.js → index-DjrHDthD.js} +1455 -1455
  26. package/dist/{index-DbaQ_-s2.js → index-WON1wez7.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-B0E1G00H.js → index.vue_vue_type_script_setup_true_lang-BL_w1CP7.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-wPSONvk-.js → payout-account-Bk7qyKXt.js} +2 -2
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/dist/Settlement-6HiVcu0l.js +0 -445
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.1.7-beta.5",
3
+ "version": "1.1.7-beta.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,445 +0,0 @@
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-CAiA-B0B.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-DY-CMDz7.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-CM1aljm7.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
- };