@feedmepos/mf-payment 1.0.15 → 1.0.16-beta.2

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 (37) hide show
  1. package/dist/{PayoutAccount-_eib40vg.js → PayoutAccount-8PS0XG-o.js} +5 -5
  2. package/dist/{PayoutAccount-BmladAUo.js → PayoutAccount-BaR-pQsE.js} +122 -121
  3. package/dist/{PayoutAccountSelector.vue_vue_type_script_setup_true_lang-Bf87p0sW.js → PayoutAccountSelector.vue_vue_type_script_setup_true_lang-Bpfma3sQ.js} +2 -2
  4. package/dist/{PayoutAccountSetting-B7oB88aM.js → PayoutAccountSetting-DGv-V72Q.js} +4 -4
  5. package/dist/{Restaurant-DAd8a0Sf.js → Restaurant-DxFHtTvZ.js} +4 -4
  6. package/dist/{RestaurantSetting-D7e6rowL.js → RestaurantSetting-CClHn4b1.js} +4 -4
  7. package/dist/{Settlement-DpUcTPxB.js → Settlement-BZ47PeA4.js} +3 -3
  8. package/dist/{Settlement-CyLRDyAQ.js → Settlement-Dre6hrbR.js} +3 -3
  9. package/dist/{SettlementTransactions-D5ERmwWf.js → SettlementTransactions-BX1rAyIV.js} +4 -4
  10. package/dist/{SettlementTransactions-isJ-omim.js → SettlementTransactions-DMrhyxeT.js} +4 -4
  11. package/dist/{Terminal-D24nWj0d.js → Terminal-3YWAIFU-.js} +5 -5
  12. package/dist/{TerminalSetting-BHDaUrn0.js → TerminalSetting-6uNjMrlx.js} +43 -41
  13. package/dist/TerminalTransaction-Dx55gC2L.js +820 -0
  14. package/dist/{TerminalTransaction-COAbt4U6.js → TerminalTransaction-DxNG44rA.js} +130 -107
  15. package/dist/{Transaction-BO92b-MM.js → Transaction-PnNFOZeu.js} +5 -5
  16. package/dist/{Transaction-C7NFK_yP.js → Transaction-cDKuWfvi.js} +6 -6
  17. package/dist/{TransactionOld-BOyHbhbK.js → TransactionOld-Ba4Fhq0A.js} +4 -4
  18. package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-9oqYe9SK.js → TransactionTable.vue_vue_type_script_setup_true_lang-6RXME_ux.js} +2 -2
  19. package/dist/{app-DjXKH0db.js → app-DOh5Q7Wl.js} +480 -480
  20. package/dist/app.js +1 -1
  21. package/dist/{assets-Cy96qAKJ.js → assets-CofaZ_lT.js} +1 -1
  22. package/dist/{grafana-B-S5S_95.js → grafana-Bk6PPzTz.js} +12 -12
  23. package/dist/{index-CblSdE4I.js → index-BGLG0L6x.js} +2 -2
  24. package/dist/{index-CpBwYTvQ.js → index-BdPxytRc.js} +1 -1
  25. package/dist/{index-DdE2XkaV.js → index-BvOwxlNE.js} +1 -1
  26. package/dist/{index-CPyo7PsK.js → index-CORtn1qp.js} +1 -1
  27. package/dist/{index-CRe278b0.js → index-CiR5XvPL.js} +1 -1
  28. package/dist/{index-DYrMKMaP.js → index-Cn1xSOHw.js} +1 -1
  29. package/dist/{index-CVqUPJke.js → index-D1ycS_0Y.js} +1 -1
  30. package/dist/{index--T9htMAt.js → index-d4H-VoHb.js} +1 -1
  31. package/dist/{index.vue_vue_type_script_setup_true_lang-UgxsCvVC.js → index.vue_vue_type_script_setup_true_lang-Cz-jVTPU.js} +1 -1
  32. package/dist/package.json +1 -1
  33. package/dist/{payout-account-yEBg2kyi.js → payout-account-lrJn2HVt.js} +2 -2
  34. package/dist/{transaction-CxzGTmkG.js → transaction-B8ifjkL4.js} +1 -1
  35. package/dist/tsconfig.app.tsbuildinfo +1 -1
  36. package/package.json +1 -1
  37. package/dist/TerminalTransaction-BNUnpt1O.js +0 -819
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as g, resolveComponent as i, openBlock as h, createBlock as y, normalizeClass as N, withCtx as _, createElementVNode as P, toDisplayString as C, createVNode as p, computed as x, ref as E, watch as F, unref as s, isRef as b, h as v } from "vue";
2
- import { u as S } from "./index--T9htMAt.js";
3
- import { _ as O } from "./index-CblSdE4I.js";
2
+ import { u as S } from "./index-d4H-VoHb.js";
3
+ import { _ as O } from "./index-BGLG0L6x.js";
4
4
  import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
5
- import { P as V } from "./payout-account-yEBg2kyi.js";
6
- import { p as $ } from "./index-DdE2XkaV.js";
5
+ import { P as V } from "./payout-account-lrJn2HVt.js";
6
+ import { p as $ } from "./index-BvOwxlNE.js";
7
7
  import "@feedmepos/ui-library";
8
- import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-UgxsCvVC.js";
8
+ import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-Cz-jVTPU.js";
9
9
  import { useRouter as T } from "vue-router";
10
10
  import { _ as U } from "./SelectAll.vue_vue_type_script_setup_true_lang-DA4rs3tk.js";
11
11
  const G = /* @__PURE__ */ g({
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as f, ref as I, reactive as J, computed as Z, watch as N, resolveComponent as Y, openBlock as n, createBlock as u, withCtx as Q, createElementVNode as r, createVNode as i, unref as w, createCommentVNode as O, createElementBlock as U, normalizeClass as h, toDisplayString as k, h as y, onMounted as R, Fragment as T } from "vue";
2
- import { p } from "./index-DdE2XkaV.js";
3
- import { _ as z, u as L, e as S } from "./index-CblSdE4I.js";
2
+ import { p } from "./index-BvOwxlNE.js";
3
+ import { _ as z, u as L, e as S } from "./index-BGLG0L6x.js";
4
4
  import { defineStore as _ } from "pinia";
5
5
  import { useCoreStore as $ } from "@feedmepos/mf-common";
6
- import { c as AA, P as W } from "./payout-account-yEBg2kyi.js";
7
- import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
6
+ import { c as AA, P as W } from "./payout-account-lrJn2HVt.js";
7
+ import { useDialogChild as eA, useDialog as sA } from "@feedmepos/ui-library";
8
8
  import { z as X, a as x } from "./validator-D5jtpt9A.js";
9
9
  import { P as K } from "./PDFViewer-xrBtzrlR.js";
10
10
  import { _ as tA } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
@@ -16,17 +16,17 @@ function aA() {
16
16
  const gA = _("mf-payment-payoutAccount", {
17
17
  state: () => aA(),
18
18
  getters: {
19
- getBusinessPayoutAccounts: (a) => a.businessPayoutAccounts
19
+ getBusinessPayoutAccounts: (t) => t.businessPayoutAccounts
20
20
  },
21
21
  actions: {
22
22
  async readBusinessPayoutAccounts() {
23
23
  this.businessPayoutAccounts = await p.readBusinessPayoutAccounts();
24
24
  },
25
- async updateBusinessPayoutAccounts(a, o) {
26
- await p.updateBusinessPayoutAccounts(a, o);
25
+ async updateBusinessPayoutAccounts(t, o) {
26
+ await p.updateBusinessPayoutAccounts(t, o);
27
27
  },
28
- async createBusinessPayoutAccounts(a) {
29
- const o = await p.createBusinessPayoutAccounts(a);
28
+ async createBusinessPayoutAccounts(t) {
29
+ const o = await p.createBusinessPayoutAccounts(t);
30
30
  this.businessPayoutAccounts.push(o);
31
31
  }
32
32
  }
@@ -69,42 +69,42 @@ const gA = _("mf-payment-payoutAccount", {
69
69
  required: !0
70
70
  }
71
71
  },
72
- setup(a) {
73
- const o = a, g = sA(), m = I(), s = J(AA(o.initialValue)), G = I([s.payoutSetting.store.ssm, s.payoutSetting.store.bankStatement, s.payoutSetting.store.exteriorPhoto].every((t) => t)), d = I(s.payoutSetting.store.ssm), e = I(s.payoutSetting.store.bankStatement), B = Z(() => s.newExteriorPhoto ? URL.createObjectURL(s.newExteriorPhoto) : s.payoutSetting.store.exteriorPhoto ? s.payoutSetting.store.exteriorPhoto : "");
74
- function b(t) {
75
- s.newExteriorPhoto = t, s.newExteriorPhoto || (s.payoutSetting.store.exteriorPhoto = "");
72
+ setup(t) {
73
+ const o = t, g = eA(), m = I(), e = J(AA(o.initialValue)), G = I([e.payoutSetting.store.ssm, e.payoutSetting.store.bankStatement, e.payoutSetting.store.exteriorPhoto].every((a) => a)), d = I(e.payoutSetting.store.ssm), s = I(e.payoutSetting.store.bankStatement), B = Z(() => e.newExteriorPhoto ? URL.createObjectURL(e.newExteriorPhoto) : e.payoutSetting.store.exteriorPhoto ? e.payoutSetting.store.exteriorPhoto : "");
74
+ function b(a) {
75
+ e.newExteriorPhoto = a, e.newExteriorPhoto || (e.payoutSetting.store.exteriorPhoto = "");
76
76
  }
77
- async function C(t) {
77
+ async function C(a) {
78
78
  const A = new FileReader();
79
79
  return new Promise((V) => {
80
80
  A.onload = (E) => {
81
81
  var M;
82
82
  V((M = E.target) == null ? void 0 : M.result);
83
- }, A.readAsDataURL(t);
83
+ }, A.readAsDataURL(a);
84
84
  });
85
85
  }
86
- async function q(t) {
87
- s.newBankStatement = t;
88
- const A = t ? await C(t) : "";
89
- e.value = A;
86
+ async function q(a) {
87
+ e.newBankStatement = a;
88
+ const A = a ? await C(a) : "";
89
+ s.value = A;
90
90
  }
91
- async function F(t) {
92
- s.newSSM = t;
93
- const A = t ? await C(t) : "";
91
+ async function F(a) {
92
+ e.newSSM = a;
93
+ const A = a ? await C(a) : "";
94
94
  d.value = A;
95
95
  }
96
96
  function l() {
97
- g.emitData(s), g.emitAction("primary");
97
+ g.emitData(e), g.emitAction("primary");
98
98
  }
99
- return N(() => s.payoutSetting.store.event, (t) => {
100
- s.payoutSetting.notifyUrl = t === z.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment";
101
- }, { immediate: !0 }), N(() => [s.newSSM, s.newBankStatement, s.newExteriorPhoto], (t) => {
102
- G.value = t.every((A) => A);
103
- }), (t, A) => {
99
+ return N(() => e.payoutSetting.store.event, (a) => {
100
+ e.payoutSetting.notifyUrl = a === z.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment";
101
+ }, { immediate: !0 }), N(() => [e.newSSM, e.newBankStatement, e.newExteriorPhoto], (a) => {
102
+ G.value = a.every((A) => A);
103
+ }), (a, A) => {
104
104
  const V = Y("FmSelect"), E = Y("FmTextField"), M = Y("FmPhoneNumber"), v = Y("FmDropField"), H = Y("FmButton"), j = Y("FmFormGroup"), D = Y("FmForm");
105
105
  return n(), u(D, {
106
106
  ref: m.value,
107
- disabled: !a.isNewAccount,
107
+ disabled: !t.isNewAccount && !t.isUpdateAccount,
108
108
  class: "flex flex-col gap-16",
109
109
  onValidationSuccess: l
110
110
  }, {
@@ -117,21 +117,21 @@ const gA = _("mf-payment-payoutAccount", {
117
117
  r("hr", { class: "flex-grow border-t border-gray-300" })
118
118
  ], -1)),
119
119
  i(V, {
120
- modelValue: s.payoutSetting.store.event,
121
- "onUpdate:modelValue": A[0] || (A[0] = (c) => s.payoutSetting.store.event = c),
120
+ modelValue: e.payoutSetting.store.event,
121
+ "onUpdate:modelValue": A[0] || (A[0] = (c) => e.payoutSetting.store.event = c),
122
122
  label: "Type",
123
123
  "label-mark": "required",
124
- disabled: !a.isUpdateAccount,
125
- items: a.storeEventOptions
124
+ disabled: !t.isNewAccount || t.isUpdateAccount,
125
+ items: t.storeEventOptions
126
126
  }, null, 8, ["modelValue", "disabled", "items"]),
127
127
  i(V, {
128
- modelValue: s.payoutSetting.store.id,
129
- "onUpdate:modelValue": A[1] || (A[1] = (c) => s.payoutSetting.store.id = c),
128
+ modelValue: e.payoutSetting.store.id,
129
+ "onUpdate:modelValue": A[1] || (A[1] = (c) => e.payoutSetting.store.id = c),
130
130
  label: "For",
131
131
  "label-mark": "required",
132
132
  placeholder: "Select store",
133
- disabled: !a.isUpdateAccount,
134
- items: s.payoutSetting.store.event === w(z.F_PAYOUT_FOR).Enum.ORDERING ? a.restaurantOptions : a.businessOptions,
133
+ disabled: !t.isNewAccount || t.isUpdateAccount,
134
+ items: e.payoutSetting.store.event === w(z.F_PAYOUT_FOR).Enum.ORDERING ? t.restaurantOptions : t.businessOptions,
135
135
  rules: w(X)(w(x).string().min(1))
136
136
  }, null, 8, ["modelValue", "disabled", "items", "rules"]),
137
137
  A[15] || (A[15] = r("div", { class: "flex items-center my-8" }, [
@@ -140,29 +140,30 @@ const gA = _("mf-payment-payoutAccount", {
140
140
  r("hr", { class: "flex-grow border-t border-gray-300" })
141
141
  ], -1)),
142
142
  i(V, {
143
- modelValue: s.payoutSetting.store.bank.name,
144
- "onUpdate:modelValue": A[2] || (A[2] = (c) => s.payoutSetting.store.bank.name = c),
143
+ modelValue: e.payoutSetting.store.bank.name,
144
+ "onUpdate:modelValue": A[2] || (A[2] = (c) => e.payoutSetting.store.bank.name = c),
145
145
  label: "Bank",
146
146
  "label-mark": "required",
147
- items: a.bankNameOptions,
147
+ items: t.bankNameOptions,
148
148
  rules: w(X)(w(x).string().min(1))
149
149
  }, null, 8, ["modelValue", "items", "rules"]),
150
150
  i(V, {
151
- "model-value": ((P = s.payoutSetting.store.bank) == null ? void 0 : P.type) ?? null,
151
+ "model-value": ((P = e.payoutSetting.store.bank) == null ? void 0 : P.type) ?? null,
152
152
  label: "Type",
153
153
  "label-mark": "required",
154
- items: a.bankTypeOptions
154
+ items: t.bankTypeOptions
155
155
  }, null, 8, ["model-value", "items"]),
156
156
  i(E, {
157
- modelValue: s.payoutSetting.store.bank.accountNumber,
158
- "onUpdate:modelValue": A[3] || (A[3] = (c) => s.payoutSetting.store.bank.accountNumber = c),
157
+ modelValue: e.payoutSetting.store.bank.accountNumber,
158
+ "onUpdate:modelValue": A[3] || (A[3] = (c) => e.payoutSetting.store.bank.accountNumber = c),
159
159
  label: "Account Number",
160
160
  "label-mark": "required",
161
+ type: "number",
161
162
  rules: w(X)(w(x).string().min(1))
162
163
  }, null, 8, ["modelValue", "rules"]),
163
164
  i(E, {
164
- modelValue: s.payoutSetting.store.bank.holderName,
165
- "onUpdate:modelValue": A[4] || (A[4] = (c) => s.payoutSetting.store.bank.holderName = c),
165
+ modelValue: e.payoutSetting.store.bank.holderName,
166
+ "onUpdate:modelValue": A[4] || (A[4] = (c) => e.payoutSetting.store.bank.holderName = c),
166
167
  label: "Holder name",
167
168
  "label-mark": "required",
168
169
  rules: w(X)(w(x).string().min(1))
@@ -173,23 +174,23 @@ const gA = _("mf-payment-payoutAccount", {
173
174
  r("hr", { class: "flex-grow border-t border-gray-300" })
174
175
  ], -1)),
175
176
  i(E, {
176
- modelValue: s.payoutSetting.store.keyPerson.name,
177
- "onUpdate:modelValue": A[5] || (A[5] = (c) => s.payoutSetting.store.keyPerson.name = c),
177
+ modelValue: e.payoutSetting.store.keyPerson.name,
178
+ "onUpdate:modelValue": A[5] || (A[5] = (c) => e.payoutSetting.store.keyPerson.name = c),
178
179
  label: "Name",
179
180
  "label-mark": "required",
180
181
  rules: w(X)(w(x).string().min(1))
181
182
  }, null, 8, ["modelValue", "rules"]),
182
183
  i(M, {
183
- modelValue: s.payoutSetting.store.keyPerson.phone,
184
- "onUpdate:modelValue": A[6] || (A[6] = (c) => s.payoutSetting.store.keyPerson.phone = c),
184
+ modelValue: e.payoutSetting.store.keyPerson.phone,
185
+ "onUpdate:modelValue": A[6] || (A[6] = (c) => e.payoutSetting.store.keyPerson.phone = c),
185
186
  "default-country": "MY",
186
187
  label: "Phone No",
187
188
  "label-mark": "required",
188
189
  rules: w(X)(w(x).string().min(7))
189
190
  }, null, 8, ["modelValue", "rules"]),
190
191
  i(E, {
191
- modelValue: s.payoutSetting.store.keyPerson.email,
192
- "onUpdate:modelValue": A[7] || (A[7] = (c) => s.payoutSetting.store.keyPerson.email = c),
192
+ modelValue: e.payoutSetting.store.keyPerson.email,
193
+ "onUpdate:modelValue": A[7] || (A[7] = (c) => e.payoutSetting.store.keyPerson.email = c),
193
194
  label: "Email",
194
195
  inputmode: "email",
195
196
  "label-mark": "required",
@@ -200,18 +201,18 @@ const gA = _("mf-payment-payoutAccount", {
200
201
  r("span", { class: "text-left mx-6 text-gray-500" }, "Legal Documents"),
201
202
  r("hr", { class: "flex-grow border-t border-gray-300" })
202
203
  ], -1)),
203
- a.isNewAccount && B.value === "" ? (n(), u(v, {
204
+ t.isNewAccount && B.value === "" ? (n(), u(v, {
204
205
  key: 0,
205
206
  class: "h-[300px] w-full",
206
207
  label: "Exterior Photo",
207
208
  "label-mark": "required",
208
209
  accept: ".png,.jpg,.jpeg,.webp",
209
- disabled: !a.isNewAccount,
210
+ disabled: !t.isNewAccount,
210
211
  onFileUpload: b
211
212
  }, null, 8, ["disabled"])) : (n(), u(j, {
212
213
  key: 1,
213
- modelValue: e.value,
214
- "onUpdate:modelValue": A[9] || (A[9] = (c) => e.value = c),
214
+ modelValue: s.value,
215
+ "onUpdate:modelValue": A[9] || (A[9] = (c) => s.value = c),
215
216
  label: "Exterior Photo"
216
217
  }, {
217
218
  default: Q(() => [
@@ -219,7 +220,7 @@ const gA = _("mf-payment-payoutAccount", {
219
220
  class: "h-[300px] w-full",
220
221
  src: B.value
221
222
  }, null, 8, rA),
222
- a.isNewAccount ? (n(), u(H, {
223
+ t.isNewAccount ? (n(), u(H, {
223
224
  key: 0,
224
225
  variant: "tertiary",
225
226
  label: "Remove",
@@ -230,28 +231,28 @@ const gA = _("mf-payment-payoutAccount", {
230
231
  ]),
231
232
  _: 1
232
233
  }, 8, ["modelValue"])),
233
- a.isNewAccount && e.value === "" ? (n(), u(v, {
234
+ t.isNewAccount && s.value === "" ? (n(), u(v, {
234
235
  key: 2,
235
236
  class: "h-[300px] w-full",
236
237
  label: "Bank Statement w/ Holder Name",
237
238
  "label-mark": "required",
238
239
  accept: ".pdf",
239
- disabled: !a.isNewAccount,
240
+ disabled: !t.isNewAccount,
240
241
  onFileUpload: q
241
242
  }, null, 8, ["disabled"])) : (n(), u(j, {
242
243
  key: 3,
243
- modelValue: e.value,
244
- "onUpdate:modelValue": A[11] || (A[11] = (c) => e.value = c),
244
+ modelValue: s.value,
245
+ "onUpdate:modelValue": A[11] || (A[11] = (c) => s.value = c),
245
246
  label: "Bank Statement w/ Holder Name"
246
247
  }, {
247
248
  default: Q(() => [
248
249
  i(K, {
249
250
  height: 300,
250
- pdf: e.value,
251
+ pdf: s.value,
251
252
  "disable-text-layer": !0,
252
253
  "disable-annotation-layer": !0
253
254
  }, null, 8, ["pdf"]),
254
- a.isNewAccount ? (n(), u(H, {
255
+ t.isNewAccount ? (n(), u(H, {
255
256
  key: 0,
256
257
  variant: "tertiary",
257
258
  label: "Remove",
@@ -262,13 +263,13 @@ const gA = _("mf-payment-payoutAccount", {
262
263
  ]),
263
264
  _: 1
264
265
  }, 8, ["modelValue"])),
265
- a.isNewAccount && d.value === "" ? (n(), u(v, {
266
+ t.isNewAccount && d.value === "" ? (n(), u(v, {
266
267
  key: 4,
267
268
  class: "w-full h-[300px]",
268
269
  label: "SSM Certificate ( Form D )",
269
270
  "label-mark": "required",
270
271
  accept: ".pdf",
271
- disabled: !a.isNewAccount,
272
+ disabled: !t.isNewAccount,
272
273
  onFileUpload: F
273
274
  }, null, 8, ["disabled"])) : (n(), u(j, {
274
275
  key: 5,
@@ -283,7 +284,7 @@ const gA = _("mf-payment-payoutAccount", {
283
284
  "disable-text-layer": !0,
284
285
  "disable-annotation-layer": !0
285
286
  }, null, 8, ["pdf"]),
286
- a.isNewAccount ? (n(), u(H, {
287
+ t.isNewAccount ? (n(), u(H, {
287
288
  key: 0,
288
289
  variant: "tertiary",
289
290
  label: "Remove",
@@ -294,7 +295,7 @@ const gA = _("mf-payment-payoutAccount", {
294
295
  ]),
295
296
  _: 1
296
297
  }, 8, ["modelValue"])),
297
- a.isNewAccount ? (n(), U("div", oA, [
298
+ t.isNewAccount ? (n(), U("div", oA, [
298
299
  i(H, {
299
300
  type: "submit",
300
301
  disabled: !G.value,
@@ -315,12 +316,12 @@ const gA = _("mf-payment-payoutAccount", {
315
316
  row: {},
316
317
  data: {}
317
318
  },
318
- setup(a) {
319
- const o = a;
319
+ setup(t) {
320
+ const o = t;
320
321
  function g() {
321
322
  return o.data === "NEW" ? "!w-[16px] !h-[16px] bg-yellow-400" : o.data === "PENDING" ? "!w-[16px] !h-[16px] bg-red-400" : "!w-[16px] !h-[16px] bg-green-400";
322
323
  }
323
- return (m, s) => {
324
+ return (m, e) => {
324
325
  const G = Y("FmBadge");
325
326
  return n(), u(G, {
326
327
  inline: "",
@@ -339,15 +340,15 @@ const gA = _("mf-payment-payoutAccount", {
339
340
  row: {},
340
341
  data: {}
341
342
  },
342
- setup(a) {
343
- const o = a;
343
+ setup(t) {
344
+ const o = t;
344
345
  function g() {
345
346
  return o.data ? "#66BB6A" : "#EF5350";
346
347
  }
347
348
  function m() {
348
349
  return o.data ? "check" : "close";
349
350
  }
350
- return (s, G) => {
351
+ return (e, G) => {
351
352
  const d = Y("FmIcon");
352
353
  return n(), u(d, {
353
354
  name: m(),
@@ -362,12 +363,12 @@ const gA = _("mf-payment-payoutAccount", {
362
363
  row: {},
363
364
  data: {}
364
365
  },
365
- setup(a) {
366
+ setup(t) {
366
367
  function o(g) {
367
368
  return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
368
369
  }
369
370
  return (g, m) => {
370
- const s = Y("FmBadge"), G = Y("FmListItem");
371
+ const e = Y("FmBadge"), G = Y("FmListItem");
371
372
  return n(), u(G, {
372
373
  label: g.row.original.holderName,
373
374
  sublabel: g.row.original.bankName + " - " + g.row.original.bankNumber,
@@ -375,7 +376,7 @@ const gA = _("mf-payment-payoutAccount", {
375
376
  tag: "label"
376
377
  }, {
377
378
  append: Q(() => [
378
- i(s, {
379
+ i(e, {
379
380
  inline: "",
380
381
  class: h(o(g.row.original.bankReady))
381
382
  }, null, 8, ["class"])
@@ -390,12 +391,12 @@ const gA = _("mf-payment-payoutAccount", {
390
391
  row: {},
391
392
  data: {}
392
393
  },
393
- setup(a) {
394
+ setup(t) {
394
395
  function o(g) {
395
396
  return g ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
396
397
  }
397
398
  return (g, m) => {
398
- const s = Y("FmBadge"), G = Y("FmListItem");
399
+ const e = Y("FmBadge"), G = Y("FmListItem");
399
400
  return n(), u(G, {
400
401
  label: g.row.original.picName,
401
402
  sublabel: g.row.original.picEmail + " - " + g.row.original.picPhone,
@@ -403,7 +404,7 @@ const gA = _("mf-payment-payoutAccount", {
403
404
  tag: "label"
404
405
  }, {
405
406
  append: Q(() => [
406
- i(s, {
407
+ i(e, {
407
408
  inline: "",
408
409
  class: h(o(g.row.original.picReady))
409
410
  }, null, 8, ["class"])
@@ -425,8 +426,8 @@ const gA = _("mf-payment-payoutAccount", {
425
426
  }
426
427
  },
427
428
  emits: ["row-click"],
428
- setup(a, { emit: o }) {
429
- const g = a, m = o, s = I(""), G = [
429
+ setup(t, { emit: o }) {
430
+ const g = t, m = o, e = I(""), G = [
430
431
  {
431
432
  header: () => "Type",
432
433
  accessorKey: "event",
@@ -441,7 +442,7 @@ const gA = _("mf-payment-payoutAccount", {
441
442
  {
442
443
  header: () => "Status",
443
444
  accessorKey: "status",
444
- cell: ({ cell: e, row: B }) => y(lA, { row: B, data: e.getValue() }),
445
+ cell: ({ cell: s, row: B }) => y(lA, { row: B, data: s.getValue() }),
445
446
  meta: {
446
447
  maxWidth: "108px"
447
448
  }
@@ -452,30 +453,30 @@ const gA = _("mf-payment-payoutAccount", {
452
453
  meta: {
453
454
  maxWidth: "64px"
454
455
  },
455
- cell: ({ cell: e, row: B }) => y(cA, { row: B, data: e.getValue() })
456
+ cell: ({ cell: s, row: B }) => y(cA, { row: B, data: s.getValue() })
456
457
  },
457
458
  {
458
459
  header: () => "Bank Details",
459
460
  accessorKey: "bank",
460
- cell: ({ cell: e, row: B }) => y(nA, { row: B, data: e.getValue() })
461
+ cell: ({ cell: s, row: B }) => y(nA, { row: B, data: s.getValue() })
461
462
  },
462
463
  {
463
464
  header: () => "Person In-Charge (PIC)",
464
465
  accessorKey: "pic",
465
- cell: ({ cell: e, row: B }) => y(wA, { row: B, data: e.getValue() })
466
+ cell: ({ cell: s, row: B }) => y(wA, { row: B, data: s.getValue() })
466
467
  }
467
- ], d = Z(() => g.data.map((e) => {
468
+ ], d = Z(() => g.data.map((s) => {
468
469
  const B = {
469
470
  bankReady: !1,
470
471
  bankNumber: "",
471
472
  bankName: "",
472
473
  holderName: ""
473
474
  };
474
- e.store.bank && e.store.bank.accountNumber && Object.assign(B, {
475
+ s.store.bank && s.store.bank.accountNumber && Object.assign(B, {
475
476
  bankReady: !0,
476
- bankNumber: e.store.bank.accountNumber,
477
- bankName: e.store.bank.name,
478
- holderName: e.store.bank.holderName
477
+ bankNumber: s.store.bank.accountNumber,
478
+ bankName: s.store.bank.name,
479
+ holderName: s.store.bank.holderName
479
480
  });
480
481
  const b = {
481
482
  picReady: !1,
@@ -483,28 +484,28 @@ const gA = _("mf-payment-payoutAccount", {
483
484
  picPhone: "",
484
485
  picEmail: ""
485
486
  };
486
- e.store.keyPerson && Object.assign(b, {
487
+ s.store.keyPerson && Object.assign(b, {
487
488
  picReady: !0,
488
- picName: e.store.keyPerson.name,
489
- picPhone: e.store.keyPerson.phone,
490
- picEmail: e.store.keyPerson.email
489
+ picName: s.store.keyPerson.name,
490
+ picPhone: s.store.keyPerson.phone,
491
+ picEmail: s.store.keyPerson.email
491
492
  });
492
- let C = e.ref.name;
493
- return e.store.event === "ORDERING" && (C = e.ref.profile.name), {
494
- _id: e._id,
495
- event: e.store.event,
493
+ let C = s.ref.name;
494
+ return s.store.event === "ORDERING" && (C = s.ref.profile.name), {
495
+ _id: s._id,
496
+ event: s.store.event,
496
497
  name: C,
497
- status: e.status,
498
- isActive: e.enable,
498
+ status: s.status,
499
+ isActive: s.enable,
499
500
  ...B,
500
501
  ...b
501
502
  };
502
503
  }));
503
- return (e, B) => {
504
+ return (s, B) => {
504
505
  const b = Y("FmTable");
505
506
  return n(), u(b, {
506
- modelValue: s.value,
507
- "onUpdate:modelValue": B[0] || (B[0] = (C) => s.value = C),
507
+ modelValue: e.value,
508
+ "onUpdate:modelValue": B[0] || (B[0] = (C) => e.value = C),
508
509
  "row-data": d.value,
509
510
  "column-defs": G,
510
511
  loading: g.loading,
@@ -517,16 +518,16 @@ const gA = _("mf-payment-payoutAccount", {
517
518
  class: "flex items-center justify-center min-h-[80vh]"
518
519
  }, YA = { class: "hidden mr-6 lg:block lg:w-1/6" }, GA = ["src"], dA = { class: "w-full max-w-lg text-left" }, mA = { class: "py-4" }, CA = { class: "flex justify-end items-center mb-6" }, VA = { class: "flex space-x-4 items-center" }, jA = /* @__PURE__ */ f({
519
520
  __name: "PayoutAccount",
520
- setup(a) {
521
- const { currentBusiness: o, restaurants: g } = $(), { isLoading: m, startAsyncCall: s } = L(!0), G = eA(), d = gA(), e = Z(() => d.getBusinessPayoutAccounts), B = Z(() => g.value.filter((l) => e.value.findIndex((t) => t.store.id === l._id) === -1).map((l) => ({ label: l.profile.name, value: l._id }))), b = Z(() => {
522
- var l, t;
523
- return [{ label: (l = o.value) == null ? void 0 : l.name, value: (t = o.value) == null ? void 0 : t._id }];
524
- }), C = Z(() => B.value.length > 0 || !e.value.find((l) => l.store.event === "MARKETING"));
521
+ setup(t) {
522
+ const { currentBusiness: o, restaurants: g } = $(), { isLoading: m, startAsyncCall: e } = L(!0), G = sA(), d = gA(), s = Z(() => d.getBusinessPayoutAccounts), B = Z(() => g.value.filter((l) => s.value.findIndex((a) => a.store.id === l._id) === -1).map((l) => ({ label: l.profile.name, value: l._id }))), b = Z(() => {
523
+ var l, a;
524
+ return [{ label: (l = o.value) == null ? void 0 : l.name, value: (a = o.value) == null ? void 0 : a._id }];
525
+ }), C = Z(() => B.value.length > 0 || !s.value.find((l) => l.store.event === "MARKETING"));
525
526
  async function q(l) {
526
527
  var j;
527
- const t = (l == null ? void 0 : l.businessId) ?? ((j = o.value) == null ? void 0 : j._id);
528
- if (!t) throw "Business id required";
529
- const A = W.initPayoutAccount(t, l), V = !l;
528
+ const a = (l == null ? void 0 : l.businessId) ?? ((j = o.value) == null ? void 0 : j._id);
529
+ if (!a) throw "Business id required";
530
+ const A = W.initPayoutAccount(a, l), V = !l;
530
531
  let E = !1;
531
532
  l && (E = l.status === "NEW");
532
533
  const M = {
@@ -539,7 +540,7 @@ const gA = _("mf-payment-payoutAccount", {
539
540
  restaurantOptions: V ? B.value : g.value.map((D) => ({ label: D.profile.name, value: D._id })),
540
541
  businessOptions: b.value
541
542
  };
542
- V && (B.value.length === 0 && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "ORDERING")), e.value.find((D) => D.store.event === "MARKETING") && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "MARKETING")));
543
+ V && (B.value.length === 0 && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "ORDERING")), s.value.find((D) => D.store.event === "MARKETING") && (M.storeEventOptions = M.storeEventOptions.filter((D) => D.value !== "MARKETING")));
543
544
  const v = G.open({
544
545
  title: V ? "Apply Payout Account" : "View Payout Account",
545
546
  closeButton: !0,
@@ -547,7 +548,7 @@ const gA = _("mf-payment-payoutAccount", {
547
548
  contentComponent: BA,
548
549
  contentComponentProps: M
549
550
  }), H = async function(D) {
550
- G.close(), s(async () => {
551
+ G.close(), e(async () => {
551
552
  const P = await W.mergeData({
552
553
  businessId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.MARKETING ? D.payoutSetting.store.id : void 0,
553
554
  restaurantId: D.payoutSetting.store.event === z.F_PAYOUT_FOR.Enum.ORDERING ? D.payoutSetting.store.id : void 0
@@ -562,11 +563,11 @@ const gA = _("mf-payment-payoutAccount", {
562
563
  v.onPrimary(H);
563
564
  }
564
565
  async function F() {
565
- await s(async () => {
566
+ await e(async () => {
566
567
  await d.readBusinessPayoutAccounts();
567
568
  });
568
569
  }
569
- return R(F), N(o, F), (l, t) => {
570
+ return R(F), N(o, F), (l, a) => {
570
571
  const A = Y("FmButton");
571
572
  return n(), u(tA, {
572
573
  title: "Payout Accounts",
@@ -574,7 +575,7 @@ const gA = _("mf-payment-payoutAccount", {
574
575
  loading: w(m)
575
576
  }, {
576
577
  default: Q(() => [
577
- e.value.length ? (n(), U(T, { key: 1 }, [
578
+ s.value.length ? (n(), U(T, { key: 1 }, [
578
579
  r("div", CA, [
579
580
  r("div", VA, [
580
581
  C.value ? (n(), u(A, {
@@ -582,13 +583,13 @@ const gA = _("mf-payment-payoutAccount", {
582
583
  "prepend-icon": "manage_accounts",
583
584
  variant: "primary",
584
585
  label: "Apply",
585
- onClick: t[1] || (t[1] = () => q())
586
+ onClick: a[1] || (a[1] = () => q())
586
587
  })) : O("", !0)
587
588
  ])
588
589
  ]),
589
590
  i(uA, {
590
591
  loading: w(m),
591
- data: e.value,
592
+ data: s.value,
592
593
  onRowClick: q
593
594
  }, null, 8, ["loading", "data"])
594
595
  ], 64)) : (n(), U("div", iA, [
@@ -600,14 +601,14 @@ const gA = _("mf-payment-payoutAccount", {
600
601
  }, null, 8, GA)
601
602
  ]),
602
603
  r("div", dA, [
603
- t[2] || (t[2] = r("h1", { class: "text-2xl font-bold mb-2" }, " Welcome! It looks like you haven't set up a payout account yet. ", -1)),
604
- t[3] || (t[3] = r("p", { class: "mb-2 mt-1" }, " Let's get you started—apply now and enjoy seamless payouts! ", -1)),
604
+ a[2] || (a[2] = r("h1", { class: "text-2xl font-bold mb-2" }, " Welcome! It looks like you haven't set up a payout account yet. ", -1)),
605
+ a[3] || (a[3] = r("p", { class: "mb-2 mt-1" }, " Let's get you started—apply now and enjoy seamless payouts! ", -1)),
605
606
  r("div", mA, [
606
607
  i(A, {
607
608
  "prepend-icon": "manage_accounts",
608
609
  variant: "primary",
609
610
  label: "Apply Now",
610
- onClick: t[0] || (t[0] = () => q())
611
+ onClick: a[0] || (a[0] = () => q())
611
612
  })
612
613
  ])
613
614
  ])
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as N, mergeModels as $, ref as M, computed as w, useModel as z, watch as B, onMounted as I, resolveComponent as d, openBlock as l, createElementBlock as m, Fragment as i, unref as P, createBlock as c, createCommentVNode as y, withCtx as p, createVNode as V, renderList as _ } from "vue";
2
- import { p as q } from "./index-DdE2XkaV.js";
3
- import { u as E } from "./index-CblSdE4I.js";
2
+ import { p as q } from "./index-BvOwxlNE.js";
3
+ import { u as E } from "./index-BGLG0L6x.js";
4
4
  import { useCoreStore as j } from "@feedmepos/mf-common";
5
5
  const O = /* @__PURE__ */ N({
6
6
  __name: "PayoutAccountSelector",
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as I, resolveComponent as i, openBlock as F, createElementBlock as R, Fragment as N, createElementVNode as s, createVNode as u, withCtx as x, createTextVNode as C, toDisplayString as P, createCommentVNode as U, createBlock as V, ref as k, watch as q, computed as B, unref as r, isRef as M, h as E, onMounted as O, resolveDynamicComponent as j, normalizeProps as Y, mergeProps as z } from "vue";
2
- import { p as $ } from "./index-DdE2XkaV.js";
3
- import { u as H, e as D } from "./index-CblSdE4I.js";
2
+ import { p as $ } from "./index-BvOwxlNE.js";
3
+ import { u as H, e as D } from "./index-BGLG0L6x.js";
4
4
  import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
5
5
  import { useRouter as W } from "vue-router";
6
- import { u as L } from "./index--T9htMAt.js";
6
+ import { u as L } from "./index-d4H-VoHb.js";
7
7
  import { P as K } from "./PDFViewer-xrBtzrlR.js";
8
8
  import { useSnackbar as Z } from "@feedmepos/ui-library";
9
9
  import { u as J } from "./error-K1CakhA9.js";
10
- import { p as _ } from "./index-CRe278b0.js";
10
+ import { p as _ } from "./index-CiR5XvPL.js";
11
11
  import { z as A, a as S } from "./validator-D5jtpt9A.js";
12
12
  import { useCoreStore as X } from "@feedmepos/mf-common";
13
13
  const h = { class: "flex gap-16 mb-6" }, ee = ["src"], te = /* @__PURE__ */ I({
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as F, ref as y, resolveComponent as g, openBlock as x, createBlock as A, withCtx as $, createVNode as f, createElementVNode as d, normalizeStyle as T, createElementBlock as R, Fragment as D, renderList as q, computed as C, watch as I, onMounted as N, unref as b, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
2
- import { u as O } from "./index--T9htMAt.js";
2
+ import { u as O } from "./index-d4H-VoHb.js";
3
3
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
4
4
  import "@feedmepos/ui-library";
5
- import { u as G } from "./index-CblSdE4I.js";
5
+ import { u as G } from "./index-BGLG0L6x.js";
6
6
  import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
7
- import { r as H } from "./index-DYrMKMaP.js";
7
+ import { r as H } from "./index-Cn1xSOHw.js";
8
8
  import { useRouter as J } from "vue-router";
9
- import { g as X } from "./grafana-B-S5S_95.js";
9
+ import { g as X } from "./grafana-Bk6PPzTz.js";
10
10
  const Y = ["id"], L = /* @__PURE__ */ F({
11
11
  __name: "FmTableSelection",
12
12
  props: {