@feedmepos/mf-payment 1.1.20-beta.2 → 1.1.20-beta.3

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 (31) hide show
  1. package/dist/{PayoutAccount-DbVJmcOa.js → PayoutAccount-B7390Med.js} +6 -6
  2. package/dist/{PayoutAccount-DtxvkRZg.js → PayoutAccount-Bwr--fc3.js} +120 -120
  3. package/dist/{PayoutAccountSetting-DcbImWD5.js → PayoutAccountSetting-DoT6xyEI.js} +3 -3
  4. package/dist/{Restaurant-DrTIWONb.js → Restaurant-BDD4ANjn.js} +4 -4
  5. package/dist/{RestaurantSetting-39Xu_7Bm.js → RestaurantSetting-BO3-8efC.js} +3 -3
  6. package/dist/{Settlement-oCVhqcmP.js → Settlement-B-yCNgCR.js} +3 -3
  7. package/dist/{Settlement-DuWPx6DN.js → Settlement-Byps5iGT.js} +3 -3
  8. package/dist/{SettlementTransactions-BPEDOI4q.js → SettlementTransactions-CI2TWZ6c.js} +3 -3
  9. package/dist/{SettlementTransactions-B1N9DToN.js → SettlementTransactions-DU9Q0Uzj.js} +3 -3
  10. package/dist/{Terminal-CHNjzVtT.js → Terminal-CaWh5Z7w.js} +5 -5
  11. package/dist/{TerminalSetting-BEP2XCkv.js → TerminalSetting-gEi3U6_p.js} +3 -3
  12. package/dist/{Transaction-Bth0jDaE.js → Transaction--eg-sBwx.js} +7 -7
  13. package/dist/{Transaction-Cb15psyP.js → Transaction-DoSCtM1f.js} +85 -85
  14. package/dist/{TransactionOld-BPnBP2cu.js → TransactionOld-D4RDKIWJ.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BdPgL0W8.js → TransactionTable.vue_vue_type_script_setup_true_lang-BqVC8ptX.js} +60 -60
  16. package/dist/{app-BfnnIbRB.js → app-NrhdTPf-.js} +257 -255
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-Bne2NJOR.js → assets-C_trdoNA.js} +2 -2
  19. package/dist/{grafana-DpsdWu10.js → grafana-BLQKWWwk.js} +1 -1
  20. package/dist/{index-Bm2MGtsS.js → index-B4wPcaJ2.js} +2284 -2284
  21. package/dist/{index-BJaJ2nSQ.js → index-BBYPCF1D.js} +1 -1
  22. package/dist/{index-sQT526AQ.js → index-BOcojvw3.js} +2 -2
  23. package/dist/{index-B0zGQtbr.js → index-BWeGY1pF.js} +1 -1
  24. package/dist/{index-B1EyQdUg.js → index-D2_DNwUT.js} +1 -1
  25. package/dist/{index-BSl3VmjZ.js → index-DY6nlSpK.js} +1 -1
  26. package/dist/{index-C5ARs2NW.js → index-Dlk-QgS6.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-CV3EXPH9.js → index.vue_vue_type_script_setup_true_lang-DVFU4K-W.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-CX7Sx9yz.js → payout-account-Cu3oqFMb.js} +3 -3
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- import { defineComponent as m, resolveComponent as d, openBlock as l, createBlock as g, normalizeClass as M, withCtx as f, createElementVNode as x, toDisplayString as D, createElementBlock as w, unref as E, createVNode as I, Fragment as P, renderList as R, ref as V, h as y } from "vue";
2
- import { useSnackbar as U, useDialog as B } from "@feedmepos/ui-library";
3
- import { g as $, a as L, t as b, c as N } from "./assets-Bne2NJOR.js";
4
- import { e as h } from "./index-Bm2MGtsS.js";
5
- import { g as G } from "./grafana-DpsdWu10.js";
6
- import { w as k } from "./Modal-DB8M9o1T.js";
1
+ import { defineComponent as y, resolveComponent as p, openBlock as l, createBlock as _, normalizeClass as D, withCtx as g, createElementVNode as E, toDisplayString as P, createElementBlock as A, unref as S, createVNode as N, Fragment as R, renderList as V, ref as U, h as f } from "vue";
2
+ import { useSnackbar as B, useDialog as $ } from "@feedmepos/ui-library";
3
+ import { g as L, a as G, t as b, c as k } from "./assets-C_trdoNA.js";
4
+ import { e as h } from "./index-B4wPcaJ2.js";
5
+ import { g as O } from "./grafana-BLQKWWwk.js";
6
+ import { w as x } from "./Modal-DB8M9o1T.js";
7
7
  import { u as T } from "./error-K1CakhA9.js";
8
- import { useCoreStore as O, useI18n as Y } from "@feedmepos/mf-common";
9
- const j = /* @__PURE__ */ m({
8
+ import { useCoreStore as Y, useI18n as j } from "@feedmepos/mf-common";
9
+ const z = /* @__PURE__ */ y({
10
10
  __name: "Status",
11
11
  props: {
12
12
  row: {},
@@ -18,31 +18,31 @@ const j = /* @__PURE__ */ m({
18
18
  return n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : n.data === h.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
19
19
  }
20
20
  return (c, i) => {
21
- const u = d("FmBadge");
22
- return l(), g(u, {
21
+ const u = p("FmBadge");
22
+ return l(), _(u, {
23
23
  inline: "",
24
- class: M(r())
24
+ class: D(r())
25
25
  }, {
26
- default: f(() => [
27
- x("div", null, D(c.data), 1)
26
+ default: g(() => [
27
+ E("div", null, P(c.data), 1)
28
28
  ]),
29
29
  _: 1
30
30
  }, 8, ["class"]);
31
31
  };
32
32
  }
33
- }), z = ["src"], Q = /* @__PURE__ */ m({
33
+ }), Q = ["src"], H = /* @__PURE__ */ y({
34
34
  __name: "Gateway",
35
35
  props: {
36
36
  row: {},
37
37
  data: {}
38
38
  },
39
39
  setup(s) {
40
- return (n, r) => (l(), w("img", {
40
+ return (n, r) => (l(), A("img", {
41
41
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
42
- src: E($)(n.row.original.gateway)
43
- }, null, 8, z));
42
+ src: S(L)(n.row.original.gateway)
43
+ }, null, 8, Q));
44
44
  }
45
- }), H = ["src"], J = /* @__PURE__ */ m({
45
+ }), J = ["src"], W = /* @__PURE__ */ y({
46
46
  __name: "Method",
47
47
  props: {
48
48
  row: {},
@@ -50,24 +50,24 @@ const j = /* @__PURE__ */ m({
50
50
  },
51
51
  setup(s) {
52
52
  return (n, r) => {
53
- const c = d("FmTooltip");
54
- return l(), g(c, {
53
+ const c = p("FmTooltip");
54
+ return l(), _(c, {
55
55
  variant: "plain",
56
56
  placement: "top",
57
57
  content: n.row.original.method.issuer,
58
58
  "hide-arrow": !0
59
59
  }, {
60
- default: f(() => [
61
- x("img", {
60
+ default: g(() => [
61
+ E("img", {
62
62
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
63
- src: E(L)(n.row.original.method.issuer, n.row.original.method.variant)
64
- }, null, 8, H)
63
+ src: S(G)(n.row.original.method.issuer, n.row.original.method.variant)
64
+ }, null, 8, J)
65
65
  ]),
66
66
  _: 1
67
67
  }, 8, ["content"]);
68
68
  };
69
69
  }
70
- }), W = /* @__PURE__ */ m({
70
+ }), X = /* @__PURE__ */ y({
71
71
  __name: "Actions",
72
72
  props: {
73
73
  onAction: { type: Function },
@@ -101,18 +101,18 @@ const j = /* @__PURE__ */ m({
101
101
  }
102
102
  ];
103
103
  return (r, c) => {
104
- const i = d("FmIcon"), u = d("FmMenuItem"), p = d("FmMenu");
105
- return l(), w("div", {
104
+ const i = p("FmIcon"), u = p("FmMenuItem"), d = p("FmMenu");
105
+ return l(), A("div", {
106
106
  onClick: c[0] || (c[0] = (a) => {
107
107
  a.stopPropagation();
108
108
  })
109
109
  }, [
110
- I(p, null, {
111
- "menu-button": f(() => [
112
- I(i, { name: "settings" })
110
+ N(d, null, {
111
+ "menu-button": g(() => [
112
+ N(i, { name: "settings" })
113
113
  ]),
114
- default: f(() => [
115
- (l(!0), w(P, null, R(n.filter((a) => !!a), (a) => (l(), g(u, {
114
+ default: g(() => [
115
+ (l(!0), A(R, null, V(n.filter((a) => !!a), (a) => (l(), _(u, {
116
116
  selectable: !0,
117
117
  key: a.label,
118
118
  sublabel: a.sublabel,
@@ -126,7 +126,7 @@ const j = /* @__PURE__ */ m({
126
126
  ]);
127
127
  };
128
128
  }
129
- }), se = /* @__PURE__ */ m({
129
+ }), ie = /* @__PURE__ */ y({
130
130
  __name: "TransactionTable",
131
131
  props: {
132
132
  data: {
@@ -140,12 +140,12 @@ const j = /* @__PURE__ */ m({
140
140
  },
141
141
  emits: ["row-click"],
142
142
  setup(s, { emit: n }) {
143
- var q;
144
- const r = s, c = n, i = U(), u = B(), { sessionUser: p } = O(), { t: a } = Y();
145
- async function S(t) {
143
+ var q, I;
144
+ const r = s, c = n, i = B(), u = $(), { sessionUser: d } = Y(), { t: a } = j();
145
+ async function K(t) {
146
146
  try {
147
147
  const e = await b.refetchTransaction({ transactionId: t.id });
148
- r.data.map((o) => o.id === e._id ? N(e) : o), i.open({
148
+ r.data.map((o) => o.id === e._id ? k(e) : o), i.open({
149
149
  type: "success",
150
150
  title: "Transaction queried and updated successfully."
151
151
  });
@@ -157,8 +157,8 @@ const j = /* @__PURE__ */ m({
157
157
  });
158
158
  }
159
159
  }
160
- async function K(t) {
161
- k(
160
+ async function v(t) {
161
+ x(
162
162
  u,
163
163
  "Refund Transaction",
164
164
  "Are you sure to refund transaction? This action cannot be revert!",
@@ -169,7 +169,7 @@ const j = /* @__PURE__ */ m({
169
169
  reason: "portal transaction refund",
170
170
  amount: t.fdoAmount
171
171
  });
172
- r.data.map((o) => o.id === e._id ? N(e) : o), i.open({
172
+ r.data.map((o) => o.id === e._id ? k(e) : o), i.open({
173
173
  type: "success",
174
174
  title: "Transaction refund request initiated."
175
175
  });
@@ -184,7 +184,7 @@ const j = /* @__PURE__ */ m({
184
184
  );
185
185
  }
186
186
  async function C(t) {
187
- k(
187
+ x(
188
188
  u,
189
189
  "Notify Transaction",
190
190
  "Are you sure to perform notify transaction?",
@@ -204,8 +204,8 @@ const j = /* @__PURE__ */ m({
204
204
  }
205
205
  );
206
206
  }
207
- async function v(t) {
208
- const e = G([
207
+ async function M(t) {
208
+ const e = O([
209
209
  {
210
210
  type: "span",
211
211
  queryKey: "transaction.id",
@@ -214,7 +214,7 @@ const j = /* @__PURE__ */ m({
214
214
  ], t.transactionAt);
215
215
  window.open(e, "_blank");
216
216
  }
217
- const A = V(""), F = [
217
+ const w = U(""), F = [
218
218
  {
219
219
  header: () => a("payment.transactions.table.id"),
220
220
  accessorKey: "id"
@@ -237,7 +237,7 @@ const j = /* @__PURE__ */ m({
237
237
  meta: {
238
238
  textAlign: "center"
239
239
  },
240
- cell: ({ cell: t, row: e }) => e.original.gateway ? y(Q, { row: e, data: t.getValue() }) : ""
240
+ cell: ({ cell: t, row: e }) => e.original.gateway ? f(H, { row: e, data: t.getValue() }) : ""
241
241
  },
242
242
  {
243
243
  header: () => a("payment.transactions.table.method"),
@@ -245,7 +245,7 @@ const j = /* @__PURE__ */ m({
245
245
  meta: {
246
246
  textAlign: "center"
247
247
  },
248
- cell: ({ cell: t, row: e }) => e.original.method ? y(J, { row: e, data: t.getValue() }) : ""
248
+ cell: ({ cell: t, row: e }) => e.original.method ? f(W, { row: e, data: t.getValue() }) : ""
249
249
  },
250
250
  {
251
251
  header: () => a("payment.transactions.table.type"),
@@ -257,7 +257,7 @@ const j = /* @__PURE__ */ m({
257
257
  {
258
258
  header: () => a("payment.transactions.table.status"),
259
259
  accessorKey: "status",
260
- cell: ({ cell: t, row: e }) => y(j, { row: e, data: t.getValue() })
260
+ cell: ({ cell: t, row: e }) => f(z, { row: e, data: t.getValue() })
261
261
  },
262
262
  {
263
263
  header: () => a("payment.transactions.table.restaurant"),
@@ -280,42 +280,42 @@ const j = /* @__PURE__ */ m({
280
280
  header: () => a("payment.transactions.table.sales_amount"),
281
281
  accessorKey: "amount",
282
282
  cell: ({ cell: t, row: e }) => {
283
- var o;
284
- return (o = p.value) != null && o.role.isStaff && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
283
+ var o, m;
284
+ return ((o = d.value) != null && o.role.isStaff || (m = d.value) != null && m.role.isAdmin) && e.original.flags.isDelivery ? e.original.amount + "( " + e.original.gatewayAmount + ")" : e.original.amount;
285
285
  }
286
286
  }
287
287
  ];
288
- return (q = p.value) != null && q.role.isStaff && F.push({
288
+ return ((q = d.value) != null && q.role.isStaff || (I = d.value) != null && I.role.isAdmin) && F.push({
289
289
  header: () => a("payment.transactions.table.actions"),
290
290
  accessorKey: "actions",
291
- cell: ({ row: t }) => y(W, {
291
+ cell: ({ row: t }) => f(X, {
292
292
  transaction: t.original,
293
293
  onAction: (e) => {
294
294
  switch (e) {
295
295
  case "notify":
296
296
  return C(t.original);
297
297
  case "query":
298
- return S(t.original);
299
- case "refund":
300
298
  return K(t.original);
301
- case "history":
299
+ case "refund":
302
300
  return v(t.original);
301
+ case "history":
302
+ return M(t.original);
303
303
  }
304
304
  }
305
305
  })
306
306
  }), (t, e) => {
307
- const o = d("FmTable");
308
- return l(), g(o, {
309
- modelValue: A.value,
310
- "onUpdate:modelValue": e[0] || (e[0] = (_) => A.value = _),
307
+ const o = p("FmTable");
308
+ return l(), _(o, {
309
+ modelValue: w.value,
310
+ "onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
311
311
  "column-defs": F,
312
312
  "row-data": r.data,
313
313
  loading: r.loading,
314
- onRowClick: e[1] || (e[1] = (_) => c("row-click", r.data.at(_.index)))
314
+ onRowClick: e[1] || (e[1] = (m) => c("row-click", r.data.at(m.index)))
315
315
  }, null, 8, ["modelValue", "row-data", "loading"]);
316
316
  };
317
317
  }
318
318
  });
319
319
  export {
320
- se as _
320
+ ie as _
321
321
  };