@feedmepos/mf-payment 1.1.7-beta.5 → 1.1.7-beta.6

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 (32) hide show
  1. package/dist/{PayoutAccount-BM5YRYN9.js → PayoutAccount-1d1J3Mbp.js} +5 -5
  2. package/dist/{PayoutAccount-CnxX2N0l.js → PayoutAccount-DTRSgLrZ.js} +3 -3
  3. package/dist/{PayoutAccountSetting-CYEDbNXl.js → PayoutAccountSetting-DM7pMb0z.js} +3 -3
  4. package/dist/{Restaurant-D_iO5C0m.js → Restaurant-DCJsgh4n.js} +4 -4
  5. package/dist/{RestaurantSetting-CuOT140H.js → RestaurantSetting-DSv0mpiy.js} +3 -3
  6. package/dist/{Settlement-CY8315rQ.js → Settlement-BP4npkfA.js} +3 -3
  7. package/dist/Settlement-Cie3vI3n.js +453 -0
  8. package/dist/{SettlementTransactions-Ci8PF1OX.js → SettlementTransactions-DyXb1ZAw.js} +80 -78
  9. package/dist/{SettlementTransactions-ziCXqaiy.js → SettlementTransactions-bRdkx8o5.js} +68 -66
  10. package/dist/{Terminal-BuOfI_zu.js → Terminal-CDBNFPbr.js} +5 -5
  11. package/dist/{TerminalSetting-CTKfzmft.js → TerminalSetting-pAsMFueM.js} +3 -3
  12. package/dist/{Transaction-et-KevEl.js → Transaction-DqvPuX4W.js} +5 -5
  13. package/dist/{Transaction-Bpa0eDNG.js → Transaction-W8sRSgGc.js} +6 -6
  14. package/dist/{TransactionOld-y5-lkWbc.js → TransactionOld-BOQ6tBqe.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BBtUxiMq.js → TransactionTable.vue_vue_type_script_setup_true_lang-CtjjM2gz.js} +3 -3
  16. package/dist/{app-Bz1GxrfP.js → app-CYglC23K.js} +282 -280
  17. package/dist/app.d.ts +2 -0
  18. package/dist/app.js +1 -1
  19. package/dist/{assets-CFu52OGc.js → assets-G15yB8yl.js} +1 -1
  20. package/dist/{grafana-DR0vcbv7.js → grafana-ByGWVKk3.js} +1 -1
  21. package/dist/{index-C1IEirFI.js → index-BKTCJbdW.js} +1 -1
  22. package/dist/{index-BJF9lPV4.js → index-C13NEGId.js} +1 -1
  23. package/dist/{index-DY-CMDz7.js → index-CtqzAx42.js} +1 -1
  24. package/dist/{index-CM1aljm7.js → index-DXrfVp2-.js} +1 -1
  25. package/dist/{index-CAiA-B0B.js → index-DjrHDthD.js} +1455 -1455
  26. package/dist/{index-DbaQ_-s2.js → index-WON1wez7.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-B0E1G00H.js → index.vue_vue_type_script_setup_true_lang-BL_w1CP7.js} +1 -1
  28. package/dist/package.json +1 -1
  29. package/dist/{payout-account-wPSONvk-.js → payout-account-Bk7qyKXt.js} +2 -2
  30. package/dist/tsconfig.app.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/dist/Settlement-6HiVcu0l.js +0 -445
@@ -1,14 +1,15 @@
1
- import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as p, ref as x, onMounted as Y, watch as H, createVNode as n, createTextVNode as i, h as N } from "vue";
2
- import { e as E, u as q } from "./index-CAiA-B0B.js";
3
- import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
1
+ import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as s, createElementVNode as t, toDisplayString as i, createElementBlock as L, unref as m, ref as x, onMounted as H, watch as q, createVNode as n, createTextVNode as u, h as N } from "vue";
2
+ import { e as E, u as J } from "./index-DjrHDthD.js";
3
+ import { useDialog as Q, useSnackbar as W } from "@feedmepos/ui-library";
4
4
  import { d as k } from "./dinero-CIVmXLL-.js";
5
- import { g as W, a as X, t as P, b as Z } from "./assets-CFu52OGc.js";
6
- import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
7
- import { useRouter as te } from "vue-router";
8
- import { s as ae } from "./index-DY-CMDz7.js";
9
- import { u as ne } from "./error-K1CakhA9.js";
10
- import { w as oe } from "./Modal-DB8M9o1T.js";
11
- const re = /* @__PURE__ */ w({
5
+ import { g as X, a as Z, t as P, b as ee } from "./assets-G15yB8yl.js";
6
+ import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
7
+ import { useRouter as ae } from "vue-router";
8
+ import { s as ne } from "./index-CtqzAx42.js";
9
+ import { u as oe } from "./error-K1CakhA9.js";
10
+ import { w as re } from "./Modal-DB8M9o1T.js";
11
+ import { h as le } from "./moment-h96o7c8I.js";
12
+ const se = /* @__PURE__ */ w({
12
13
  __name: "Status",
13
14
  props: {
14
15
  row: {},
@@ -16,47 +17,47 @@ const re = /* @__PURE__ */ w({
16
17
  },
17
18
  setup(y) {
18
19
  const o = y;
19
- function m() {
20
+ function d() {
20
21
  return o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.PENDING ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.FAILED ? "!w-[16px] !h-[16px] bg-red-400" : o.data === E.F_PAYMENT_TRANSACTION_STATUS.Enum.REFUNDED ? "!w-[16px] !h-[16px] bg-blue-400" : "!w-[16px] !h-[16px] bg-green-400";
21
22
  }
22
23
  return (A, _) => {
23
24
  const b = g("FmBadge");
24
25
  return F(), B(b, {
25
26
  inline: "",
26
- class: G(m())
27
+ class: G(d())
27
28
  }, {
28
- default: l(() => [
29
- t("div", null, u(A.data), 1)
29
+ default: s(() => [
30
+ t("div", null, i(A.data), 1)
30
31
  ]),
31
32
  _: 1
32
33
  }, 8, ["class"]);
33
34
  };
34
35
  }
35
- }), le = ["src"], se = /* @__PURE__ */ w({
36
+ }), ie = ["src"], ue = /* @__PURE__ */ w({
36
37
  __name: "Gateway",
37
38
  props: {
38
39
  row: {},
39
40
  data: {}
40
41
  },
41
42
  setup(y) {
42
- return (o, m) => (F(), L("img", {
43
+ return (o, d) => (F(), L("img", {
43
44
  class: "rounded-md m-auto border-transparent object-contain w-[32px] h-[32px]",
44
- src: p(W)(o.row.original.gateway)
45
- }, null, 8, le));
45
+ src: m(X)(o.row.original.gateway)
46
+ }, null, 8, ie));
46
47
  }
47
- }), ue = ["src"], ie = /* @__PURE__ */ w({
48
+ }), me = ["src"], de = /* @__PURE__ */ w({
48
49
  __name: "Method",
49
50
  props: {
50
51
  row: {},
51
52
  data: {}
52
53
  },
53
54
  setup(y) {
54
- return (o, m) => (F(), L("img", {
55
+ return (o, d) => (F(), L("img", {
55
56
  class: "rounded-md m-auto border-transparent w-[32px] h-[32px]",
56
- src: p(X)(o.row.original.method.issuer, o.row.original.method.variant)
57
- }, null, 8, ue));
57
+ src: m(Z)(o.row.original.method.issuer, o.row.original.method.variant)
58
+ }, null, 8, me));
58
59
  }
59
- }), me = /* @__PURE__ */ w({
60
+ }), ce = /* @__PURE__ */ w({
60
61
  __name: "Actions",
61
62
  props: {
62
63
  row: {},
@@ -64,17 +65,17 @@ const re = /* @__PURE__ */ w({
64
65
  },
65
66
  emits: ["delete"],
66
67
  setup(y, { emit: o }) {
67
- const m = o;
68
+ const d = o;
68
69
  return (A, _) => {
69
70
  const b = g("FmButton");
70
71
  return F(), B(b, {
71
72
  variant: "plain",
72
73
  "prepend-icon": "delete",
73
- onClick: _[0] || (_[0] = () => m("delete"))
74
+ onClick: _[0] || (_[0] = () => d("delete"))
74
75
  });
75
76
  };
76
77
  }
77
- }), de = { class: "flex mb-6" }, ce = { class: "my-6 w-[240px]" }, Fe = /* @__PURE__ */ w({
78
+ }), pe = { class: "flex mb-6" }, fe = { class: "my-6 w-[240px]" }, Ne = /* @__PURE__ */ w({
78
79
  __name: "SettlementTransactions",
79
80
  props: {
80
81
  settlementId: {
@@ -83,19 +84,19 @@ const re = /* @__PURE__ */ w({
83
84
  }
84
85
  },
85
86
  setup(y) {
86
- const o = y, { isLoading: m, startAsyncCall: A, startAsyncCallFn: _ } = q(!0), b = J(), M = Q(), O = te(), s = x(), S = x([]), I = x([]);
87
+ const o = y, { isLoading: d, startAsyncCall: A, startAsyncCallFn: _ } = J(!0), b = Q(), O = W(), R = ae(), l = x(), S = x([]), h = x([]);
87
88
  async function V(a = !1) {
88
89
  A(async () => {
89
- a || (s.value = await ae.readById(o.settlementId));
90
+ a || (l.value = await ne.readById(o.settlementId));
90
91
  const e = await P.readBySettlementId(o.settlementId);
91
- S.value = Z(e), I.value = S.value;
92
+ S.value = ee(e), h.value = S.value;
92
93
  });
93
94
  }
94
- function R() {
95
+ function Y() {
95
96
  V();
96
97
  }
97
- Y(R);
98
- const K = x(""), U = [
98
+ H(Y);
99
+ const D = x(""), U = [
99
100
  {
100
101
  header: () => "Transaction ID",
101
102
  accessorKey: "id"
@@ -110,7 +111,7 @@ const re = /* @__PURE__ */ w({
110
111
  meta: {
111
112
  textAlign: "center"
112
113
  },
113
- cell: ({ cell: a, row: e }) => e.original.method ? N(se, { row: e, data: a.getValue() }) : ""
114
+ cell: ({ cell: a, row: e }) => e.original.method ? N(ue, { row: e, data: a.getValue() }) : ""
114
115
  },
115
116
  {
116
117
  header: () => "Method",
@@ -118,7 +119,7 @@ const re = /* @__PURE__ */ w({
118
119
  meta: {
119
120
  textAlign: "center"
120
121
  },
121
- cell: ({ cell: a, row: e }) => e.original.method ? N(ie, { row: e, data: a.getValue() }) : ""
122
+ cell: ({ cell: a, row: e }) => e.original.method ? N(de, { row: e, data: a.getValue() }) : ""
122
123
  },
123
124
  {
124
125
  header: () => "Type",
@@ -136,7 +137,7 @@ const re = /* @__PURE__ */ w({
136
137
  {
137
138
  header: () => "Status",
138
139
  accessorKey: "status",
139
- cell: ({ cell: a, row: e }) => N(re, { row: e, data: a.getValue() })
140
+ cell: ({ cell: a, row: e }) => N(se, { row: e, data: a.getValue() })
140
141
  },
141
142
  {
142
143
  header: () => "Transaction At",
@@ -160,10 +161,10 @@ const re = /* @__PURE__ */ w({
160
161
  {
161
162
  header: () => "Actions",
162
163
  accessorKey: "action",
163
- cell: ({ cell: a, row: e }) => N(me, {
164
+ cell: ({ cell: a, row: e }) => N(ce, {
164
165
  row: e,
165
166
  data: a.getValue(),
166
- onDelete: () => oe(
167
+ onDelete: () => re(
167
168
  b,
168
169
  "Remove transaction",
169
170
  "Are you sure to remove transaction from settlement? This action cannot be revert !",
@@ -171,10 +172,10 @@ const re = /* @__PURE__ */ w({
171
172
  try {
172
173
  await P.removeTransactionFromSettlement(e.original.id), await V();
173
174
  } catch (f) {
174
- M.open({
175
+ O.open({
175
176
  type: "error",
176
177
  title: "Error occurs when removing transaction",
177
- message: ne(f)
178
+ message: oe(f)
178
179
  });
179
180
  }
180
181
  })
@@ -182,50 +183,51 @@ const re = /* @__PURE__ */ w({
182
183
  })
183
184
  }
184
185
  ], T = x("");
185
- let h;
186
- return H(T, async () => {
187
- h && clearTimeout(h), h = setTimeout(() => {
186
+ let I;
187
+ return q(T, async () => {
188
+ I && clearTimeout(I), I = setTimeout(() => {
188
189
  var a = new RegExp(T.value, "i");
189
- I.value = S.value.filter((e) => {
190
+ h.value = S.value.filter((e) => {
190
191
  const f = JSON.stringify(e);
191
192
  return a.test(f);
192
193
  });
193
194
  }, 700);
194
195
  }), (a, e) => {
195
- var $;
196
+ var K, $;
196
197
  const f = g("FmCardHeader"), v = g("FmCardSection"), C = g("FmCard"), j = g("FmSearch"), z = g("FmTable");
197
- return F(), B(ee, {
198
- title: `Settlement Transactions (${($ = s.value) == null ? void 0 : $._id})`,
199
- loading: p(m),
200
- onBack: p(O).back
198
+ return F(), B(te, {
199
+ title: `Settlement Transactions (${(K = l.value) == null ? void 0 : K._id})`,
200
+ description: `Date: ${m(le)(($ = l.value) == null ? void 0 : $.createdAt).format("YYYY-MM-DD")}`,
201
+ loading: m(d),
202
+ onBack: m(R).back
201
203
  }, {
202
- default: l(() => [
203
- t("div", de, [
204
+ default: s(() => [
205
+ t("div", pe, [
204
206
  n(C, {
205
207
  horizontal: "",
206
208
  class: "flex-1 p-6",
207
209
  variant: "elevated"
208
210
  }, {
209
- default: l(() => [
211
+ default: s(() => [
210
212
  n(v, { class: "flex flex-col gap-16 justify-between" }, {
211
- default: l(() => [
213
+ default: s(() => [
212
214
  n(f, {
213
215
  class: "p-0",
214
216
  title: "Transaction Info",
215
217
  subtitle: ""
216
218
  }),
217
219
  n(v, { class: "p-0" }, {
218
- default: l(() => {
219
- var r, d, c, D;
220
+ default: s(() => {
221
+ var r, c, p, M;
220
222
  return [
221
223
  e[2] || (e[2] = t("b", null, "For", -1)),
222
- i(": " + u((d = (r = s.value) == null ? void 0 : r.store) == null ? void 0 : d.event) + " ", 1),
224
+ u(": " + i((c = (r = l.value) == null ? void 0 : r.store) == null ? void 0 : c.event) + " ", 1),
223
225
  e[3] || (e[3] = t("br", null, null, -1)),
224
226
  e[4] || (e[4] = t("b", null, "Reference", -1)),
225
- i(": " + u((D = (c = s.value) == null ? void 0 : c.store) == null ? void 0 : D.id), 1),
227
+ u(": " + i((M = (p = l.value) == null ? void 0 : p.store) == null ? void 0 : M.id), 1),
226
228
  e[5] || (e[5] = t("br", null, null, -1)),
227
229
  e[6] || (e[6] = t("b", null, "Transaction", -1)),
228
- i(": " + u(S.value.length), 1)
230
+ u(": " + i(S.value.length), 1)
229
231
  ];
230
232
  }),
231
233
  _: 1
@@ -241,26 +243,26 @@ const re = /* @__PURE__ */ w({
241
243
  class: "flex-1 p-6 mx-6",
242
244
  variant: "elevated"
243
245
  }, {
244
- default: l(() => [
246
+ default: s(() => [
245
247
  n(v, { class: "flex flex-col gap-16 justify-between" }, {
246
- default: l(() => [
248
+ default: s(() => [
247
249
  n(f, {
248
250
  class: "p-0",
249
251
  title: "Bank Info",
250
252
  subtitle: ""
251
253
  }),
252
254
  n(v, { class: "p-0" }, {
253
- default: l(() => {
254
- var r, d, c;
255
+ default: s(() => {
256
+ var r, c, p;
255
257
  return [
256
258
  e[7] || (e[7] = t("b", null, "Bank", -1)),
257
- i(": " + u((r = s.value) == null ? void 0 : r.beneficiaryBank.name), 1),
259
+ u(": " + i((r = l.value) == null ? void 0 : r.beneficiaryBank.name), 1),
258
260
  e[8] || (e[8] = t("br", null, null, -1)),
259
261
  e[9] || (e[9] = t("b", null, "Name", -1)),
260
- i(": " + u((d = s.value) == null ? void 0 : d.beneficiaryBank.holderName), 1),
262
+ u(": " + i((c = l.value) == null ? void 0 : c.beneficiaryBank.holderName), 1),
261
263
  e[10] || (e[10] = t("br", null, null, -1)),
262
264
  e[11] || (e[11] = t("b", null, "Number", -1)),
263
- i(": " + u((c = s.value) == null ? void 0 : c.beneficiaryBank.accountNumber), 1)
265
+ u(": " + i((p = l.value) == null ? void 0 : p.beneficiaryBank.accountNumber), 1)
264
266
  ];
265
267
  }),
266
268
  _: 1
@@ -276,26 +278,26 @@ const re = /* @__PURE__ */ w({
276
278
  class: "flex-1 p-6",
277
279
  variant: "elevated"
278
280
  }, {
279
- default: l(() => [
281
+ default: s(() => [
280
282
  n(v, { class: "flex flex-col gap-16 justify-between" }, {
281
- default: l(() => [
283
+ default: s(() => [
282
284
  n(f, {
283
285
  class: "p-0",
284
286
  title: "Payout Info",
285
287
  subtitle: ""
286
288
  }),
287
289
  n(v, { class: "p-0" }, {
288
- default: l(() => {
289
- var r, d, c;
290
+ default: s(() => {
291
+ var r, c, p;
290
292
  return [
291
293
  e[12] || (e[12] = t("b", null, "Amount", -1)),
292
- i(": " + u(p(k)((r = s.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
294
+ u(": " + i(m(k)((r = l.value) == null ? void 0 : r.totalAmount).toFormat("$0.00")), 1),
293
295
  e[13] || (e[13] = t("br", null, null, -1)),
294
296
  e[14] || (e[14] = t("b", null, "Fee", -1)),
295
- i(": " + u(p(k)((d = s.value) == null ? void 0 : d.totalFee).toFormat("$0.00")), 1),
297
+ u(": " + i(m(k)((c = l.value) == null ? void 0 : c.totalFee).toFormat("$0.00")), 1),
296
298
  e[15] || (e[15] = t("br", null, null, -1)),
297
299
  e[16] || (e[16] = t("b", null, "Payout", -1)),
298
- i(": " + u(p(k)((c = s.value) == null ? void 0 : c.totalPayout).toFormat("$0.00")), 1)
300
+ u(": " + i(m(k)((p = l.value) == null ? void 0 : p.totalPayout).toFormat("$0.00")), 1)
299
301
  ];
300
302
  }),
301
303
  _: 1
@@ -307,7 +309,7 @@ const re = /* @__PURE__ */ w({
307
309
  _: 1
308
310
  })
309
311
  ]),
310
- t("div", ce, [
312
+ t("div", fe, [
311
313
  n(j, {
312
314
  modelValue: T.value,
313
315
  "onUpdate:modelValue": e[0] || (e[0] = (r) => T.value = r),
@@ -315,20 +317,20 @@ const re = /* @__PURE__ */ w({
315
317
  }, null, 8, ["modelValue"])
316
318
  ]),
317
319
  n(z, {
318
- modelValue: K.value,
319
- "onUpdate:modelValue": e[1] || (e[1] = (r) => K.value = r),
320
+ modelValue: D.value,
321
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => D.value = r),
320
322
  "shrink-at": !1,
321
323
  "search-value": T.value,
322
- "row-data": I.value,
324
+ "row-data": h.value,
323
325
  "column-defs": U,
324
- loading: p(m)
326
+ loading: m(d)
325
327
  }, null, 8, ["modelValue", "search-value", "row-data", "loading"])
326
328
  ]),
327
329
  _: 1
328
- }, 8, ["title", "loading", "onBack"]);
330
+ }, 8, ["title", "description", "loading", "onBack"]);
329
331
  };
330
332
  }
331
333
  });
332
334
  export {
333
- Fe as default
335
+ Ne as default
334
336
  };