@feedmepos/mf-payment 0.0.0-beta.50 → 0.0.0-beta.51

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-DABJBnNC.js → PayoutAccount-45KBDFz5.js} +5 -5
  2. package/dist/{PayoutAccount-DGydj2Rp.js → PayoutAccount-B1-2p330.js} +3 -3
  3. package/dist/{PayoutAccountSetting-CTHMEsjH.js → PayoutAccountSetting-CbhtXeh7.js} +3 -3
  4. package/dist/Settlement-DlaJyp58.js +195 -0
  5. package/dist/{Settlement-DsjIRuJW.js → Settlement-tSkIAVNP.js} +3 -3
  6. package/dist/{SettlementTransactions-D1pkLrWn.js → SettlementTransactions-BJT_BbHY.js} +4 -4
  7. package/dist/{SettlementTransactions-DZnWOOzM.js → SettlementTransactions-CEZC6XZG.js} +4 -4
  8. package/dist/{Terminal-ClGqWjhf.js → Terminal-BQl4r6HC.js} +4 -4
  9. package/dist/{TerminalSetting-BixN506L.js → TerminalSetting-C44QLn1Z.js} +3 -3
  10. package/dist/{TerminalTransaction-CjYedRYO.js → TerminalTransaction-CABZWS4H.js} +5 -5
  11. package/dist/{TerminalTransaction-Cpovc2fH.js → TerminalTransaction-CKSvq9rD.js} +5 -5
  12. package/dist/{Transaction-bUy85OPi.js → Transaction-C6RSlZ9y.js} +4 -4
  13. package/dist/{Transaction-LC2KAr1G.js → Transaction-xV5p9Mhz.js} +4 -4
  14. package/dist/api/index.d.ts +2 -0
  15. package/dist/api/settlement/index.d.ts +5 -0
  16. package/dist/{app-BSw8aQiR.js → app-_E4ykcC3.js} +203 -203
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-B9l5jWbK.js → assets-BrVemDyU.js} +1 -1
  19. package/dist/{index-C5AZUa6M.js → index-Bz1J_qmc.js} +1 -1
  20. package/dist/index-C2w3JCtA.js +127 -0
  21. package/dist/{index-DuCv6dOI.js → index-C5-Iy39F.js} +1 -1
  22. package/dist/{index-BlGpdOEP.js → index-CJy1IRg3.js} +1 -1
  23. package/dist/{index-9ujJCGqe.js → index-C_lvRbae.js} +29 -14
  24. package/dist/{index-DYz8XIrE.js → index-CdN6mR2m.js} +1 -1
  25. package/dist/{index.vue_vue_type_script_setup_true_lang-DcbfY6SQ.js → index.vue_vue_type_script_setup_true_lang-DBooU_VF.js} +1 -1
  26. package/dist/package.json +1 -1
  27. package/dist/{payout-account-DDKFUaz5.js → payout-account-DA4gfB3w.js} +2 -2
  28. package/dist/{transaction-D5lnozQA.js → transaction-BBM__3mR.js} +1 -1
  29. package/dist/tsconfig.app.tsbuildinfo +1 -1
  30. package/package.json +1 -1
  31. package/dist/Settlement-G6Ac690_.js +0 -144
  32. package/dist/index-C074LfUa.js +0 -51
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "0.0.0-beta.50",
3
+ "version": "0.0.0-beta.51",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,144 +0,0 @@
1
- import { defineComponent as w, ref as h, computed as S, resolveComponent as v, openBlock as x, createBlock as D, h as A, watch as k, onMounted as F, unref as o, withCtx as R, createElementVNode as u, createVNode as p, isRef as V } from "vue";
2
- import { u as b } from "./index-9ujJCGqe.js";
3
- import { h as _ } from "./moment-h96o7c8I.js";
4
- import { s as g } from "./index-C074LfUa.js";
5
- import "@feedmepos/ui-library";
6
- import { d as f } from "./dinero-CIVmXLL-.js";
7
- import { _ as C } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
8
- import { useRouter as $ } from "vue-router";
9
- import { _ as I } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
10
- import { u as K } from "./index-C5AZUa6M.js";
11
- import { _ as P } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- const B = /* @__PURE__ */ w({
13
- __name: "SettlementTable",
14
- props: {
15
- data: {
16
- type: Array,
17
- required: !0
18
- },
19
- loading: {
20
- type: Boolean,
21
- required: !0
22
- }
23
- },
24
- emits: ["row-click"],
25
- setup(y, { emit: l }) {
26
- const r = y, d = l, m = h(""), e = [
27
- {
28
- header: () => "Settlement ID",
29
- accessorKey: "id",
30
- cell: ({ cell: t }) => A(C, { data: t.getValue() })
31
- },
32
- {
33
- header: () => "Created At",
34
- accessorKey: "transactionAt",
35
- meta: {
36
- width: "180px"
37
- }
38
- },
39
- {
40
- header: () => "Sales Amount",
41
- accessorKey: "amount"
42
- },
43
- {
44
- header: () => "Fee",
45
- accessorKey: "fee"
46
- },
47
- {
48
- header: () => "Settlement Amount",
49
- accessorKey: "payout"
50
- }
51
- ], i = S(() => r.data.map((t) => ({
52
- id: t._id,
53
- transactionAt: _(t.createdAt).format("YYYY-MM-DD"),
54
- amount: f(t.totalAmount).toFormat("$0.00"),
55
- fee: f(t.totalFee).toFormat("$0.00"),
56
- payout: f(t.totalPayout).toFormat("$0.00")
57
- })));
58
- return (t, a) => {
59
- const n = v("FmTable");
60
- return x(), D(n, {
61
- modelValue: m.value,
62
- "onUpdate:modelValue": a[0] || (a[0] = (s) => m.value = s),
63
- "row-data": i.value,
64
- "column-defs": e,
65
- loading: r.loading,
66
- onRowClick: a[1] || (a[1] = (s) => d("row-click", r.data.at(s.index)))
67
- }, null, 8, ["modelValue", "row-data", "loading"]);
68
- };
69
- }
70
- }), O = { class: "flex justify-between items-center mb-6" }, Y = { class: "flex space-x-4 items-center" }, L = { class: "flex space-x-4 items-center" }, J = /* @__PURE__ */ w({
71
- __name: "Settlement",
72
- setup(y) {
73
- const { isLoading: l, startAsyncCall: r } = b(!0), d = h([]), m = $(), { dateRange: e } = K({
74
- dateRange: {
75
- startDate: _().startOf("day").toISOString(),
76
- endDate: _().endOf("day").toISOString()
77
- }
78
- });
79
- k(e, i);
80
- async function i() {
81
- await r(async () => {
82
- const a = await g.readByDate(
83
- {
84
- start: e.value.startDate,
85
- end: e.value.endDate
86
- }
87
- );
88
- d.value = a;
89
- });
90
- }
91
- function t() {
92
- i();
93
- }
94
- return F(t), (a, n) => {
95
- const s = v("FmDateRangePicker");
96
- return x(), D(I, {
97
- title: "Settlements",
98
- loading: o(l)
99
- }, {
100
- default: R(() => [
101
- u("div", O, [
102
- u("div", Y, [
103
- p(s, {
104
- modelValue: o(e),
105
- "onUpdate:modelValue": n[0] || (n[0] = (c) => V(e) ? e.value = c : null),
106
- compare: "",
107
- "show-predefined-range": ""
108
- }, null, 8, ["modelValue"])
109
- ]),
110
- u("div", L, [
111
- p(P, {
112
- button: {
113
- appendIcon: "file_download",
114
- variant: "primary",
115
- label: "Export"
116
- },
117
- handler: async () => {
118
- await o(g).downloadSettlementReport({
119
- start: o(e).startDate,
120
- end: o(e).endDate
121
- });
122
- }
123
- }, null, 8, ["handler"])
124
- ])
125
- ]),
126
- p(B, {
127
- loading: o(l),
128
- data: d.value,
129
- onRowClick: n[1] || (n[1] = (c) => o(m).push({
130
- name: "mf-payment-admin.settlement-transaction",
131
- params: {
132
- settlementId: c._id
133
- }
134
- }))
135
- }, null, 8, ["loading", "data"])
136
- ]),
137
- _: 1
138
- }, 8, ["loading"]);
139
- };
140
- }
141
- });
142
- export {
143
- J as default
144
- };
@@ -1,51 +0,0 @@
1
- import { g as e, b as a, i as n, r as s } from "./index-9ujJCGqe.js";
2
- const m = {
3
- async updateRemark(t) {
4
- return e(
5
- await a().put("/settlements/remark", t)
6
- );
7
- },
8
- async readByDate(t) {
9
- return e(
10
- await a().get("/settlements", {
11
- params: t
12
- })
13
- );
14
- },
15
- async downloadSettlementReport(t) {
16
- return n(
17
- await a().get("/settlements/audit/v2", {
18
- params: t
19
- }),
20
- `settlement-report-${t.start}-${t.end}.xlsx`
21
- );
22
- },
23
- async downloadRestaurantSettlementReport(t) {
24
- return n(
25
- await s().get("/settlements/report", {
26
- params: t
27
- }),
28
- `settlement-report-${t.start}-${t.end}.xlsx`
29
- );
30
- },
31
- async readById(t) {
32
- return e(
33
- await a().get(`/settlements/${t}`)
34
- );
35
- },
36
- async readRestaurantSettlementById(t) {
37
- return e(
38
- await s().get(`/settlements/${t}`)
39
- );
40
- },
41
- async readRestaurantSettlements(t) {
42
- return e(
43
- await s().get("/settlements", {
44
- params: t
45
- })
46
- );
47
- }
48
- };
49
- export {
50
- m as s
51
- };