@feedmepos/mf-payment 1.0.2 → 1.0.3-beta.1

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 (58) hide show
  1. package/dist/{PayoutAccount-suhh8XGz.js → PayoutAccount-BpTmAq7L.js} +5 -5
  2. package/dist/{PayoutAccount-B1dg1KvL.js → PayoutAccount-DPDYDztu.js} +3 -3
  3. package/dist/{PayoutAccountSetting-C1yeSNv8.js → PayoutAccountSetting-Dqj5Ay8_.js} +4 -4
  4. package/dist/Restaurant-BouKFsha.js +302 -0
  5. package/dist/{RestaurantSetting-CWZAKz1A.js → RestaurantSetting-BeXpe5M9.js} +4 -4
  6. package/dist/{Settlement-BKwie9R8.js → Settlement-BZevkUVD.js} +3 -3
  7. package/dist/{Settlement-ByPXBNx1.js → Settlement-C5S8SCT8.js} +3 -3
  8. package/dist/{SettlementTransactions-DcZmwZKJ.js → SettlementTransactions-CNFm-E92.js} +4 -4
  9. package/dist/{SettlementTransactions-BxMV868W.js → SettlementTransactions-D2Z-i4tv.js} +4 -4
  10. package/dist/Terminal-D7EMm_un.js +404 -0
  11. package/dist/{TerminalSetting-qklmRz3H.js → TerminalSetting-BgxObmZ4.js} +3 -3
  12. package/dist/{TerminalTransaction-YXcGJ2ne.js → TerminalTransaction-Buf0yMu-.js} +184 -154
  13. package/dist/{TerminalTransaction-64Bn6vh0.js → TerminalTransaction-DUAhQ3VJ.js} +19 -18
  14. package/dist/{Transaction-CZkNzH-m.js → Transaction-DJ62jUdZ.js} +4 -4
  15. package/dist/Transaction-y9wPMvLS.js +408 -0
  16. package/dist/api/transaction/index.d.ts +3 -0
  17. package/dist/{app-8rjSGM7c.js → app-D9URbI68.js} +252 -252
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-DjRoCcqv.js → assets-C_LulpgD.js} +1 -1
  20. package/dist/grafana-CqkYm_ru.js +46 -0
  21. package/dist/helpers/grafana.d.ts +7 -0
  22. package/dist/{index-CWGSYCJG.js → index-B6KIJrFV.js} +1 -1
  23. package/dist/{index-BWFqxSU3.js → index-B74aXBpn.js} +1 -1
  24. package/dist/{index-Dj_LwPBy.js → index-C1AMSmO9.js} +8295 -8151
  25. package/dist/{index-BEFlDEyV.js → index-CKD2hEEa.js} +1 -1
  26. package/dist/{index-DFePh4ct.js → index-CuQ0G8FE.js} +1 -1
  27. package/dist/{index-Bp_58SiC.js → index-CvqYcrBo.js} +1 -1
  28. package/dist/{index-CKyh0nlu.js → index-DBnMiisv.js} +1 -1
  29. package/dist/{index-BerQZMQW.js → index-DzBM1rDP.js} +1 -1
  30. package/dist/{index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js → index.vue_vue_type_script_setup_true_lang-BmM0EooD.js} +1 -1
  31. package/dist/model/payout-account.d.ts +1 -1
  32. package/dist/model/transaction.d.ts +1 -0
  33. package/dist/package.json +2 -2
  34. package/dist/{payout-account-D5aZKGxy.js → payout-account-CvnI-60K.js} +2 -2
  35. package/dist/stores/payoutAccount.d.ts +6 -6
  36. package/dist/{transaction-CIYqsLqc.js → transaction-DNuE-yMH.js} +23 -16
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +6 -6
  39. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
  40. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +6 -6
  41. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +6 -6
  42. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
  43. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
  44. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  45. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  46. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
  47. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  48. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  49. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  50. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
  51. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  52. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +12 -12
  53. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  54. package/package.json +2 -2
  55. package/dist/Restaurant-B02jty0J.js +0 -262
  56. package/dist/Terminal-DX8v8WpM.js +0 -386
  57. package/dist/Transaction-CvrsRuuz.js +0 -403
  58. package/dist/views/admin/transaction/TransactionTable.vue.d.ts +0 -30
@@ -1,403 +0,0 @@
1
- import { defineComponent as g, resolveComponent as _, openBlock as y, createBlock as D, normalizeClass as Y, withCtx as x, createElementVNode as v, toDisplayString as $, createElementBlock as A, unref as d, createVNode as f, Fragment as L, renderList as B, ref as E, h as T, onMounted as U, watch as I, isRef as M } from "vue";
2
- import { t as b, a as G, b as k } from "./transaction-CIYqsLqc.js";
3
- import { e as N, u as J } from "./index-Dj_LwPBy.js";
4
- import { useSnackbar as Q, useDialog as j } from "@feedmepos/ui-library";
5
- import "./dinero-CIVmXLL-.js";
6
- import { h as R } from "./moment-h96o7c8I.js";
7
- import { g as z, a as H } from "./assets-DjRoCcqv.js";
8
- import { _ as W } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
9
- import { u as X } from "./index-BerQZMQW.js";
10
- import { _ as Z } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
11
- import { _ as ee } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
12
- import { w as q } from "./Modal-DB8M9o1T.js";
13
- import { u as S } from "./error-K1CakhA9.js";
14
- import { _ as te } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
15
- const ae = /* @__PURE__ */ g({
16
- __name: "Status",
17
- props: {
18
- row: {},
19
- data: {}
20
- },
21
- setup(m) {
22
- const a = m;
23
- function o() {
24
- return a.data === N.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : a.data === N.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : a.data === N.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
25
- }
26
- return (u, p) => {
27
- const s = _("FmBadge");
28
- return y(), D(s, {
29
- inline: "",
30
- class: Y(o())
31
- }, {
32
- default: x(() => [
33
- v("div", null, $(u.data), 1)
34
- ]),
35
- _: 1
36
- }, 8, ["class"]);
37
- };
38
- }
39
- }), ne = ["src"], oe = /* @__PURE__ */ g({
40
- __name: "Gateway",
41
- props: {
42
- row: {},
43
- data: {}
44
- },
45
- setup(m) {
46
- return (a, o) => (y(), A("img", {
47
- class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
48
- src: d(z)(a.row.original.gateway)
49
- }, null, 8, ne));
50
- }
51
- }), re = ["src"], se = /* @__PURE__ */ g({
52
- __name: "Method",
53
- props: {
54
- row: {},
55
- data: {}
56
- },
57
- setup(m) {
58
- return (a, o) => (y(), A("img", {
59
- class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
60
- src: d(H)(a.row.original.method.issuer)
61
- }, null, 8, re));
62
- }
63
- }), ie = /* @__PURE__ */ g({
64
- __name: "Actions",
65
- props: {
66
- onAction: { type: Function }
67
- },
68
- setup(m) {
69
- const a = [
70
- {
71
- label: "Query",
72
- sublabel: "Perform transaction status inquriy",
73
- icon: "question_answer",
74
- action: "query"
75
- },
76
- {
77
- label: "Refund",
78
- sublabel: "Perform transaction refund request",
79
- icon: "request_page",
80
- action: "refund"
81
- },
82
- {
83
- label: "Notify",
84
- sublabel: "Perform webhook notification for transaction",
85
- icon: "webhook",
86
- action: "notify"
87
- }
88
- ];
89
- return (o, u) => {
90
- const p = _("FmIcon"), s = _("FmMenuItem"), r = _("FmMenu");
91
- return y(), A("div", {
92
- onClick: u[0] || (u[0] = (e) => {
93
- e.stopPropagation();
94
- })
95
- }, [
96
- f(r, null, {
97
- "menu-button": x(() => [
98
- f(p, { name: "settings" })
99
- ]),
100
- default: x(() => [
101
- (y(), A(L, null, B(a, (e) => f(s, {
102
- selectable: !0,
103
- key: e.label,
104
- sublabel: e.sublabel,
105
- label: e.label,
106
- icon: e.icon,
107
- onclick: () => o.onAction(e.action)
108
- }, null, 8, ["sublabel", "label", "icon", "onclick"])), 64))
109
- ]),
110
- _: 1
111
- })
112
- ]);
113
- };
114
- }
115
- }), ce = /* @__PURE__ */ g({
116
- __name: "TransactionTable",
117
- props: {
118
- data: {
119
- type: Array,
120
- required: !0
121
- },
122
- loading: {
123
- type: Boolean,
124
- required: !0
125
- }
126
- },
127
- emits: ["query", "refund", "notify"],
128
- setup(m, { emit: a }) {
129
- const o = m, u = a, p = E(""), s = [
130
- {
131
- header: () => "Transaction ID",
132
- accessorKey: "id",
133
- cell: ({ cell: r }) => T(W, { data: r.getValue() })
134
- },
135
- {
136
- header: () => "Pay ID",
137
- accessorKey: "payId"
138
- },
139
- {
140
- header: () => "Gateway",
141
- accessorKey: "gateway",
142
- meta: {
143
- textAlign: "center"
144
- },
145
- cell: ({ cell: r, row: e }) => e.original.method ? T(oe, { row: e, data: r.getValue() }) : ""
146
- },
147
- {
148
- header: () => "Method",
149
- accessorKey: "method",
150
- meta: {
151
- textAlign: "center"
152
- },
153
- cell: ({ cell: r, row: e }) => e.original.method ? T(se, { row: e, data: r.getValue() }) : ""
154
- },
155
- {
156
- header: () => "Type",
157
- accessorKey: "type",
158
- meta: {
159
- textAlign: "center"
160
- },
161
- cell: ({ row: r }) => {
162
- if (!r.original.method)
163
- return "";
164
- const e = r.original.method.variant;
165
- return e.includes("_ONLINE") ? "ONLINE" : e.includes("_OFFLINE") ? "OFFLINE" : e;
166
- }
167
- },
168
- {
169
- header: () => "Status",
170
- accessorKey: "status",
171
- cell: ({ cell: r, row: e }) => T(ae, { row: e, data: r.getValue() })
172
- },
173
- {
174
- header: () => "Transaction At",
175
- accessorKey: "transactionAt",
176
- meta: {
177
- width: "180px"
178
- }
179
- },
180
- {
181
- header: () => "Sales Amount",
182
- accessorKey: "amount"
183
- },
184
- {
185
- header: () => "Fee",
186
- accessorKey: "fee"
187
- },
188
- {
189
- header: () => "Settlement Amount",
190
- accessorKey: "payout"
191
- },
192
- {
193
- header: () => "Actions",
194
- accessorKey: "actions",
195
- cell: ({ row: r }) => T(ie, {
196
- onAction: (e) => u(e, r.index)
197
- })
198
- }
199
- ];
200
- return (r, e) => {
201
- const l = _("FmTable");
202
- return y(), D(l, {
203
- modelValue: p.value,
204
- "onUpdate:modelValue": e[0] || (e[0] = (w) => p.value = w),
205
- "column-defs": s,
206
- "row-data": o.data,
207
- loading: o.loading
208
- }, null, 8, ["modelValue", "row-data", "loading"]);
209
- };
210
- }
211
- }), le = { class: "flex justify-between mb-6 items-center" }, ue = { class: "flex space-x-4" }, de = { class: "flex space-x-4 self-center" }, me = { class: "mb-6" }, Ne = /* @__PURE__ */ g({
212
- __name: "Transaction",
213
- setup(m) {
214
- const { dateRange: a, searchKey: o } = X({
215
- searchKey: "",
216
- dateRange: {
217
- startDate: R().startOf("day").format("YYYY-MM-DD"),
218
- endDate: R().endOf("day").format("YYYY-MM-DD")
219
- }
220
- }), { isLoading: u, startAsyncCall: p } = J(!0), s = Q(), r = j(), e = E([]), l = E([]);
221
- async function w() {
222
- await p(async () => {
223
- const { startDate: i, endDate: t } = a.value, n = await b.readTransactions({
224
- start: i,
225
- end: t
226
- });
227
- if (e.value = G(n), l.value = e.value, o.value > "") {
228
- var c = new RegExp(o.value, "i");
229
- l.value = e.value.filter((h) => {
230
- const C = JSON.stringify(h);
231
- return c.test(C);
232
- });
233
- }
234
- });
235
- }
236
- function K() {
237
- w();
238
- }
239
- U(K), I(a, w);
240
- let F;
241
- I(o, async () => {
242
- F && clearTimeout(F), F = setTimeout(() => {
243
- var i = new RegExp(o.value, "i");
244
- l.value = e.value.filter((t) => {
245
- const n = JSON.stringify(t);
246
- return i.test(n);
247
- });
248
- }, 700);
249
- }), I(e, async () => {
250
- let i = e.value;
251
- if (o.value) {
252
- var t = new RegExp(o.value, "i");
253
- i = e.value.filter((n) => {
254
- const c = JSON.stringify(n);
255
- return t.test(c);
256
- });
257
- }
258
- l.value = i;
259
- }, { deep: !0 });
260
- async function O(i) {
261
- const t = l.value.at(i);
262
- if (!t) {
263
- s.open({
264
- type: "error",
265
- title: "Something went wrong",
266
- message: "Fail to find transactions from the displayed transactions."
267
- });
268
- return;
269
- }
270
- try {
271
- const n = await b.refetchTransaction({ transactionId: t.id }), c = e.value.findIndex((h) => h.id === n._id);
272
- e.value[c] = k(n), s.open({
273
- type: "success",
274
- title: "Transaction queried and updated successfully."
275
- });
276
- } catch (n) {
277
- s.open({
278
- type: "error",
279
- title: "Fail to query transaction.",
280
- message: S(n)
281
- });
282
- }
283
- }
284
- async function V(i) {
285
- const t = l.value.at(i);
286
- if (!t) {
287
- s.open({
288
- type: "error",
289
- title: "Something went wrong",
290
- message: "Fail to find transactions from the displayed transactions."
291
- });
292
- return;
293
- }
294
- q(
295
- r,
296
- "Refund Transaction",
297
- "Are you sure to refund transaction? This action cannot be revert!",
298
- async () => {
299
- try {
300
- const n = await b.refundTransaction({
301
- transactionId: t.id,
302
- reason: "portal transaction refund",
303
- amount: t.fdoAmount
304
- }), c = e.value.findIndex((h) => h.id === n._id);
305
- e.value[c] = k(n), s.open({
306
- type: "success",
307
- title: "Transaction refund request initiated."
308
- });
309
- } catch (n) {
310
- s.open({
311
- type: "error",
312
- title: "Fail to request refund transaction.",
313
- message: S(n)
314
- });
315
- }
316
- }
317
- );
318
- }
319
- async function P(i) {
320
- const t = l.value.at(i);
321
- if (!t) {
322
- s.open({
323
- type: "error",
324
- title: "Something went wrong",
325
- message: "Fail to find transactions from the displayed transactions."
326
- });
327
- return;
328
- }
329
- q(
330
- r,
331
- "Notify Transaction",
332
- "Are you sure to perform notify transaction?",
333
- async () => {
334
- try {
335
- await b.renotifyTransaction(t.id), s.open({
336
- type: "success",
337
- title: "Transaction notify successfully."
338
- });
339
- } catch (n) {
340
- s.open({
341
- type: "error",
342
- title: "Fail to notify transaction.",
343
- message: S(n)
344
- });
345
- }
346
- }
347
- );
348
- }
349
- return (i, t) => {
350
- const n = _("FmSearch");
351
- return y(), D(Z, {
352
- title: "Online Transactions",
353
- loading: d(u)
354
- }, {
355
- default: x(() => [
356
- v("div", le, [
357
- v("div", ue, [
358
- f(n, {
359
- "model-value": d(o),
360
- "onUpdate:modelValue": t[0] || (t[0] = (c) => M(o) ? o.value = c : null),
361
- class: "mr-8",
362
- label: "Search",
363
- placeholder: "Search Transactions ..."
364
- }, null, 8, ["model-value"])
365
- ]),
366
- v("div", de, [
367
- f(ee, {
368
- button: {
369
- appendIcon: "file_download",
370
- variant: "primary",
371
- label: "Export"
372
- },
373
- handler: async () => {
374
- await d(b).downloadTransactionReport({
375
- start: d(a).startDate,
376
- end: d(a).endDate
377
- });
378
- }
379
- }, null, 8, ["handler"])
380
- ])
381
- ]),
382
- v("div", me, [
383
- f(te, {
384
- modelValue: d(a),
385
- "onUpdate:modelValue": t[1] || (t[1] = (c) => M(a) ? a.value = c : null)
386
- }, null, 8, ["modelValue"])
387
- ]),
388
- f(ce, {
389
- loading: d(u),
390
- data: l.value,
391
- onQuery: O,
392
- onRefund: V,
393
- onNotify: P
394
- }, null, 8, ["loading", "data"])
395
- ]),
396
- _: 1
397
- }, 8, ["loading"]);
398
- };
399
- }
400
- });
401
- export {
402
- Ne as default
403
- };
@@ -1,30 +0,0 @@
1
- import { type PropType } from 'vue';
2
- import { type PortalPaymentTransaction } from '@/model/transaction';
3
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- data: {
5
- type: PropType<PortalPaymentTransaction[]>;
6
- required: true;
7
- };
8
- loading: {
9
- type: BooleanConstructor;
10
- required: true;
11
- };
12
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
13
- query: (index: number) => any;
14
- refund: (index: number) => any;
15
- notify: (index: number) => any;
16
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
- data: {
18
- type: PropType<PortalPaymentTransaction[]>;
19
- required: true;
20
- };
21
- loading: {
22
- type: BooleanConstructor;
23
- required: true;
24
- };
25
- }>> & Readonly<{
26
- onQuery?: ((index: number) => any) | undefined;
27
- onRefund?: ((index: number) => any) | undefined;
28
- onNotify?: ((index: number) => any) | undefined;
29
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
30
- export default _default;