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

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 (34) hide show
  1. package/dist/{PayoutAccount-DtxvkRZg.js → PayoutAccount-B50mbpXa.js} +28 -28
  2. package/dist/{PayoutAccount-DbVJmcOa.js → PayoutAccount-ChnMSqoz.js} +6 -6
  3. package/dist/{PayoutAccountSetting-DcbImWD5.js → PayoutAccountSetting-CYflBcUv.js} +3 -3
  4. package/dist/{Restaurant-DrTIWONb.js → Restaurant-Ddo7QfJv.js} +4 -4
  5. package/dist/{RestaurantSetting-39Xu_7Bm.js → RestaurantSetting-C_5OjEo4.js} +3 -3
  6. package/dist/{Settlement-oCVhqcmP.js → Settlement-DDZ6ll4r.js} +3 -3
  7. package/dist/{Settlement-DuWPx6DN.js → Settlement-DxMP0Iu2.js} +3 -3
  8. package/dist/{SettlementTransactions-BPEDOI4q.js → SettlementTransactions-4Z1eNypN.js} +3 -3
  9. package/dist/{SettlementTransactions-B1N9DToN.js → SettlementTransactions-VinJ6fUK.js} +3 -3
  10. package/dist/{Terminal-CHNjzVtT.js → Terminal-msh6w52E.js} +6 -6
  11. package/dist/{TerminalSetting-BEP2XCkv.js → TerminalSetting-B56NaLJG.js} +3 -3
  12. package/dist/{Transaction-Cb15psyP.js → Transaction-BFEc8CE5.js} +147 -147
  13. package/dist/{Transaction-Bth0jDaE.js → Transaction-CJ6tkVm7.js} +7 -7
  14. package/dist/{TransactionOld-BPnBP2cu.js → TransactionOld-CQCjIj-y.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BdPgL0W8.js → TransactionTable.vue_vue_type_script_setup_true_lang-Be5X-POy.js} +53 -57
  16. package/dist/{app-BfnnIbRB.js → app-BMjpPKrE.js} +372 -388
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-Bne2NJOR.js → assets-uU5K-t3w.js} +22 -25
  19. package/dist/{grafana-DpsdWu10.js → grafana-jZIQEb-4.js} +2 -2
  20. package/dist/{index-C5ARs2NW.js → index-4jxBEYP_.js} +1 -1
  21. package/dist/{index-BJaJ2nSQ.js → index-C2icSInW.js} +1 -1
  22. package/dist/{index-sQT526AQ.js → index-CWuISLUP.js} +2 -2
  23. package/dist/{index-Bm2MGtsS.js → index-CeqaPQxS.js} +2285 -2285
  24. package/dist/{index-BSl3VmjZ.js → index-Ci5Z345g.js} +1 -1
  25. package/dist/{index-B1EyQdUg.js → index-Db8vOED3.js} +1 -1
  26. package/dist/{index-B0zGQtbr.js → index-sQgEmNx9.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-CV3EXPH9.js → index.vue_vue_type_script_setup_true_lang-D8jBmVoN.js} +19 -19
  28. package/dist/model/transaction.d.ts +0 -2
  29. package/dist/package.json +1 -1
  30. package/dist/{payout-account-CX7Sx9yz.js → payout-account-CQou3k40.js} +3 -3
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/dist/Forbidden-BvhtA1Ni.js +0 -37
  34. package/dist/views/Forbidden.vue.d.ts +0 -2
@@ -1,8 +1,8 @@
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";
1
+ import { defineComponent as m, resolveComponent as d, openBlock as l, createBlock as f, normalizeClass as v, withCtx as y, createElementVNode as x, toDisplayString as P, createElementBlock as w, unref as E, createVNode as q, Fragment as R, renderList as V, ref as D, h as p } from "vue";
2
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";
3
+ import { g as $, a as L, t as b, c as N } from "./assets-uU5K-t3w.js";
4
+ import { e as h } from "./index-CeqaPQxS.js";
5
+ import { g as G } from "./grafana-jZIQEb-4.js";
6
6
  import { w as k } from "./Modal-DB8M9o1T.js";
7
7
  import { u as T } from "./error-K1CakhA9.js";
8
8
  import { useCoreStore as O, useI18n as Y } from "@feedmepos/mf-common";
@@ -12,19 +12,19 @@ const j = /* @__PURE__ */ m({
12
12
  row: {},
13
13
  data: {}
14
14
  },
15
- setup(s) {
16
- const n = s;
15
+ setup(o) {
16
+ const n = o;
17
17
  function r() {
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
- return (c, i) => {
20
+ return (i, s) => {
21
21
  const u = d("FmBadge");
22
- return l(), g(u, {
22
+ return l(), f(u, {
23
23
  inline: "",
24
- class: M(r())
24
+ class: v(r())
25
25
  }, {
26
- default: f(() => [
27
- x("div", null, D(c.data), 1)
26
+ default: y(() => [
27
+ x("div", null, P(i.data), 1)
28
28
  ]),
29
29
  _: 1
30
30
  }, 8, ["class"]);
@@ -36,7 +36,7 @@ const j = /* @__PURE__ */ m({
36
36
  row: {},
37
37
  data: {}
38
38
  },
39
- setup(s) {
39
+ setup(o) {
40
40
  return (n, r) => (l(), w("img", {
41
41
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
42
42
  src: E($)(n.row.original.gateway)
@@ -48,16 +48,16 @@ const j = /* @__PURE__ */ m({
48
48
  row: {},
49
49
  data: {}
50
50
  },
51
- setup(s) {
51
+ setup(o) {
52
52
  return (n, r) => {
53
- const c = d("FmTooltip");
54
- return l(), g(c, {
53
+ const i = d("FmTooltip");
54
+ return l(), f(i, {
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(() => [
60
+ default: y(() => [
61
61
  x("img", {
62
62
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
63
63
  src: E(L)(n.row.original.method.issuer, n.row.original.method.variant)
@@ -73,21 +73,21 @@ const j = /* @__PURE__ */ m({
73
73
  onAction: { type: Function },
74
74
  transaction: {}
75
75
  },
76
- setup(s) {
76
+ setup(o) {
77
77
  const n = [
78
- s.transaction.flags.query && {
78
+ o.transaction.flags.query && {
79
79
  label: "Query",
80
80
  sublabel: "Perform transaction status inquriy",
81
81
  icon: "question_answer",
82
82
  action: "query"
83
83
  },
84
- s.transaction.flags.refund && {
84
+ o.transaction.flags.refund && {
85
85
  label: "Refund",
86
86
  sublabel: "Perform transaction refund request",
87
87
  icon: "request_page",
88
88
  action: "refund"
89
89
  },
90
- s.transaction.flags.notify && {
90
+ o.transaction.flags.notify && {
91
91
  label: "Notify",
92
92
  sublabel: "Perform webhook notification for transaction",
93
93
  icon: "webhook",
@@ -100,19 +100,19 @@ const j = /* @__PURE__ */ m({
100
100
  action: "history"
101
101
  }
102
102
  ];
103
- return (r, c) => {
104
- const i = d("FmIcon"), u = d("FmMenuItem"), p = d("FmMenu");
103
+ return (r, i) => {
104
+ const s = d("FmIcon"), u = d("FmMenuItem"), g = d("FmMenu");
105
105
  return l(), w("div", {
106
- onClick: c[0] || (c[0] = (a) => {
106
+ onClick: i[0] || (i[0] = (a) => {
107
107
  a.stopPropagation();
108
108
  })
109
109
  }, [
110
- I(p, null, {
111
- "menu-button": f(() => [
112
- I(i, { name: "settings" })
110
+ q(g, null, {
111
+ "menu-button": y(() => [
112
+ q(s, { name: "settings" })
113
113
  ]),
114
- default: f(() => [
115
- (l(!0), w(P, null, R(n.filter((a) => !!a), (a) => (l(), g(u, {
114
+ default: y(() => [
115
+ (l(!0), w(R, null, V(n.filter((a) => !!a), (a) => (l(), f(u, {
116
116
  selectable: !0,
117
117
  key: a.label,
118
118
  sublabel: a.sublabel,
@@ -139,25 +139,25 @@ const j = /* @__PURE__ */ m({
139
139
  }
140
140
  },
141
141
  emits: ["row-click"],
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) {
142
+ setup(o, { emit: n }) {
143
+ var I;
144
+ const r = o, i = n, s = U(), u = B(), { sessionUser: g } = O(), { t: a } = Y();
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((c) => c.id === e._id ? N(e) : c), s.open({
149
149
  type: "success",
150
150
  title: "Transaction queried and updated successfully."
151
151
  });
152
152
  } catch (e) {
153
- i.open({
153
+ s.open({
154
154
  type: "error",
155
155
  title: "Fail to query transaction.",
156
156
  message: T(e)
157
157
  });
158
158
  }
159
159
  }
160
- async function K(t) {
160
+ async function S(t) {
161
161
  k(
162
162
  u,
163
163
  "Refund Transaction",
@@ -169,12 +169,12 @@ 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((c) => c.id === e._id ? N(e) : c), s.open({
173
173
  type: "success",
174
174
  title: "Transaction refund request initiated."
175
175
  });
176
176
  } catch (e) {
177
- i.open({
177
+ s.open({
178
178
  type: "error",
179
179
  title: "Fail to request refund transaction.",
180
180
  message: T(e)
@@ -190,12 +190,12 @@ const j = /* @__PURE__ */ m({
190
190
  "Are you sure to perform notify transaction?",
191
191
  async () => {
192
192
  try {
193
- await b.renotifyTransaction(t.id), i.open({
193
+ await b.renotifyTransaction(t.id), s.open({
194
194
  type: "success",
195
195
  title: "Transaction notify successfully."
196
196
  });
197
197
  } catch (e) {
198
- i.open({
198
+ s.open({
199
199
  type: "error",
200
200
  title: "Fail to notify transaction.",
201
201
  message: T(e)
@@ -204,7 +204,7 @@ const j = /* @__PURE__ */ m({
204
204
  }
205
205
  );
206
206
  }
207
- async function v(t) {
207
+ async function M(t) {
208
208
  const e = G([
209
209
  {
210
210
  type: "span",
@@ -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 A = D(""), 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 ? p(Q, { 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 ? p(J, { 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 }) => p(j, { row: e, data: t.getValue() })
261
261
  },
262
262
  {
263
263
  header: () => a("payment.transactions.table.restaurant"),
@@ -278,40 +278,36 @@ const j = /* @__PURE__ */ m({
278
278
  },
279
279
  {
280
280
  header: () => a("payment.transactions.table.sales_amount"),
281
- accessorKey: "amount",
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;
285
- }
281
+ accessorKey: "amount"
286
282
  }
287
283
  ];
288
- return (q = p.value) != null && q.role.isStaff && F.push({
284
+ return (I = g.value) != null && I.isInternal && F.push({
289
285
  header: () => a("payment.transactions.table.actions"),
290
286
  accessorKey: "actions",
291
- cell: ({ row: t }) => y(W, {
287
+ cell: ({ row: t }) => p(W, {
292
288
  transaction: t.original,
293
289
  onAction: (e) => {
294
290
  switch (e) {
295
291
  case "notify":
296
292
  return C(t.original);
297
293
  case "query":
298
- return S(t.original);
299
- case "refund":
300
294
  return K(t.original);
295
+ case "refund":
296
+ return S(t.original);
301
297
  case "history":
302
- return v(t.original);
298
+ return M(t.original);
303
299
  }
304
300
  }
305
301
  })
306
302
  }), (t, e) => {
307
- const o = d("FmTable");
308
- return l(), g(o, {
303
+ const c = d("FmTable");
304
+ return l(), f(c, {
309
305
  modelValue: A.value,
310
306
  "onUpdate:modelValue": e[0] || (e[0] = (_) => A.value = _),
311
307
  "column-defs": F,
312
308
  "row-data": r.data,
313
309
  loading: r.loading,
314
- onRowClick: e[1] || (e[1] = (_) => c("row-click", r.data.at(_.index)))
310
+ onRowClick: e[1] || (e[1] = (_) => i("row-click", r.data.at(_.index)))
315
311
  }, null, 8, ["modelValue", "row-data", "loading"]);
316
312
  };
317
313
  }