@feedmepos/mf-payment 0.0.0-beta.34 → 0.0.0-beta.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/dist/{PayoutAccount-D-9hzZyp.js → PayoutAccount-C-FZD8lM.js} +2 -2
  2. package/dist/{PayoutAccount-BF4TdtVz.js → PayoutAccount-mpVH-GBq.js} +1 -1
  3. package/dist/{SettlementTransactions-w0jXLftr.js → SettlementTransactions-Co4ziq3a.js} +1 -1
  4. package/dist/{SettlementTransactions-CdZswF1S.js → SettlementTransactions-yJhT6FR4.js} +1 -1
  5. package/dist/{Terminal-BbIs7aYi.js → Terminal-BDDP5VT8.js} +1 -1
  6. package/dist/TerminalTransaction-CEQ3hedf.js +413 -0
  7. package/dist/{TerminalTransaction-BEyzFREU.js → TerminalTransaction-DCqbXI2q.js} +4 -4
  8. package/dist/{Transaction-Atm-A5eN.js → Transaction-D6mKrbLJ.js} +1 -1
  9. package/dist/Transaction-DvgeNetP.js +405 -0
  10. package/dist/api/terminal-transaction/index.d.ts +3 -1
  11. package/dist/api/transaction/index.d.ts +1 -0
  12. package/dist/app.js +9 -9
  13. package/dist/components/CursorTable/index.vue.d.ts +4 -0
  14. package/dist/{index-RhSxYSBk.js → index-Dlszue3Y.js} +20 -10
  15. package/dist/{index.vue_vue_type_script_setup_true_lang-B7ePQpGr.js → index.vue_vue_type_script_setup_true_lang-B8eGz19R.js} +62 -58
  16. package/dist/model/transaction.d.ts +2 -1
  17. package/dist/package.json +1 -1
  18. package/dist/{payout-account-C1kHqPZb.js → payout-account-C5rDbsPa.js} +175 -175
  19. package/dist/{transaction-BH1Pm92q.js → transaction-DdbmOKZ7.js} +18 -11
  20. package/dist/tsconfig.app.tsbuildinfo +1 -1
  21. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +7 -0
  22. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +6 -2
  23. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +7 -0
  24. package/package.json +1 -1
  25. package/dist/TerminalTransaction-CVcDmLvg.js +0 -274
  26. package/dist/Transaction-DpmCjczz.js +0 -243
@@ -0,0 +1,7 @@
1
+ export type emitAction = "query" | "refund";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ onAction: (event: emitAction) => void;
4
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
5
+ onAction: (event: emitAction) => void;
6
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -10,7 +10,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
10
10
  required: true;
11
11
  };
12
12
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- "row-click": (payment: PortalPaymentTransaction) => any;
13
+ query: (index: number) => any;
14
+ refund: (index: number) => any;
15
+ notify: (index: number) => any;
14
16
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
17
  data: {
16
18
  type: PropType<PortalPaymentTransaction[]>;
@@ -21,6 +23,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
21
23
  required: true;
22
24
  };
23
25
  }>> & Readonly<{
24
- "onRow-click"?: ((payment: PortalPaymentTransaction) => any) | undefined;
26
+ onQuery?: ((index: number) => any) | undefined;
27
+ onRefund?: ((index: number) => any) | undefined;
28
+ onNotify?: ((index: number) => any) | undefined;
25
29
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
30
  export default _default;
@@ -0,0 +1,7 @@
1
+ export type emitAction = "query" | "refund" | "notify";
2
+ declare const _default: import("vue").DefineComponent<{
3
+ onAction: (event: emitAction) => void;
4
+ }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
5
+ onAction: (event: emitAction) => void;
6
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "0.0.0-beta.34",
3
+ "version": "0.0.0-beta.35",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -1,274 +0,0 @@
1
- import { defineComponent as g, openBlock as p, createElementBlock as w, unref as n, createCommentVNode as F, createElementVNode as u, resolveComponent as A, createBlock as R, normalizeClass as k, withCtx as C, toDisplayString as S, ref as V, watch as N, createVNode as d, isRef as h, h as f } from "vue";
2
- import { e as c } from "./index-Cnxt2xmc.js";
3
- import { h as I } from "./moment-h96o7c8I.js";
4
- import { u as D } from "./index-BgnU5ezY.js";
5
- import { _ as K } from "./index.vue_vue_type_script_setup_true_lang-B7ePQpGr.js";
6
- import { _ as $ } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
7
- import "@feedmepos/ui-library";
8
- import { g as M } from "./assets-sX1_K-nt.js";
9
- import { E as L, t as x } from "./index-RhSxYSBk.js";
10
- import { d as B } from "./dinero-CIVmXLL-.js";
11
- import { _ as G } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
13
- import { useRouter as U } from "vue-router";
14
- const Y = { class: "flex" }, W = ["src"], j = ["src"], q = /* @__PURE__ */ g({
15
- __name: "Gateway",
16
- props: {
17
- row: {},
18
- data: {}
19
- },
20
- setup(i) {
21
- return (a, r) => (p(), w("div", Y, [
22
- a.row.original.ecrGateway ? (p(), w("img", {
23
- key: 0,
24
- class: "bg-fm-color-overlay-background rounded-md m-auto border-transparent w-[32px] h-[32px]",
25
- src: n(L)
26
- }, null, 8, W)) : F("", !0),
27
- u("img", {
28
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
29
- src: n(M)(a.row.original.gateway)
30
- }, null, 8, j)
31
- ]));
32
- }
33
- }), z = /* @__PURE__ */ g({
34
- __name: "Status",
35
- props: {
36
- row: {},
37
- data: {}
38
- },
39
- setup(i) {
40
- const a = i;
41
- function r() {
42
- return a.data === c.F_TERMINAL_TRANSACTION_ACTION.Enum.process ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === c.F_TERMINAL_TRANSACTION_ACTION.Enum.failed ? "!w-[16px] !h-[16px] bg-red-400" : a.data === c.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
43
- }
44
- return (s, l) => {
45
- const m = A("FmBadge");
46
- return p(), R(m, {
47
- inline: "",
48
- class: k(r())
49
- }, {
50
- default: C(() => [
51
- u("div", null, S(s.data.toUpperCase()), 1)
52
- ]),
53
- _: 1
54
- }, 8, ["class"]);
55
- };
56
- }
57
- }), Q = /* @__PURE__ */ g({
58
- __name: "RouteCell",
59
- props: {
60
- data: {},
61
- route: {}
62
- },
63
- setup(i) {
64
- const a = i, r = U();
65
- function s() {
66
- r.push(a.route);
67
- }
68
- return (l, m) => (p(), w("div", {
69
- class: "fm-typo-en-link-md-600",
70
- onClick: m[0] || (m[0] = (T) => {
71
- T.stopPropagation(), s();
72
- })
73
- }, S(l.data), 1));
74
- }
75
- }), H = { class: "flex justify-between mb-6 items-start" }, J = { class: "flex space-x-4 items-start" }, X = { class: "flex space-x-4" }, ue = /* @__PURE__ */ g({
76
- __name: "TerminalTransaction",
77
- setup(i) {
78
- const a = V(), { dateRange: r, status: s, searchKey: l } = D({
79
- searchKey: "",
80
- status: [c.F_TERMINAL_TRANSACTION_ACTION.Enum.success],
81
- dateRange: {
82
- startDate: I().startOf("day").toISOString(),
83
- endDate: I().endOf("day").toISOString()
84
- }
85
- });
86
- N([r, s], () => {
87
- var e;
88
- return (e = a.value) == null ? void 0 : e.reset();
89
- });
90
- let m;
91
- N(l, async () => {
92
- m && clearTimeout(m), m = setTimeout(
93
- () => {
94
- var e;
95
- return (e = a.value) == null ? void 0 : e.reset();
96
- },
97
- 700
98
- );
99
- });
100
- const T = [
101
- {
102
- label: "Success",
103
- value: c.F_TERMINAL_TRANSACTION_ACTION.Enum.success
104
- },
105
- {
106
- label: "Refunded",
107
- value: c.F_TERMINAL_TRANSACTION_ACTION.Enum.refunded
108
- },
109
- {
110
- label: "Process",
111
- value: c.F_TERMINAL_TRANSACTION_ACTION.Enum.process
112
- },
113
- {
114
- label: "Failed",
115
- value: c.F_TERMINAL_TRANSACTION_ACTION.Enum.failed
116
- }
117
- ], v = function(e) {
118
- const t = e;
119
- let _ = "-";
120
- return t.details && t.details.amount && (_ = B(t.details.amount).toFormat("$0.00")), {
121
- id: e._id,
122
- refId: e.refId,
123
- owner: e.owner,
124
- terminalId: e.terminalId,
125
- transactionAt: I(e.transactionAt).format("YYYY-MM-DD hh:mm:ss"),
126
- action: e.action,
127
- gateway: e.gateway,
128
- ecrGateway: e.ecrGateway,
129
- amount: _
130
- };
131
- }, E = [
132
- {
133
- accessorKey: "id",
134
- header: () => "Transaction ID",
135
- meta: {
136
- textAlign: "left"
137
- },
138
- cell: ({ cell: e }) => f(P, { data: e.getValue() })
139
- },
140
- {
141
- accessorKey: "terminalId",
142
- header: () => "Terminal ID",
143
- meta: {
144
- textAlign: "left"
145
- },
146
- cell: ({ cell: e }) => {
147
- const t = e.getValue();
148
- return f(Q, {
149
- data: t,
150
- route: {
151
- name: "mf-payment-admin.terminal-setting",
152
- params: { terminalId: t }
153
- }
154
- });
155
- }
156
- },
157
- {
158
- accessorKey: "refId",
159
- header: () => "Reference ID",
160
- meta: {
161
- textAlign: "left"
162
- }
163
- },
164
- {
165
- accessorKey: "gateway",
166
- header: () => "Gateway",
167
- meta: {
168
- textAlign: "center",
169
- maxWidth: "128px"
170
- },
171
- cell: ({ cell: e, row: t }) => f(q, { row: t, data: e.getValue() })
172
- },
173
- {
174
- accessorKey: "action",
175
- header: () => "Status",
176
- meta: {
177
- textAlign: "left",
178
- maxWidth: "128px"
179
- },
180
- cell: ({ cell: e, row: t }) => f(z, { row: t, data: e.getValue() })
181
- },
182
- {
183
- accessorKey: "amount",
184
- header: () => "Sales Amount",
185
- meta: {
186
- textAlign: "center"
187
- }
188
- },
189
- {
190
- accessorKey: "owner",
191
- header: () => "Reference",
192
- meta: {
193
- textAlign: "left"
194
- }
195
- },
196
- {
197
- accessorKey: "transactionAt",
198
- header: () => "Transaction At",
199
- meta: {
200
- textAlign: "left"
201
- }
202
- }
203
- ];
204
- return (e, t) => {
205
- const _ = A("FmSearch"), y = A("FmSelect"), O = A("FmDateRangePicker");
206
- return p(), R($, {
207
- title: "Offline Transactions",
208
- loading: !1
209
- }, {
210
- default: C(() => [
211
- u("div", H, [
212
- u("div", J, [
213
- d(_, {
214
- "model-value": n(l),
215
- "onUpdate:modelValue": t[0] || (t[0] = (o) => h(l) ? l.value = o : null),
216
- class: "mr-8",
217
- label: "Search",
218
- placeholder: "Search Transactions ..."
219
- }, null, 8, ["model-value"]),
220
- d(y, {
221
- modelValue: n(s),
222
- "onUpdate:modelValue": t[1] || (t[1] = (o) => h(s) ? s.value = o : null),
223
- class: "mr-6 w-[300px]",
224
- label: "Status",
225
- "label-mark": "required",
226
- multiselect: "",
227
- items: T
228
- }, null, 8, ["modelValue"]),
229
- d(O, {
230
- modelValue: n(r),
231
- "onUpdate:modelValue": t[2] || (t[2] = (o) => h(r) ? r.value = o : null),
232
- compare: "",
233
- "show-predefined-range": ""
234
- }, null, 8, ["modelValue"])
235
- ]),
236
- u("div", X, [
237
- d(G, {
238
- button: {
239
- appendIcon: "file_download",
240
- variant: "primary",
241
- label: "Export"
242
- },
243
- handler: () => {
244
- var o;
245
- return n(x).downloadTransactions(((o = a.value) == null ? void 0 : o.data()) ?? []);
246
- }
247
- }, null, 8, ["handler"])
248
- ])
249
- ]),
250
- d(K, {
251
- ref_key: "controller",
252
- ref: a,
253
- "column-defs": E,
254
- "rows-defs": v,
255
- paginate: (o, b) => n(x).readTransactions({
256
- status: n(s),
257
- searchKey: n(l),
258
- limit: o,
259
- cursor: b,
260
- start: n(r).startDate,
261
- end: n(r).endDate
262
- }),
263
- onRowClick: () => {
264
- }
265
- }, null, 8, ["paginate"])
266
- ]),
267
- _: 1
268
- });
269
- };
270
- }
271
- });
272
- export {
273
- ue as default
274
- };
@@ -1,243 +0,0 @@
1
- import { defineComponent as p, resolveComponent as T, openBlock as _, createBlock as A, normalizeClass as O, withCtx as I, createElementVNode as y, toDisplayString as R, createElementBlock as b, unref as r, ref as S, h as g, onMounted as V, watch as K, createVNode as h, isRef as N } from "vue";
2
- import { t as E, a as k } from "./transaction-BH1Pm92q.js";
3
- import { c as v, u as C } from "./index-Cnxt2xmc.js";
4
- import "@feedmepos/ui-library";
5
- import "./dinero-CIVmXLL-.js";
6
- import { h as F } from "./moment-h96o7c8I.js";
7
- import { g as P, a as $ } from "./assets-sX1_K-nt.js";
8
- import { _ as L } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-GXPXBEf5.js";
9
- import "@feedmepos/mf-common";
10
- import { u as B } from "./index-BgnU5ezY.js";
11
- import { _ as M } from "./AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js";
12
- import { _ as U } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
- const G = /* @__PURE__ */ p({
14
- __name: "Status",
15
- props: {
16
- row: {},
17
- data: {}
18
- },
19
- setup(i) {
20
- const a = i;
21
- function n() {
22
- return a.data === v.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === v.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === v.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
23
- }
24
- return (c, d) => {
25
- const o = T("FmBadge");
26
- return _(), A(o, {
27
- inline: "",
28
- class: O(n())
29
- }, {
30
- default: I(() => [
31
- y("div", null, R(c.data), 1)
32
- ]),
33
- _: 1
34
- }, 8, ["class"]);
35
- };
36
- }
37
- }), Y = ["src"], q = /* @__PURE__ */ p({
38
- __name: "Gateway",
39
- props: {
40
- row: {},
41
- data: {}
42
- },
43
- setup(i) {
44
- return (a, n) => (_(), b("img", {
45
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
46
- src: r(P)(a.row.original.gateway)
47
- }, null, 8, Y));
48
- }
49
- }), J = ["src"], j = /* @__PURE__ */ p({
50
- __name: "Method",
51
- props: {
52
- row: {},
53
- data: {}
54
- },
55
- setup(i) {
56
- return (a, n) => (_(), b("img", {
57
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
58
- src: r($)(a.row.original.method.issuer)
59
- }, null, 8, J));
60
- }
61
- }), z = /* @__PURE__ */ p({
62
- __name: "TransactionTable",
63
- props: {
64
- data: {
65
- type: Array,
66
- required: !0
67
- },
68
- loading: {
69
- type: Boolean,
70
- required: !0
71
- }
72
- },
73
- emits: ["row-click"],
74
- setup(i, { emit: a }) {
75
- const n = i, c = a, d = S(""), o = [
76
- {
77
- header: () => "Transaction ID",
78
- accessorKey: "id",
79
- cell: ({ cell: t }) => g(L, { data: t.getValue() })
80
- },
81
- {
82
- header: () => "Pay ID",
83
- accessorKey: "payId"
84
- },
85
- {
86
- header: () => "Gateway",
87
- accessorKey: "gateway",
88
- meta: {
89
- textAlign: "center"
90
- },
91
- cell: ({ cell: t, row: e }) => e.original.method ? g(q, { row: e, data: t.getValue() }) : ""
92
- },
93
- {
94
- header: () => "Method",
95
- accessorKey: "method",
96
- meta: {
97
- textAlign: "center"
98
- },
99
- cell: ({ cell: t, row: e }) => e.original.method ? g(j, { row: e, data: t.getValue() }) : ""
100
- },
101
- {
102
- header: () => "Type",
103
- accessorKey: "type",
104
- meta: {
105
- textAlign: "center"
106
- },
107
- cell: ({ row: t }) => {
108
- if (!t.original.method)
109
- return "";
110
- const e = t.original.method.variant;
111
- return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
112
- }
113
- },
114
- {
115
- header: () => "Status",
116
- accessorKey: "status",
117
- cell: ({ cell: t, row: e }) => g(G, { row: e, data: t.getValue() })
118
- },
119
- {
120
- header: () => "Transaction At",
121
- accessorKey: "transactionAt",
122
- meta: {
123
- width: "180px"
124
- }
125
- },
126
- {
127
- header: () => "Sales Amount",
128
- accessorKey: "amount"
129
- },
130
- {
131
- header: () => "Fee",
132
- accessorKey: "fee"
133
- },
134
- {
135
- header: () => "Settlement Amount",
136
- accessorKey: "payout"
137
- }
138
- ];
139
- return (t, e) => {
140
- const w = T("FmTable");
141
- return _(), A(w, {
142
- modelValue: d.value,
143
- "onUpdate:modelValue": e[0] || (e[0] = (l) => d.value = l),
144
- "column-defs": o,
145
- "row-data": n.data,
146
- loading: n.loading,
147
- onRowClick: e[1] || (e[1] = (l) => c("row-click", n.data.at(l.index)))
148
- }, null, 8, ["modelValue", "row-data", "loading"]);
149
- };
150
- }
151
- }), Q = { class: "flex justify-between mb-6 items-center" }, H = { class: "flex space-x-4" }, W = { class: "flex space-x-4" }, de = /* @__PURE__ */ p({
152
- __name: "Transaction",
153
- setup(i) {
154
- const { dateRange: a, searchKey: n } = B({
155
- searchKey: "",
156
- dateRange: {
157
- startDate: F().startOf("day").toISOString(),
158
- endDate: F().endOf("day").toISOString()
159
- }
160
- }), { isLoading: c, startAsyncCall: d } = C(!0), o = S([]), t = S([]);
161
- async function e() {
162
- await d(async () => {
163
- const { startDate: f, endDate: s } = a.value, u = await E.readTransactions({
164
- start: f,
165
- end: s
166
- });
167
- if (o.value = k(u), t.value = o.value, n.value > "") {
168
- var x = new RegExp(n.value, "i");
169
- t.value = o.value.filter((m) => {
170
- const D = JSON.stringify(m);
171
- return x.test(D);
172
- });
173
- }
174
- });
175
- }
176
- function w() {
177
- e();
178
- }
179
- V(w);
180
- let l;
181
- return K(n, async () => {
182
- l && clearTimeout(l), l = setTimeout(() => {
183
- var f = new RegExp(n.value, "i");
184
- t.value = o.value.filter((s) => {
185
- const u = JSON.stringify(s);
186
- return f.test(u);
187
- });
188
- }, 700);
189
- }), (f, s) => {
190
- const u = T("FmSearch"), x = T("FmDateRangePicker");
191
- return _(), A(M, {
192
- title: "Online Transactions",
193
- loading: r(c)
194
- }, {
195
- default: I(() => [
196
- y("div", Q, [
197
- y("div", H, [
198
- h(u, {
199
- "model-value": r(n),
200
- "onUpdate:modelValue": s[0] || (s[0] = (m) => N(n) ? n.value = m : null),
201
- class: "mr-8",
202
- label: "Search",
203
- placeholder: "Search Transactions ..."
204
- }, null, 8, ["model-value"]),
205
- h(x, {
206
- modelValue: r(a),
207
- "onUpdate:modelValue": [
208
- s[1] || (s[1] = (m) => N(a) ? a.value = m : null),
209
- e
210
- ],
211
- compare: "",
212
- "show-predefined-range": ""
213
- }, null, 8, ["modelValue"])
214
- ]),
215
- y("div", W, [
216
- h(U, {
217
- button: {
218
- appendIcon: "file_download",
219
- variant: "primary",
220
- label: "Export"
221
- },
222
- handler: async () => {
223
- await r(E).downloadTransactionReport({
224
- start: r(a).startDate,
225
- end: r(a).endDate
226
- });
227
- }
228
- }, null, 8, ["handler"])
229
- ])
230
- ]),
231
- h(z, {
232
- loading: r(c),
233
- data: t.value
234
- }, null, 8, ["loading", "data"])
235
- ]),
236
- _: 1
237
- }, 8, ["loading"]);
238
- };
239
- }
240
- });
241
- export {
242
- de as default
243
- };