@feedmepos/mf-payment 1.6.5 → 1.6.6-dev

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 (43) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-DAxaoH2_.js → Actions.vue_vue_type_script_setup_true_lang-Clsf72yT.js} +1 -1
  2. package/dist/{Chargeback-mmahMkU2.js → Chargeback-DoiZmxRc.js} +5 -5
  3. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-CdICJijx.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DlwyoRyN.js} +1 -1
  4. package/dist/{OnboardForm-DcHQqYYX.js → OnboardForm-DGWfjxZR.js} +5 -5
  5. package/dist/{OnboardForm-0wfXiZNq.js → OnboardForm-DXV-Pc1Y.js} +5 -5
  6. package/dist/{OnboardSubmission-Dp4QmPAZ.js → OnboardSubmission-BBXMk9Tw.js} +2 -2
  7. package/dist/{OnboardSubmission-CRIsACkI.js → OnboardSubmission-vZZEO9ez.js} +5 -5
  8. package/dist/{PayoutAccount-B0fiUu5k.js → PayoutAccount-C0rVV_Sn.js} +5 -5
  9. package/dist/{PayoutAccount-CVP7XAWH.js → PayoutAccount-TbyH0c8w.js} +5 -5
  10. package/dist/{PayoutAccountSetting-AfiXAw4i.js → PayoutAccountSetting-Cy7-BGpz.js} +96 -93
  11. package/dist/{Restaurant-DjVmC321.js → Restaurant-DOx3AlXt.js} +4 -4
  12. package/dist/{RestaurantSetting-otcaVBEY.js → RestaurantSetting-CIdcsypt.js} +3 -3
  13. package/dist/{Settlement-BR0eiOvD.js → Settlement-BikQzNUH.js} +4 -4
  14. package/dist/{Settlement-EvbyEhZy.js → Settlement-COiJkyPE.js} +3 -3
  15. package/dist/{SettlementTransactions-CzXpI06o.js → SettlementTransactions-CAUt1eQe.js} +4 -4
  16. package/dist/{SettlementTransactions-Cl5MpLRe.js → SettlementTransactions-DWd6qioy.js} +4 -4
  17. package/dist/{Status.vue_vue_type_script_setup_true_lang-1c-L6wBM.js → Status.vue_vue_type_script_setup_true_lang-yZz_GVVU.js} +1 -1
  18. package/dist/{Terminal-CFw1icwx.js → Terminal-BSAYsZ00.js} +5 -5
  19. package/dist/{TerminalSetting-BnHK2VcU.js → TerminalSetting-CdAABoUa.js} +245 -243
  20. package/dist/{Transaction-D2LeKB1L.js → Transaction-CADEPU1t.js} +13 -13
  21. package/dist/{Transaction-Hh9DsZti.js → Transaction-RFoivnE3.js} +9 -9
  22. package/dist/{TransactionOld-CZzDvZ4V.js → TransactionOld-LsRHg_jj.js} +7 -7
  23. package/dist/api/document/index.d.ts +1 -0
  24. package/dist/{app-CnRmLdS_.js → app-BKYw-TBs.js} +180 -171
  25. package/dist/app.js +1 -1
  26. package/dist/{assets-8u-qS55J.js → assets-Q3jwGdH2.js} +1 -1
  27. package/dist/{grafana-DVHjaRm4.js → grafana-CUQUJCoc.js} +1 -1
  28. package/dist/{index-DTY9OeUA.js → index-BgLxG5Su.js} +1 -1
  29. package/dist/{index-D6wYQSLs.js → index-CMeKR83d.js} +1 -1
  30. package/dist/{index-DyVl5OC4.js → index-Cln1qxWz.js} +1 -1
  31. package/dist/{index-BnFjLAZ9.js → index-Cm10hA-5.js} +21 -3
  32. package/dist/{index-DP823O2i.js → index-DTfDweZz.js} +1 -1
  33. package/dist/{index-iujpUb8Z.js → index-D_Ns3MqY.js} +2 -2
  34. package/dist/{index-fKbtEyKA.js → index-DtC940-u.js} +1 -1
  35. package/dist/index-FbkInaFL.js +62 -0
  36. package/dist/{index-CWbl1nrA.js → index-HFB7pbLN.js} +1 -1
  37. package/dist/{index-DjPlzbUi.js → index-fFwg-TQI.js} +1 -1
  38. package/dist/{index.vue_vue_type_script_setup_true_lang-D-7OGj8L.js → index.vue_vue_type_script_setup_true_lang-ClzNDEHF.js} +1 -1
  39. package/dist/package.json +2 -2
  40. package/dist/{payout-account-CpX1Qppg.js → payout-account-DGQQnDkh.js} +3 -3
  41. package/dist/tsconfig.app.tsbuildinfo +1 -1
  42. package/package.json +1 -1
  43. package/dist/index-BwdnN4a2.js +0 -58
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as a, i as e, r as i } from "./app-CnRmLdS_.js";
1
+ import { b as a, i as e, r as i } from "./app-BKYw-TBs.js";
2
2
  import "@feedmepos/mf-financing";
3
3
  import "vue";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { p as Q } from "./index-DjPlzbUi.js";
1
+ import { p as Q } from "./index-fFwg-TQI.js";
2
2
  import { d as w } from "./dinero-CIVmXLL-.js";
3
3
  import { h as V } from "./moment-h96o7c8I.js";
4
4
  import { defineComponent as c, resolveComponent as R, openBlock as l, createBlock as L, normalizeClass as T, withCtx as z, createElementVNode as p, toDisplayString as r } from "vue";
@@ -1,4 +1,4 @@
1
- import { e as c } from "./index-DjPlzbUi.js";
1
+ import { e as c } from "./index-fFwg-TQI.js";
2
2
  import { useCoreStore as p } from "@feedmepos/mf-common";
3
3
  import { h as n } from "./moment-h96o7c8I.js";
4
4
  const i = "https://grafana.feedme.farm/explore?schemaVersion=1", m = (o, r, t) => ({
@@ -1,4 +1,4 @@
1
- import { g as n, b as e, a as o, d as m, l, c as i, r as f } from "./index-DjPlzbUi.js";
1
+ import { g as n, b as e, a as o, d as m, l, c as i, r as f } from "./index-fFwg-TQI.js";
2
2
  import { h as a } from "./moment-h96o7c8I.js";
3
3
  const w = {
4
4
  async readBySettlementId(t) {
@@ -1,4 +1,4 @@
1
- import { g as o, c as m, b as s, d as l, l as c, f as d, h as y } from "./index-DjPlzbUi.js";
1
+ import { g as o, c as m, b as s, d as l, l as c, f as d, h as y } from "./index-fFwg-TQI.js";
2
2
  import { h as a } from "./moment-h96o7c8I.js";
3
3
  import { d as f } from "./dinero-CIVmXLL-.js";
4
4
  function* p(t, r) {
@@ -1,4 +1,4 @@
1
- import { b as r, g as e } from "./index-DjPlzbUi.js";
1
+ import { b as r, g as e } from "./index-fFwg-TQI.js";
2
2
  const n = {
3
3
  async readRestaurantById(t) {
4
4
  const a = await r().get(`/restaurants/${t}`);
@@ -1,10 +1,28 @@
1
- import { b as r, c as n } from "./index-DjPlzbUi.js";
1
+ import { b as r, c as p } from "./index-fFwg-TQI.js";
2
2
  const i = {
3
3
  async upload(e, s, t) {
4
- const a = (await n().post("/document/presign", {
4
+ const o = (await p().post("/document/presign", {
5
5
  file: e,
6
6
  restaurantId: t
7
7
  })).data.url;
8
+ if (!(await fetch(o, {
9
+ method: "PUT",
10
+ body: s,
11
+ headers: {
12
+ "Content-Type": s.type || "application/octet-stream"
13
+ }
14
+ })).ok)
15
+ throw new Error("Failed to upload document");
16
+ return e;
17
+ },
18
+ async adminUpload(e, s, t, n) {
19
+ const a = (await r().post(
20
+ `/businesses/${t}/document/presign`,
21
+ {
22
+ file: e,
23
+ restaurantId: n
24
+ }
25
+ )).data.url;
8
26
  if (!(await fetch(a, {
9
27
  method: "PUT",
10
28
  body: s,
@@ -16,7 +34,7 @@ const i = {
16
34
  return e;
17
35
  },
18
36
  async view(e, s) {
19
- return (await n().post("/document/view", {
37
+ return (await p().post("/document/view", {
20
38
  file: e,
21
39
  restaurantId: s
22
40
  })).data.url;
@@ -1,4 +1,4 @@
1
- import { b as a, g as t, p as r, c as i, a as s } from "./index-DjPlzbUi.js";
1
+ import { b as a, g as t, p as r, c as i, a as s } from "./index-fFwg-TQI.js";
2
2
  const m = {
3
3
  async create(e) {
4
4
  return s(
@@ -1,6 +1,6 @@
1
- import { g as n, b as a, o as u, a as m } from "./index-DjPlzbUi.js";
1
+ import { g as n, b as a, o as u, a as m } from "./index-fFwg-TQI.js";
2
2
  import { h as b } from "./moment-h96o7c8I.js";
3
- import { d } from "./index-BnFjLAZ9.js";
3
+ import { d } from "./index-Cm10hA-5.js";
4
4
  const w = {
5
5
  async read(s) {
6
6
  return m(
@@ -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 { g as y } from "./app-CnRmLdS_.js";
3
+ import { g as y } from "./app-BKYw-TBs.js";
4
4
  var d = {};
5
5
  (function(s) {
6
6
  (function(c) {
@@ -0,0 +1,62 @@
1
+ import { useCoreStore as d } from "@feedmepos/mf-common";
2
+ import { h as m } from "./moment-h96o7c8I.js";
3
+ import { ref as g } from "vue";
4
+ import { useSnackbar as p } from "@feedmepos/ui-library";
5
+ const k = () => {
6
+ const { currentCountry: a } = d();
7
+ return {
8
+ getBillLink: (t) => {
9
+ var o;
10
+ return !((o = t.payId) != null && o.startsWith("bill_")) || !t.restaurantId || t.restaurantId == "" || !t.businessId || t.businessId == "" || a.value == null ? null : `/restaurant-operation/transaction/${encodeURIComponent(t.payId)}?restaurantId=${encodeURIComponent(t.restaurantId)}&businessId=${encodeURIComponent(t.businessId)}&country=${encodeURIComponent(a.value)}`;
11
+ }
12
+ };
13
+ }, v = /^[a-f\d]{24}$/i, C = ({
14
+ searchKey: a,
15
+ dateRange: s,
16
+ onBeforeApply: t
17
+ }) => {
18
+ const o = p(), r = g(null), i = () => {
19
+ const e = a.value.trim();
20
+ return v.test(e) ? e : null;
21
+ }, u = () => {
22
+ if (!r.value)
23
+ return;
24
+ const e = r.value;
25
+ r.value = null, o.close(e);
26
+ }, l = () => {
27
+ r.value = null;
28
+ }, c = (e) => {
29
+ const n = parseInt(e.slice(0, 8), 16);
30
+ return m.unix(n).format("YYYY-MM-DD");
31
+ }, I = () => {
32
+ const e = i();
33
+ if (!e) {
34
+ u();
35
+ return;
36
+ }
37
+ t == null || t();
38
+ const n = c(e);
39
+ (s.value.startDate !== n || s.value.endDate !== n) && (s.value = {
40
+ ...s.value,
41
+ startDate: n,
42
+ endDate: n
43
+ }), u();
44
+ };
45
+ return {
46
+ promptSuggestion: () => {
47
+ u(), i() && (r.value = o.open({
48
+ title: "Are you searching for transaction ID ?",
49
+ message: "We can auto-set the date range from this ID to help narrow down the results.",
50
+ action: "Apply",
51
+ type: "info",
52
+ onAction: I,
53
+ onClose: l
54
+ }, 5e3));
55
+ },
56
+ closeSuggestion: u
57
+ };
58
+ };
59
+ export {
60
+ C as a,
61
+ k as u
62
+ };
@@ -1,4 +1,4 @@
1
- import { g as n, b as s, c as u, a as e } from "./index-DjPlzbUi.js";
1
+ import { g as n, b as s, c as u, a as e } from "./index-fFwg-TQI.js";
2
2
  const o = {
3
3
  async read(a) {
4
4
  return e(
@@ -1,4 +1,4 @@
1
- import { c as H, a as Iv, g as Av } from "./app-CnRmLdS_.js";
1
+ import { c as H, a as Iv, g as Av } from "./app-BKYw-TBs.js";
2
2
  import { useCoreStore as Tu } from "@feedmepos/mf-common";
3
3
  import { ref as pv } from "vue";
4
4
  var eh = {}, Hd = {}, F = {}, Vm = {}, p_ = {}, S_ = {}, hc = {};
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as U, ref as r, resolveComponent as f, openBlock as g, createBlock as S, withCtx as z, createElementVNode as s, normalizeStyle as j, createElementBlock as B, Fragment as N, renderList as E, createVNode as c, computed as _, watch as I, onMounted as O, unref as C, toDisplayString as D, createCommentVNode as R, nextTick as G, normalizeClass as H } from "vue";
2
- import { u as J } from "./index-DjPlzbUi.js";
2
+ import { u as J } from "./index-fFwg-TQI.js";
3
3
  import "@feedmepos/ui-library";
4
4
  const K = ["id"], L = /* @__PURE__ */ U({
5
5
  __name: "FmTableSelection",
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.6.5",
3
+ "version": "1.6.6-dev",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -108,4 +108,4 @@
108
108
  "vite": "^5.2.11",
109
109
  "vue-tsc": "^2.0.11"
110
110
  }
111
- }
111
+ }
@@ -1,7 +1,7 @@
1
- import { p as E, B as st } from "./index-DjPlzbUi.js";
2
- import { g as it, c as at, _ as ut } from "./app-CnRmLdS_.js";
1
+ import { p as E, B as st } from "./index-fFwg-TQI.js";
2
+ import { g as it, c as at, _ as ut } from "./app-BKYw-TBs.js";
3
3
  import { useCoreStore as ot } from "@feedmepos/mf-common";
4
- import { d as H } from "./index-BnFjLAZ9.js";
4
+ import { d as H } from "./index-Cm10hA-5.js";
5
5
  var Q = { exports: {} };
6
6
  (function(i, a) {
7
7
  (function(t, m) {