@feedmepos/mf-payment 1.9.5-dev → 1.9.7-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 (46) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-D9eFw5GT.js → Actions.vue_vue_type_script_setup_true_lang-BZcsnsum.js} +1 -1
  2. package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-tqt-P5jM.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CgINTFXl.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-wts-x4-q.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Dq2Edu64.js} +2 -2
  4. package/dist/{Chargeback-D9ezofj9.js → Chargeback-D1KlZKJD.js} +5 -5
  5. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-B53mbAw2.js → DocumentViewer.vue_vue_type_script_setup_true_lang-B9yPSEWW.js} +1 -1
  6. package/dist/{ExternalTerminal-DHVCjDqS.js → ExternalTerminal-C1Zp6jsh.js} +177 -170
  7. package/dist/{OnboardForm-CE_z1TWy.js → OnboardForm-CH48O1XF.js} +6 -6
  8. package/dist/{OnboardForm-DHY3cskz.js → OnboardForm-DO69195z.js} +6 -6
  9. package/dist/{OnboardSubmission-vkH_ZjQd.js → OnboardSubmission-C8vuAVey.js} +6 -6
  10. package/dist/{OnboardSubmission-DAf8-PMR.js → OnboardSubmission-Dye6TVj1.js} +3 -3
  11. package/dist/{PayoutAccount-rs-jPdOb.js → PayoutAccount-B-mUH5k_.js} +5 -5
  12. package/dist/{PayoutAccount-CLYNzn8n.js → PayoutAccount-VVOvJlHK.js} +7 -7
  13. package/dist/{PayoutAccountSetting-CeVVbTpp.js → PayoutAccountSetting-CcPxgJ8D.js} +6 -6
  14. package/dist/{Restaurant-DUeCpGQz.js → Restaurant-Dm407idD.js} +4 -4
  15. package/dist/{RestaurantSetting-DPnjaSZP.js → RestaurantSetting--JkIxrXu.js} +3 -3
  16. package/dist/{Settlement-DOWtSotU.js → Settlement-DMnPPWm8.js} +4 -4
  17. package/dist/{Settlement-Bvh2SjD-.js → Settlement-nI7u4nhD.js} +3 -3
  18. package/dist/{SettlementTransactions-K-J0ovnq.js → SettlementTransactions-CYk6UGS9.js} +5 -5
  19. package/dist/{SettlementTransactions-D3J51WrT.js → SettlementTransactions-DCkpOyt5.js} +5 -5
  20. package/dist/{Status.vue_vue_type_script_setup_true_lang-CvJ6L1_a.js → Status.vue_vue_type_script_setup_true_lang-D_7OKts9.js} +1 -1
  21. package/dist/{Terminal-CO3PpKg9.js → Terminal-DLXFcFec.js} +6 -6
  22. package/dist/{TerminalSetting-DN4d9lH9.js → TerminalSetting-9WPx0VGD.js} +6 -6
  23. package/dist/{Transaction-CTZ89Wbs.js → Transaction-Bi_8xljd.js} +10 -10
  24. package/dist/{Transaction-CDcgKp1w.js → Transaction-DLwzAbcQ.js} +11 -11
  25. package/dist/{TransactionOld-C_95omc8.js → TransactionOld-BcacyYJV.js} +7 -7
  26. package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-D1-vczoG.js → TransactionStatus.vue_vue_type_script_setup_true_lang-BX7-QE5c.js} +1 -1
  27. package/dist/{app-Cs0_lCUQ.js → app-DZTbOw2r.js} +85 -84
  28. package/dist/app.js +1 -1
  29. package/dist/{assets-D3ALZiYC.js → assets-BmBw7sbJ.js} +1 -1
  30. package/dist/{grafana-DgZsQuHZ.js → grafana-C_DIpBzo.js} +1 -1
  31. package/dist/{index-DblBoips.js → index-AOcQiqce.js} +1 -1
  32. package/dist/{index-9wT3znSS.js → index-B9wv-Z7c.js} +1 -1
  33. package/dist/{index-CjC49DkQ.js → index-C5gOk5nZ.js} +1 -1
  34. package/dist/{index-6pMHqVXQ.js → index-CKMH3irr.js} +1 -1
  35. package/dist/{index-CD3vR04K.js → index-CW9ACt8t.js} +1 -1
  36. package/dist/{index-CrRToXMG.js → index-CZPUptsd.js} +1 -1
  37. package/dist/{index-Cc2oWXJD.js → index-DdVYri9L.js} +1 -1
  38. package/dist/{index-BuXolnO9.js → index-Dgmie4RK.js} +2 -2
  39. package/dist/{index-DFN4_x7R.js → index-DzR-1F2a.js} +1 -1
  40. package/dist/{index-8HjTWFUv.js → index-xMYjfBuw.js} +1 -1
  41. package/dist/{index.vue_vue_type_script_setup_true_lang-BVloZZBn.js → index.vue_vue_type_script_setup_true_lang-DFvDNfOk.js} +1 -1
  42. package/dist/{onboard-submission-DEJSQhGY.js → onboard-submission-U49O3Zxc.js} +1 -1
  43. package/dist/package.json +1 -1
  44. package/dist/{payout-account-bky0BGyg.js → payout-account-CLCqR7oI.js} +3 -3
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/package.json +1 -1
@@ -1,97 +1,97 @@
1
- import { defineComponent as E, resolveComponent as u, openBlock as x, createElementBlock as I, createVNode as d, normalizeClass as z, withCtx as B, createElementVNode as F, toDisplayString as q, createBlock as b, useModel as O, ref as _, watch as K, unref as m, createCommentVNode as $, mergeModels as R, createTextVNode as D, computed as M, resolveDynamicComponent as Y, normalizeProps as H, guardReactiveProps as L, isRef as Q, h as U } from "vue";
2
- import { h as W } from "./moment-h96o7c8I.js";
3
- import { useCoreStore as G } from "@feedmepos/mf-common";
4
- import { u as J } from "./index-CrRToXMG.js";
5
- import { _ as X } from "./index.vue_vue_type_script_setup_true_lang-BVloZZBn.js";
6
- import { _ as Z } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
7
- import { useSnackbar as N, useDialogChild as ee, useDialog as te } from "@feedmepos/ui-library";
8
- import { e as k } from "./index-DFN4_x7R.js";
9
- import { c as ae } from "./clipboard-4jh1WteU.js";
10
- import { z as P, a as h } from "./validator-CTlVogBQ.js";
11
- import { _ as re } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-wts-x4-q.js";
12
- import { p as ne } from "./index-8HjTWFUv.js";
13
- import { u as A } from "./error-K1CakhA9.js";
14
- import { w as oe } from "./Modal-DB8M9o1T.js";
15
- const le = /* @__PURE__ */ E({
1
+ import { defineComponent as w, resolveComponent as u, openBlock as v, createElementBlock as U, createVNode as c, normalizeClass as z, withCtx as h, createElementVNode as b, toDisplayString as q, createBlock as C, useModel as H, ref as _, computed as $, watch as O, unref as m, createCommentVNode as N, mergeModels as M, createTextVNode as k, resolveDynamicComponent as G, normalizeProps as L, guardReactiveProps as Q, isRef as W, h as K } from "vue";
2
+ import { h as J } from "./moment-h96o7c8I.js";
3
+ import { useCoreStore as Y } from "@feedmepos/mf-common";
4
+ import { u as X } from "./index-CZPUptsd.js";
5
+ import { _ as Z } from "./index.vue_vue_type_script_setup_true_lang-DFvDNfOk.js";
6
+ import { _ as ee } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
7
+ import { useSnackbar as j, useDialogChild as te, useDialog as ae } from "@feedmepos/ui-library";
8
+ import { e as S } from "./index-DzR-1F2a.js";
9
+ import { c as ne } from "./clipboard-4jh1WteU.js";
10
+ import { z as P, a as B } from "./validator-CTlVogBQ.js";
11
+ import { _ as re } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Dq2Edu64.js";
12
+ import { e as A, p as oe } from "./index-xMYjfBuw.js";
13
+ import { u as R } from "./error-K1CakhA9.js";
14
+ import { w as le } from "./Modal-DB8M9o1T.js";
15
+ const se = /* @__PURE__ */ w({
16
16
  __name: "ID",
17
17
  props: {
18
18
  row: {},
19
19
  data: {}
20
20
  },
21
- setup(c) {
22
- const o = c, a = N();
21
+ setup(d) {
22
+ const o = d, n = j();
23
23
  function s() {
24
24
  return o.row.original.status === "READY" ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-amber-400";
25
25
  }
26
26
  function l() {
27
27
  try {
28
- ae(o.data), a.open({ title: "Text copied to clipboard." }, 1e3);
28
+ ne(o.data), n.open({ title: "Text copied to clipboard." }, 1e3);
29
29
  } catch {
30
- a.open({ title: "Clipboard API incompatible." }, 1e3);
30
+ n.open({ title: "Clipboard API incompatible." }, 1e3);
31
31
  }
32
32
  }
33
- return (n, e) => {
33
+ return (r, e) => {
34
34
  const i = u("FmBadge");
35
- return x(), I("div", {
35
+ return v(), U("div", {
36
36
  onClick: e[0] || (e[0] = (p) => {
37
37
  p.stopPropagation(), l();
38
38
  })
39
39
  }, [
40
- d(i, {
40
+ c(i, {
41
41
  inline: "",
42
42
  class: z(s())
43
43
  }, {
44
- default: B(() => [
45
- F("div", null, q(c.data), 1)
44
+ default: h(() => [
45
+ b("div", null, q(d.data), 1)
46
46
  ]),
47
47
  _: 1
48
48
  }, 8, ["class"])
49
49
  ]);
50
50
  };
51
51
  }
52
- }), se = { class: "flex items-center justify-center" }, ie = {
52
+ }), ie = { class: "flex items-center justify-center" }, me = {
53
53
  key: 1,
54
54
  class: "t-caption text-fm-color-neutral-gray-500 whitespace-nowrap"
55
- }, me = /* @__PURE__ */ E({
55
+ }, ue = /* @__PURE__ */ w({
56
56
  __name: "Actions",
57
57
  props: {
58
58
  data: {}
59
59
  },
60
60
  emits: ["pair", "edit", "delete"],
61
- setup(c, { emit: o }) {
62
- const a = o;
61
+ setup(d, { emit: o }) {
62
+ const n = o;
63
63
  return (s, l) => {
64
- const n = u("FmButton");
65
- return x(), I("div", se, [
66
- c.data.status === "NEW" ? (x(), b(n, {
64
+ const r = u("FmButton");
65
+ return v(), U("div", ie, [
66
+ d.data.status === "NEW" ? (v(), C(r, {
67
67
  key: 0,
68
68
  variant: "tertiary",
69
69
  label: "Pair",
70
70
  "prepend-icon": "link",
71
71
  onClick: l[0] || (l[0] = (e) => {
72
- e.stopPropagation(), a("pair");
72
+ e.stopPropagation(), n("pair");
73
73
  })
74
- })) : (x(), I("div", ie, " Ready to use ")),
75
- d(n, {
74
+ })) : (v(), U("div", me, " Ready to use ")),
75
+ c(r, {
76
76
  variant: "plain",
77
77
  "prepend-icon": "edit",
78
78
  onClick: l[1] || (l[1] = (e) => {
79
- e.stopPropagation(), a("edit");
79
+ e.stopPropagation(), n("edit");
80
80
  })
81
81
  }),
82
- d(n, {
82
+ c(r, {
83
83
  variant: "plain",
84
84
  "prepend-icon": "delete",
85
85
  onClick: l[2] || (l[2] = (e) => {
86
- e.stopPropagation(), a("delete");
86
+ e.stopPropagation(), n("delete");
87
87
  })
88
88
  })
89
89
  ]);
90
90
  };
91
91
  }
92
- }), ue = /* @__PURE__ */ E({
92
+ }), ce = /* @__PURE__ */ w({
93
93
  __name: "ExternalTerminalSideSheet",
94
- props: /* @__PURE__ */ R({
94
+ props: /* @__PURE__ */ M({
95
95
  terminal: {
96
96
  type: Object
97
97
  }
@@ -99,63 +99,70 @@ const le = /* @__PURE__ */ E({
99
99
  modelValue: { type: Boolean, default: !1 },
100
100
  modelModifiers: {}
101
101
  }),
102
- emits: /* @__PURE__ */ R(["submit"], ["update:modelValue"]),
103
- setup(c, { emit: o }) {
104
- const a = c, s = o, l = O(c, "modelValue"), n = _(), e = _(""), i = _(""), p = _(), g = ne.FdoExternalTerminalProvider.options.map((C) => ({
105
- label: C,
106
- value: C
107
- }));
108
- K(l, (C) => {
109
- var y, T, w;
110
- C && (e.value = ((y = a.terminal) == null ? void 0 : y.name) ?? "", i.value = ((T = a.terminal) == null ? void 0 : T.restaurantId) ?? "", p.value = (w = a.terminal) == null ? void 0 : w.type);
102
+ emits: /* @__PURE__ */ M(["submit"], ["update:modelValue"]),
103
+ setup(d, { emit: o }) {
104
+ const n = d, s = o, l = H(d, "modelValue"), r = _(), e = _(""), i = _(""), p = _(), F = {
105
+ BEAM: [A.F_COUNTRY.enum.TH],
106
+ BRI: [A.F_COUNTRY.enum.ID]
107
+ }, V = Y().currentCountry, D = $(
108
+ () => oe.FdoExternalTerminalProvider.options.filter(
109
+ (x) => F[x].includes(V.value ?? A.F_COUNTRY.enum.MY)
110
+ ).map((x) => ({
111
+ label: x,
112
+ value: x
113
+ }))
114
+ );
115
+ O(l, (x) => {
116
+ var y, t, a;
117
+ x && (e.value = ((y = n.terminal) == null ? void 0 : y.name) ?? "", i.value = ((t = n.terminal) == null ? void 0 : t.restaurantId) ?? "", p.value = (a = n.terminal) == null ? void 0 : a.type);
111
118
  });
112
- function V() {
119
+ function I() {
113
120
  s("submit", {
114
121
  name: e.value,
115
122
  restaurantId: i.value,
116
123
  type: p.value
117
124
  }), l.value = !1;
118
125
  }
119
- return (C, y) => {
120
- const T = u("FmSelect"), w = u("FmTextField"), t = u("FmButton"), r = u("FmForm"), f = u("FmSideSheet");
121
- return x(), b(f, {
126
+ return (x, y) => {
127
+ const t = u("FmSelect"), a = u("FmTextField"), f = u("FmButton"), T = u("FmForm"), E = u("FmSideSheet");
128
+ return v(), C(E, {
122
129
  modelValue: l.value,
123
- "onUpdate:modelValue": y[3] || (y[3] = (v) => l.value = v),
124
- header: a.terminal ? "Update External Terminal" : "Create New External Terminal",
130
+ "onUpdate:modelValue": y[3] || (y[3] = (g) => l.value = g),
131
+ header: n.terminal ? "Update External Terminal" : "Create New External Terminal",
125
132
  "close-button": ""
126
133
  }, {
127
- default: B(() => [
128
- d(r, {
129
- ref: n.value,
134
+ default: h(() => [
135
+ c(T, {
136
+ ref: r.value,
130
137
  class: "flex flex-col gap-16 px-4 py-6",
131
- onValidationSuccess: V
138
+ onValidationSuccess: I
132
139
  }, {
133
- default: B(() => [
134
- a.terminal ? $("", !0) : (x(), b(T, {
140
+ default: h(() => [
141
+ n.terminal ? N("", !0) : (v(), C(t, {
135
142
  key: 0,
136
143
  modelValue: p.value,
137
- "onUpdate:modelValue": y[0] || (y[0] = (v) => p.value = v),
144
+ "onUpdate:modelValue": y[0] || (y[0] = (g) => p.value = g),
138
145
  label: "Provider",
139
- items: m(g),
140
- rules: m(P)(m(h).string().min(1, "Provider is required"))
146
+ items: D.value,
147
+ rules: m(P)(m(B).string().min(1, "Provider is required"))
141
148
  }, null, 8, ["modelValue", "items", "rules"])),
142
- a.terminal ? $("", !0) : (x(), b(re, {
149
+ n.terminal ? N("", !0) : (v(), C(re, {
143
150
  key: 1,
144
151
  modelValue: i.value,
145
- "onUpdate:modelValue": y[1] || (y[1] = (v) => i.value = v),
152
+ "onUpdate:modelValue": y[1] || (y[1] = (g) => i.value = g),
146
153
  label: "Restaurant",
147
154
  "search-placeholder": "Search restaurants",
148
- rules: m(P)(m(h).string().min(1, "Restaurant is required"))
155
+ rules: m(P)(m(B).string().min(1, "Restaurant is required"))
149
156
  }, null, 8, ["modelValue", "rules"])),
150
- d(w, {
157
+ c(a, {
151
158
  modelValue: e.value,
152
- "onUpdate:modelValue": y[2] || (y[2] = (v) => e.value = v),
159
+ "onUpdate:modelValue": y[2] || (y[2] = (g) => e.value = g),
153
160
  label: "Terminal Name",
154
- rules: m(P)(m(h).string().min(1))
161
+ rules: m(P)(m(B).string().min(1))
155
162
  }, null, 8, ["modelValue", "rules"]),
156
- d(t, {
163
+ c(f, {
157
164
  type: "submit",
158
- label: a.terminal ? "Update" : "Create"
165
+ label: n.terminal ? "Update" : "Create"
159
166
  }, null, 8, ["label"])
160
167
  ]),
161
168
  _: 1
@@ -165,7 +172,7 @@ const le = /* @__PURE__ */ E({
165
172
  }, 8, ["modelValue", "header"]);
166
173
  };
167
174
  }
168
- }), de = { class: "t-caption" }, ce = /* @__PURE__ */ E({
175
+ }), de = { class: "t-caption" }, pe = /* @__PURE__ */ w({
169
176
  __name: "BeamTerminal",
170
177
  props: {
171
178
  terminal: {
@@ -177,29 +184,29 @@ const le = /* @__PURE__ */ E({
177
184
  required: !0
178
185
  }
179
186
  },
180
- setup(c) {
181
- const o = c, a = _(), s = _("");
182
- return (l, n) => {
187
+ setup(d) {
188
+ const o = d, n = _(), s = _("");
189
+ return (l, r) => {
183
190
  const e = u("FmTextField"), i = u("FmButton"), p = u("FmForm");
184
- return x(), b(p, {
185
- ref: a.value,
191
+ return v(), C(p, {
192
+ ref: n.value,
186
193
  class: "flex flex-col gap-16 mb-6",
187
- onValidationSuccess: n[1] || (n[1] = () => o.onPair({ type: "BEAM", pairCode: s.value }))
194
+ onValidationSuccess: r[1] || (r[1] = () => o.onPair({ type: "BEAM", pairCode: s.value }))
188
195
  }, {
189
- default: B(() => [
190
- F("div", de, [
191
- n[2] || (n[2] = D(" Enter the pairing code shown on ", -1)),
192
- F("b", null, q(o.terminal.name), 1),
193
- n[3] || (n[3] = D(" to register it with Bolt Connect. ", -1))
196
+ default: h(() => [
197
+ b("div", de, [
198
+ r[2] || (r[2] = k(" Enter the pairing code shown on ", -1)),
199
+ b("b", null, q(o.terminal.name), 1),
200
+ r[3] || (r[3] = k(" to register it with Bolt Connect. ", -1))
194
201
  ]),
195
- d(e, {
202
+ c(e, {
196
203
  modelValue: s.value,
197
- "onUpdate:modelValue": n[0] || (n[0] = (g) => s.value = g),
204
+ "onUpdate:modelValue": r[0] || (r[0] = (F) => s.value = F),
198
205
  label: "Pair Code",
199
206
  "label-mark": "required",
200
- rules: m(P)(m(h).string().min(1, "Pair code is required"))
207
+ rules: m(P)(m(B).string().min(1, "Pair code is required"))
201
208
  }, null, 8, ["modelValue", "rules"]),
202
- d(i, {
209
+ c(i, {
203
210
  type: "submit",
204
211
  label: "Pair"
205
212
  })
@@ -208,7 +215,7 @@ const le = /* @__PURE__ */ E({
208
215
  }, 512);
209
216
  };
210
217
  }
211
- }), pe = { class: "t-caption" }, fe = /* @__PURE__ */ E({
218
+ }), fe = { class: "t-caption" }, ye = /* @__PURE__ */ w({
212
219
  __name: "BRITerminal",
213
220
  props: {
214
221
  terminal: {
@@ -220,36 +227,36 @@ const le = /* @__PURE__ */ E({
220
227
  required: !0
221
228
  }
222
229
  },
223
- setup(c) {
224
- const o = c, a = _(), s = _(""), l = _("");
225
- return (n, e) => {
226
- const i = u("FmTextField"), p = u("FmButton"), g = u("FmForm");
227
- return x(), b(g, {
228
- ref: a.value,
230
+ setup(d) {
231
+ const o = d, n = _(), s = _(""), l = _("");
232
+ return (r, e) => {
233
+ const i = u("FmTextField"), p = u("FmButton"), F = u("FmForm");
234
+ return v(), C(F, {
235
+ ref: n.value,
229
236
  class: "flex flex-col gap-16 mb-6",
230
237
  onValidationSuccess: e[2] || (e[2] = () => o.onPair({ type: "BRI", pairCode: s.value, edcId: l.value }))
231
238
  }, {
232
- default: B(() => [
233
- F("div", pe, [
234
- e[3] || (e[3] = D(" Enter the pairing code and EDC ID shown on ", -1)),
235
- F("b", null, q(o.terminal.name), 1),
236
- e[4] || (e[4] = D(" to register it with BRI. ", -1))
239
+ default: h(() => [
240
+ b("div", fe, [
241
+ e[3] || (e[3] = k(" Enter the pairing code and EDC ID shown on ", -1)),
242
+ b("b", null, q(o.terminal.name), 1),
243
+ e[4] || (e[4] = k(" to register it with BRI. ", -1))
237
244
  ]),
238
- d(i, {
245
+ c(i, {
239
246
  modelValue: s.value,
240
247
  "onUpdate:modelValue": e[0] || (e[0] = (V) => s.value = V),
241
248
  label: "Pair Code",
242
249
  "label-mark": "required",
243
- rules: m(P)(m(h).string().min(1, "Pair code is required"))
250
+ rules: m(P)(m(B).string().min(1, "Pair code is required"))
244
251
  }, null, 8, ["modelValue", "rules"]),
245
- d(i, {
252
+ c(i, {
246
253
  modelValue: l.value,
247
254
  "onUpdate:modelValue": e[1] || (e[1] = (V) => l.value = V),
248
255
  label: "EDC ID",
249
256
  "label-mark": "required",
250
- rules: m(P)(m(h).string().min(1, "EDC ID is required"))
257
+ rules: m(P)(m(B).string().min(1, "EDC ID is required"))
251
258
  }, null, 8, ["modelValue", "rules"]),
252
- d(p, {
259
+ c(p, {
253
260
  type: "submit",
254
261
  label: "Pair"
255
262
  })
@@ -258,7 +265,7 @@ const le = /* @__PURE__ */ E({
258
265
  }, 512);
259
266
  };
260
267
  }
261
- }), ye = /* @__PURE__ */ E({
268
+ }), _e = /* @__PURE__ */ w({
262
269
  __name: "ExternalTerminalPairDialog",
263
270
  props: {
264
271
  terminal: {
@@ -266,91 +273,91 @@ const le = /* @__PURE__ */ E({
266
273
  required: !0
267
274
  }
268
275
  },
269
- setup(c) {
270
- const o = c, a = ee(), s = {
271
- BEAM: ce,
272
- BRI: fe
273
- }, l = M(() => s[o.terminal.type]);
274
- function n(e) {
275
- a.emitData(e), a.emitAction("primary");
276
+ setup(d) {
277
+ const o = d, n = te(), s = {
278
+ BEAM: pe,
279
+ BRI: ye
280
+ }, l = $(() => s[o.terminal.type]);
281
+ function r(e) {
282
+ n.emitData(e), n.emitAction("primary");
276
283
  }
277
- return (e, i) => (x(), b(Y(l.value), H(L({
284
+ return (e, i) => (v(), C(G(l.value), L(Q({
278
285
  terminal: o.terminal,
279
- onPair: n
286
+ onPair: r
280
287
  })), null, 16));
281
288
  }
282
- }), ve = { class: "flex justify-between mb-6 items-center" }, _e = { class: "flex space-x-4" }, xe = { class: "flex space-x-4" }, Ae = /* @__PURE__ */ E({
289
+ }), ve = { class: "flex justify-between mb-6 items-center" }, xe = { class: "flex space-x-4" }, ge = { class: "flex space-x-4" }, Ae = /* @__PURE__ */ w({
283
290
  __name: "ExternalTerminal",
284
- setup(c) {
285
- const o = _(), { searchKey: a } = J({
291
+ setup(d) {
292
+ const o = _(), { searchKey: n } = X({
286
293
  searchKey: ""
287
294
  });
288
295
  let s;
289
- K(a, async () => {
296
+ O(n, async () => {
290
297
  s && clearTimeout(s), s = setTimeout(() => {
291
298
  var t;
292
299
  return (t = o.value) == null ? void 0 : t.reset();
293
300
  }, 700);
294
301
  });
295
- const l = G(), n = te(), e = N();
296
- M(
302
+ const l = Y(), r = ae(), e = j();
303
+ $(
297
304
  () => new Map(l.restaurants.value.map((t) => [t._id, t.profile.name]))
298
305
  );
299
306
  const i = _(!1), p = _();
300
- function g(t) {
307
+ function F(t) {
301
308
  p.value = t, i.value = !0;
302
309
  }
303
310
  async function V(t) {
304
311
  var f;
305
- const r = p.value;
312
+ const a = p.value;
306
313
  try {
307
- r ? await k.updateById(r._id, {
314
+ a ? await S.updateById(a._id, {
308
315
  name: t.name
309
- }) : await k.create(t), (f = o.value) == null || f.reset(), e.open({
316
+ }) : await S.create(t), (f = o.value) == null || f.reset(), e.open({
310
317
  type: "success",
311
- message: r ? "External terminal updated successfully." : "External terminal created successfully."
318
+ message: a ? "External terminal updated successfully." : "External terminal created successfully."
312
319
  });
313
- } catch (v) {
320
+ } catch (T) {
314
321
  e.open({
315
322
  type: "error",
316
- title: r ? "Error occurs when update external terminal" : "Error occurs when create external terminal",
317
- message: A(v)
323
+ title: a ? "Error occurs when update external terminal" : "Error occurs when create external terminal",
324
+ message: R(T)
318
325
  });
319
326
  }
320
327
  }
321
- async function C(t) {
322
- n.open({
328
+ async function D(t) {
329
+ r.open({
323
330
  title: "Pair External Terminal",
324
331
  closeButton: !0,
325
332
  overlay: !0,
326
- contentComponent: ye,
333
+ contentComponent: _e,
327
334
  contentComponentProps: { terminal: t }
328
- }).onPrimary(async (r) => {
335
+ }).onPrimary(async (a) => {
329
336
  var f;
330
- n.close();
337
+ r.close();
331
338
  try {
332
- await k.pair(t._id, r), (f = o.value) == null || f.reset(), e.open({
339
+ await S.pair(t._id, a), (f = o.value) == null || f.reset(), e.open({
333
340
  type: "success",
334
341
  message: "External terminal paired successfully."
335
342
  });
336
- } catch (v) {
343
+ } catch (T) {
337
344
  e.open({
338
345
  type: "error",
339
346
  title: "Error occurs when pair external terminal",
340
- message: A(v)
347
+ message: R(T)
341
348
  });
342
349
  }
343
350
  });
344
351
  }
345
- async function y(t) {
346
- oe(
347
- n,
352
+ async function I(t) {
353
+ le(
354
+ r,
348
355
  "Delete External Terminal",
349
356
  "Are you sure to delete this external terminal? This action cannot be revert!",
350
357
  async () => {
351
- var r;
358
+ var a;
352
359
  try {
353
- await k.delete(t), (r = o.value) == null || r.reset(), e.open({
360
+ await S.delete(t), (a = o.value) == null || a.reset(), e.open({
354
361
  type: "success",
355
362
  message: "External terminal deleted successfully."
356
363
  });
@@ -358,29 +365,29 @@ const le = /* @__PURE__ */ E({
358
365
  e.open({
359
366
  type: "error",
360
367
  title: "Error occurs when delete external terminal",
361
- message: A(f)
368
+ message: R(f)
362
369
  });
363
370
  }
364
371
  }
365
372
  );
366
373
  }
367
- const T = function(t) {
374
+ const x = function(t) {
368
375
  return {
369
376
  id: t._id,
370
377
  status: t.status,
371
378
  name: t.name,
372
379
  type: t.type,
373
380
  restaurant: t.restaurantId,
374
- updatedAt: W(t.updatedAt).format("YYYY-MM-DD HH:mm:ss")
381
+ updatedAt: J(t.updatedAt).format("YYYY-MM-DD HH:mm:ss")
375
382
  };
376
- }, w = [
383
+ }, y = [
377
384
  {
378
385
  accessorKey: "id",
379
386
  header: () => "Terminal ID",
380
387
  meta: {
381
388
  textAlign: "right"
382
389
  },
383
- cell: ({ cell: t, row: r }) => U(le, { row: r, data: t.getValue() })
390
+ cell: ({ cell: t, row: a }) => K(se, { row: a, data: t.getValue() })
384
391
  },
385
392
  {
386
393
  accessorKey: "name",
@@ -425,51 +432,51 @@ const le = /* @__PURE__ */ E({
425
432
  },
426
433
  cell: ({ row: t }) => {
427
434
  var f;
428
- const r = (f = o.value) == null ? void 0 : f.pageData().at(t.index);
429
- return U(me, {
430
- data: r,
431
- onPair: () => C(r),
432
- onEdit: () => g(r),
433
- onDelete: () => y(r._id)
435
+ const a = (f = o.value) == null ? void 0 : f.pageData().at(t.index);
436
+ return K(ue, {
437
+ data: a,
438
+ onPair: () => D(a),
439
+ onEdit: () => F(a),
440
+ onDelete: () => I(a._id)
434
441
  });
435
442
  }
436
443
  }
437
444
  ];
438
- return (t, r) => {
439
- const f = u("FmSearch"), v = u("FmButton");
440
- return x(), b(Z, {
445
+ return (t, a) => {
446
+ const f = u("FmSearch"), T = u("FmButton");
447
+ return v(), C(ee, {
441
448
  title: "External Terminals",
442
449
  loading: !1
443
450
  }, {
444
- default: B(() => [
445
- F("div", ve, [
446
- F("div", _e, [
447
- d(f, {
448
- "model-value": m(a),
449
- "onUpdate:modelValue": r[0] || (r[0] = (S) => Q(a) ? a.value = S : null),
451
+ default: h(() => [
452
+ b("div", ve, [
453
+ b("div", xe, [
454
+ c(f, {
455
+ "model-value": m(n),
456
+ "onUpdate:modelValue": a[0] || (a[0] = (E) => W(n) ? n.value = E : null),
450
457
  class: "mr-8",
451
458
  label: "Search",
452
459
  placeholder: "Search ..."
453
460
  }, null, 8, ["model-value"])
454
461
  ]),
455
- F("div", xe, [
456
- d(v, {
462
+ b("div", ge, [
463
+ c(T, {
457
464
  label: "Create",
458
465
  icon: "add",
459
- onClick: r[1] || (r[1] = () => g())
466
+ onClick: a[1] || (a[1] = () => F())
460
467
  })
461
468
  ])
462
469
  ]),
463
- d(X, {
470
+ c(Z, {
464
471
  ref_key: "controller",
465
472
  ref: o,
466
- "column-defs": w,
467
- "rows-defs": T,
468
- paginate: (S, j) => m(k).read({ searchKey: m(a), limit: S, cursor: j })
473
+ "column-defs": y,
474
+ "rows-defs": x,
475
+ paginate: (E, g) => m(S).read({ searchKey: m(n), limit: E, cursor: g })
469
476
  }, null, 8, ["paginate"]),
470
- d(ue, {
477
+ c(ce, {
471
478
  modelValue: i.value,
472
- "onUpdate:modelValue": r[2] || (r[2] = (S) => i.value = S),
479
+ "onUpdate:modelValue": a[2] || (a[2] = (E) => i.value = E),
473
480
  terminal: p.value,
474
481
  onSubmit: V
475
482
  }, null, 8, ["modelValue", "terminal"])
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as vn, ref as g, computed as dn, resolveComponent as y, openBlock as b, createElementBlock as u, createElementVNode as s, toDisplayString as U, renderSlot as yn, createCommentVNode as p, Fragment as $, createBlock as M, withCtx as X, createVNode as r, unref as t, watch as bn, onMounted as un, renderList as Gn, createTextVNode as sn, nextTick as xn, h as wn, resolveDynamicComponent as Zn } from "vue";
2
2
  import { z as a, a as j } from "./validator-CTlVogBQ.js";
3
- import { _ as Hn, P as On } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-B53mbAw2.js";
3
+ import { _ as Hn, P as On } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-B9yPSEWW.js";
4
4
  import { useCoreStore as hn, useI18n as gn } from "@feedmepos/mf-common";
5
- import { o as en } from "./index-BuXolnO9.js";
6
- import { p as Dn } from "./index-CD3vR04K.js";
5
+ import { o as en } from "./index-Dgmie4RK.js";
6
+ import { p as Dn } from "./index-CW9ACt8t.js";
7
7
  import { useSnackbar as Tn, useFormChild as Jn, useDialog as Ln } from "@feedmepos/ui-library";
8
- import { u as zn } from "./index-8HjTWFUv.js";
8
+ import { u as zn } from "./index-xMYjfBuw.js";
9
9
  import { s as Nn } from "./vue-signature-pad.esm-IXPjf4fL.js";
10
- import { P as Bn } from "./payout-account-bky0BGyg.js";
11
- import { a as Wn } from "./onboard-submission-DEJSQhGY.js";
10
+ import { P as Bn } from "./payout-account-CLCqR7oI.js";
11
+ import { a as Wn } from "./onboard-submission-U49O3Zxc.js";
12
12
  import { useRouter as mn } from "vue-router";
13
13
  import { _ as kn } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
14
  const Rn = { class: "flex" }, Vn = { class: "justify-self-center font-semibold" }, Yn = {
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Z, ref as E, computed as W, resolveComponent as C, openBlock as b, createElementBlock as P, createElementVNode as n, toDisplayString as U, createBlock as T, withCtx as f, createCommentVNode as A, createVNode as r, unref as e, Fragment as J, renderList as le, createTextVNode as z, onMounted as pe, resolveDynamicComponent as be } from "vue";
2
- import { o as H } from "./index-BuXolnO9.js";
3
- import { u as te, p as oe } from "./index-8HjTWFUv.js";
2
+ import { o as H } from "./index-Dgmie4RK.js";
3
+ import { u as te, p as oe } from "./index-xMYjfBuw.js";
4
4
  import { useRouter as ce } from "vue-router";
5
5
  import { z as u, a as d } from "./validator-CTlVogBQ.js";
6
- import { P as ye } from "./payout-account-bky0BGyg.js";
7
- import { a as ge } from "./onboard-submission-DEJSQhGY.js";
8
- import { _ as re } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-B53mbAw2.js";
6
+ import { P as ye } from "./payout-account-CLCqR7oI.js";
7
+ import { a as ge } from "./onboard-submission-U49O3Zxc.js";
8
+ import { _ as re } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-B9yPSEWW.js";
9
9
  import { s as Ve } from "./vue-signature-pad.esm-IXPjf4fL.js";
10
- import { _ as ie } from "./Status.vue_vue_type_script_setup_true_lang-CvJ6L1_a.js";
10
+ import { _ as ie } from "./Status.vue_vue_type_script_setup_true_lang-D_7OKts9.js";
11
11
  import { useSnackbar as ae } from "@feedmepos/ui-library";
12
12
  import { u as Q } from "./error-K1CakhA9.js";
13
13
  const ve = ["src"], F = /* @__PURE__ */ Z({