@feedmepos/mf-payment 1.1.7 → 1.1.8-beta.1

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 (40) hide show
  1. package/dist/{PayoutAccount-CAdClj2Y.js → PayoutAccount-8i57shlX.js} +3 -3
  2. package/dist/{PayoutAccount-C362ShA8.js → PayoutAccount-D7-wVu54.js} +5 -5
  3. package/dist/{PayoutAccountSetting-Cbl5b1Jr.js → PayoutAccountSetting-CMKwrL4M.js} +3 -3
  4. package/dist/{Restaurant-ClDu-bSv.js → Restaurant-CRacG00G.js} +4 -4
  5. package/dist/{RestaurantSetting-D5h5RoHf.js → RestaurantSetting-D8gT0OLI.js} +3 -3
  6. package/dist/Settlement-ChZcWUR2.js +454 -0
  7. package/dist/Settlement-HpncV_wh.js +219 -0
  8. package/dist/{SettlementTransactions-Cpaq8K6x.js → SettlementTransactions-B4foya_u.js} +75 -69
  9. package/dist/{SettlementTransactions-DIvLOEw6.js → SettlementTransactions-Qi1y0ELt.js} +80 -78
  10. package/dist/{Terminal-Cmed6xrj.js → Terminal-CPxZpDko.js} +6 -6
  11. package/dist/TerminalSetting-BTjY6R2k.js +497 -0
  12. package/dist/{Transaction-BQn5rvxe.js → Transaction-BRsEkW-X.js} +6 -6
  13. package/dist/{Transaction-8m9pEyyX.js → Transaction-DOJeGqKs.js} +52 -47
  14. package/dist/{TransactionOld-CX-Odthg.js → TransactionOld-ytcLv_RQ.js} +5 -5
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-BX7YIl4i.js → TransactionTable.vue_vue_type_script_setup_true_lang-BadRdWve.js} +12 -8
  16. package/dist/api/settlement/index.d.ts +1 -1
  17. package/dist/api/terminal/index.d.ts +4 -0
  18. package/dist/api/transaction/index.d.ts +1 -1
  19. package/dist/{app-QYQdqlqy.js → app-BTvVE_p8.js} +465 -459
  20. package/dist/app.d.ts +6 -0
  21. package/dist/app.js +1 -1
  22. package/dist/{assets-Da-9jPqG.js → assets-D3eyomsS.js} +49 -52
  23. package/dist/{grafana-BDr-LF8O.js → grafana-pHGBuON2.js} +7 -7
  24. package/dist/{index-Dg0Vf3qd.js → index-C3jOMHIB.js} +1 -1
  25. package/dist/{index-DbBsTEVS.js → index-DcXXLPgu.js} +1 -1
  26. package/dist/{index-Dq07OgOJ.js → index-DgF6PpqL.js} +9 -1
  27. package/dist/{index-0Dl-qVTd.js → index-DztkVnZ_.js} +29 -29
  28. package/dist/{index-DFq7xhNQ.js → index-GGA88cxn.js} +1 -1
  29. package/dist/{index-DTH2dIPG.js → index-Qf0lEeEt.js} +796 -796
  30. package/dist/{index.vue_vue_type_script_setup_true_lang-JHB8s5dZ.js → index.vue_vue_type_script_setup_true_lang-BfPw3DTP.js} +1 -1
  31. package/dist/model/transaction.d.ts +3 -0
  32. package/dist/package.json +1 -1
  33. package/dist/{payout-account--IA1DbB5.js → payout-account-G2OxuB1T.js} +2 -2
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +87 -0
  36. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +87 -0
  37. package/package.json +1 -1
  38. package/dist/Settlement-B06tIr4_.js +0 -445
  39. package/dist/Settlement-C2BVxmir.js +0 -219
  40. package/dist/TerminalSetting-BrTRbBF7.js +0 -389
@@ -1,12 +1,12 @@
1
- import { e as y } from "./index-DTH2dIPG.js";
1
+ import { e as y } from "./index-Qf0lEeEt.js";
2
2
  import { useCoreStore as p } from "@feedmepos/mf-common";
3
3
  import { h as m } from "./moment-h96o7c8I.js";
4
- const i = "https://grafana.feedme.farm/explore?schemaVersion=1", d = (o, e, t) => ({
4
+ const i = "https://grafana.feedme.farm/explore?schemaVersion=1", d = (t, e, o) => ({
5
5
  apq: {
6
6
  datasource: "P998741A58ED2B411",
7
7
  range: {
8
8
  from: e,
9
- to: t
9
+ to: o
10
10
  },
11
11
  queries: [
12
12
  {
@@ -18,11 +18,11 @@ const i = "https://grafana.feedme.farm/explore?schemaVersion=1", d = (o, e, t) =
18
18
  queryType: "search",
19
19
  service: "payment-backend",
20
20
  limit: 1e3,
21
- tags: o.map((r) => `${r.queryKey}=${r.queryValue}`).join(" ")
21
+ tags: t.map((r) => `${r.queryKey}=${r.queryValue}`).join(" ")
22
22
  }
23
23
  ]
24
24
  }
25
- }), g = (o, e) => {
25
+ }), g = (t, e) => {
26
26
  const r = p().currentCountry.value ?? y.F_COUNTRY.enum.MY, a = [
27
27
  // {
28
28
  // type: "resource",
@@ -32,7 +32,7 @@ const i = "https://grafana.feedme.farm/explore?schemaVersion=1", d = (o, e, t) =
32
32
  {
33
33
  type: "resource",
34
34
  queryKey: "cluster",
35
- queryValue: "production"
35
+ queryValue: "dev"
36
36
  },
37
37
  {
38
38
  type: "resource",
@@ -40,7 +40,7 @@ const i = "https://grafana.feedme.farm/explore?schemaVersion=1", d = (o, e, t) =
40
40
  queryValue: "apps-" + r.toLowerCase()
41
41
  }
42
42
  ];
43
- a.push(...o);
43
+ a.push(...t);
44
44
  let s = "now", n = "now-1d";
45
45
  if (e) {
46
46
  const u = +m(e).add(-3, "hours").toDate();
@@ -1,4 +1,4 @@
1
- import { b as r, g as e } from "./index-DTH2dIPG.js";
1
+ import { b as r, g as e } from "./index-Qf0lEeEt.js";
2
2
  const n = {
3
3
  async readRestaurantById(t) {
4
4
  const a = await r().get(`/restaurants/${t}`);
@@ -1,4 +1,4 @@
1
- import { d as u, b as s, g as t, f as e } from "./index-DTH2dIPG.js";
1
+ import { d as u, b as s, g as t, f as e } from "./index-Qf0lEeEt.js";
2
2
  const o = {
3
3
  async read(a) {
4
4
  return u(
@@ -1,4 +1,4 @@
1
- import { d as s, b as t, g as a, f as r, h as i } from "./index-DTH2dIPG.js";
1
+ import { d as s, b as t, g as a, f as r, h as i } from "./index-Qf0lEeEt.js";
2
2
  const y = {
3
3
  async create(e) {
4
4
  return s(
@@ -45,6 +45,14 @@ const y = {
45
45
  `restaurants/${e}/terminals?deviceType=${i.FdoTerminalDeviceType.Enum.TERMINAL}`
46
46
  )
47
47
  );
48
+ },
49
+ async kioskModeRequest(e, n) {
50
+ return a(
51
+ await t().post(
52
+ `/payments/terminals/${e}/kiosk`,
53
+ n
54
+ )
55
+ );
48
56
  }
49
57
  };
50
58
  export {
@@ -1,15 +1,15 @@
1
- import { g as r, b as i, e as y, j as f, l as p, k as b, i as u, r as m } from "./index-DTH2dIPG.js";
1
+ import { g as r, b as i, j as c, l as d, k as y, i as l, r as m } from "./index-Qf0lEeEt.js";
2
2
  import { h as o } from "./moment-h96o7c8I.js";
3
- import { d as w } from "./dinero-CIVmXLL-.js";
4
- function* S(t, a) {
3
+ import { d as f } from "./dinero-CIVmXLL-.js";
4
+ function* p(t, n) {
5
5
  const e = t[Symbol.iterator](), s = e.next();
6
6
  if (!s.done) {
7
7
  yield s.value;
8
- for (const l of e)
9
- yield a, yield l;
8
+ for (const a of e)
9
+ yield n, yield a;
10
10
  }
11
11
  }
12
- const D = {
12
+ const S = {
13
13
  async updateRemark(t) {
14
14
  return r(
15
15
  await i().put("/settlements/remark", t)
@@ -22,32 +22,32 @@ const D = {
22
22
  })
23
23
  );
24
24
  },
25
- async downloadBankInstructionFile(t, a) {
26
- const e = "7161151059";
27
- let s = "MYR";
28
- t === y.F_COUNTRY.enum.SG && (s = "SGD");
29
- const l = a.map((n) => ({
25
+ async downloadBankInstructionFile(t) {
26
+ const n = "7161151059";
27
+ if (t.length === 0)
28
+ throw Error("no settlement for export");
29
+ const e = t.map((a) => ({
30
30
  productCode: "P2A",
31
31
  settlementDate: o().format("DDMMYYYY"),
32
32
  myRefNo: "",
33
- companyAccNo: e,
34
- amount: w(n.totalPayout).toUnit().toString(),
35
- currency: s,
33
+ companyAccNo: n,
34
+ amount: f(a.totalPayout).toUnit().toString(),
35
+ currency: t[0].totalPayout.currency,
36
36
  proxyType: "",
37
37
  transferType: "DFLT",
38
- beneficiaryAccountNo: n.beneficiaryBank.accountNumber.toString().trim(),
39
- beneficiarySwiftCode: n.beneficiaryBank.swiftCode,
38
+ beneficiaryAccountNo: a.beneficiaryBank.accountNumber.toString().trim(),
39
+ beneficiarySwiftCode: a.beneficiaryBank.swiftCode,
40
40
  beneficiaryCountryCode: "",
41
41
  duitNowID: "",
42
- recipientReference: n._id,
42
+ recipientReference: a._id,
43
43
  pf_payment: "",
44
44
  notifyMethod: "",
45
45
  emailAddress: ""
46
- })), c = new Blob(
46
+ })), s = new Blob(
47
47
  Array.from(
48
- S(
49
- l.map(
50
- (n) => Object.values(n).map((d) => d).join("|")
48
+ p(
49
+ e.map(
50
+ (a) => Object.values(a).map((u) => u).join("|")
51
51
  ),
52
52
  `
53
53
  `
@@ -57,13 +57,13 @@ const D = {
57
57
  type: "text/plain;charset=utf-8"
58
58
  }
59
59
  );
60
- return f(c, "duitnow_bulk_transfer.txt");
60
+ return c(s, "duitnow_bulk_transfer.txt");
61
61
  },
62
- async downloadSummaryReport(t, a) {
63
- return p(
64
- t.map((e) => b(e)),
62
+ async downloadSummaryReport(t, n) {
63
+ return d(
64
+ t.map((e) => y(e)),
65
65
  {
66
- filename: `summary-report-${a.start}-${a.end}.xlsx`,
66
+ filename: `summary-report-${n.start}-${n.end}.xlsx`,
67
67
  exclude: [
68
68
  "beneficiaryBank.swiftCode",
69
69
  "beneficiaryBank.holderName",
@@ -95,7 +95,7 @@ const D = {
95
95
  );
96
96
  },
97
97
  async downloadSettlementReport(t) {
98
- return u(
98
+ return l(
99
99
  await i().get("/settlements/audit/v2", {
100
100
  params: {
101
101
  start: o(t.start).startOf("day").toISOString(),
@@ -106,7 +106,7 @@ const D = {
106
106
  );
107
107
  },
108
108
  async downloadRestaurantSettlementReport(t) {
109
- return u(
109
+ return l(
110
110
  await m().get("/settlements/report", {
111
111
  params: {
112
112
  start: o(t.start).startOf("day").toISOString(),
@@ -142,5 +142,5 @@ const D = {
142
142
  }
143
143
  };
144
144
  export {
145
- D as s
145
+ S as s
146
146
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as b, watch as w } from "vue";
2
2
  import { useRoute as A, useRouter as m } from "vue-router";
3
- import { a as y } from "./index-DTH2dIPG.js";
3
+ import { a as y } from "./index-Qf0lEeEt.js";
4
4
  var d = {};
5
5
  (function(s) {
6
6
  (function(c) {