@feedmepos/mf-payment 1.2.0 → 1.2.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 (63) hide show
  1. package/dist/{PDFViewer-BQfgFexr.js → PDFViewer-xrBtzrlR.js} +1 -2
  2. package/dist/{PayoutAccount-CLJp9Jyn.js → PayoutAccount-C1eI-Tha.js} +6 -6
  3. package/dist/{PayoutAccount-BvU23xuM.js → PayoutAccount-QY9LkR0r.js} +7 -7
  4. package/dist/PayoutAccountSetting-Bt-BBfpF.js +970 -0
  5. package/dist/{Restaurant-C962cqyn.js → Restaurant-DMEt0GSf.js} +4 -4
  6. package/dist/RestaurantSetting-Bjgjx7_c.js +487 -0
  7. package/dist/{Settlement-BZuKvRaG.js → Settlement-DHczxjKA.js} +3 -3
  8. package/dist/{Settlement-BHHc5YoF.js → Settlement-PYl2xRrw.js} +3 -3
  9. package/dist/{SettlementTransactions-zqQOlNmL.js → SettlementTransactions-B6eUs4ay.js} +3 -3
  10. package/dist/{SettlementTransactions-T_NueCUi.js → SettlementTransactions-Bn2-iO30.js} +3 -3
  11. package/dist/{Terminal-DEndcR6q.js → Terminal-q9AtQVTw.js} +36 -36
  12. package/dist/{TerminalSetting-Y11VutPg.js → TerminalSetting-DKvLKsrH.js} +218 -212
  13. package/dist/{Transaction-BMh7HeF-.js → Transaction-BSDhGkTu.js} +5 -5
  14. package/dist/{Transaction-CKHYz4EJ.js → Transaction-DlkiWPJt.js} +7 -7
  15. package/dist/{TransactionOld-CBu3JNau.js → TransactionOld-B93Kp78J.js} +4 -4
  16. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-Bm6pV5Ps.js → TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js} +3 -3
  17. package/dist/api/payout/index.d.ts +2 -1
  18. package/dist/{app-BpdRZpkd.js → app-B1yXzXMJ.js} +270 -270
  19. package/dist/app.js +1 -1
  20. package/dist/{assets-CiNHrDU0.js → assets-DbCf2oTj.js} +2 -2
  21. package/dist/{grafana-D4sIBgS0.js → grafana-CxvNheOh.js} +1 -1
  22. package/dist/{index-D7YmrmZF.js → index-BoafQG_3.js} +1 -1
  23. package/dist/{index-B9Q6VJh7.js → index-BwmZGhzh.js} +6719 -6639
  24. package/dist/{index-CtH76apJ.js → index-C9YbV874.js} +1 -1
  25. package/dist/{index-CtGB8IE0.js → index-DJx90D2_.js} +1 -1
  26. package/dist/{index-C2ZxjTVN.js → index-DQ6y1YEM.js} +1 -1
  27. package/dist/index-DoWYy-5F.js +73 -0
  28. package/dist/{index-CuBlZneL.js → index-DrVrxzsm.js} +1 -1
  29. package/dist/{index.vue_vue_type_script_setup_true_lang-C5YwGnbl.js → index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js} +1 -1
  30. package/dist/package.json +4 -4
  31. package/dist/{payout-account-DoiqVkOg.js → payout-account-Cy0D7ycP.js} +3 -3
  32. package/dist/stores/payoutAccount.d.ts +60 -10
  33. package/dist/tsconfig.app.tsbuildinfo +1 -1
  34. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +60 -10
  35. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +56 -16
  36. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +56 -16
  37. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +60 -10
  38. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +60 -10
  39. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +173 -0
  40. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  41. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +46 -1
  42. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +49 -0
  43. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  44. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +2 -2
  45. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +50 -0
  46. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +2 -2
  47. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  48. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +12 -12
  49. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +14 -12
  50. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +12 -12
  51. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +12 -12
  52. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +12 -12
  53. package/dist/views/admin/terminal/tabs/SoftspaceGateway.vue.d.ts +12 -12
  54. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +12 -12
  55. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +12 -12
  56. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +120 -20
  57. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +16 -16
  58. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +8 -8
  59. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  60. package/package.json +4 -4
  61. package/dist/PayoutAccountSetting-DjrQRJDm.js +0 -728
  62. package/dist/RestaurantSetting-C2zHT9N3.js +0 -412
  63. package/dist/index-CJL2mrrn.js +0 -67
@@ -1,412 +0,0 @@
1
- import { defineComponent as C, ref as I, resolveComponent as d, openBlock as f, createBlock as F, withCtx as k, createVNode as u, unref as a, createElementVNode as D, createCommentVNode as S, onMounted as P, computed as q, createElementBlock as K, Fragment as M, resolveDynamicComponent as O, normalizeProps as $, mergeProps as B, isRef as N } from "vue";
2
- import { g as T, b as R, u as E, e as U } from "./index-B9Q6VJh7.js";
3
- import { _ as Y } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
- import { useRouter as A } from "vue-router";
5
- import { u as L } from "./index-C2ZxjTVN.js";
6
- import { z as p, a as v } from "./validator-D5jtpt9A.js";
7
- import { useCoreStore as j } from "@feedmepos/mf-common";
8
- import { r as z } from "./index-D7YmrmZF.js";
9
- const _ = {
10
- async get(n) {
11
- return T(
12
- await R().get(
13
- `restaurants/${n}/payment-gateway`
14
- )
15
- );
16
- },
17
- async upsert(n, i) {
18
- return T(
19
- await R().post(
20
- `restaurants/${n}/payment-gateway`,
21
- { data: i }
22
- )
23
- );
24
- },
25
- async delete(n, i) {
26
- return T(
27
- await R().delete(
28
- `restaurants/${n}/payment-gateway/${i}`
29
- )
30
- );
31
- }
32
- }, H = { class: "flex mt-6 space-x-6" }, Q = /* @__PURE__ */ C({
33
- __name: "FiuuGateway",
34
- props: {
35
- onUpdate: {
36
- type: Function,
37
- required: !0
38
- },
39
- onDelete: {
40
- type: Function,
41
- required: !0
42
- },
43
- gateway: {
44
- type: Object,
45
- required: !0
46
- }
47
- },
48
- setup(n) {
49
- var c;
50
- const t = I(((c = n.gateway) == null ? void 0 : c.config) || {
51
- merchantId: "",
52
- uniqueId: "",
53
- verifyKey: "",
54
- secretKey: "",
55
- applicationCode: "",
56
- offlineSecret: ""
57
- });
58
- return (b, e) => {
59
- const l = d("FmTextField"), g = d("FmButton"), w = d("FmForm");
60
- return f(), F(w, {
61
- ref: "form",
62
- class: "flex flex-col gap-16",
63
- onValidationSuccess: e[6] || (e[6] = () => n.onUpdate(t.value))
64
- }, {
65
- default: k(() => [
66
- u(l, {
67
- modelValue: t.value.merchantId,
68
- "onUpdate:modelValue": e[0] || (e[0] = (o) => t.value.merchantId = o),
69
- label: "Merchant ID",
70
- rules: a(p)(a(v).string())
71
- }, null, 8, ["modelValue", "rules"]),
72
- u(l, {
73
- modelValue: t.value.uniqueId,
74
- "onUpdate:modelValue": e[1] || (e[1] = (o) => t.value.uniqueId = o),
75
- label: "Unique ID",
76
- rules: a(p)(a(v).string())
77
- }, null, 8, ["modelValue", "rules"]),
78
- u(l, {
79
- modelValue: t.value.verifyKey,
80
- "onUpdate:modelValue": e[2] || (e[2] = (o) => t.value.verifyKey = o),
81
- label: "Verify Key",
82
- rules: a(p)(a(v).string())
83
- }, null, 8, ["modelValue", "rules"]),
84
- u(l, {
85
- modelValue: t.value.secretKey,
86
- "onUpdate:modelValue": e[3] || (e[3] = (o) => t.value.secretKey = o),
87
- label: "Secret Key",
88
- rules: a(p)(a(v).string())
89
- }, null, 8, ["modelValue", "rules"]),
90
- u(l, {
91
- modelValue: t.value.applicationCode,
92
- "onUpdate:modelValue": e[4] || (e[4] = (o) => t.value.applicationCode = o),
93
- label: "Application Code ( Offline )",
94
- rules: a(p)(a(v).string())
95
- }, null, 8, ["modelValue", "rules"]),
96
- u(l, {
97
- modelValue: t.value.offlineSecret,
98
- "onUpdate:modelValue": e[5] || (e[5] = (o) => t.value.offlineSecret = o),
99
- label: "Offline Secret ( Offline )",
100
- rules: a(p)(a(v).string())
101
- }, null, 8, ["modelValue", "rules"]),
102
- D("div", H, [
103
- n.gateway ? (f(), F(g, {
104
- key: 0,
105
- class: "flex-1",
106
- variant: "secondary",
107
- label: "Delete",
108
- onclick: () => n.onDelete(n.gateway)
109
- }, null, 8, ["onclick"])) : S("", !0),
110
- u(g, {
111
- type: "submit",
112
- class: "flex-1",
113
- variant: "primary",
114
- label: "Save"
115
- })
116
- ])
117
- ]),
118
- _: 1
119
- }, 512);
120
- };
121
- }
122
- }), Z = { class: "flex mt-6 space-x-6" }, J = /* @__PURE__ */ C({
123
- __name: "RevenueMonsterGateway",
124
- props: {
125
- onUpdate: {
126
- type: Function,
127
- required: !0
128
- },
129
- onDelete: {
130
- type: Function,
131
- required: !0
132
- },
133
- gateway: {
134
- type: Object,
135
- required: !0
136
- }
137
- },
138
- setup(n) {
139
- var c;
140
- const t = I(((c = n.gateway) == null ? void 0 : c.config) || {
141
- storeId: "",
142
- clientId: "",
143
- clientSecret: "",
144
- clientPrivateKey: ""
145
- });
146
- return (b, e) => {
147
- const l = d("FmTextField"), g = d("FmTextarea"), w = d("FmButton"), o = d("FmForm");
148
- return f(), F(o, {
149
- ref: "form",
150
- class: "flex flex-col gap-16",
151
- onValidationSuccess: e[4] || (e[4] = () => n.onUpdate(t.value))
152
- }, {
153
- default: k(() => [
154
- u(l, {
155
- modelValue: t.value.storeId,
156
- "onUpdate:modelValue": e[0] || (e[0] = (r) => t.value.storeId = r),
157
- label: "Store ID",
158
- rules: a(p)(a(v).string())
159
- }, null, 8, ["modelValue", "rules"]),
160
- u(l, {
161
- modelValue: t.value.clientId,
162
- "onUpdate:modelValue": e[1] || (e[1] = (r) => t.value.clientId = r),
163
- label: "Client ID",
164
- rules: a(p)(a(v).string())
165
- }, null, 8, ["modelValue", "rules"]),
166
- u(l, {
167
- modelValue: t.value.clientSecret,
168
- "onUpdate:modelValue": e[2] || (e[2] = (r) => t.value.clientSecret = r),
169
- label: "Client Secret",
170
- rules: a(p)(a(v).string())
171
- }, null, 8, ["modelValue", "rules"]),
172
- u(g, {
173
- modelValue: t.value.clientPrivateKey,
174
- "onUpdate:modelValue": e[3] || (e[3] = (r) => t.value.clientPrivateKey = r),
175
- label: "Client Private Key"
176
- }, null, 8, ["modelValue"]),
177
- D("div", Z, [
178
- n.gateway ? (f(), F(w, {
179
- key: 0,
180
- class: "flex-1",
181
- variant: "secondary",
182
- label: "Delete",
183
- onclick: () => n.onDelete(n.gateway)
184
- }, null, 8, ["onclick"])) : S("", !0),
185
- u(w, {
186
- type: "submit",
187
- class: "flex-1",
188
- variant: "primary",
189
- label: "Save"
190
- })
191
- ])
192
- ]),
193
- _: 1
194
- }, 512);
195
- };
196
- }
197
- }), W = { class: "flex mt-6 space-x-6" }, X = /* @__PURE__ */ C({
198
- __name: "GhlGateway",
199
- props: {
200
- onUpdate: {
201
- type: Function,
202
- required: !0
203
- },
204
- onDelete: {
205
- type: Function,
206
- required: !0
207
- },
208
- gateway: {
209
- type: Object,
210
- required: !0
211
- }
212
- },
213
- setup(n) {
214
- var c;
215
- const t = I(((c = n.gateway) == null ? void 0 : c.config) || {
216
- merchantId: "",
217
- terminalId: "",
218
- privateKey: ""
219
- });
220
- return (b, e) => {
221
- const l = d("FmTextField"), g = d("FmTextarea"), w = d("FmButton"), o = d("FmForm");
222
- return f(), F(o, {
223
- ref: "form",
224
- class: "flex flex-col gap-16",
225
- onValidationSuccess: e[3] || (e[3] = () => n.onUpdate(t.value))
226
- }, {
227
- default: k(() => [
228
- u(l, {
229
- modelValue: t.value.merchantId,
230
- "onUpdate:modelValue": e[0] || (e[0] = (r) => t.value.merchantId = r),
231
- label: "Merchant ID",
232
- rules: a(p)(a(v).string())
233
- }, null, 8, ["modelValue", "rules"]),
234
- u(l, {
235
- modelValue: t.value.terminalId,
236
- "onUpdate:modelValue": e[1] || (e[1] = (r) => t.value.terminalId = r),
237
- label: "Terminal ID",
238
- rules: a(p)(a(v).string())
239
- }, null, 8, ["modelValue", "rules"]),
240
- u(g, {
241
- id: "ghl_pkey",
242
- modelValue: t.value.privateKey,
243
- "onUpdate:modelValue": e[2] || (e[2] = (r) => t.value.privateKey = r),
244
- label: "Private Key",
245
- rules: a(p)(a(v).string())
246
- }, null, 8, ["modelValue", "rules"]),
247
- D("div", W, [
248
- n.gateway ? (f(), F(w, {
249
- key: 0,
250
- class: "flex-1",
251
- variant: "secondary",
252
- label: "Delete",
253
- onclick: () => n.onDelete(n.gateway)
254
- }, null, 8, ["onclick"])) : S("", !0),
255
- u(w, {
256
- type: "submit",
257
- class: "flex-1",
258
- variant: "primary",
259
- label: "Save"
260
- })
261
- ])
262
- ]),
263
- _: 1
264
- }, 512);
265
- };
266
- }
267
- }), h = {
268
- key: 0,
269
- class: "flex items-center justify-center min-h-[80vh]"
270
- }, ee = /* @__PURE__ */ C({
271
- __name: "PaymentGateway",
272
- props: {
273
- restaurant: {
274
- type: Object,
275
- required: !0
276
- }
277
- },
278
- setup(n) {
279
- const i = n, t = j(), { isLoading: c, startAsyncCall: b } = E(), e = I(), l = I([]);
280
- function g() {
281
- b(async () => {
282
- var y;
283
- l.value = await _.get(i.restaurant._id), e.value = (y = l.value.find((s) => s.active)) == null ? void 0 : y.paymentGateway;
284
- });
285
- }
286
- async function w(y) {
287
- await b(async () => {
288
- var G;
289
- const s = {
290
- _id: "",
291
- _rev: "",
292
- paymentGateway: e.value,
293
- config: y,
294
- active: !0
295
- }, V = l.value.find((m) => m.paymentGateway === e.value);
296
- V && (s._id = V._id, s._rev = V._rev), await Promise.all(
297
- l.value.map(async (m) => {
298
- m.paymentGateway || await _.delete(i.restaurant._id, m._id), m.active && m.paymentGateway !== s.paymentGateway && await _.upsert(i.restaurant._id, {
299
- ...m,
300
- active: !1
301
- });
302
- })
303
- ), await _.upsert(i.restaurant._id, s), l.value = await _.get(i.restaurant._id), e.value = (G = l.value.find((m) => m.active)) == null ? void 0 : G.paymentGateway;
304
- });
305
- }
306
- async function o(y) {
307
- b(async () => {
308
- var s;
309
- await _.delete(i.restaurant._id, y._id), l.value = await _.get(i.restaurant._id), e.value = (s = l.value.find((V) => V.active)) == null ? void 0 : s.paymentGateway;
310
- });
311
- }
312
- P(g);
313
- const r = [
314
- {
315
- label: "Fiuu",
316
- value: "RAZER_MERCHANT_SERVICE",
317
- form: Q,
318
- region: [U.F_COUNTRY.enum.MY, U.F_COUNTRY.enum.SG]
319
- },
320
- {
321
- label: "Revenue Monster",
322
- value: "REVENUE_MONSTER",
323
- form: J,
324
- region: [U.F_COUNTRY.enum.MY]
325
- },
326
- {
327
- label: "GHL",
328
- value: "E_GHL",
329
- form: X,
330
- region: [U.F_COUNTRY.enum.MY]
331
- }
332
- ], x = q(() => {
333
- var y;
334
- return (y = r.find((s) => s.value === e.value)) == null ? void 0 : y.form;
335
- });
336
- return (y, s) => {
337
- const V = d("FmCircularProgress"), G = d("FmSelect");
338
- return f(), K(M, null, [
339
- a(c) ? (f(), K("div", h, [
340
- u(V, { size: "xxl" })
341
- ])) : (f(), F(G, {
342
- key: 1,
343
- modelValue: e.value,
344
- "onUpdate:modelValue": s[0] || (s[0] = (m) => e.value = m),
345
- class: "mb-6",
346
- label: "Payment Service Provider",
347
- items: r.filter((m) => m.region.includes(a(t).currentCountry.value ?? a(U.F_COUNTRY).enum.MY))
348
- }, null, 8, ["modelValue", "items"])),
349
- e.value ? (f(), F(O(x.value), $(B({ key: 2 }, {
350
- gateway: l.value.find((m) => m.paymentGateway === e.value),
351
- onDelete: o,
352
- onUpdate: w
353
- })), null, 16)) : S("", !0)
354
- ], 64);
355
- };
356
- }
357
- }), ie = /* @__PURE__ */ C({
358
- __name: "RestaurantSetting",
359
- props: {
360
- restaurantId: {
361
- type: String,
362
- required: !0
363
- }
364
- },
365
- setup(n) {
366
- const i = n, { tab: t } = L({
367
- tab: "payment-gateway"
368
- }), { isLoading: c, startAsyncCall: b } = E(!0), e = A(), l = I(), g = [
369
- {
370
- label: "Payment Gateway",
371
- value: "payment-gateway",
372
- icon: "assured_workload",
373
- render: ee
374
- }
375
- ];
376
- function w() {
377
- b(async () => {
378
- l.value = await z.readRestaurantById(i.restaurantId);
379
- });
380
- }
381
- P(w);
382
- const o = q(() => {
383
- var r;
384
- return (r = g.find((x) => x.value === t.value)) == null ? void 0 : r.render;
385
- });
386
- return (r, x) => {
387
- var s;
388
- const y = d("FmTabs");
389
- return f(), F(Y, {
390
- title: `Restaurant (${(s = l.value) == null ? void 0 : s._id})`,
391
- loading: a(c),
392
- onBack: a(e).back
393
- }, {
394
- default: k(() => [
395
- u(y, {
396
- "model-value": a(t),
397
- "onUpdate:modelValue": x[0] || (x[0] = (V) => N(t) ? t.value = V : null),
398
- class: "mb-6",
399
- items: g
400
- }, null, 8, ["model-value"]),
401
- a(t) && l.value ? (f(), F(O(o.value), $(B({ key: 0 }, {
402
- restaurant: l.value
403
- })), null, 16)) : S("", !0)
404
- ]),
405
- _: 1
406
- }, 8, ["title", "loading", "onBack"]);
407
- };
408
- }
409
- });
410
- export {
411
- ie as default
412
- };
@@ -1,67 +0,0 @@
1
- import { f as u, b as s, g as t, h as e } from "./index-B9Q6VJh7.js";
2
- import "./index-CuBlZneL.js";
3
- const r = {
4
- async read(a) {
5
- return u(
6
- await s().get("payout-accounts", {
7
- params: { ...a }
8
- })
9
- );
10
- },
11
- async readById(a) {
12
- return t(
13
- await s().get(`payout-accounts/${a}`)
14
- );
15
- },
16
- async updateById(a, n) {
17
- return t(
18
- await s().put(`payout-accounts/${a}`, {
19
- ...n
20
- })
21
- );
22
- },
23
- async readBusinessPayoutAccounts() {
24
- return t(await e().get("/payout-accounts"));
25
- },
26
- async createBusinessPayoutAccounts(a) {
27
- return t(
28
- await e().post("/payout-accounts", { ...a })
29
- );
30
- },
31
- async updateBusinessPayoutAccounts(a, n) {
32
- return t(
33
- await e().put(`/payout-accounts/${a}`, {
34
- ...n
35
- })
36
- );
37
- },
38
- async updateGateway(a, n) {
39
- return s().put(
40
- `/payout-accounts/${a}/gateways`,
41
- n
42
- );
43
- },
44
- async getChannels(a) {
45
- return t(
46
- await s().get(`/payout-accounts/${a}/channels`)
47
- );
48
- },
49
- async updateChannels(a, n) {
50
- return t(
51
- await s().put(
52
- `/payout-accounts/${a}/channels`,
53
- n
54
- )
55
- );
56
- },
57
- async resetChannels(a) {
58
- return t(
59
- await s().delete(
60
- `/payout-accounts/${a}/channels`
61
- )
62
- );
63
- }
64
- };
65
- export {
66
- r as p
67
- };