@feedmepos/mf-payment 1.0.4-beta.2 → 1.0.5-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 (41) hide show
  1. package/dist/{PayoutAccount-CUcmLnpF.js → PayoutAccount-DoPGyjcC.js} +5 -5
  2. package/dist/{PayoutAccount-K-clfaW8.js → PayoutAccount-xeea4ogM.js} +3 -3
  3. package/dist/PayoutAccountSelector.vue_vue_type_script_setup_true_lang-CP-SP877.js +110 -0
  4. package/dist/{PayoutAccountSetting-B1uLo7gi.js → PayoutAccountSetting-CUCmcJak.js} +4 -4
  5. package/dist/{Restaurant-D5L8pG25.js → Restaurant-BnWy9O5t.js} +3 -3
  6. package/dist/{RestaurantSetting-Dx0fPDEn.js → RestaurantSetting-CVGwsyzO.js} +4 -4
  7. package/dist/{Settlement-BGueDfpI.js → Settlement-6voGKEDr.js} +3 -3
  8. package/dist/{Settlement-D0nuXQMV.js → Settlement-DPmYq05c.js} +3 -3
  9. package/dist/{SettlementTransactions-DW8-tVPe.js → SettlementTransactions-Duig1e4U.js} +4 -4
  10. package/dist/{SettlementTransactions-Dsnpidi1.js → SettlementTransactions-JYas_1C-.js} +4 -4
  11. package/dist/{Terminal-BkhqmKjN.js → Terminal-BH0OOd3v.js} +4 -4
  12. package/dist/{TerminalSetting-CrpB7DIV.js → TerminalSetting-ChCIqCIe.js} +3 -3
  13. package/dist/{TerminalTransaction-BGy4ABmm.js → TerminalTransaction-Bjs3Es1x.js} +5 -5
  14. package/dist/{TerminalTransaction-2E_8keFp.js → TerminalTransaction-DyTN8zj5.js} +83 -78
  15. package/dist/Transaction-Ce33Gg4W.js +145 -0
  16. package/dist/{Transaction-izWqPmdQ.js → Transaction-D8WYnO8-.js} +5 -5
  17. package/dist/TransactionOld-CEvlp4U4.js +99 -0
  18. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-_MmkKHxE.js +151 -0
  19. package/dist/api/terminal-transaction/index.d.ts +2 -1
  20. package/dist/api/transaction/index.d.ts +8 -1
  21. package/dist/{app-DPCnmmmg.js → app-Bcuom8z3.js} +471 -458
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-NM2zCyV8.js → assets-Cppbnt4C.js} +1 -1
  24. package/dist/components/PayoutAccountSelector.vue.d.ts +23 -0
  25. package/dist/{index-BWpuTiNy.js → index-BIH2Edx9.js} +1 -1
  26. package/dist/{index-CZv4Ucw7.js → index-BKXt3n4_.js} +1 -1
  27. package/dist/{index-Bl77l-UI.js → index-BqZakjyK.js} +1 -1
  28. package/dist/{index-BpclEVci.js → index-BwVE-Z1U.js} +10 -10
  29. package/dist/{index-DffVv67M.js → index-CmhokViT.js} +1 -1
  30. package/dist/{index-DfC2cb6i.js → index-FEQKf928.js} +1 -1
  31. package/dist/{index-B5pmhl4r.js → index-GoHzCxeA.js} +1 -1
  32. package/dist/{index-BbPdddp2.js → index-Rhk_nXeB.js} +1 -1
  33. package/dist/{index.vue_vue_type_script_setup_true_lang-Bm7Wybo3.js → index.vue_vue_type_script_setup_true_lang-BE90OAD9.js} +1 -1
  34. package/dist/package.json +2 -2
  35. package/dist/{payout-account-DpAKpX1a.js → payout-account-DFHGVtXO.js} +2 -2
  36. package/dist/router/index.d.ts +1 -0
  37. package/dist/{transaction-13xSmWg9.js → transaction-BPkT1OxL.js} +39 -26
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/views/transaction/TransactionOld.vue.d.ts +2 -0
  40. package/package.json +2 -2
  41. package/dist/Transaction-DFqANzFa.js +0 -242
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.0.4-beta.2",
3
+ "version": "1.0.5-beta.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -34,7 +34,7 @@
34
34
  "@feedmepos/core": "^2.6.0",
35
35
  "@feedmepos/mf-common": "^1.8.21",
36
36
  "@feedmepos/payment-entity": "^0.0.13",
37
- "@feedmepos/ui-library": "^1.2.61",
37
+ "@feedmepos/ui-library": "^1.3.5",
38
38
  "axios": "^0.27.2",
39
39
  "buffer": "^6.0.3",
40
40
  "change-case": "^4.1.2",
@@ -1,242 +0,0 @@
1
- import { defineComponent as f, resolveComponent as A, openBlock as h, createBlock as S, normalizeClass as O, withCtx as D, createElementVNode as _, toDisplayString as V, createElementBlock as I, unref as o, ref as N, h as v, onMounted as C, watch as w, createVNode as p, isRef as E } from "vue";
2
- import { t as b, a as M } from "./transaction-13xSmWg9.js";
3
- import { e as x, u as Y } from "./index-Bl77l-UI.js";
4
- import "@feedmepos/ui-library";
5
- import "./dinero-CIVmXLL-.js";
6
- import { h as F } from "./moment-h96o7c8I.js";
7
- import { g as $, a as k } from "./assets-NM2zCyV8.js";
8
- import { useCoreStore as B } from "@feedmepos/mf-common";
9
- import { _ as L } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
10
- import { u as P } from "./index-BWpuTiNy.js";
11
- import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- import { _ as q } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-CY4ttpKj.js";
13
- import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
14
- const j = /* @__PURE__ */ f({
15
- __name: "Status",
16
- props: {
17
- row: {},
18
- data: {}
19
- },
20
- setup(s) {
21
- const a = s;
22
- function t() {
23
- return a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === x.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
24
- }
25
- return (l, c) => {
26
- const d = A("FmBadge");
27
- return h(), S(d, {
28
- inline: "",
29
- class: O(t())
30
- }, {
31
- default: D(() => [
32
- _("div", null, V(l.data), 1)
33
- ]),
34
- _: 1
35
- }, 8, ["class"]);
36
- };
37
- }
38
- }), J = ["src"], z = /* @__PURE__ */ f({
39
- __name: "Gateway",
40
- props: {
41
- row: {},
42
- data: {}
43
- },
44
- setup(s) {
45
- return (a, t) => (h(), I("img", {
46
- class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
47
- src: o($)(a.row.original.gateway)
48
- }, null, 8, J));
49
- }
50
- }), Q = ["src"], H = /* @__PURE__ */ f({
51
- __name: "Method",
52
- props: {
53
- row: {},
54
- data: {}
55
- },
56
- setup(s) {
57
- return (a, t) => (h(), I("img", {
58
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
59
- src: o(k)(a.row.original.method.issuer)
60
- }, null, 8, Q));
61
- }
62
- }), W = /* @__PURE__ */ f({
63
- __name: "TransactionTable",
64
- props: {
65
- data: {
66
- type: Array,
67
- required: !0
68
- },
69
- loading: {
70
- type: Boolean,
71
- required: !0
72
- }
73
- },
74
- emits: ["row-click"],
75
- setup(s, { emit: a }) {
76
- const t = s, l = a, c = N(""), d = [
77
- {
78
- header: () => "Transaction ID",
79
- accessorKey: "id"
80
- },
81
- {
82
- header: () => "Pay ID",
83
- accessorKey: "payId"
84
- },
85
- {
86
- header: () => "Bill Seq No",
87
- accessorKey: "seqNumber"
88
- },
89
- {
90
- header: () => "Gateway",
91
- accessorKey: "gateway",
92
- meta: {
93
- textAlign: "center"
94
- },
95
- cell: ({ cell: n, row: e }) => e.original.method ? v(z, { row: e, data: n.getValue() }) : ""
96
- },
97
- {
98
- header: () => "Method",
99
- accessorKey: "method",
100
- meta: {
101
- textAlign: "center"
102
- },
103
- cell: ({ cell: n, row: e }) => e.original.method ? v(H, { row: e, data: n.getValue() }) : ""
104
- },
105
- {
106
- header: () => "Type",
107
- accessorKey: "type",
108
- meta: {
109
- textAlign: "center"
110
- },
111
- cell: ({ row: n }) => {
112
- if (!n.original.method)
113
- return "";
114
- const e = n.original.method.variant;
115
- return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
116
- }
117
- },
118
- {
119
- header: () => "Status",
120
- accessorKey: "status",
121
- cell: ({ cell: n, row: e }) => v(j, { row: e, data: n.getValue() })
122
- },
123
- {
124
- header: () => "Transaction At",
125
- accessorKey: "transactionAt",
126
- meta: {
127
- width: "180px"
128
- }
129
- },
130
- {
131
- header: () => "Sales Amount",
132
- accessorKey: "amount"
133
- },
134
- {
135
- header: () => "Fee",
136
- accessorKey: "fee"
137
- },
138
- {
139
- header: () => "Settlement Amount",
140
- accessorKey: "payout"
141
- }
142
- ];
143
- return (n, e) => {
144
- const g = A("FmTable");
145
- return h(), S(g, {
146
- modelValue: c.value,
147
- "onUpdate:modelValue": e[0] || (e[0] = (i) => c.value = i),
148
- "column-defs": d,
149
- "row-data": t.data,
150
- loading: t.loading,
151
- onRowClick: e[1] || (e[1] = (i) => l("row-click", t.data.at(i.index)))
152
- }, null, 8, ["modelValue", "row-data", "loading"]);
153
- };
154
- }
155
- }), X = { class: "flex justify-between mb-6 items-center" }, Z = { class: "flex space-x-8" }, ee = { class: "flex space-x-4 self-center" }, ae = { class: "mb-6" }, fe = /* @__PURE__ */ f({
156
- __name: "Transaction",
157
- setup(s) {
158
- const { dateRange: a, searchKey: t } = P({
159
- searchKey: "",
160
- dateRange: {
161
- startDate: F().startOf("day").format("YYYY-MM-DD"),
162
- endDate: F().endOf("day").format("YYYY-MM-DD")
163
- }
164
- }), { isLoading: l, startAsyncCall: c } = Y(!0), { currentRestaurant: d } = B(), n = N([]), e = N([]);
165
- async function g() {
166
- await c(async () => {
167
- const { startDate: y, endDate: r } = a.value, u = await b.readRestaurantTransactions({
168
- start: y,
169
- end: r
170
- });
171
- if (n.value = M(u), e.value = n.value, t.value > "") {
172
- var m = new RegExp(t.value, "i");
173
- e.value = n.value.filter((R) => {
174
- const K = JSON.stringify(R);
175
- return m.test(K);
176
- });
177
- }
178
- });
179
- }
180
- function i() {
181
- g();
182
- }
183
- C(i), w(d, i), w(a, g);
184
- let T;
185
- return w(t, async () => {
186
- T && clearTimeout(T), T = setTimeout(() => {
187
- var y = new RegExp(t.value, "i");
188
- e.value = n.value.filter((r) => {
189
- const u = JSON.stringify(r);
190
- return y.test(u);
191
- });
192
- }, 700);
193
- }), (y, r) => {
194
- const u = A("FmSearch");
195
- return h(), S(L, {
196
- title: "Online Transactions",
197
- description: "Transactions are purchases or payments made over the internet using electronic methods like cards or digital wallets.",
198
- loading: o(l)
199
- }, {
200
- default: D(() => [
201
- _("div", X, [
202
- _("div", Z, [
203
- p(q),
204
- p(u, {
205
- "model-value": o(t),
206
- "onUpdate:modelValue": r[0] || (r[0] = (m) => E(t) ? t.value = m : null),
207
- label: "Search",
208
- placeholder: "Search Transactions ..."
209
- }, null, 8, ["model-value"])
210
- ]),
211
- _("div", ee, [
212
- p(U, {
213
- button: {
214
- appendIcon: "file_download",
215
- variant: "primary",
216
- label: "Export"
217
- },
218
- handler: async () => {
219
- await o(b).downloadRestaurantTransactionReport(n.value);
220
- }
221
- }, null, 8, ["handler"])
222
- ])
223
- ]),
224
- _("div", ae, [
225
- p(G, {
226
- modelValue: o(a),
227
- "onUpdate:modelValue": r[1] || (r[1] = (m) => E(a) ? a.value = m : null)
228
- }, null, 8, ["modelValue"])
229
- ]),
230
- p(W, {
231
- loading: o(l),
232
- data: e.value
233
- }, null, 8, ["loading", "data"])
234
- ]),
235
- _: 1
236
- }, 8, ["loading"]);
237
- };
238
- }
239
- });
240
- export {
241
- fe as default
242
- };