@feedmepos/mf-payment 1.0.4-beta.1 → 1.0.4

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 (55) hide show
  1. package/dist/{PayoutAccount-DBhxJpFQ.js → PayoutAccount-BnYhJ0R2.js} +5 -5
  2. package/dist/{PayoutAccount-Dy-eEx08.js → PayoutAccount-Cjkghc6L.js} +3 -3
  3. package/dist/{PayoutAccountSetting-BaRtIsKY.js → PayoutAccountSetting-C1yeSNv8.js} +4 -4
  4. package/dist/Restaurant-B02jty0J.js +262 -0
  5. package/dist/{RestaurantSetting-D-cBpybz.js → RestaurantSetting-CWZAKz1A.js} +4 -4
  6. package/dist/{Settlement-B3CKERls.js → Settlement-BKwie9R8.js} +3 -3
  7. package/dist/{Settlement-SSy8FZgq.js → Settlement-ByPXBNx1.js} +3 -3
  8. package/dist/{SettlementTransactions-BkH69jUI.js → SettlementTransactions-DVRoAUYv.js} +4 -4
  9. package/dist/{SettlementTransactions-hB3JKgE5.js → SettlementTransactions-rXQceUoG.js} +4 -4
  10. package/dist/Terminal-DX8v8WpM.js +386 -0
  11. package/dist/{TerminalSetting-BltsUaiq.js → TerminalSetting-qklmRz3H.js} +3 -3
  12. package/dist/{TerminalTransaction-EYjZZ_w_.js → TerminalTransaction-64Bn6vh0.js} +18 -19
  13. package/dist/{TerminalTransaction-DC0asF22.js → TerminalTransaction-YXcGJ2ne.js} +154 -184
  14. package/dist/{Transaction-DJo1HsrU.js → Transaction-BOc0NW9a.js} +27 -31
  15. package/dist/{Transaction-DBGFZ03y.js → Transaction-CqTKm8KP.js} +48 -81
  16. package/dist/{app-D0XKYcX9.js → app-JZYaBz1E.js} +215 -215
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-CtxhVAqn.js → assets-DjRoCcqv.js} +1 -1
  19. package/dist/{index-D-6CKdYb.js → index-BEFlDEyV.js} +1 -1
  20. package/dist/{index-5sP9T4Lq.js → index-BWFqxSU3.js} +1 -1
  21. package/dist/{index-l8-xPUow.js → index-BerQZMQW.js} +1 -1
  22. package/dist/{index-TG70bysm.js → index-Bp_58SiC.js} +1 -1
  23. package/dist/{index-BSWqm4n5.js → index-CKyh0nlu.js} +1 -1
  24. package/dist/{index-6-EWa9pE.js → index-CWGSYCJG.js} +1 -1
  25. package/dist/{index-D2L_rQB_.js → index-DFePh4ct.js} +1 -1
  26. package/dist/{index-BO5zewDS.js → index-Dj_LwPBy.js} +8151 -8295
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-CmDoWsi3.js → index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js} +1 -1
  28. package/dist/model/payout-account.d.ts +1 -1
  29. package/dist/model/transaction.d.ts +0 -2
  30. package/dist/package.json +2 -2
  31. package/dist/{payout-account-DvLt0SFL.js → payout-account-DWXNiWdx.js} +2 -2
  32. package/dist/stores/payoutAccount.d.ts +6 -6
  33. package/dist/{transaction-DiuoGMjE.js → transaction-Bxl86wzh.js} +20 -25
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +6 -6
  36. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +6 -6
  37. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +6 -6
  38. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +6 -6
  39. package/dist/views/admin/restaurant/tabs/PaymentGateway.vue.d.ts +2 -2
  40. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
  41. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  42. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +8 -8
  43. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  44. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  45. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  46. package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +1 -3
  47. package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
  48. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +12 -12
  49. package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
  50. package/package.json +2 -2
  51. package/dist/Restaurant-CQsEnEZr.js +0 -305
  52. package/dist/Terminal-DaCXiq41.js +0 -404
  53. package/dist/grafana-CqkYm_ru.js +0 -46
  54. package/dist/helpers/grafana.d.ts +0 -7
  55. package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +0 -5
@@ -1,404 +0,0 @@
1
- import { defineComponent as h, openBlock as g, createElementBlock as V, createTextVNode as M, createElementVNode as x, toDisplayString as L, resolveComponent as f, createVNode as v, normalizeClass as z, withCtx as B, createBlock as b, createCommentVNode as F, ref as C, computed as Y, unref as m, watch as K, isRef as P, h as E } from "vue";
2
- import "./index-BO5zewDS.js";
3
- import { h as q } from "./moment-h96o7c8I.js";
4
- import { u as j } from "./index-l8-xPUow.js";
5
- import { _ as G } from "./index.vue_vue_type_script_setup_true_lang-CmDoWsi3.js";
6
- import { _ as Q } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
7
- import { useSnackbar as D, useDialogChild as H, useDialog as J } from "@feedmepos/ui-library";
8
- import { t as A } from "./index-D2L_rQB_.js";
9
- import { c as O } from "./clipboard-4jh1WteU.js";
10
- import { g as W } from "./grafana-CqkYm_ru.js";
11
- import { u as N } from "./error-K1CakhA9.js";
12
- import { z as R, a as U } from "./validator-D5jtpt9A.js";
13
- import { useCoreStore as X } from "@feedmepos/mf-common";
14
- import { w as Z } from "./Modal-DB8M9o1T.js";
15
- import { useRouter as ee } from "vue-router";
16
- const te = { class: "t-caption" }, ne = /* @__PURE__ */ h({
17
- __name: "TerminalBindCodeDialog",
18
- props: {
19
- code: {
20
- type: String,
21
- required: !0
22
- }
23
- },
24
- setup(y) {
25
- const o = y, i = D();
26
- function r() {
27
- try {
28
- O(o.code), i.open({ title: "Text copied to clipboard." }, 1e3);
29
- } catch {
30
- i.open({ title: "Clipboard API incompatible." }, 1e3);
31
- }
32
- }
33
- return (d, a) => (g(), V("div", te, [
34
- a[1] || (a[1] = M(" Enter the binding code below on your device to link it with this terminal and apply the configuration. ")),
35
- x("div", {
36
- class: "my-6 text-center fm-typo-en-title-md-800 tracking-[0.3rem] cursor-pointer hover:text-fm-color-neutral-gray-300",
37
- onClick: a[0] || (a[0] = (n) => {
38
- n.stopPropagation(), r();
39
- })
40
- }, L(y.code), 1)
41
- ]));
42
- }
43
- }), oe = /* @__PURE__ */ h({
44
- __name: "ID",
45
- props: {
46
- row: {},
47
- data: {}
48
- },
49
- setup(y) {
50
- const o = y, i = D();
51
- function r() {
52
- return o.row.original.status === "Active" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
53
- }
54
- function d() {
55
- try {
56
- O(o.data), i.open({ title: "Text copied to clipboard." }, 1e3);
57
- } catch {
58
- i.open({ title: "Clipboard API incompatible." }, 1e3);
59
- }
60
- o.data;
61
- }
62
- return (a, n) => {
63
- const l = f("FmBadge");
64
- return g(), V("div", {
65
- onClick: n[0] || (n[0] = (s) => {
66
- s.stopPropagation(), d();
67
- })
68
- }, [
69
- v(l, {
70
- inline: "",
71
- class: z(r())
72
- }, {
73
- default: B(() => [
74
- x("div", null, L(a.data), 1)
75
- ]),
76
- _: 1
77
- }, 8, ["class"])
78
- ]);
79
- };
80
- }
81
- }), ae = { class: "flex" }, re = /* @__PURE__ */ h({
82
- __name: "Actions",
83
- props: {
84
- data: {}
85
- },
86
- emits: ["link", "unlink", "edit"],
87
- setup(y, { emit: o }) {
88
- const i = y, r = o;
89
- function d() {
90
- const a = W([
91
- {
92
- type: "span",
93
- queryKey: "terminal.id",
94
- queryValue: i.data._id
95
- }
96
- ]);
97
- window.open(a, "_blank");
98
- }
99
- return (a, n) => {
100
- const l = f("FmButton");
101
- return g(), V("div", ae, [
102
- v(l, {
103
- variant: "plain",
104
- "prepend-icon": "history",
105
- onClick: n[0] || (n[0] = (s) => {
106
- s.stopPropagation(), d();
107
- })
108
- }),
109
- a.data.deviceType === "TERMINAL" && !a.data.deviceId ? (g(), b(l, {
110
- key: 0,
111
- variant: "plain",
112
- "prepend-icon": "link",
113
- onClick: n[1] || (n[1] = (s) => {
114
- s.stopPropagation(), r("link");
115
- })
116
- })) : F("", !0),
117
- a.data.deviceType === "TERMINAL" && a.data.deviceId ? (g(), b(l, {
118
- key: 1,
119
- variant: "plain",
120
- "prepend-icon": "link_off",
121
- onClick: n[2] || (n[2] = (s) => {
122
- s.stopPropagation(), r("unlink");
123
- })
124
- })) : F("", !0),
125
- v(l, {
126
- variant: "plain",
127
- "prepend-icon": "edit",
128
- onClick: n[3] || (n[3] = (s) => {
129
- s.stopPropagation(), r("edit");
130
- })
131
- })
132
- ]);
133
- };
134
- }
135
- }), ie = /* @__PURE__ */ h({
136
- __name: "TerminalDialog",
137
- props: {
138
- terminal: {
139
- type: Object
140
- }
141
- },
142
- setup(y) {
143
- var w, _, I;
144
- const o = y, i = X(), r = H(), d = C(), a = C((w = o.terminal) == null ? void 0 : w.name), n = C((_ = o.terminal) == null ? void 0 : _.referenceId), l = C(((I = o.terminal) == null ? void 0 : I.status) === "Active"), s = Y(() => i.restaurants.value.map((T) => ({
145
- label: T.profile.name,
146
- value: T._id
147
- })));
148
- return (T, p) => {
149
- const e = f("FmSelect"), t = f("FmTextField"), u = f("FmSwitch"), k = f("FmButton"), S = f("FmForm");
150
- return g(), b(S, {
151
- ref: d.value,
152
- class: "flex flex-col gap-16 mb-6",
153
- onValidationSuccess: p[3] || (p[3] = () => {
154
- m(r).emitData({ name: a.value, referenceId: n.value, status: l.value ? "Active" : "Inactive" }), m(r).emitAction("primary");
155
- })
156
- }, {
157
- default: B(() => [
158
- o.terminal ? F("", !0) : (g(), b(e, {
159
- key: 0,
160
- modelValue: n.value,
161
- "onUpdate:modelValue": p[0] || (p[0] = (c) => n.value = c),
162
- label: "Restaurant",
163
- "helper-text": "If you can't find the restaurant please change the business to the restaurant's business.",
164
- items: s.value,
165
- rules: m(R)(m(U).string())
166
- }, null, 8, ["modelValue", "items", "rules"])),
167
- v(t, {
168
- modelValue: a.value,
169
- "onUpdate:modelValue": p[1] || (p[1] = (c) => a.value = c),
170
- label: "Terminal Name",
171
- rules: m(R)(m(U).string())
172
- }, null, 8, ["modelValue", "rules"]),
173
- o.terminal ? (g(), b(u, {
174
- key: 1,
175
- modelValue: l.value,
176
- "onUpdate:modelValue": p[2] || (p[2] = (c) => l.value = c),
177
- label: "Status"
178
- }, null, 8, ["modelValue"])) : F("", !0),
179
- v(k, {
180
- type: "submit",
181
- label: "Create"
182
- })
183
- ]),
184
- _: 1
185
- }, 512);
186
- };
187
- }
188
- }), le = { class: "flex justify-between mb-6 items-center" }, se = { class: "flex space-x-4" }, ce = { class: "flex space-x-4" }, we = /* @__PURE__ */ h({
189
- __name: "Terminal",
190
- setup(y) {
191
- const o = C(), { searchKey: i, deviceType: r } = j({
192
- searchKey: "",
193
- deviceType: void 0
194
- });
195
- K(r, () => {
196
- var e;
197
- return (e = o.value) == null ? void 0 : e.reset();
198
- });
199
- let d;
200
- K(i, async () => {
201
- d && clearTimeout(d), d = setTimeout(
202
- () => {
203
- var e;
204
- return (e = o.value) == null ? void 0 : e.reset();
205
- },
206
- 700
207
- );
208
- });
209
- const a = ee(), n = J(), l = D();
210
- async function s(e) {
211
- Z(
212
- n,
213
- "Terminal Unbind",
214
- "Are you sure to unbind terminal from device? This action cannot be revert and device will be logged out!",
215
- async () => {
216
- var t;
217
- try {
218
- await A.unbind(e), (t = o.value) == null || t.reset(), l.open({
219
- type: "success",
220
- message: "Terminal unbind successfully"
221
- });
222
- } catch (u) {
223
- l.open({
224
- type: "error",
225
- title: "Error occurs when unbind terminal",
226
- message: N(u)
227
- });
228
- }
229
- }
230
- );
231
- }
232
- async function w(e) {
233
- const t = await A.getBindCode(e);
234
- n.open({
235
- title: "Terminal Bind Code",
236
- closeButton: !0,
237
- overlay: !0,
238
- contentComponent: ne,
239
- contentComponentProps: { code: t }
240
- });
241
- }
242
- async function _(e) {
243
- n.open({
244
- title: e ? "Update Terminal" : "Create New Terminal",
245
- closeButton: !0,
246
- overlay: !0,
247
- contentComponent: ie,
248
- contentComponentProps: { terminal: e }
249
- }).onPrimary(async (t) => {
250
- var u;
251
- n.close();
252
- try {
253
- await A.create(t), (u = o.value) == null || u.reset(), l.open({
254
- type: "success",
255
- message: e ? "Terminal udpated successfully" : "Terminal created successfully."
256
- });
257
- } catch (k) {
258
- l.open({
259
- type: "error",
260
- title: "Error occurs when create terminal",
261
- message: N(k)
262
- });
263
- }
264
- });
265
- }
266
- const I = function(e) {
267
- return {
268
- id: e._id,
269
- status: e.status,
270
- referenceId: e.referenceId,
271
- name: e.name,
272
- deviceId: e.deviceId,
273
- deviceType: e.deviceType,
274
- updatedAt: q(e.updatedAt).format("YYYY-MM-DD hh:mm:ss")
275
- };
276
- }, T = [
277
- {
278
- accessorKey: "id",
279
- header: () => "Terminal ID",
280
- meta: {
281
- textAlign: "right"
282
- },
283
- cell: ({ cell: e, row: t }) => E(oe, { row: t, data: e.getValue() })
284
- },
285
- {
286
- accessorKey: "deviceType",
287
- header: () => "Device Type",
288
- meta: {
289
- textAlign: "left"
290
- }
291
- },
292
- {
293
- accessorKey: "name",
294
- header: () => "Name",
295
- meta: {
296
- textAlign: "left"
297
- }
298
- },
299
- {
300
- accessorKey: "referenceId",
301
- header: () => "Reference",
302
- meta: {
303
- textAlign: "left"
304
- }
305
- },
306
- {
307
- accessorKey: "deviceId",
308
- header: () => "Bound Device Id",
309
- meta: {
310
- textAlign: "left"
311
- }
312
- },
313
- {
314
- accessorKey: "updatedAt",
315
- header: () => "Last Updated",
316
- meta: {
317
- textAlign: "left"
318
- }
319
- },
320
- {
321
- accessorKey: "id",
322
- header: () => "Actions",
323
- meta: {
324
- textAlign: "center"
325
- },
326
- cell: ({ row: e }) => {
327
- var u;
328
- const t = (u = o.value) == null ? void 0 : u.pageData().at(e.index);
329
- return E(re, {
330
- data: t,
331
- onLink: () => w(t._id),
332
- onUnlink: () => s(t._id),
333
- onEdit: () => _(t)
334
- });
335
- }
336
- }
337
- ], p = [
338
- {
339
- label: "POS",
340
- value: "POS"
341
- },
342
- {
343
- label: "KIOSK",
344
- value: "KIOSK"
345
- },
346
- {
347
- label: "TERMINAL",
348
- value: "TERMINAL"
349
- }
350
- ];
351
- return (e, t) => {
352
- const u = f("FmSearch"), k = f("FmSelect"), S = f("FmButton");
353
- return g(), b(Q, {
354
- title: "Terminals",
355
- loading: !1
356
- }, {
357
- default: B(() => [
358
- x("div", le, [
359
- x("div", se, [
360
- v(u, {
361
- "model-value": m(i),
362
- "onUpdate:modelValue": t[0] || (t[0] = (c) => P(i) ? i.value = c : null),
363
- class: "mr-8",
364
- label: "Search",
365
- placeholder: "Search Terminals ..."
366
- }, null, 8, ["model-value"]),
367
- v(k, {
368
- modelValue: m(r),
369
- "onUpdate:modelValue": t[1] || (t[1] = (c) => P(r) ? r.value = c : null),
370
- class: "ml-6 w-[180px]",
371
- label: "Device",
372
- items: p
373
- }, null, 8, ["modelValue"])
374
- ]),
375
- x("div", ce, [
376
- v(S, {
377
- label: "Create",
378
- icon: "add",
379
- onClick: t[2] || (t[2] = () => _())
380
- })
381
- ])
382
- ]),
383
- v(G, {
384
- ref_key: "controller",
385
- ref: o,
386
- "column-defs": T,
387
- "rows-defs": I,
388
- paginate: (c, $) => m(A).read({ searchKey: m(i), deviceType: m(r), limit: c, cursor: $ }),
389
- onRowClick: t[3] || (t[3] = (c) => m(a).push({
390
- name: "mf-payment-admin.terminal-setting",
391
- params: {
392
- terminalId: c._id
393
- }
394
- }))
395
- }, null, 8, ["paginate"])
396
- ]),
397
- _: 1
398
- });
399
- };
400
- }
401
- });
402
- export {
403
- we as default
404
- };
@@ -1,46 +0,0 @@
1
- import { h as p } from "./moment-h96o7c8I.js";
2
- const u = "https://grafana.feedme.farm/explore?schemaVersion=1", i = (s, t, r) => ({
3
- apq: {
4
- datasource: "P214B5B846CF3925F",
5
- queries: [
6
- {
7
- refId: "A",
8
- datasource: {
9
- type: "tempo",
10
- uid: "P214B5B846CF3925F"
11
- },
12
- queryType: "traceql",
13
- limit: 100,
14
- tableType: "spans",
15
- query: s,
16
- spss: 1,
17
- step: ""
18
- }
19
- ],
20
- range: {
21
- from: t,
22
- to: r
23
- }
24
- }
25
- }), d = (s, t) => {
26
- const r = {
27
- "resource.service.name": "payment-backend",
28
- "resource.cluster": "production"
29
- };
30
- r["resource.cluster"] = "dev", s.forEach((e) => {
31
- r[`${e.type}.${e.queryKey}`] = e.queryValue;
32
- });
33
- const a = `{
34
- ${Object.keys(r).map((e) => `${e}="${r[e]}"`).join("&&")}
35
- }`;
36
- let o = "now", n = "now-1d";
37
- if (t) {
38
- const e = +p(t).toDate();
39
- n = `${e}`, o = `${e + 24 * 60 * 60 * 1e3}`;
40
- }
41
- const c = i(a, n, o);
42
- return u + `&panes=${encodeURIComponent(JSON.stringify(c))}&orgId=1`;
43
- };
44
- export {
45
- d as g
46
- };
@@ -1,7 +0,0 @@
1
- type QueryTarget = {
2
- type: "span" | "resource";
3
- queryKey: string;
4
- queryValue: string;
5
- };
6
- declare const getGrafanaOtelURL: (extras: QueryTarget[], startAt?: string) => string;
7
- export default getGrafanaOtelURL;
@@ -1,5 +0,0 @@
1
- type __VLS_Props = {
2
- id: string;
3
- };
4
- declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>;
5
- export default _default;