@feedmepos/mf-payment 0.0.0-beta.35 → 0.0.0-beta.37

Sign up to get free protection for your applications and to get access to all the features.
package/dist/app.js CHANGED
@@ -1,15 +1,15 @@
1
- import { createRouter as D, createWebHistory as I, useRouter as S } from "vue-router";
2
- import { computed as b, watch as l, defineComponent as h, ref as T, resolveComponent as v, openBlock as _, createBlock as R, onMounted as g, onBeforeMount as w } from "vue";
3
- import { useCoreStore as d } from "@feedmepos/mf-common";
4
- import { defineStore as P } from "pinia";
5
- const f = [
1
+ import { createRouter as R, createWebHistory as D, useRouter as I } from "vue-router";
2
+ import { computed as f, watch as c, defineComponent as y, ref as P, resolveComponent as h, openBlock as b, createBlock as _, onMounted as S, onBeforeMount as w } from "vue";
3
+ import { useCoreStore as u } from "@feedmepos/mf-common";
4
+ import { defineStore as T } from "pinia";
5
+ const l = [
6
6
  {
7
7
  path: "/admin/payout-accounts",
8
8
  name: "mf-payment-admin.payout-account",
9
9
  meta: {
10
10
  sidebarDisplay: "Payout Accounts"
11
11
  },
12
- component: () => import("./PayoutAccount-C-FZD8lM.js")
12
+ component: () => import("./PayoutAccount-BcgYhX4b.js")
13
13
  },
14
14
  {
15
15
  path: "/admin/payout-accounts/:accountId",
@@ -23,13 +23,13 @@ const f = [
23
23
  meta: {
24
24
  sidebarDisplay: "Terminals"
25
25
  },
26
- component: () => import("./Terminal-BDDP5VT8.js")
26
+ component: () => import("./Terminal-CP380u7w.js")
27
27
  },
28
28
  {
29
29
  path: "/admin/terminal/:terminalId",
30
30
  name: "mf-payment-admin.terminal-setting",
31
31
  props: !0,
32
- component: () => import("./TerminalSetting-3CRuMj8l.js")
32
+ component: () => import("./TerminalSetting-DOdZk5cq.js")
33
33
  },
34
34
  {
35
35
  path: "/admin/terminal-transaction",
@@ -37,7 +37,7 @@ const f = [
37
37
  meta: {
38
38
  sidebarDisplay: "Offline Transactions"
39
39
  },
40
- component: () => import("./TerminalTransaction-CEQ3hedf.js")
40
+ component: () => import("./TerminalTransaction-BC-QZh_F.js")
41
41
  },
42
42
  {
43
43
  path: "/admin/transaction",
@@ -61,7 +61,7 @@ const f = [
61
61
  props: !0,
62
62
  component: () => import("./SettlementTransactions-yJhT6FR4.js")
63
63
  }
64
- ], y = [
64
+ ], d = [
65
65
  {
66
66
  path: "",
67
67
  redirect: { name: "mf-payment-payout-account" }
@@ -69,7 +69,7 @@ const f = [
69
69
  {
70
70
  path: "/payout-account",
71
71
  name: "mf-payment-payout-account",
72
- component: () => import("./PayoutAccount-mpVH-GBq.js"),
72
+ component: () => import("./PayoutAccount-B0viIh7c.js"),
73
73
  meta: {
74
74
  sidebarDisplay: "Payout Accounts"
75
75
  }
@@ -104,10 +104,10 @@ const f = [
104
104
  props: !0,
105
105
  component: () => import("./SettlementTransactions-Co4ziq3a.js")
106
106
  }
107
- ], A = P("iframe", () => {
107
+ ], g = T("iframe", () => {
108
108
  const o = {
109
109
  isIframe: !1
110
- }, a = b(() => o);
110
+ }, a = f(() => o);
111
111
  function n(r) {
112
112
  o.isIframe = r;
113
113
  }
@@ -115,40 +115,45 @@ const f = [
115
115
  state: a,
116
116
  init: n
117
117
  };
118
- }), C = D({
119
- history: I(),
120
- routes: [...y, ...f]
118
+ }), A = R({
119
+ history: D(),
120
+ routes: [...d, ...l]
121
121
  });
122
- C.beforeEach(async (o) => {
122
+ A.beforeEach(async (o) => {
123
123
  const {
124
124
  sessionUser: a,
125
125
  currentRestaurant: n,
126
- businesses: r,
127
- changeBusiness: c,
128
- currentBusiness: s,
129
- readRestaurants: u,
130
- changeRestaurant: e
131
- } = d();
132
- return o.name.startsWith("mf-payment-admin") ? a.value ? !0 : new Promise((t) => {
133
- const i = l(a, (m) => {
134
- var p;
135
- m && (i(), t((p = a.value) == null ? void 0 : p.isInternal));
126
+ currentBusiness: r,
127
+ readRestaurants: p,
128
+ changeRestaurant: i
129
+ } = u();
130
+ return o.name.startsWith("mf-payment-admin") ? a.value ? !0 : new Promise((m) => {
131
+ const e = c(a, (t) => {
132
+ var s;
133
+ t && (e(), m((s = a.value) == null ? void 0 : s.isInternal));
136
134
  });
137
- }) : !s.value || !n.value ? new Promise(async (t) => {
138
- const i = l(n, (p) => {
139
- p && (i(), t(!0));
140
- }), m = await u();
141
- await e(m == null ? void 0 : m.at(0));
142
- }) : !0;
135
+ }) : !r.value || !n.value ? Promise.all([
136
+ new Promise(async (m) => {
137
+ const e = c(r, (t) => {
138
+ t && (e(), m(!0));
139
+ });
140
+ }),
141
+ new Promise(async (m) => {
142
+ const e = c(n, (s) => {
143
+ s && (e(), m(!0));
144
+ }), t = await p();
145
+ await i(t == null ? void 0 : t.at(0));
146
+ })
147
+ ]).then((m) => !0) : !0;
143
148
  });
144
- const B = /* @__PURE__ */ h({
149
+ const C = /* @__PURE__ */ y({
145
150
  __name: "AppSidebar",
146
151
  setup(o) {
147
- const a = d(), n = S(), r = T(n.currentRoute.value.name);
148
- l(n.currentRoute, () => {
152
+ const a = u(), n = I(), r = P(n.currentRoute.value.name);
153
+ c(n.currentRoute, () => {
149
154
  r.value = n.currentRoute.value.name;
150
155
  });
151
- const c = y.map((e) => {
156
+ const p = d.map((e) => {
152
157
  var t;
153
158
  if ((t = e.meta) != null && t.sidebarDisplay)
154
159
  return {
@@ -159,7 +164,7 @@ const B = /* @__PURE__ */ h({
159
164
  return n.push({ name: e.name });
160
165
  }
161
166
  };
162
- }).filter((e) => !!e), s = f.map((e) => {
167
+ }).filter((e) => !!e), i = l.map((e) => {
163
168
  var t;
164
169
  if ((t = e.meta) != null && t.sidebarDisplay)
165
170
  return {
@@ -170,9 +175,9 @@ const B = /* @__PURE__ */ h({
170
175
  return n.push({ name: e.name });
171
176
  }
172
177
  };
173
- }).filter((e) => !!e), u = b(() => {
178
+ }).filter((e) => !!e), m = f(() => {
174
179
  var t;
175
- const e = [...c];
180
+ const e = [...p];
176
181
  return (t = a.sessionUser.value) != null && t.isInternal && (e.push({
177
182
  label: "",
178
183
  value: "divider",
@@ -182,36 +187,36 @@ const B = /* @__PURE__ */ h({
182
187
  icon: "admin_panel_settings",
183
188
  value: "divider",
184
189
  disabled: !0
185
- }), e.push(...s)), e;
190
+ }), e.push(...i)), e;
186
191
  });
187
192
  return (e, t) => {
188
- const i = v("FmCollapsibleTabs");
189
- return _(), R(i, {
193
+ const s = h("FmCollapsibleTabs");
194
+ return b(), _(s, {
190
195
  modelValue: r.value,
191
- "onUpdate:modelValue": t[0] || (t[0] = (m) => r.value = m),
192
- items: u.value,
196
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => r.value = v),
197
+ items: m.value,
193
198
  class: "py-16 px-8"
194
199
  }, null, 8, ["modelValue", "items"]);
195
200
  };
196
201
  }
197
- }), F = /* @__PURE__ */ h({
202
+ }), O = /* @__PURE__ */ y({
198
203
  __name: "App",
199
204
  setup(o) {
200
- const { state: a } = A(), n = d();
201
- return g(() => {
205
+ const { state: a } = g(), n = u();
206
+ return S(() => {
202
207
  a.isIframe && parent.postMessage({ event: "ready" }, "*");
203
208
  }), w(() => {
204
- n.registerSidebarComponent(B);
205
- }), (r, c) => {
206
- const s = v("RouterView");
207
- return _(), R(s);
209
+ n.registerSidebarComponent(C);
210
+ }), (r, p) => {
211
+ const i = h("RouterView");
212
+ return b(), _(i);
208
213
  };
209
214
  }
210
- }), M = [
211
- ...f,
212
- ...y
215
+ }), F = [
216
+ ...l,
217
+ ...d
213
218
  ];
214
219
  export {
215
- F as FmApp,
216
- M as routers
220
+ O as FmApp,
221
+ F as routers
217
222
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "0.0.0-beta.35",
3
+ "version": "0.0.0-beta.37",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"