@feedmepos/mf-payment 1.4.19 → 1.4.20

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 (66) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-lEt-1wD5.js → Actions.vue_vue_type_script_setup_true_lang-CXzcR3lA.js} +2 -2
  2. package/dist/{OnboardForm-Em7M8vsV.js → OnboardForm-BgZBt-6p.js} +4 -4
  3. package/dist/{OnboardForm-CxT9uhD7.js → OnboardForm-ByqXEVZQ.js} +4 -4
  4. package/dist/{OnboardSubmission-DwpNtBfr.js → OnboardSubmission-CGwneESK.js} +2 -2
  5. package/dist/{OnboardSubmission-StQ2VfT7.js → OnboardSubmission-DLXWPrJx.js} +5 -5
  6. package/dist/{PayoutAccount-CLeghqRc.js → PayoutAccount-Bwjfyhsh.js} +5 -5
  7. package/dist/{PayoutAccount-DsqNnuOH.js → PayoutAccount-D680GDdz.js} +5 -5
  8. package/dist/{PayoutAccountSetting-C6S5qXwQ.js → PayoutAccountSetting-DNI3FbQH.js} +3 -3
  9. package/dist/{Restaurant-DIy6nvRx.js → Restaurant-ZTbhEMio.js} +4 -4
  10. package/dist/{RestaurantSetting-aSOpK7BL.js → RestaurantSetting-D49rMf6l.js} +242 -167
  11. package/dist/{Settlement-DAc2Eo53.js → Settlement-CR8qyWus.js} +3 -3
  12. package/dist/{Settlement-BNp511_t.js → Settlement-CqZSTDvu.js} +3 -3
  13. package/dist/{SettlementTransactions-Ca3US_pq.js → SettlementTransactions-BX1D315E.js} +3 -3
  14. package/dist/{SettlementTransactions-C4g9LiTV.js → SettlementTransactions-C9jYK2Ne.js} +3 -3
  15. package/dist/{Status.vue_vue_type_script_setup_true_lang-X-A4zImD.js → Status.vue_vue_type_script_setup_true_lang-Betuxyqe.js} +1 -1
  16. package/dist/{Terminal-DSwALqKp.js → Terminal-D-Uekfe6.js} +5 -5
  17. package/dist/{TerminalSetting-_vlpT1ap.js → TerminalSetting-DnvasW1-.js} +3 -3
  18. package/dist/{Transaction-CUDvEyDI.js → Transaction-8hEjSIV1.js} +8 -8
  19. package/dist/{Transaction-CcQlhCLL.js → Transaction-NaM-tip2.js} +5 -5
  20. package/dist/{TransactionOld-jZQIXQwX.js → TransactionOld-Qhbe5ao8.js} +5 -5
  21. package/dist/{app-CwJ19RRq.js → app-CddAYZGA.js} +22 -22
  22. package/dist/app.js +1 -1
  23. package/dist/{assets-wQt-RclW.js → assets-BGs9zWOF.js} +1 -1
  24. package/dist/{grafana-Ddr9UJ5i.js → grafana-inVQ9Jwy.js} +1 -1
  25. package/dist/{index-4o6XEvKK.js → index-0fX5ZxQX.js} +1 -1
  26. package/dist/{index-C5gCZHen.js → index-ATmg3hKo.js} +1 -1
  27. package/dist/{index-vveCdggv.js → index-B1DPEFQu.js} +2 -2
  28. package/dist/{index-BKbFR1mm.js → index-Bgu6ZXN4.js} +1 -1
  29. package/dist/{index-Cm9gPHIH.js → index-CYaUSwOX.js} +1 -1
  30. package/dist/{index-DVLqrR4d.js → index-DSG40xEJ.js} +4299 -4232
  31. package/dist/{index-C9vSg8Xx.js → index-Dn73sX5Z.js} +1 -1
  32. package/dist/{index.vue_vue_type_script_setup_true_lang-C7aGohmV.js → index.vue_vue_type_script_setup_true_lang-Cf_wL7Uo.js} +1 -1
  33. package/dist/package.json +2 -2
  34. package/dist/{payout-account-5tWMknNV.js → payout-account-4nMWJq7g.js} +3 -3
  35. package/dist/{plugins-CtDTQJMh.js → plugins-BBPJWIbh.js} +1 -1
  36. package/dist/stores/payoutAccount.d.ts +4 -4
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +24 -24
  39. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
  40. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +8 -8
  41. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +8 -8
  42. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
  43. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
  44. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +8 -8
  45. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +0 -2
  46. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  47. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +48 -0
  48. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
  49. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +8 -8
  50. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
  51. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +8 -8
  52. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
  53. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +8 -8
  54. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +8 -8
  55. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +8 -8
  56. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +8 -8
  57. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +8 -8
  58. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +8 -8
  59. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +8 -8
  60. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +8 -8
  61. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +8 -8
  62. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
  63. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
  64. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +28 -28
  65. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +14 -14
  66. package/package.json +2 -2
@@ -1,39 +1,39 @@
1
- import { defineComponent as D, ref as b, resolveComponent as r, openBlock as F, createBlock as w, withCtx as I, createVNode as o, unref as n, createElementVNode as _, createCommentVNode as S, computed as O, onMounted as K, createElementBlock as N, Fragment as L, isRef as $, resolveDynamicComponent as B, normalizeProps as P, mergeProps as Y } from "vue";
2
- import { g as G, b as q, u as R, e as U } from "./index-DVLqrR4d.js";
3
- import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
- import { useRouter as H } from "vue-router";
5
- import { u as E } from "./index-C9vSg8Xx.js";
6
- import { z as f, a as g } from "./validator-D5jtpt9A.js";
1
+ import { defineComponent as D, ref as b, resolveComponent as r, openBlock as g, createBlock as w, withCtx as I, createVNode as o, unref as n, createElementVNode as T, createCommentVNode as S, computed as O, onMounted as R, createElementBlock as N, Fragment as L, isRef as B, resolveDynamicComponent as $, normalizeProps as P, mergeProps as Y } from "vue";
2
+ import { g as q, b as G, u as M, e as U } from "./index-DSG40xEJ.js";
3
+ import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
4
+ import { useRouter as z } from "vue-router";
5
+ import { u as E } from "./index-Dn73sX5Z.js";
6
+ import { z as f, a as F } from "./validator-D5jtpt9A.js";
7
7
  import { useCoreStore as j } from "@feedmepos/mf-common";
8
8
  import { u as Q } from "./error-K1CakhA9.js";
9
9
  import { useSnackbar as Z } from "@feedmepos/ui-library";
10
- import { r as J } from "./index-4o6XEvKK.js";
10
+ import { r as J } from "./index-0fX5ZxQX.js";
11
11
  const A = {
12
12
  async get(a) {
13
- return G(
14
- await q().get(
13
+ return q(
14
+ await G().get(
15
15
  `restaurants/${a}/payment-gateway`
16
16
  )
17
17
  );
18
18
  },
19
- async upsert(a, i) {
20
- return G(
21
- await q().post(
19
+ async upsert(a, m) {
20
+ return q(
21
+ await G().post(
22
22
  `restaurants/${a}/payment-gateway`,
23
- { data: i }
23
+ { data: m }
24
24
  )
25
25
  );
26
26
  },
27
- async delete(a, i) {
28
- return G(
29
- await q().delete(
30
- `restaurants/${a}/payment-gateway/${i}`
27
+ async delete(a, m) {
28
+ return q(
29
+ await G().delete(
30
+ `restaurants/${a}/payment-gateway/${m}`
31
31
  )
32
32
  );
33
33
  },
34
34
  async grabSync(a) {
35
- return G(
36
- await q().post(
35
+ return q(
36
+ await G().post(
37
37
  `restaurants/${a}/payment-gateway/grab/sync`
38
38
  )
39
39
  );
@@ -55,8 +55,8 @@ const A = {
55
55
  }
56
56
  },
57
57
  setup(a) {
58
- var y, d;
59
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
58
+ var v, d;
59
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
60
60
  merchantId: "",
61
61
  uniqueId: "",
62
62
  verifyKey: "",
@@ -64,9 +64,9 @@ const A = {
64
64
  applicationCode: "",
65
65
  offlineSecret: ""
66
66
  });
67
- return (v, e) => {
68
- const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), p = r("FmForm");
69
- return F(), w(p, {
67
+ return (p, e) => {
68
+ const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), y = r("FmForm");
69
+ return g(), w(y, {
70
70
  ref: "form",
71
71
  class: "flex flex-col gap-16",
72
72
  onValidationSuccess: e[7] || (e[7] = () => a.onUpdate(u.value, t.value))
@@ -76,45 +76,45 @@ const A = {
76
76
  modelValue: t.value.merchantId,
77
77
  "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
78
78
  label: "Merchant ID",
79
- rules: n(f)(n(g).string())
79
+ rules: n(f)(n(F).string())
80
80
  }, null, 8, ["modelValue", "rules"]),
81
81
  o(s, {
82
82
  modelValue: t.value.uniqueId,
83
83
  "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.uniqueId = l),
84
84
  label: "Unique ID",
85
- rules: n(f)(n(g).string())
85
+ rules: n(f)(n(F).string())
86
86
  }, null, 8, ["modelValue", "rules"]),
87
87
  o(s, {
88
88
  modelValue: t.value.verifyKey,
89
89
  "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.verifyKey = l),
90
90
  label: "Verify Key",
91
- rules: n(f)(n(g).string())
91
+ rules: n(f)(n(F).string())
92
92
  }, null, 8, ["modelValue", "rules"]),
93
93
  o(s, {
94
94
  modelValue: t.value.secretKey,
95
95
  "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.secretKey = l),
96
96
  label: "Secret Key",
97
- rules: n(f)(n(g).string())
97
+ rules: n(f)(n(F).string())
98
98
  }, null, 8, ["modelValue", "rules"]),
99
99
  o(s, {
100
100
  modelValue: t.value.applicationCode,
101
101
  "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.applicationCode = l),
102
102
  label: "Application Code ( Offline )",
103
- rules: n(f)(n(g).string())
103
+ rules: n(f)(n(F).string())
104
104
  }, null, 8, ["modelValue", "rules"]),
105
105
  o(s, {
106
106
  modelValue: t.value.offlineSecret,
107
107
  "onUpdate:modelValue": e[5] || (e[5] = (l) => t.value.offlineSecret = l),
108
108
  label: "Offline Secret ( Offline )",
109
- rules: n(f)(n(g).string())
109
+ rules: n(f)(n(F).string())
110
110
  }, null, 8, ["modelValue", "rules"]),
111
111
  o(V, {
112
112
  modelValue: u.value,
113
113
  "onUpdate:modelValue": e[6] || (e[6] = (l) => u.value = l),
114
114
  label: "Is Active"
115
115
  }, null, 8, ["modelValue"]),
116
- _("div", W, [
117
- a.gateway ? (F(), w(c, {
116
+ T("div", W, [
117
+ a.gateway ? (g(), w(c, {
118
118
  key: 0,
119
119
  class: "flex-1",
120
120
  variant: "secondary",
@@ -150,16 +150,16 @@ const A = {
150
150
  }
151
151
  },
152
152
  setup(a) {
153
- var y, d;
154
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
153
+ var v, d;
154
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
155
155
  storeId: "",
156
156
  clientId: "",
157
157
  clientSecret: "",
158
158
  clientPrivateKey: ""
159
159
  });
160
- return (v, e) => {
161
- const s = r("FmTextField"), V = r("FmTextarea"), c = r("FmSwitch"), p = r("FmButton"), l = r("FmForm");
162
- return F(), w(l, {
160
+ return (p, e) => {
161
+ const s = r("FmTextField"), V = r("FmTextarea"), c = r("FmSwitch"), y = r("FmButton"), l = r("FmForm");
162
+ return g(), w(l, {
163
163
  ref: "form",
164
164
  class: "flex flex-col gap-16",
165
165
  onValidationSuccess: e[5] || (e[5] = () => a.onUpdate(u.value, t.value))
@@ -167,41 +167,41 @@ const A = {
167
167
  default: I(() => [
168
168
  o(s, {
169
169
  modelValue: t.value.storeId,
170
- "onUpdate:modelValue": e[0] || (e[0] = (m) => t.value.storeId = m),
170
+ "onUpdate:modelValue": e[0] || (e[0] = (i) => t.value.storeId = i),
171
171
  label: "Store ID",
172
- rules: n(f)(n(g).string())
172
+ rules: n(f)(n(F).string())
173
173
  }, null, 8, ["modelValue", "rules"]),
174
174
  o(s, {
175
175
  modelValue: t.value.clientId,
176
- "onUpdate:modelValue": e[1] || (e[1] = (m) => t.value.clientId = m),
176
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => t.value.clientId = i),
177
177
  label: "Client ID",
178
- rules: n(f)(n(g).string())
178
+ rules: n(f)(n(F).string())
179
179
  }, null, 8, ["modelValue", "rules"]),
180
180
  o(s, {
181
181
  modelValue: t.value.clientSecret,
182
- "onUpdate:modelValue": e[2] || (e[2] = (m) => t.value.clientSecret = m),
182
+ "onUpdate:modelValue": e[2] || (e[2] = (i) => t.value.clientSecret = i),
183
183
  label: "Client Secret",
184
- rules: n(f)(n(g).string())
184
+ rules: n(f)(n(F).string())
185
185
  }, null, 8, ["modelValue", "rules"]),
186
186
  o(V, {
187
187
  modelValue: t.value.clientPrivateKey,
188
- "onUpdate:modelValue": e[3] || (e[3] = (m) => t.value.clientPrivateKey = m),
188
+ "onUpdate:modelValue": e[3] || (e[3] = (i) => t.value.clientPrivateKey = i),
189
189
  label: "Client Private Key"
190
190
  }, null, 8, ["modelValue"]),
191
191
  o(c, {
192
192
  modelValue: u.value,
193
- "onUpdate:modelValue": e[4] || (e[4] = (m) => u.value = m),
193
+ "onUpdate:modelValue": e[4] || (e[4] = (i) => u.value = i),
194
194
  label: "Is Active"
195
195
  }, null, 8, ["modelValue"]),
196
- _("div", h, [
197
- a.gateway ? (F(), w(p, {
196
+ T("div", h, [
197
+ a.gateway ? (g(), w(y, {
198
198
  key: 0,
199
199
  class: "flex-1",
200
200
  variant: "secondary",
201
201
  label: "Delete",
202
202
  onclick: () => a.onDelete(a.gateway)
203
203
  }, null, 8, ["onclick"])) : S("", !0),
204
- o(p, {
204
+ o(y, {
205
205
  type: "submit",
206
206
  class: "flex-1",
207
207
  variant: "primary",
@@ -230,15 +230,15 @@ const A = {
230
230
  }
231
231
  },
232
232
  setup(a) {
233
- var y, d;
234
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
233
+ var v, d;
234
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
235
235
  merchantId: "",
236
236
  terminalId: "",
237
237
  privateKey: ""
238
238
  });
239
- return (v, e) => {
240
- const s = r("FmTextField"), V = r("FmTextarea"), c = r("FmSwitch"), p = r("FmButton"), l = r("FmForm");
241
- return F(), w(l, {
239
+ return (p, e) => {
240
+ const s = r("FmTextField"), V = r("FmTextarea"), c = r("FmSwitch"), y = r("FmButton"), l = r("FmForm");
241
+ return g(), w(l, {
242
242
  ref: "form",
243
243
  class: "flex flex-col gap-16",
244
244
  onValidationSuccess: e[4] || (e[4] = () => a.onUpdate(u.value, t.value))
@@ -246,37 +246,37 @@ const A = {
246
246
  default: I(() => [
247
247
  o(s, {
248
248
  modelValue: t.value.merchantId,
249
- "onUpdate:modelValue": e[0] || (e[0] = (m) => t.value.merchantId = m),
249
+ "onUpdate:modelValue": e[0] || (e[0] = (i) => t.value.merchantId = i),
250
250
  label: "Merchant ID",
251
- rules: n(f)(n(g).string())
251
+ rules: n(f)(n(F).string())
252
252
  }, null, 8, ["modelValue", "rules"]),
253
253
  o(s, {
254
254
  modelValue: t.value.terminalId,
255
- "onUpdate:modelValue": e[1] || (e[1] = (m) => t.value.terminalId = m),
255
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => t.value.terminalId = i),
256
256
  label: "Terminal ID",
257
- rules: n(f)(n(g).string())
257
+ rules: n(f)(n(F).string())
258
258
  }, null, 8, ["modelValue", "rules"]),
259
259
  o(V, {
260
260
  modelValue: t.value.privateKey,
261
- "onUpdate:modelValue": e[2] || (e[2] = (m) => t.value.privateKey = m),
261
+ "onUpdate:modelValue": e[2] || (e[2] = (i) => t.value.privateKey = i),
262
262
  label: "Private Key",
263
263
  "label-mark": "optional",
264
264
  "label-info": "Default will use FeedMe Private Key"
265
265
  }, null, 8, ["modelValue"]),
266
266
  o(c, {
267
267
  modelValue: u.value,
268
- "onUpdate:modelValue": e[3] || (e[3] = (m) => u.value = m),
268
+ "onUpdate:modelValue": e[3] || (e[3] = (i) => u.value = i),
269
269
  label: "Is Active"
270
270
  }, null, 8, ["modelValue"]),
271
- _("div", te, [
272
- a.gateway ? (F(), w(p, {
271
+ T("div", te, [
272
+ a.gateway ? (g(), w(y, {
273
273
  key: 0,
274
274
  class: "flex-1",
275
275
  variant: "secondary",
276
276
  label: "Delete",
277
277
  onclick: () => a.onDelete(a.gateway)
278
278
  }, null, 8, ["onclick"])) : S("", !0),
279
- o(p, {
279
+ o(y, {
280
280
  type: "submit",
281
281
  class: "flex-1",
282
282
  variant: "primary",
@@ -305,17 +305,17 @@ const A = {
305
305
  }
306
306
  },
307
307
  setup(a) {
308
- var y, d;
309
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
308
+ var v, d;
309
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
310
310
  merchantId: "",
311
311
  merchantName: "",
312
312
  merchantCategoryCode: "",
313
313
  storeID: "",
314
314
  storeName: ""
315
315
  });
316
- return (v, e) => {
317
- const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), p = r("FmForm");
318
- return F(), w(p, {
316
+ return (p, e) => {
317
+ const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), y = r("FmForm");
318
+ return g(), w(y, {
319
319
  ref: "form",
320
320
  class: "flex flex-col gap-16",
321
321
  onValidationSuccess: e[6] || (e[6] = () => a.onUpdate(u.value, t.value))
@@ -325,39 +325,39 @@ const A = {
325
325
  modelValue: t.value.merchantId,
326
326
  "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
327
327
  label: "Merchant ID",
328
- rules: n(f)(n(g).string())
328
+ rules: n(f)(n(F).string())
329
329
  }, null, 8, ["modelValue", "rules"]),
330
330
  o(s, {
331
331
  modelValue: t.value.merchantName,
332
332
  "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantName = l),
333
333
  label: "Merchant Name",
334
- rules: n(f)(n(g).string())
334
+ rules: n(f)(n(F).string())
335
335
  }, null, 8, ["modelValue", "rules"]),
336
336
  o(s, {
337
337
  modelValue: t.value.merchantCategoryCode,
338
338
  "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.merchantCategoryCode = l),
339
339
  label: "Merchant MCC",
340
- rules: n(f)(n(g).string())
340
+ rules: n(f)(n(F).string())
341
341
  }, null, 8, ["modelValue", "rules"]),
342
342
  o(s, {
343
343
  modelValue: t.value.storeID,
344
344
  "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.storeID = l),
345
345
  label: "Store ID",
346
- rules: n(f)(n(g).string())
346
+ rules: n(f)(n(F).string())
347
347
  }, null, 8, ["modelValue", "rules"]),
348
348
  o(s, {
349
349
  modelValue: t.value.storeName,
350
350
  "onUpdate:modelValue": e[4] || (e[4] = (l) => t.value.storeName = l),
351
351
  label: "Store Name",
352
- rules: n(f)(n(g).string())
352
+ rules: n(f)(n(F).string())
353
353
  }, null, 8, ["modelValue", "rules"]),
354
354
  o(V, {
355
355
  modelValue: u.value,
356
356
  "onUpdate:modelValue": e[5] || (e[5] = (l) => u.value = l),
357
357
  label: "Is Active"
358
358
  }, null, 8, ["modelValue"]),
359
- _("div", ae, [
360
- a.gateway ? (F(), w(c, {
359
+ T("div", ae, [
360
+ a.gateway ? (g(), w(c, {
361
361
  key: 0,
362
362
  class: "flex-1",
363
363
  variant: "secondary",
@@ -394,20 +394,20 @@ const A = {
394
394
  },
395
395
  setup(a) {
396
396
  var V, c;
397
- const i = Z(), { isLoading: u, startAsyncCall: t } = R(), y = j(), d = a, v = b(((V = d.gateway) == null ? void 0 : V.active) ?? !1), e = b(((c = d.gateway) == null ? void 0 : c.config) || {
397
+ const m = Z(), { isLoading: u, startAsyncCall: t } = M(), v = j(), d = a, p = b(((V = d.gateway) == null ? void 0 : V.active) ?? !1), e = b(((c = d.gateway) == null ? void 0 : c.config) || {
398
398
  merchantId: ""
399
399
  });
400
400
  async function s() {
401
401
  t(async () => {
402
- var p;
402
+ var y;
403
403
  try {
404
- const { merchantID: l } = await A.grabSync(((p = y.currentRestaurant.value) == null ? void 0 : p._id) ?? "");
405
- e.value.merchantId = l, v.value = !0, i.open({
404
+ const { merchantID: l } = await A.grabSync(((y = v.currentRestaurant.value) == null ? void 0 : y._id) ?? "");
405
+ e.value.merchantId = l, p.value = !0, m.open({
406
406
  type: "success",
407
407
  title: "Grab Setting sync succesfully, you will still need to save the changes."
408
408
  });
409
409
  } catch (l) {
410
- i.open({
410
+ m.open({
411
411
  type: "error",
412
412
  title: "Error occurs when sync ordering settings",
413
413
  message: Q(l)
@@ -415,22 +415,22 @@ const A = {
415
415
  }
416
416
  });
417
417
  }
418
- return (p, l) => {
419
- const m = r("FmTextField"), x = r("FmButton"), T = r("FmTooltip"), C = r("FmSwitch"), k = r("FmForm");
420
- return F(), w(k, {
418
+ return (y, l) => {
419
+ const i = r("FmTextField"), x = r("FmButton"), _ = r("FmTooltip"), k = r("FmSwitch"), C = r("FmForm");
420
+ return g(), w(C, {
421
421
  ref: "form",
422
422
  class: "flex flex-col gap-16",
423
- onValidationSuccess: l[2] || (l[2] = () => a.onUpdate(v.value, e.value))
423
+ onValidationSuccess: l[2] || (l[2] = () => a.onUpdate(p.value, e.value))
424
424
  }, {
425
425
  default: I(() => [
426
- _("div", oe, [
427
- o(m, {
426
+ T("div", oe, [
427
+ o(i, {
428
428
  modelValue: e.value.merchantId,
429
- "onUpdate:modelValue": l[0] || (l[0] = (M) => e.value.merchantId = M),
429
+ "onUpdate:modelValue": l[0] || (l[0] = (K) => e.value.merchantId = K),
430
430
  label: "Merchant ID",
431
- rules: n(f)(n(g).string())
431
+ rules: n(f)(n(F).string())
432
432
  }, null, 8, ["modelValue", "rules"]),
433
- o(T, {
433
+ o(_, {
434
434
  variant: "plain",
435
435
  placement: "right",
436
436
  content: "Sync from Ordering Settings"
@@ -448,13 +448,13 @@ const A = {
448
448
  _: 1
449
449
  })
450
450
  ]),
451
- o(C, {
452
- modelValue: v.value,
453
- "onUpdate:modelValue": l[1] || (l[1] = (M) => v.value = M),
451
+ o(k, {
452
+ modelValue: p.value,
453
+ "onUpdate:modelValue": l[1] || (l[1] = (K) => p.value = K),
454
454
  label: "Is Active"
455
455
  }, null, 8, ["modelValue"]),
456
- _("div", ue, [
457
- a.gateway ? (F(), w(x, {
456
+ T("div", ue, [
457
+ a.gateway ? (g(), w(x, {
458
458
  key: 0,
459
459
  class: "flex-1",
460
460
  variant: "secondary",
@@ -490,14 +490,14 @@ const A = {
490
490
  }
491
491
  },
492
492
  setup(a) {
493
- var y, d;
494
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
493
+ var v, d;
494
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
495
495
  mid: "",
496
496
  tid: ""
497
497
  });
498
- return (v, e) => {
499
- const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), p = r("FmForm");
500
- return F(), w(p, {
498
+ return (p, e) => {
499
+ const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), y = r("FmForm");
500
+ return g(), w(y, {
501
501
  ref: "form",
502
502
  class: "flex flex-col gap-16",
503
503
  onValidationSuccess: e[3] || (e[3] = () => a.onUpdate(u.value, t.value))
@@ -507,21 +507,21 @@ const A = {
507
507
  modelValue: t.value.mid,
508
508
  "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.mid = l),
509
509
  label: "MID",
510
- rules: n(f)(n(g).string())
510
+ rules: n(f)(n(F).string())
511
511
  }, null, 8, ["modelValue", "rules"]),
512
512
  o(s, {
513
513
  modelValue: t.value.tid,
514
514
  "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.tid = l),
515
515
  label: "TID",
516
- rules: n(f)(n(g).string())
516
+ rules: n(f)(n(F).string())
517
517
  }, null, 8, ["modelValue", "rules"]),
518
518
  o(V, {
519
519
  modelValue: u.value,
520
520
  "onUpdate:modelValue": e[2] || (e[2] = (l) => u.value = l),
521
521
  label: "Is Active"
522
522
  }, null, 8, ["modelValue"]),
523
- _("div", se, [
524
- a.gateway ? (F(), w(c, {
523
+ T("div", se, [
524
+ a.gateway ? (g(), w(c, {
525
525
  key: 0,
526
526
  class: "flex-1",
527
527
  variant: "secondary",
@@ -557,13 +557,13 @@ const A = {
557
557
  }
558
558
  },
559
559
  setup(a) {
560
- var y, d;
561
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
560
+ var v, d;
561
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
562
562
  merchantId: ""
563
563
  });
564
- return (v, e) => {
565
- const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), p = r("FmForm");
566
- return F(), w(p, {
564
+ return (p, e) => {
565
+ const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), y = r("FmForm");
566
+ return g(), w(y, {
567
567
  ref: "form",
568
568
  class: "flex flex-col gap-16",
569
569
  onValidationSuccess: e[2] || (e[2] = () => a.onUpdate(u.value, t.value))
@@ -573,15 +573,15 @@ const A = {
573
573
  modelValue: t.value.merchantId,
574
574
  "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.merchantId = l),
575
575
  label: "Merchant ID",
576
- rules: n(f)(n(g).string())
576
+ rules: n(f)(n(F).string())
577
577
  }, null, 8, ["modelValue", "rules"]),
578
578
  o(V, {
579
579
  modelValue: u.value,
580
580
  "onUpdate:modelValue": e[1] || (e[1] = (l) => u.value = l),
581
581
  label: "Is Active"
582
582
  }, null, 8, ["modelValue"]),
583
- _("div", me, [
584
- a.gateway ? (F(), w(c, {
583
+ T("div", me, [
584
+ a.gateway ? (g(), w(c, {
585
585
  key: 0,
586
586
  class: "flex-1",
587
587
  variant: "secondary",
@@ -600,7 +600,7 @@ const A = {
600
600
  }, 512);
601
601
  };
602
602
  }
603
- }), ce = { class: "flex mt-6 space-x-6" }, ye = /* @__PURE__ */ D({
603
+ }), ce = { class: "flex mt-6 space-x-6" }, ve = /* @__PURE__ */ D({
604
604
  __name: "AdyenGateway",
605
605
  props: {
606
606
  onUpdate: {
@@ -617,17 +617,17 @@ const A = {
617
617
  }
618
618
  },
619
619
  setup(a) {
620
- var y, d;
621
- const i = a, u = b(((y = i.gateway) == null ? void 0 : y.active) ?? !1), t = b(((d = i.gateway) == null ? void 0 : d.config) || {
620
+ var v, d;
621
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(((d = m.gateway) == null ? void 0 : d.config) || {
622
622
  merchantAccount: "",
623
623
  username: "",
624
624
  apiKey: "",
625
625
  endpoint: "",
626
626
  hmacKey: ""
627
627
  });
628
- return (v, e) => {
629
- const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), p = r("FmForm");
630
- return F(), w(p, {
628
+ return (p, e) => {
629
+ const s = r("FmTextField"), V = r("FmSwitch"), c = r("FmButton"), y = r("FmForm");
630
+ return g(), w(y, {
631
631
  ref: "form",
632
632
  class: "flex flex-col gap-16",
633
633
  onValidationSuccess: e[6] || (e[6] = () => a.onUpdate(u.value, t.value))
@@ -637,25 +637,25 @@ const A = {
637
637
  modelValue: t.value.endpoint,
638
638
  "onUpdate:modelValue": e[0] || (e[0] = (l) => t.value.endpoint = l),
639
639
  label: "Endpoint",
640
- rules: n(f)(n(g).string())
640
+ rules: n(f)(n(F).string())
641
641
  }, null, 8, ["modelValue", "rules"]),
642
642
  o(s, {
643
643
  modelValue: t.value.merchantAccount,
644
644
  "onUpdate:modelValue": e[1] || (e[1] = (l) => t.value.merchantAccount = l),
645
645
  label: "Merchant Account",
646
- rules: n(f)(n(g).string())
646
+ rules: n(f)(n(F).string())
647
647
  }, null, 8, ["modelValue", "rules"]),
648
648
  o(s, {
649
649
  modelValue: t.value.username,
650
650
  "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value.username = l),
651
651
  label: "Username",
652
- rules: n(f)(n(g).string())
652
+ rules: n(f)(n(F).string())
653
653
  }, null, 8, ["modelValue", "rules"]),
654
654
  o(s, {
655
655
  modelValue: t.value.apiKey,
656
656
  "onUpdate:modelValue": e[3] || (e[3] = (l) => t.value.apiKey = l),
657
657
  label: "API Key",
658
- rules: n(f)(n(g).string())
658
+ rules: n(f)(n(F).string())
659
659
  }, null, 8, ["modelValue", "rules"]),
660
660
  o(s, {
661
661
  modelValue: t.value.hmacKey,
@@ -667,8 +667,8 @@ const A = {
667
667
  "onUpdate:modelValue": e[5] || (e[5] = (l) => u.value = l),
668
668
  label: "Is Active"
669
669
  }, null, 8, ["modelValue"]),
670
- _("div", ce, [
671
- a.gateway ? (F(), w(c, {
670
+ T("div", ce, [
671
+ a.gateway ? (g(), w(c, {
672
672
  key: 0,
673
673
  class: "flex-1",
674
674
  variant: "secondary",
@@ -687,10 +687,79 @@ const A = {
687
687
  }, 512);
688
688
  };
689
689
  }
690
- }), ve = {
690
+ }), ye = { class: "flex mt-6 space-x-6" }, pe = /* @__PURE__ */ D({
691
+ __name: "KsherGateway",
692
+ props: {
693
+ gateway: {
694
+ type: Object,
695
+ required: !0
696
+ },
697
+ onUpdate: {
698
+ type: Function,
699
+ required: !0
700
+ },
701
+ onDelete: {
702
+ type: Function,
703
+ required: !0
704
+ }
705
+ },
706
+ setup(a) {
707
+ var v, d;
708
+ const m = a, u = b(((v = m.gateway) == null ? void 0 : v.active) ?? !1), t = b(
709
+ ((d = m.gateway) == null ? void 0 : d.config) || {
710
+ appId: "",
711
+ privateKey: ""
712
+ }
713
+ );
714
+ return (p, e) => {
715
+ const s = r("FmTextField"), V = r("FmTextarea"), c = r("FmSwitch"), y = r("FmButton"), l = r("FmForm");
716
+ return g(), w(l, {
717
+ ref: "form",
718
+ class: "flex flex-col gap-16",
719
+ onValidationSuccess: e[3] || (e[3] = () => a.onUpdate(u.value, t.value))
720
+ }, {
721
+ default: I(() => [
722
+ o(s, {
723
+ modelValue: t.value.appId,
724
+ "onUpdate:modelValue": e[0] || (e[0] = (i) => t.value.appId = i),
725
+ label: "App ID",
726
+ rules: n(f)(n(F).string())
727
+ }, null, 8, ["modelValue", "rules"]),
728
+ o(V, {
729
+ modelValue: t.value.privateKey,
730
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => t.value.privateKey = i),
731
+ label: "Private Key",
732
+ placeholder: "Paste your private key including BEGIN and END markers"
733
+ }, null, 8, ["modelValue"]),
734
+ o(c, {
735
+ modelValue: u.value,
736
+ "onUpdate:modelValue": e[2] || (e[2] = (i) => u.value = i),
737
+ label: "Is Active"
738
+ }, null, 8, ["modelValue"]),
739
+ T("div", ye, [
740
+ a.gateway ? (g(), w(y, {
741
+ key: 0,
742
+ class: "flex-1",
743
+ variant: "secondary",
744
+ label: "Delete",
745
+ onclick: () => a.onDelete(a.gateway)
746
+ }, null, 8, ["onclick"])) : S("", !0),
747
+ o(y, {
748
+ type: "submit",
749
+ class: "flex-1",
750
+ variant: "primary",
751
+ label: "Save"
752
+ })
753
+ ])
754
+ ]),
755
+ _: 1
756
+ }, 512);
757
+ };
758
+ }
759
+ }), fe = {
691
760
  key: 0,
692
761
  class: "flex items-center justify-center min-h-[80vh]"
693
- }, pe = /* @__PURE__ */ D({
762
+ }, Fe = /* @__PURE__ */ D({
694
763
  __name: "PaymentGateway",
695
764
  props: {
696
765
  restaurant: {
@@ -699,7 +768,7 @@ const A = {
699
768
  }
700
769
  },
701
770
  setup(a) {
702
- const i = [
771
+ const m = [
703
772
  {
704
773
  label: "Fiuu",
705
774
  value: "RAZER_MERCHANT_SERVICE",
@@ -742,64 +811,70 @@ const A = {
742
811
  form: de,
743
812
  region: [U.F_COUNTRY.enum.TH]
744
813
  },
814
+ {
815
+ label: "Ksher",
816
+ value: "KSHER",
817
+ form: pe,
818
+ region: [U.F_COUNTRY.enum.TH]
819
+ },
745
820
  {
746
821
  label: "Adyen",
747
822
  value: "ADYEN",
748
- form: ye,
823
+ form: ve,
749
824
  region: [U.F_COUNTRY.enum.MY, U.F_COUNTRY.enum.SG]
750
825
  }
751
- ], u = a, t = j(), { isLoading: y, startAsyncCall: d } = R(), { activeGateway: v } = E({
826
+ ], u = a, t = j(), { isLoading: v, startAsyncCall: d } = M(), { activeGateway: p } = E({
752
827
  activeGateway: ""
753
828
  }), e = b([]);
754
- async function s(m, x) {
829
+ async function s(i, x) {
755
830
  await d(async () => {
756
- const T = {
831
+ const _ = {
757
832
  _id: "",
758
833
  _rev: "",
759
- paymentGateway: v.value,
834
+ paymentGateway: p.value,
760
835
  config: x,
761
- active: m
762
- }, C = e.value.find((k) => k.paymentGateway === v.value);
763
- C && (T._id = C._id, T._rev = C._rev), await A.upsert(u.restaurant._id, T), e.value = await A.get(u.restaurant._id);
836
+ active: i
837
+ }, k = e.value.find((C) => C.paymentGateway === p.value);
838
+ k && (_._id = k._id, _._rev = k._rev), await A.upsert(u.restaurant._id, _), e.value = await A.get(u.restaurant._id);
764
839
  });
765
840
  }
766
- async function V(m) {
841
+ async function V(i) {
767
842
  d(async () => {
768
- await A.delete(u.restaurant._id, m._id), e.value = await A.get(u.restaurant._id);
843
+ await A.delete(u.restaurant._id, i._id), e.value = await A.get(u.restaurant._id);
769
844
  });
770
845
  }
771
- const c = O(() => i.filter((m) => m.region.includes(t.currentCountry.value ?? U.F_COUNTRY.enum.MY)));
772
- function p() {
846
+ const c = O(() => m.filter((i) => i.region.includes(t.currentCountry.value ?? U.F_COUNTRY.enum.MY)));
847
+ function y() {
773
848
  d(async () => {
774
- e.value = await A.get(u.restaurant._id), c.value.length > 0 && (v.value = c.value[0].value);
849
+ e.value = await A.get(u.restaurant._id), c.value.length > 0 && (p.value = c.value[0].value);
775
850
  });
776
851
  }
777
- K(p);
852
+ R(y);
778
853
  const l = O(() => {
779
- var m;
780
- return (m = i.find((x) => x.value === v.value)) == null ? void 0 : m.form;
854
+ var i;
855
+ return (i = m.find((x) => x.value === p.value)) == null ? void 0 : i.form;
781
856
  });
782
- return (m, x) => {
783
- const T = r("FmCircularProgress"), C = r("FmTabs");
784
- return F(), N(L, null, [
785
- n(y) ? (F(), N("div", ve, [
786
- o(T, { size: "xxl" })
857
+ return (i, x) => {
858
+ const _ = r("FmCircularProgress"), k = r("FmTabs");
859
+ return g(), N(L, null, [
860
+ n(v) ? (g(), N("div", fe, [
861
+ o(_, { size: "xxl" })
787
862
  ])) : S("", !0),
788
- o(C, {
863
+ o(k, {
789
864
  class: "mb-6",
790
- "model-value": n(v),
791
- "onUpdate:modelValue": x[0] || (x[0] = (k) => $(v) ? v.value = k : null),
865
+ "model-value": n(p),
866
+ "onUpdate:modelValue": x[0] || (x[0] = (C) => B(p) ? p.value = C : null),
792
867
  items: c.value
793
868
  }, null, 8, ["model-value", "items"]),
794
- n(v) ? (F(), w(B(l.value), P(Y({ key: 1 }, {
795
- gateway: e.value.find((k) => k.paymentGateway === n(v)),
869
+ n(p) ? (g(), w($(l.value), P(Y({ key: 1 }, {
870
+ gateway: e.value.find((C) => C.paymentGateway === n(p)),
796
871
  onDelete: V,
797
872
  onUpdate: s
798
873
  })), null, 16)) : S("", !0)
799
874
  ], 64);
800
875
  };
801
876
  }
802
- }), De = /* @__PURE__ */ D({
877
+ }), _e = /* @__PURE__ */ D({
803
878
  __name: "RestaurantSetting",
804
879
  props: {
805
880
  restaurantId: {
@@ -808,43 +883,43 @@ const A = {
808
883
  }
809
884
  },
810
885
  setup(a) {
811
- const i = a, { tab: u } = E({
886
+ const m = a, { tab: u } = E({
812
887
  tab: "payment-gateway"
813
- }), { isLoading: t, startAsyncCall: y } = R(!0), d = H(), v = b(), e = [
888
+ }), { isLoading: t, startAsyncCall: v } = M(!0), d = z(), p = b(), e = [
814
889
  {
815
890
  label: "Payment Gateway",
816
891
  value: "payment-gateway",
817
892
  icon: "assured_workload",
818
- render: pe
893
+ render: Fe
819
894
  }
820
895
  ];
821
896
  function s() {
822
- y(async () => {
823
- v.value = await J.readRestaurantById(i.restaurantId);
897
+ v(async () => {
898
+ p.value = await J.readRestaurantById(m.restaurantId);
824
899
  });
825
900
  }
826
- K(s);
901
+ R(s);
827
902
  const V = O(() => {
828
903
  var c;
829
- return (c = e.find((p) => p.value === u.value)) == null ? void 0 : c.render;
904
+ return (c = e.find((y) => y.value === u.value)) == null ? void 0 : c.render;
830
905
  });
831
- return (c, p) => {
832
- var m;
906
+ return (c, y) => {
907
+ var i;
833
908
  const l = r("FmTabs");
834
- return F(), w(z, {
835
- title: `Restaurant (${(m = v.value) == null ? void 0 : m._id})`,
909
+ return g(), w(H, {
910
+ title: `Restaurant (${(i = p.value) == null ? void 0 : i._id})`,
836
911
  loading: n(t),
837
912
  onBack: n(d).back
838
913
  }, {
839
914
  default: I(() => [
840
915
  o(l, {
841
916
  "model-value": n(u),
842
- "onUpdate:modelValue": p[0] || (p[0] = (x) => $(u) ? u.value = x : null),
917
+ "onUpdate:modelValue": y[0] || (y[0] = (x) => B(u) ? u.value = x : null),
843
918
  class: "mb-6",
844
919
  items: e
845
920
  }, null, 8, ["model-value"]),
846
- n(u) && v.value ? (F(), w(B(V.value), P(Y({ key: 0 }, {
847
- restaurant: v.value
921
+ n(u) && p.value ? (g(), w($(V.value), P(Y({ key: 0 }, {
922
+ restaurant: p.value
848
923
  })), null, 16)) : S("", !0)
849
924
  ]),
850
925
  _: 1
@@ -853,5 +928,5 @@ const A = {
853
928
  }
854
929
  });
855
930
  export {
856
- De as default
931
+ _e as default
857
932
  };