@feedmepos/mf-payment 1.2.2 → 1.2.5

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 (58) hide show
  1. package/dist/{PayoutAccount-C1eI-Tha.js → PayoutAccount-D9LY7i1J.js} +6 -6
  2. package/dist/{PayoutAccount-QY9LkR0r.js → PayoutAccount-DEoI6K0j.js} +5 -5
  3. package/dist/{PayoutAccountSetting-Bt-BBfpF.js → PayoutAccountSetting-5lrvWFIz.js} +3 -3
  4. package/dist/{Restaurant-DMEt0GSf.js → Restaurant-AxoM-AsE.js} +4 -4
  5. package/dist/{RestaurantSetting-Bjgjx7_c.js → RestaurantSetting-B6LQF664.js} +171 -157
  6. package/dist/{Settlement-DHczxjKA.js → Settlement-D4CsP3fg.js} +3 -3
  7. package/dist/{Settlement-PYl2xRrw.js → Settlement-DDwe_w3m.js} +3 -3
  8. package/dist/{SettlementTransactions-B6eUs4ay.js → SettlementTransactions-Cmv7dqVI.js} +3 -3
  9. package/dist/{SettlementTransactions-Bn2-iO30.js → SettlementTransactions-Dp3nN442.js} +3 -3
  10. package/dist/{Terminal-q9AtQVTw.js → Terminal-B8UQH6ga.js} +5 -5
  11. package/dist/TerminalSetting-yRok1Iuc.js +572 -0
  12. package/dist/{Transaction-BSDhGkTu.js → Transaction-BZ7H6oB_.js} +5 -5
  13. package/dist/{Transaction-DlkiWPJt.js → Transaction-KkfCz4Cu.js} +7 -7
  14. package/dist/{TransactionOld-B93Kp78J.js → TransactionOld-BLpQHFH1.js} +4 -4
  15. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-DEgiifDL.js → TransactionTable.vue_vue_type_script_setup_true_lang-C4Bb203Q.js} +3 -3
  16. package/dist/{app-B1yXzXMJ.js → app-I2TNuZCs.js} +397 -397
  17. package/dist/app.js +1 -1
  18. package/dist/{assets-DbCf2oTj.js → assets-D5Qc4r7j.js} +2 -2
  19. package/dist/{grafana-CxvNheOh.js → grafana-BAbIv4CF.js} +1 -1
  20. package/dist/{index-DoWYy-5F.js → index-1NP0WkxZ.js} +2 -2
  21. package/dist/{index-DQ6y1YEM.js → index-Cc0abuxv.js} +1 -1
  22. package/dist/{index-DrVrxzsm.js → index-CguRXKmG.js} +1 -1
  23. package/dist/{index-C9YbV874.js → index-CnGVTtwu.js} +1 -1
  24. package/dist/{index-BwmZGhzh.js → index-D209n4gS.js} +317 -306
  25. package/dist/{index-BoafQG_3.js → index-DGcRvKvr.js} +1 -1
  26. package/dist/{index-DJx90D2_.js → index-bOlAWIVP.js} +1 -1
  27. package/dist/{index.vue_vue_type_script_setup_true_lang-BJAdIBCX.js → index.vue_vue_type_script_setup_true_lang-HYqCCZsZ.js} +1 -1
  28. package/dist/package.json +2 -2
  29. package/dist/{payout-account-Cy0D7ycP.js → payout-account-DNGKjfY1.js} +3 -3
  30. package/dist/stores/payoutAccount.d.ts +18 -18
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +18 -18
  33. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +22 -22
  34. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +22 -22
  35. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +18 -18
  36. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +18 -18
  37. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +22 -22
  38. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  39. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
  40. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +8 -8
  41. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +8 -8
  42. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +10 -6
  43. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -6
  44. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +8 -8
  45. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  46. package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
  47. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  48. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
  49. package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
  50. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
  51. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +36 -36
  52. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +40 -40
  53. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +20 -20
  54. package/dist/views/settlement/SettlementTable.vue.d.ts +8 -8
  55. package/package.json +2 -2
  56. package/dist/TerminalSetting-DKvLKsrH.js +0 -618
  57. package/dist/views/admin/terminal/tabs/FiuuGateway.vue.d.ts +0 -92
  58. package/dist/views/admin/terminal/tabs/{SoftspaceGateway.vue.d.ts → SoftposGateway.vue.d.ts} +8 -8
@@ -1,35 +1,35 @@
1
- import { defineComponent as I, ref as _, resolveComponent as i, openBlock as v, createBlock as V, withCtx as G, createVNode as u, unref as a, createElementVNode as T, createCommentVNode as S, onMounted as K, computed as P, createElementBlock as q, Fragment as E, resolveDynamicComponent as N, normalizeProps as O, mergeProps as $, isRef as A } from "vue";
2
- import { g as R, b as M, e as U, u as B } from "./index-BwmZGhzh.js";
1
+ import { defineComponent as C, ref as U, resolveComponent as d, openBlock as v, createBlock as F, withCtx as D, createVNode as o, unref as a, createElementVNode as k, createCommentVNode as S, onMounted as q, computed as M, createElementBlock as P, Fragment as E, resolveDynamicComponent as K, normalizeProps as O, mergeProps as $, isRef as A } from "vue";
2
+ import { g as N, b as R, e as _, u as B } from "./index-D209n4gS.js";
3
3
  import { _ as Y } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
4
  import { useRouter as L } from "vue-router";
5
- import { u as j } from "./index-DQ6y1YEM.js";
6
- import { z as y, a as p } from "./validator-D5jtpt9A.js";
5
+ import { u as j } from "./index-Cc0abuxv.js";
6
+ import { z as i, a as m } from "./validator-D5jtpt9A.js";
7
7
  import { useCoreStore as z } from "@feedmepos/mf-common";
8
- import { r as H } from "./index-BoafQG_3.js";
8
+ import { r as H } from "./index-DGcRvKvr.js";
9
9
  const x = {
10
- async get(l) {
11
- return R(
12
- await M().get(
13
- `restaurants/${l}/payment-gateway`
10
+ async get(n) {
11
+ return N(
12
+ await R().get(
13
+ `restaurants/${n}/payment-gateway`
14
14
  )
15
15
  );
16
16
  },
17
- async upsert(l, F) {
18
- return R(
19
- await M().post(
20
- `restaurants/${l}/payment-gateway`,
21
- { data: F }
17
+ async upsert(n, V) {
18
+ return N(
19
+ await R().post(
20
+ `restaurants/${n}/payment-gateway`,
21
+ { data: V }
22
22
  )
23
23
  );
24
24
  },
25
- async delete(l, F) {
26
- return R(
27
- await M().delete(
28
- `restaurants/${l}/payment-gateway/${F}`
25
+ async delete(n, V) {
26
+ return N(
27
+ await R().delete(
28
+ `restaurants/${n}/payment-gateway/${V}`
29
29
  )
30
30
  );
31
31
  }
32
- }, Q = { class: "flex mt-6 space-x-6" }, Z = /* @__PURE__ */ I({
32
+ }, Q = { class: "flex mt-6 space-x-6" }, Z = /* @__PURE__ */ C({
33
33
  __name: "FiuuGateway",
34
34
  props: {
35
35
  onUpdate: {
@@ -45,9 +45,9 @@ const x = {
45
45
  required: !0
46
46
  }
47
47
  },
48
- setup(l) {
49
- var d;
50
- const e = _(((d = l.gateway) == null ? void 0 : d.config) || {
48
+ setup(n) {
49
+ var y;
50
+ const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
51
51
  merchantId: "",
52
52
  uniqueId: "",
53
53
  verifyKey: "",
@@ -56,58 +56,58 @@ const x = {
56
56
  offlineSecret: ""
57
57
  });
58
58
  return (w, t) => {
59
- const n = i("FmTextField"), o = i("FmButton"), f = i("FmForm");
60
- return v(), V(f, {
59
+ const l = d("FmTextField"), u = d("FmButton"), f = d("FmForm");
60
+ return v(), F(f, {
61
61
  ref: "form",
62
62
  class: "flex flex-col gap-16",
63
- onValidationSuccess: t[6] || (t[6] = () => l.onUpdate(e.value))
63
+ onValidationSuccess: t[6] || (t[6] = () => n.onUpdate(e.value))
64
64
  }, {
65
- default: G(() => [
66
- u(n, {
65
+ default: D(() => [
66
+ o(l, {
67
67
  modelValue: e.value.merchantId,
68
68
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.merchantId = r),
69
69
  label: "Merchant ID",
70
- rules: a(y)(a(p).string())
70
+ rules: a(i)(a(m).string())
71
71
  }, null, 8, ["modelValue", "rules"]),
72
- u(n, {
72
+ o(l, {
73
73
  modelValue: e.value.uniqueId,
74
74
  "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.uniqueId = r),
75
75
  label: "Unique ID",
76
- rules: a(y)(a(p).string())
76
+ rules: a(i)(a(m).string())
77
77
  }, null, 8, ["modelValue", "rules"]),
78
- u(n, {
78
+ o(l, {
79
79
  modelValue: e.value.verifyKey,
80
80
  "onUpdate:modelValue": t[2] || (t[2] = (r) => e.value.verifyKey = r),
81
81
  label: "Verify Key",
82
- rules: a(y)(a(p).string())
82
+ rules: a(i)(a(m).string())
83
83
  }, null, 8, ["modelValue", "rules"]),
84
- u(n, {
84
+ o(l, {
85
85
  modelValue: e.value.secretKey,
86
86
  "onUpdate:modelValue": t[3] || (t[3] = (r) => e.value.secretKey = r),
87
87
  label: "Secret Key",
88
- rules: a(y)(a(p).string())
88
+ rules: a(i)(a(m).string())
89
89
  }, null, 8, ["modelValue", "rules"]),
90
- u(n, {
90
+ o(l, {
91
91
  modelValue: e.value.applicationCode,
92
92
  "onUpdate:modelValue": t[4] || (t[4] = (r) => e.value.applicationCode = r),
93
93
  label: "Application Code ( Offline )",
94
- rules: a(y)(a(p).string())
94
+ rules: a(i)(a(m).string())
95
95
  }, null, 8, ["modelValue", "rules"]),
96
- u(n, {
96
+ o(l, {
97
97
  modelValue: e.value.offlineSecret,
98
98
  "onUpdate:modelValue": t[5] || (t[5] = (r) => e.value.offlineSecret = r),
99
99
  label: "Offline Secret ( Offline )",
100
- rules: a(y)(a(p).string())
100
+ rules: a(i)(a(m).string())
101
101
  }, null, 8, ["modelValue", "rules"]),
102
- T("div", Q, [
103
- l.gateway ? (v(), V(o, {
102
+ k("div", Q, [
103
+ n.gateway ? (v(), F(u, {
104
104
  key: 0,
105
105
  class: "flex-1",
106
106
  variant: "secondary",
107
107
  label: "Delete",
108
- onclick: () => l.onDelete(l.gateway)
108
+ onclick: () => n.onDelete(n.gateway)
109
109
  }, null, 8, ["onclick"])) : S("", !0),
110
- u(o, {
110
+ o(u, {
111
111
  type: "submit",
112
112
  class: "flex-1",
113
113
  variant: "primary",
@@ -119,7 +119,7 @@ const x = {
119
119
  }, 512);
120
120
  };
121
121
  }
122
- }), J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ I({
122
+ }), J = { class: "flex mt-6 space-x-6" }, W = /* @__PURE__ */ C({
123
123
  __name: "RevenueMonsterGateway",
124
124
  props: {
125
125
  onUpdate: {
@@ -135,54 +135,54 @@ const x = {
135
135
  required: !0
136
136
  }
137
137
  },
138
- setup(l) {
139
- var d;
140
- const e = _(((d = l.gateway) == null ? void 0 : d.config) || {
138
+ setup(n) {
139
+ var y;
140
+ const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
141
141
  storeId: "",
142
142
  clientId: "",
143
143
  clientSecret: "",
144
144
  clientPrivateKey: ""
145
145
  });
146
146
  return (w, t) => {
147
- const n = i("FmTextField"), o = i("FmTextarea"), f = i("FmButton"), r = i("FmForm");
148
- return v(), V(r, {
147
+ const l = d("FmTextField"), u = d("FmTextarea"), f = d("FmButton"), r = d("FmForm");
148
+ return v(), F(r, {
149
149
  ref: "form",
150
150
  class: "flex flex-col gap-16",
151
- onValidationSuccess: t[4] || (t[4] = () => l.onUpdate(e.value))
151
+ onValidationSuccess: t[4] || (t[4] = () => n.onUpdate(e.value))
152
152
  }, {
153
- default: G(() => [
154
- u(n, {
153
+ default: D(() => [
154
+ o(l, {
155
155
  modelValue: e.value.storeId,
156
156
  "onUpdate:modelValue": t[0] || (t[0] = (s) => e.value.storeId = s),
157
157
  label: "Store ID",
158
- rules: a(y)(a(p).string())
158
+ rules: a(i)(a(m).string())
159
159
  }, null, 8, ["modelValue", "rules"]),
160
- u(n, {
160
+ o(l, {
161
161
  modelValue: e.value.clientId,
162
162
  "onUpdate:modelValue": t[1] || (t[1] = (s) => e.value.clientId = s),
163
163
  label: "Client ID",
164
- rules: a(y)(a(p).string())
164
+ rules: a(i)(a(m).string())
165
165
  }, null, 8, ["modelValue", "rules"]),
166
- u(n, {
166
+ o(l, {
167
167
  modelValue: e.value.clientSecret,
168
168
  "onUpdate:modelValue": t[2] || (t[2] = (s) => e.value.clientSecret = s),
169
169
  label: "Client Secret",
170
- rules: a(y)(a(p).string())
170
+ rules: a(i)(a(m).string())
171
171
  }, null, 8, ["modelValue", "rules"]),
172
- u(o, {
172
+ o(u, {
173
173
  modelValue: e.value.clientPrivateKey,
174
174
  "onUpdate:modelValue": t[3] || (t[3] = (s) => e.value.clientPrivateKey = s),
175
175
  label: "Client Private Key"
176
176
  }, null, 8, ["modelValue"]),
177
- T("div", J, [
178
- l.gateway ? (v(), V(f, {
177
+ k("div", J, [
178
+ n.gateway ? (v(), F(f, {
179
179
  key: 0,
180
180
  class: "flex-1",
181
181
  variant: "secondary",
182
182
  label: "Delete",
183
- onclick: () => l.onDelete(l.gateway)
183
+ onclick: () => n.onDelete(n.gateway)
184
184
  }, null, 8, ["onclick"])) : S("", !0),
185
- u(f, {
185
+ o(f, {
186
186
  type: "submit",
187
187
  class: "flex-1",
188
188
  variant: "primary",
@@ -194,7 +194,7 @@ const x = {
194
194
  }, 512);
195
195
  };
196
196
  }
197
- }), X = { class: "flex mt-6 space-x-6" }, h = /* @__PURE__ */ I({
197
+ }), X = { class: "flex mt-6 space-x-6" }, h = /* @__PURE__ */ C({
198
198
  __name: "GhlGateway",
199
199
  props: {
200
200
  onUpdate: {
@@ -210,49 +210,49 @@ const x = {
210
210
  required: !0
211
211
  }
212
212
  },
213
- setup(l) {
214
- var d;
215
- const e = _(((d = l.gateway) == null ? void 0 : d.config) || {
213
+ setup(n) {
214
+ var y;
215
+ const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
216
216
  merchantId: "",
217
217
  terminalId: "",
218
218
  privateKey: ""
219
219
  });
220
220
  return (w, t) => {
221
- const n = i("FmTextField"), o = i("FmTextarea"), f = i("FmButton"), r = i("FmForm");
222
- return v(), V(r, {
221
+ const l = d("FmTextField"), u = d("FmTextarea"), f = d("FmButton"), r = d("FmForm");
222
+ return v(), F(r, {
223
223
  ref: "form",
224
224
  class: "flex flex-col gap-16",
225
- onValidationSuccess: t[3] || (t[3] = () => l.onUpdate(e.value))
225
+ onValidationSuccess: t[3] || (t[3] = () => n.onUpdate(e.value))
226
226
  }, {
227
- default: G(() => [
228
- u(n, {
227
+ default: D(() => [
228
+ o(l, {
229
229
  modelValue: e.value.merchantId,
230
230
  "onUpdate:modelValue": t[0] || (t[0] = (s) => e.value.merchantId = s),
231
231
  label: "Merchant ID",
232
- rules: a(y)(a(p).string())
232
+ rules: a(i)(a(m).string())
233
233
  }, null, 8, ["modelValue", "rules"]),
234
- u(n, {
234
+ o(l, {
235
235
  modelValue: e.value.terminalId,
236
236
  "onUpdate:modelValue": t[1] || (t[1] = (s) => e.value.terminalId = s),
237
237
  label: "Terminal ID",
238
- rules: a(y)(a(p).string())
238
+ rules: a(i)(a(m).string())
239
239
  }, null, 8, ["modelValue", "rules"]),
240
- u(o, {
240
+ o(u, {
241
241
  id: "ghl_pkey",
242
242
  modelValue: e.value.privateKey,
243
243
  "onUpdate:modelValue": t[2] || (t[2] = (s) => e.value.privateKey = s),
244
244
  label: "Private Key",
245
- rules: a(y)(a(p).string())
245
+ rules: a(i)(a(m).string())
246
246
  }, null, 8, ["modelValue", "rules"]),
247
- T("div", X, [
248
- l.gateway ? (v(), V(f, {
247
+ k("div", X, [
248
+ n.gateway ? (v(), F(f, {
249
249
  key: 0,
250
250
  class: "flex-1",
251
251
  variant: "secondary",
252
252
  label: "Delete",
253
- onclick: () => l.onDelete(l.gateway)
253
+ onclick: () => n.onDelete(n.gateway)
254
254
  }, null, 8, ["onclick"])) : S("", !0),
255
- u(f, {
255
+ o(f, {
256
256
  type: "submit",
257
257
  class: "flex-1",
258
258
  variant: "primary",
@@ -264,7 +264,7 @@ const x = {
264
264
  }, 512);
265
265
  };
266
266
  }
267
- }), ee = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ I({
267
+ }), ee = { class: "flex mt-6 space-x-6" }, te = /* @__PURE__ */ C({
268
268
  __name: "MacauPassGateway",
269
269
  props: {
270
270
  onUpdate: {
@@ -280,48 +280,62 @@ const x = {
280
280
  required: !0
281
281
  }
282
282
  },
283
- setup(l) {
284
- var d;
285
- const e = _(((d = l.gateway) == null ? void 0 : d.config) || {
283
+ setup(n) {
284
+ var y;
285
+ const e = U(((y = n.gateway) == null ? void 0 : y.config) || {
286
286
  merchantId: "",
287
287
  merchantName: "",
288
- merchantCategoryCode: ""
288
+ merchantCategoryCode: "",
289
+ storeID: "",
290
+ storeName: ""
289
291
  });
290
292
  return (w, t) => {
291
- const n = i("FmTextField"), o = i("FmButton"), f = i("FmForm");
292
- return v(), V(f, {
293
+ const l = d("FmTextField"), u = d("FmButton"), f = d("FmForm");
294
+ return v(), F(f, {
293
295
  ref: "form",
294
296
  class: "flex flex-col gap-16",
295
- onValidationSuccess: t[3] || (t[3] = () => l.onUpdate(e.value))
297
+ onValidationSuccess: t[5] || (t[5] = () => n.onUpdate(e.value))
296
298
  }, {
297
- default: G(() => [
298
- u(n, {
299
+ default: D(() => [
300
+ o(l, {
299
301
  modelValue: e.value.merchantId,
300
302
  "onUpdate:modelValue": t[0] || (t[0] = (r) => e.value.merchantId = r),
301
303
  label: "Merchant ID",
302
- rules: a(y)(a(p).string())
304
+ rules: a(i)(a(m).string())
303
305
  }, null, 8, ["modelValue", "rules"]),
304
- u(n, {
306
+ o(l, {
305
307
  modelValue: e.value.merchantName,
306
308
  "onUpdate:modelValue": t[1] || (t[1] = (r) => e.value.merchantName = r),
307
309
  label: "Merchant Name",
308
- rules: a(y)(a(p).string())
310
+ rules: a(i)(a(m).string())
309
311
  }, null, 8, ["modelValue", "rules"]),
310
- u(n, {
312
+ o(l, {
311
313
  modelValue: e.value.merchantCategoryCode,
312
314
  "onUpdate:modelValue": t[2] || (t[2] = (r) => e.value.merchantCategoryCode = r),
313
315
  label: "Merchant MCC",
314
- rules: a(y)(a(p).string())
316
+ rules: a(i)(a(m).string())
315
317
  }, null, 8, ["modelValue", "rules"]),
316
- T("div", ee, [
317
- l.gateway ? (v(), V(o, {
318
+ o(l, {
319
+ modelValue: e.value.storeID,
320
+ "onUpdate:modelValue": t[3] || (t[3] = (r) => e.value.storeID = r),
321
+ label: "Store ID",
322
+ rules: a(i)(a(m).string())
323
+ }, null, 8, ["modelValue", "rules"]),
324
+ o(l, {
325
+ modelValue: e.value.storeName,
326
+ "onUpdate:modelValue": t[4] || (t[4] = (r) => e.value.storeName = r),
327
+ label: "Store Name",
328
+ rules: a(i)(a(m).string())
329
+ }, null, 8, ["modelValue", "rules"]),
330
+ k("div", ee, [
331
+ n.gateway ? (v(), F(u, {
318
332
  key: 0,
319
333
  class: "flex-1",
320
334
  variant: "secondary",
321
335
  label: "Delete",
322
- onclick: () => l.onDelete(l.gateway)
336
+ onclick: () => n.onDelete(n.gateway)
323
337
  }, null, 8, ["onclick"])) : S("", !0),
324
- u(o, {
338
+ o(u, {
325
339
  type: "submit",
326
340
  class: "flex-1",
327
341
  variant: "primary",
@@ -336,7 +350,7 @@ const x = {
336
350
  }), ae = {
337
351
  key: 0,
338
352
  class: "flex items-center justify-center min-h-[80vh]"
339
- }, le = /* @__PURE__ */ I({
353
+ }, le = /* @__PURE__ */ C({
340
354
  __name: "PaymentGateway",
341
355
  props: {
342
356
  restaurant: {
@@ -344,92 +358,92 @@ const x = {
344
358
  required: !0
345
359
  }
346
360
  },
347
- setup(l) {
348
- const F = [
361
+ setup(n) {
362
+ const V = [
349
363
  {
350
364
  label: "Fiuu",
351
365
  value: "RAZER_MERCHANT_SERVICE",
352
366
  form: Z,
353
- region: [U.F_COUNTRY.enum.MY, U.F_COUNTRY.enum.SG]
367
+ region: [_.F_COUNTRY.enum.MY, _.F_COUNTRY.enum.SG]
354
368
  },
355
369
  {
356
370
  label: "Revenue Monster",
357
371
  value: "REVENUE_MONSTER",
358
372
  form: W,
359
- region: [U.F_COUNTRY.enum.MY]
373
+ region: [_.F_COUNTRY.enum.MY]
360
374
  },
361
375
  {
362
376
  label: "GHL",
363
377
  value: "E_GHL",
364
378
  form: h,
365
- region: [U.F_COUNTRY.enum.MY]
379
+ region: [_.F_COUNTRY.enum.MY]
366
380
  },
367
381
  {
368
382
  label: "Macau Pass",
369
383
  value: "MACAU_PASS",
370
384
  form: te,
371
- region: [U.F_COUNTRY.enum.MO]
385
+ region: [_.F_COUNTRY.enum.MO]
372
386
  }
373
- ], e = l, d = z(), { isLoading: w, startAsyncCall: t } = B(), n = _(), o = _([]);
387
+ ], e = n, y = z(), { isLoading: w, startAsyncCall: t } = B(), l = U(), u = U([]);
374
388
  function f() {
375
389
  t(async () => {
376
- var c;
377
- o.value = await x.get(e.restaurant._id), n.value = (c = o.value.find((m) => m.active)) == null ? void 0 : c.paymentGateway;
390
+ var p;
391
+ u.value = await x.get(e.restaurant._id), l.value = (p = u.value.find((c) => c.active)) == null ? void 0 : p.paymentGateway;
378
392
  });
379
393
  }
380
- async function r(c) {
394
+ async function r(p) {
381
395
  await t(async () => {
382
- var k;
383
- const m = {
396
+ var G;
397
+ const c = {
384
398
  _id: "",
385
399
  _rev: "",
386
- paymentGateway: n.value,
387
- config: c,
400
+ paymentGateway: l.value,
401
+ config: p,
388
402
  active: !0
389
- }, b = o.value.find((g) => g.paymentGateway === n.value);
390
- b && (m._id = b._id, m._rev = b._rev), await Promise.all(
391
- o.value.map(async (g) => {
392
- g.paymentGateway || await x.delete(e.restaurant._id, g._id), g.active && g.paymentGateway !== m.paymentGateway && await x.upsert(e.restaurant._id, {
403
+ }, b = u.value.find((g) => g.paymentGateway === l.value);
404
+ b && (c._id = b._id, c._rev = b._rev), await Promise.all(
405
+ u.value.map(async (g) => {
406
+ g.paymentGateway || await x.delete(e.restaurant._id, g._id), g.active && g.paymentGateway !== c.paymentGateway && await x.upsert(e.restaurant._id, {
393
407
  ...g,
394
408
  active: !1
395
409
  });
396
410
  })
397
- ), await x.upsert(e.restaurant._id, m), o.value = await x.get(e.restaurant._id), n.value = (k = o.value.find((g) => g.active)) == null ? void 0 : k.paymentGateway;
411
+ ), await x.upsert(e.restaurant._id, c), u.value = await x.get(e.restaurant._id), l.value = (G = u.value.find((g) => g.active)) == null ? void 0 : G.paymentGateway;
398
412
  });
399
413
  }
400
- async function s(c) {
414
+ async function s(p) {
401
415
  t(async () => {
402
- var m;
403
- await x.delete(e.restaurant._id, c._id), o.value = await x.get(e.restaurant._id), n.value = (m = o.value.find((b) => b.active)) == null ? void 0 : m.paymentGateway;
416
+ var c;
417
+ await x.delete(e.restaurant._id, p._id), u.value = await x.get(e.restaurant._id), l.value = (c = u.value.find((b) => b.active)) == null ? void 0 : c.paymentGateway;
404
418
  });
405
419
  }
406
- K(f);
407
- const C = P(() => {
408
- var c;
409
- return (c = F.find((m) => m.value === n.value)) == null ? void 0 : c.form;
410
- }), D = P(() => F.filter((c) => c.region.includes(d.currentCountry.value ?? U.F_COUNTRY.enum.MY)));
411
- return (c, m) => {
412
- const b = i("FmCircularProgress"), k = i("FmSelect");
413
- return v(), q(E, null, [
414
- a(w) ? (v(), q("div", ae, [
415
- u(b, { size: "xxl" })
416
- ])) : (v(), V(k, {
420
+ q(f);
421
+ const I = M(() => {
422
+ var p;
423
+ return (p = V.find((c) => c.value === l.value)) == null ? void 0 : p.form;
424
+ }), T = M(() => V.filter((p) => p.region.includes(y.currentCountry.value ?? _.F_COUNTRY.enum.MY)));
425
+ return (p, c) => {
426
+ const b = d("FmCircularProgress"), G = d("FmSelect");
427
+ return v(), P(E, null, [
428
+ a(w) ? (v(), P("div", ae, [
429
+ o(b, { size: "xxl" })
430
+ ])) : (v(), F(G, {
417
431
  key: 1,
418
- modelValue: n.value,
419
- "onUpdate:modelValue": m[0] || (m[0] = (g) => n.value = g),
432
+ modelValue: l.value,
433
+ "onUpdate:modelValue": c[0] || (c[0] = (g) => l.value = g),
420
434
  class: "mb-6",
421
435
  label: "Payment Service Provider",
422
- items: D.value
436
+ items: T.value
423
437
  }, null, 8, ["modelValue", "items"])),
424
- n.value ? (v(), V(N(C.value), O($({ key: 2 }, {
425
- gateway: o.value.find((g) => g.paymentGateway === n.value),
438
+ l.value ? (v(), F(K(I.value), O($({ key: 2 }, {
439
+ gateway: u.value.find((g) => g.paymentGateway === l.value),
426
440
  onDelete: s,
427
441
  onUpdate: r
428
442
  })), null, 16)) : S("", !0)
429
443
  ], 64);
430
444
  };
431
445
  }
432
- }), ce = /* @__PURE__ */ I({
446
+ }), ce = /* @__PURE__ */ C({
433
447
  __name: "RestaurantSetting",
434
448
  props: {
435
449
  restaurantId: {
@@ -437,10 +451,10 @@ const x = {
437
451
  required: !0
438
452
  }
439
453
  },
440
- setup(l) {
441
- const F = l, { tab: e } = j({
454
+ setup(n) {
455
+ const V = n, { tab: e } = j({
442
456
  tab: "payment-gateway"
443
- }), { isLoading: d, startAsyncCall: w } = B(!0), t = L(), n = _(), o = [
457
+ }), { isLoading: y, startAsyncCall: w } = B(!0), t = L(), l = U(), u = [
444
458
  {
445
459
  label: "Payment Gateway",
446
460
  value: "payment-gateway",
@@ -450,31 +464,31 @@ const x = {
450
464
  ];
451
465
  function f() {
452
466
  w(async () => {
453
- n.value = await H.readRestaurantById(F.restaurantId);
467
+ l.value = await H.readRestaurantById(V.restaurantId);
454
468
  });
455
469
  }
456
- K(f);
457
- const r = P(() => {
470
+ q(f);
471
+ const r = M(() => {
458
472
  var s;
459
- return (s = o.find((C) => C.value === e.value)) == null ? void 0 : s.render;
473
+ return (s = u.find((I) => I.value === e.value)) == null ? void 0 : s.render;
460
474
  });
461
- return (s, C) => {
462
- var c;
463
- const D = i("FmTabs");
464
- return v(), V(Y, {
465
- title: `Restaurant (${(c = n.value) == null ? void 0 : c._id})`,
466
- loading: a(d),
475
+ return (s, I) => {
476
+ var p;
477
+ const T = d("FmTabs");
478
+ return v(), F(Y, {
479
+ title: `Restaurant (${(p = l.value) == null ? void 0 : p._id})`,
480
+ loading: a(y),
467
481
  onBack: a(t).back
468
482
  }, {
469
- default: G(() => [
470
- u(D, {
483
+ default: D(() => [
484
+ o(T, {
471
485
  "model-value": a(e),
472
- "onUpdate:modelValue": C[0] || (C[0] = (m) => A(e) ? e.value = m : null),
486
+ "onUpdate:modelValue": I[0] || (I[0] = (c) => A(e) ? e.value = c : null),
473
487
  class: "mb-6",
474
- items: o
488
+ items: u
475
489
  }, null, 8, ["model-value"]),
476
- a(e) && n.value ? (v(), V(N(r.value), O($({ key: 0 }, {
477
- restaurant: n.value
490
+ a(e) && l.value ? (v(), F(K(r.value), O($({ key: 0 }, {
491
+ restaurant: l.value
478
492
  })), null, 16)) : S("", !0)
479
493
  ]),
480
494
  _: 1
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as C, ref as k, computed as R, resolveComponent as w, openBlock as V, createBlock as D, h as T, watch as P, createElementBlock as U, Fragment as q, createElementVNode as m, createVNode as u, withCtx as _, unref as t, toDisplayString as r, createTextVNode as v, onMounted as O, isRef as M, createCommentVNode as N } from "vue";
2
- import { u as z } from "./index-BwmZGhzh.js";
2
+ import { u as z } from "./index-D209n4gS.js";
3
3
  import { h as $ } from "./moment-h96o7c8I.js";
4
4
  import { useI18n as K, useCoreStore as E } from "@feedmepos/mf-common";
5
5
  import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
6
- import { s as A } from "./index-C9YbV874.js";
6
+ import { s as A } from "./index-CnGVTtwu.js";
7
7
  import { useDialog as I } from "@feedmepos/ui-library";
8
8
  import { d } from "./dinero-CIVmXLL-.js";
9
9
  import { _ as B } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
10
10
  import { useRouter as L } from "vue-router";
11
- import { u as J } from "./index-DQ6y1YEM.js";
11
+ import { u as J } from "./index-Cc0abuxv.js";
12
12
  import { _ as Q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
13
  import { _ as W } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DyLnqQYe.js";
14
14
  import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as M, ref as h, computed as T, resolveComponent as d, openBlock as F, createBlock as Y, h as E, watch as C, onMounted as L, unref as r, withCtx as g, createElementVNode as k, createVNode as i, isRef as R, createElementBlock as N, Fragment as O, renderList as P } from "vue";
2
- import { u as A } from "./index-BwmZGhzh.js";
2
+ import { u as A } from "./index-D209n4gS.js";
3
3
  import { h as S } from "./moment-h96o7c8I.js";
4
- import { s as _ } from "./index-C9YbV874.js";
4
+ import { s as _ } from "./index-CnGVTtwu.js";
5
5
  import { useSnackbar as U } from "@feedmepos/ui-library";
6
6
  import { d as w } from "./dinero-CIVmXLL-.js";
7
7
  import { _ as q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
8
8
  import { useRouter as J } from "vue-router";
9
9
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
10
- import { u as z } from "./index-DQ6y1YEM.js";
10
+ import { u as z } from "./index-Cc0abuxv.js";
11
11
  import { u as G } from "./error-K1CakhA9.js";
12
12
  import { _ as Q } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
13
13
  import "@feedmepos/mf-common";
@@ -1,11 +1,11 @@
1
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-BwmZGhzh.js";
2
+ import { e as E, u as J } from "./index-D209n4gS.js";
3
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 X, a as Z, t as P, b as ee } from "./assets-DbCf2oTj.js";
5
+ import { g as X, a as Z, t as P, b as ee } from "./assets-D5Qc4r7j.js";
6
6
  import { _ as te } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
7
7
  import { useRouter as ae } from "vue-router";
8
- import { s as ne } from "./index-C9YbV874.js";
8
+ import { s as ne } from "./index-CnGVTtwu.js";
9
9
  import { u as oe } from "./error-K1CakhA9.js";
10
10
  import { w as re } from "./Modal-DB8M9o1T.js";
11
11
  import { h as le } from "./moment-h96o7c8I.js";