@feedmepos/mf-payment 1.0.28 → 1.1.0-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 (80) hide show
  1. package/dist/{PDFViewer-xrBtzrlR.js → PDFViewer-BQfgFexr.js} +2 -1
  2. package/dist/{PayoutAccount-QybE7meK.js → PayoutAccount-BHJpjUqD.js} +5 -5
  3. package/dist/{PayoutAccount-C53rv89t.js → PayoutAccount-DCkf_1yL.js} +5 -4
  4. package/dist/PayoutAccountSetting-Bk-g7ucZ.js +723 -0
  5. package/dist/{Restaurant-B1ed_oVp.js → Restaurant-D2qq84VL.js} +56 -54
  6. package/dist/{RestaurantSetting-CKG5jn2J.js → RestaurantSetting-DAtrtX6S.js} +3 -3
  7. package/dist/{Settlement-SeGVEdZj.js → Settlement-BVIsszEJ.js} +37 -34
  8. package/dist/{Settlement-Fh86ozFD.js → Settlement-Cx1tc5wt.js} +9 -8
  9. package/dist/{SettlementTransactions-BSF2Jw-L.js → SettlementTransactions-C82DyYlO.js} +14 -14
  10. package/dist/{SettlementTransactions-CHRsIcoh.js → SettlementTransactions-CeN4SRWa.js} +39 -39
  11. package/dist/{Terminal-BUBkiYYw.js → Terminal-Az2k8E6F.js} +323 -342
  12. package/dist/{TerminalSetting-CfCa-6pK.js → TerminalSetting-C-xlLYXa.js} +27 -27
  13. package/dist/Transaction-CC8hc8_r.js +250 -0
  14. package/dist/{Transaction-DWzZ31qR.js → Transaction-Y_mc0yQv.js} +123 -105
  15. package/dist/{TransactionOld-Pj412ujb.js → TransactionOld-BxhI-wwm.js} +7 -7
  16. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.js +304 -0
  17. package/dist/api/payout/index.d.ts +5 -1
  18. package/dist/api/terminal/index.d.ts +6 -10
  19. package/dist/api/transaction/index.d.ts +12 -11
  20. package/dist/{app-DC4HbItX.js → app-OBp4HaEY.js} +853 -791
  21. package/dist/app.js +1 -1
  22. package/dist/{assets-BySnqkmr.js → assets-pLBp82yE.js} +208 -56
  23. package/dist/components/SourceSelector.vue.d.ts +12 -0
  24. package/dist/{grafana-b2ht7XmY.js → grafana-hv7inD36.js} +2 -2
  25. package/dist/{index-d3nubgyT.js → index-1xF00w89.js} +1 -1
  26. package/dist/{index-CvJ2nft4.js → index-CFYD8Dv4.js} +1 -1
  27. package/dist/index-Cqq3p9PP.js +66 -0
  28. package/dist/{index-DXV5GQaF.js → index-DD5mEX0D.js} +1 -1
  29. package/dist/{index-iiG_kivD.js → index-DGKxdJVj.js} +8163 -8081
  30. package/dist/index-oM4Z9ffu.js +45 -0
  31. package/dist/{index.vue_vue_type_script_setup_true_lang-Du3twb8U.js → index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js} +8 -7
  32. package/dist/model/payout-account.d.ts +1 -1
  33. package/dist/model/transaction.d.ts +13 -5
  34. package/dist/package.json +2 -2
  35. package/dist/{payout-account-DPdwKVTr.js → payout-account-DPaS3dIs.js} +2 -2
  36. package/dist/router/index.d.ts +1 -0
  37. package/dist/stores/payoutAccount.d.ts +4 -4
  38. package/dist/tsconfig.app.tsbuildinfo +1 -1
  39. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  40. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +133 -0
  41. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +133 -0
  42. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  43. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  44. package/dist/views/admin/payout-account/tabs/cell/Actions.vue.d.ts +8 -0
  45. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +10 -23
  46. package/dist/views/admin/{terminal-transaction/TerminalTransaction.vue.d.ts → payout-account/tabs/gateway/MacauPassGateway.vue.d.ts} +1 -1
  47. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  48. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
  49. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  50. package/dist/views/admin/terminal/Terminal.vue.d.ts +4 -1
  51. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +2 -2
  52. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +2 -2
  53. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +2 -2
  54. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
  55. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +2 -2
  56. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +2 -0
  57. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  58. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
  59. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
  60. package/dist/views/{admin/terminal-transaction → transaction}/cell/Actions.vue.d.ts +3 -3
  61. package/package.json +2 -2
  62. package/dist/PayoutAccountSetting-Zhkm_GN8.js +0 -426
  63. package/dist/TerminalTransaction-DIM7WO_C.js +0 -589
  64. package/dist/TerminalTransaction-DQZnx7dy.js +0 -333
  65. package/dist/Transaction-DRYwBnHK.js +0 -247
  66. package/dist/TransactionTable.vue_vue_type_script_setup_true_lang-B3FGhKjA.js +0 -159
  67. package/dist/components/PayoutAccountSelector.vue.d.ts +0 -23
  68. package/dist/index-BJpE0YhF.js +0 -52
  69. package/dist/index-BqzuW2qa.js +0 -40
  70. package/dist/index-Dwv1hbHU.js +0 -77
  71. package/dist/transaction-CzLoSCVe.js +0 -136
  72. package/dist/views/admin/payout-account/tabs/gateway/GhlGateway.vue.d.ts +0 -50
  73. package/dist/views/admin/payout-account/tabs/gateway/RevenueMonsterGateway.vue.d.ts +0 -52
  74. package/dist/views/admin/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
  75. package/dist/views/admin/terminal-transaction/cell/Method.vue.d.ts +0 -7
  76. package/dist/views/admin/terminal-transaction/cell/Status.vue.d.ts +0 -7
  77. package/dist/views/terminal-transaction/TerminalTransaction.vue.d.ts +0 -2
  78. package/dist/views/terminal-transaction/cell/Gateway.vue.d.ts +0 -7
  79. package/dist/views/terminal-transaction/cell/Method.vue.d.ts +0 -7
  80. package/dist/views/terminal-transaction/cell/Status.vue.d.ts +0 -7
@@ -1,426 +0,0 @@
1
- import { defineComponent as S, resolveComponent as i, openBlock as v, createElementBlock as C, Fragment as B, createElementVNode as o, createVNode as u, withCtx as b, createTextVNode as g, toDisplayString as F, createCommentVNode as V, createBlock as P, ref as w, watch as R, computed as E, unref as k, isRef as M, h as T, onMounted as D, resolveDynamicComponent as _, normalizeProps as q, mergeProps as z } from "vue";
2
- import { p as $ } from "./index-BqzuW2qa.js";
3
- import { u as H } from "./index-iiG_kivD.js";
4
- import { _ as K } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
- import { useRouter as O } from "vue-router";
6
- import { u as h } from "./index-d3nubgyT.js";
7
- import { P as U } from "./PDFViewer-xrBtzrlR.js";
8
- import { useSnackbar as G } from "@feedmepos/ui-library";
9
- import { u as L } from "./error-K1CakhA9.js";
10
- const Q = { class: "flex gap-16 mb-6" }, W = ["src"], J = /* @__PURE__ */ S({
11
- __name: "Information",
12
- props: {
13
- payoutAccount: {
14
- type: Object,
15
- required: !0
16
- }
17
- },
18
- setup(e) {
19
- return (c, t) => {
20
- const d = i("FmCardHeader"), s = i("FmCardSection"), m = i("FmCard");
21
- return v(), C(B, null, [
22
- o("div", Q, [
23
- u(m, {
24
- horizontal: "",
25
- class: "flex-1 p-6",
26
- variant: "elevated"
27
- }, {
28
- default: b(() => [
29
- u(s, { class: "flex flex-col gap-16 justify-between" }, {
30
- default: b(() => [
31
- u(d, {
32
- class: "p-0",
33
- title: "Account Info",
34
- subtitle: ""
35
- }),
36
- u(s, { class: "p-0" }, {
37
- default: b(() => {
38
- var r, y, f, a, n;
39
- return [
40
- t[0] || (t[0] = o("b", null, "For", -1)),
41
- g(": " + F((y = (r = e.payoutAccount) == null ? void 0 : r.store) == null ? void 0 : y.event) + " ", 1),
42
- t[1] || (t[1] = o("br", null, null, -1)),
43
- t[2] || (t[2] = o("b", null, "Reference", -1)),
44
- g(": " + F((a = (f = e.payoutAccount) == null ? void 0 : f.store) == null ? void 0 : a.id), 1),
45
- t[3] || (t[3] = o("br", null, null, -1)),
46
- t[4] || (t[4] = o("b", null, "Business", -1)),
47
- g(": " + F((n = e.payoutAccount) == null ? void 0 : n.businessId), 1),
48
- t[5] || (t[5] = o("br", null, null, -1))
49
- ];
50
- }),
51
- _: 1
52
- })
53
- ]),
54
- _: 1
55
- })
56
- ]),
57
- _: 1
58
- }),
59
- u(m, {
60
- horizontal: "",
61
- class: "flex-1 p-6",
62
- variant: "elevated"
63
- }, {
64
- default: b(() => [
65
- u(s, { class: "flex flex-col gap-16 justify-between" }, {
66
- default: b(() => [
67
- u(d, {
68
- class: "p-0",
69
- title: "Key Person",
70
- subtitle: ""
71
- }),
72
- u(s, { class: "p-0" }, {
73
- default: b(() => {
74
- var r, y, f, a, n, l, p, A;
75
- return [
76
- t[6] || (t[6] = o("b", null, "Email", -1)),
77
- g(": " + F((f = (y = (r = e.payoutAccount) == null ? void 0 : r.store) == null ? void 0 : y.keyPerson) == null ? void 0 : f.email) + " ", 1),
78
- t[7] || (t[7] = o("br", null, null, -1)),
79
- t[8] || (t[8] = o("b", null, "Name", -1)),
80
- g(": " + F((l = (n = (a = e.payoutAccount) == null ? void 0 : a.store) == null ? void 0 : n.keyPerson) == null ? void 0 : l.name), 1),
81
- t[9] || (t[9] = o("br", null, null, -1)),
82
- t[10] || (t[10] = o("b", null, "Phone", -1)),
83
- g(": " + F((A = (p = e.payoutAccount) == null ? void 0 : p.store.keyPerson) == null ? void 0 : A.phone), 1),
84
- t[11] || (t[11] = o("br", null, null, -1))
85
- ];
86
- }),
87
- _: 1
88
- })
89
- ]),
90
- _: 1
91
- })
92
- ]),
93
- _: 1
94
- })
95
- ]),
96
- t[12] || (t[12] = o("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Exterior Photo", -1)),
97
- e.payoutAccount.store.exteriorPhoto ? (v(), C("img", {
98
- key: 0,
99
- src: e.payoutAccount.store.exteriorPhoto
100
- }, null, 8, W)) : V("", !0)
101
- ], 64);
102
- };
103
- }
104
- }), X = { class: "flex gap-16" }, Y = { class: "flex-1" }, Z = { class: "flex-1" }, tt = /* @__PURE__ */ S({
105
- __name: "Settlement",
106
- props: {
107
- payoutAccount: {
108
- type: Object,
109
- required: !0
110
- }
111
- },
112
- setup(e) {
113
- return (c, t) => {
114
- const d = i("FmCardHeader"), s = i("FmCardSection"), m = i("FmCard");
115
- return v(), C(B, null, [
116
- u(m, {
117
- horizontal: "",
118
- class: "flex-1 p-6 mx-6 mb-6",
119
- variant: "elevated"
120
- }, {
121
- default: b(() => [
122
- u(s, { class: "flex flex-col gap-16 justify-between" }, {
123
- default: b(() => [
124
- u(d, {
125
- class: "p-0",
126
- title: "Bank Info",
127
- subtitle: ""
128
- }),
129
- u(s, { class: "p-0" }, {
130
- default: b(() => {
131
- var r, y, f, a, n, l;
132
- return [
133
- t[0] || (t[0] = o("b", null, "Bank", -1)),
134
- g(": " + F((y = (r = e.payoutAccount) == null ? void 0 : r.store.bank) == null ? void 0 : y.name), 1),
135
- t[1] || (t[1] = o("br", null, null, -1)),
136
- t[2] || (t[2] = o("b", null, "Name", -1)),
137
- g(": " + F((a = (f = e.payoutAccount) == null ? void 0 : f.store.bank) == null ? void 0 : a.holderName), 1),
138
- t[3] || (t[3] = o("br", null, null, -1)),
139
- t[4] || (t[4] = o("b", null, "Number", -1)),
140
- g(": " + F((l = (n = e.payoutAccount) == null ? void 0 : n.store.bank) == null ? void 0 : l.accountNumber), 1)
141
- ];
142
- }),
143
- _: 1
144
- })
145
- ]),
146
- _: 1
147
- })
148
- ]),
149
- _: 1
150
- }),
151
- o("div", X, [
152
- o("div", Y, [
153
- t[5] || (t[5] = o("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "SSM", -1)),
154
- e.payoutAccount.store.ssm ? (v(), P(U, {
155
- key: 0,
156
- pdf: e.payoutAccount.store.ssm,
157
- "disable-text-layer": !0,
158
- "disable-annotation-layer": !0
159
- }, null, 8, ["pdf"])) : V("", !0)
160
- ]),
161
- o("div", Z, [
162
- t[6] || (t[6] = o("p", { class: "fm-typo-en-body-lg-600 mb-6" }, "Bank Statement", -1)),
163
- e.payoutAccount.store.bankStatement ? (v(), P(U, {
164
- key: 0,
165
- pdf: e.payoutAccount.store.bankStatement,
166
- "disable-text-layer": !0,
167
- "disable-annotation-layer": !0
168
- }, null, 8, ["pdf"])) : V("", !0)
169
- ])
170
- ])
171
- ], 64);
172
- };
173
- }
174
- }), et = /* @__PURE__ */ S({
175
- __name: "RateInput",
176
- props: {
177
- data: {},
178
- onChange: { type: Function }
179
- },
180
- setup(e) {
181
- const c = e, t = w(c.data.toString());
182
- return R(t, (d) => {
183
- c.onChange(parseFloat(d));
184
- }), (d, s) => {
185
- const m = i("FmTextField");
186
- return v(), P(m, {
187
- inputmode: "decimal",
188
- modelValue: t.value,
189
- "onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r)
190
- }, {
191
- append: b(() => s[1] || (s[1] = [
192
- g("%")
193
- ])),
194
- _: 1
195
- }, 8, ["modelValue"]);
196
- };
197
- }
198
- }), nt = /* @__PURE__ */ S({
199
- __name: "TPlusInput",
200
- props: {
201
- data: {},
202
- onChange: { type: Function }
203
- },
204
- setup(e) {
205
- const c = e, t = w(c.data.toString());
206
- return R(t, (d) => {
207
- c.onChange(parseInt(d));
208
- }), (d, s) => {
209
- const m = i("FmTextField");
210
- return v(), P(m, {
211
- inputmode: "numeric",
212
- modelValue: t.value,
213
- "onUpdate:modelValue": s[0] || (s[0] = (r) => t.value = r)
214
- }, null, 8, ["modelValue"]);
215
- };
216
- }
217
- }), ot = { class: "flex gap-16 mt-6" }, at = { class: "flex-1" }, lt = { class: "flex-1" }, ut = { class: "my-6 w-full flex justify-end" }, st = { class: "w-[320px]" }, rt = /* @__PURE__ */ S({
218
- __name: "PaymentStatus",
219
- props: {
220
- onUpdate: {
221
- type: Function,
222
- required: !0
223
- },
224
- payoutAccount: {
225
- type: Object,
226
- required: !0
227
- }
228
- },
229
- setup(e) {
230
- const c = e, t = w(!1), d = G(), s = async (a) => {
231
- try {
232
- t.value = !0, await c.onUpdate(a), d.open({
233
- type: "success",
234
- title: "Payout account update succesfully"
235
- });
236
- } catch (n) {
237
- d.open({
238
- type: "error",
239
- title: "Error occurs when updating payout account",
240
- message: L(n)
241
- });
242
- } finally {
243
- t.value = !1;
244
- }
245
- }, { search: m } = h({
246
- search: ""
247
- }), r = E(() => {
248
- const { ssm: a, bank: n, bankStatement: l } = c.payoutAccount.store;
249
- return a && n && n.name && n.accountNumber && n.holderName && l;
250
- }), y = w(""), f = [
251
- {
252
- header: () => "Payment Method",
253
- accessorKey: "issuer",
254
- cell: (a) => `${a.row.original.issuer} (${a.row.original.variant})`
255
- },
256
- {
257
- header: () => "Rate",
258
- accessorKey: "rate",
259
- cell: ({ row: a }) => {
260
- let n = 0;
261
- return a.original.rate && (n = a.original.rate.amount / Math.pow(10, a.original.rate.precision)), T(et, {
262
- data: n,
263
- onChange: (l) => {
264
- const p = c.payoutAccount.methods.at(a.index);
265
- p.rate || (p.rate = {
266
- amount: 0,
267
- precision: 4
268
- }), p.rate.amount = l * Math.pow(10, p.rate.precision);
269
- }
270
- });
271
- }
272
- },
273
- {
274
- header: () => "T plus",
275
- accessorKey: "tPlus",
276
- cell: ({ row: a }) => T(nt, {
277
- data: a.original.tPlus ?? 0,
278
- onChange: (n) => {
279
- const l = c.payoutAccount.methods.at(a.index);
280
- l.tPlus = n;
281
- }
282
- })
283
- }
284
- ];
285
- return (a, n) => {
286
- const l = i("FmRadio"), p = i("FmRadioGroup"), A = i("FmSwitch"), I = i("FmSearch"), N = i("FmTable"), j = i("FmButton");
287
- return v(), C(B, null, [
288
- o("div", ot, [
289
- o("div", at, [
290
- u(p, {
291
- modelValue: e.payoutAccount.status,
292
- "onUpdate:modelValue": n[0] || (n[0] = (x) => e.payoutAccount.status = x),
293
- label: "Account Status"
294
- }, {
295
- default: b(() => [
296
- u(l, {
297
- value: "NEW",
298
- label: "New"
299
- }),
300
- u(l, {
301
- value: "PENDING",
302
- label: "Pending"
303
- }),
304
- u(l, {
305
- value: "APPROVED",
306
- label: "Approved"
307
- })
308
- ]),
309
- _: 1
310
- }, 8, ["modelValue"])
311
- ]),
312
- o("div", lt, [
313
- u(A, {
314
- modelValue: e.payoutAccount.enable,
315
- "onUpdate:modelValue": n[1] || (n[1] = (x) => e.payoutAccount.enable = x),
316
- disabled: !r.value,
317
- label: "Enabled",
318
- sublabel: "Merchant can use online features such as e-payment, settlement"
319
- }, null, 8, ["modelValue", "disabled"])
320
- ])
321
- ]),
322
- e.payoutAccount.enable ? (v(), C(B, { key: 0 }, [
323
- o("div", ut, [
324
- o("div", st, [
325
- u(I, {
326
- modelValue: k(m),
327
- "onUpdate:modelValue": n[2] || (n[2] = (x) => M(m) ? m.value = x : null),
328
- placeholder: "Search Method ..."
329
- }, null, 8, ["modelValue"])
330
- ])
331
- ]),
332
- u(N, {
333
- class: "mt-6",
334
- modelValue: y.value,
335
- "onUpdate:modelValue": n[3] || (n[3] = (x) => y.value = x),
336
- "search-value": k(m),
337
- "row-data": e.payoutAccount.methods,
338
- "column-defs": f
339
- }, null, 8, ["modelValue", "search-value", "row-data"])
340
- ], 64)) : V("", !0),
341
- u(j, {
342
- class: "w-full mt-6",
343
- variant: "primary",
344
- label: "Save",
345
- loading: t.value,
346
- onclick: () => s(e.payoutAccount)
347
- }, null, 8, ["loading", "onclick"])
348
- ], 64);
349
- };
350
- }
351
- }), gt = /* @__PURE__ */ S({
352
- __name: "PayoutAccountSetting",
353
- props: {
354
- accountId: {
355
- type: String,
356
- required: !0
357
- }
358
- },
359
- setup(e) {
360
- const c = e, { tab: t } = h({
361
- tab: "information"
362
- }), { isLoading: d, startAsyncCall: s } = H(!0), m = O(), r = w();
363
- async function y(l) {
364
- await $.updateById(
365
- c.accountId,
366
- l
367
- ), r.value = await $.readById(c.accountId);
368
- }
369
- const f = [
370
- {
371
- label: "Information",
372
- value: "information",
373
- icon: "overview",
374
- render: J
375
- },
376
- {
377
- label: "Settlement",
378
- value: "settlement",
379
- icon: "payments",
380
- render: tt
381
- },
382
- {
383
- label: "MDR Status",
384
- value: "payment",
385
- icon: "account_box",
386
- render: rt
387
- }
388
- ];
389
- function a() {
390
- s(async () => {
391
- r.value = await $.readById(c.accountId);
392
- });
393
- }
394
- D(a);
395
- const n = E(() => {
396
- var l;
397
- return (l = f.find((p) => p.value === t.value)) == null ? void 0 : l.render;
398
- });
399
- return (l, p) => {
400
- var I;
401
- const A = i("FmTabs");
402
- return v(), P(K, {
403
- title: `Payout Account (${(I = r.value) == null ? void 0 : I._id})`,
404
- loading: k(d),
405
- onBack: k(m).back
406
- }, {
407
- default: b(() => [
408
- u(A, {
409
- "model-value": k(t),
410
- "onUpdate:modelValue": p[0] || (p[0] = (N) => M(t) ? t.value = N : null),
411
- class: "mb-6",
412
- items: f
413
- }, null, 8, ["model-value"]),
414
- k(t) ? (v(), P(_(n.value), q(z({ key: 0 }, {
415
- payoutAccount: r.value,
416
- onUpdate: y
417
- })), null, 16)) : V("", !0)
418
- ]),
419
- _: 1
420
- }, 8, ["title", "loading", "onBack"]);
421
- };
422
- }
423
- });
424
- export {
425
- gt as default
426
- };