@feedmepos/mf-payment 1.0.3 → 1.0.4

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.
@@ -2,7 +2,7 @@ import { defineComponent as g, resolveComponent as i, openBlock as h, createBloc
2
2
  import { u as S } from "./index-BerQZMQW.js";
3
3
  import { _ as O } from "./index-Dj_LwPBy.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-BhSP2Imp.js";
5
+ import { P as V } from "./payout-account-DWXNiWdx.js";
6
6
  import { p as $ } from "./index-CWGSYCJG.js";
7
7
  import "@feedmepos/ui-library";
8
8
  import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-BgTr7KWF.js";
@@ -1,12 +1,12 @@
1
- import { defineComponent as f, ref as W, reactive as k, computed as j, watch as p, resolveComponent as Y, openBlock as n, createBlock as u, withCtx as E, createElementVNode as r, createVNode as D, unref as w, createCommentVNode as I, createElementBlock as N, normalizeClass as U, toDisplayString as R, h as O, onMounted as T, Fragment as L } from "vue";
1
+ import { defineComponent as f, ref as W, reactive as J, computed as j, watch as p, resolveComponent as Y, openBlock as c, createBlock as D, withCtx as E, createElementVNode as r, createVNode as i, unref as u, createCommentVNode as I, createElementBlock as N, normalizeClass as U, toDisplayString as k, h as O, onMounted as R, Fragment as T } from "vue";
2
2
  import { p as z } from "./index-CWGSYCJG.js";
3
- import { _ as y, u as S, e as K } from "./index-Dj_LwPBy.js";
3
+ import { _ as y, u as L, e as S } from "./index-Dj_LwPBy.js";
4
4
  import { defineStore as _ } from "pinia";
5
5
  import { useCoreStore as $ } from "@feedmepos/mf-common";
6
- import { c as AA, P as v } from "./payout-account-BhSP2Imp.js";
6
+ import { c as AA, P as v } from "./payout-account-DWXNiWdx.js";
7
7
  import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
8
8
  import { z as X, a as x } from "./validator-D5jtpt9A.js";
9
- import { P as J } from "./PDFViewer-xrBtzrlR.js";
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";
11
11
  function aA() {
12
12
  return {
@@ -66,16 +66,16 @@ const gA = _("mf-payment-payoutAccount", {
66
66
  }
67
67
  },
68
68
  setup(a) {
69
- const o = a, g = sA(), d = W(), s = k(AA(o.initialValue)), G = W([s.payoutSetting.store.ssm, s.payoutSetting.store.bankStatement, s.payoutSetting.store.exteriorPhoto].every((t) => t)), m = W(s.payoutSetting.store.ssm), e = W(s.payoutSetting.store.bankStatement), B = j(() => s.newExteriorPhoto ? URL.createObjectURL(s.newExteriorPhoto) : s.payoutSetting.store.exteriorPhoto ? s.payoutSetting.store.exteriorPhoto : "");
70
- function M(t) {
69
+ const o = a, g = sA(), d = W(), s = J(AA(o.initialValue)), G = W([s.payoutSetting.store.ssm, s.payoutSetting.store.bankStatement, s.payoutSetting.store.exteriorPhoto].every((t) => t)), m = W(s.payoutSetting.store.ssm), e = W(s.payoutSetting.store.bankStatement), B = j(() => s.newExteriorPhoto ? URL.createObjectURL(s.newExteriorPhoto) : s.payoutSetting.store.exteriorPhoto ? s.payoutSetting.store.exteriorPhoto : "");
70
+ function b(t) {
71
71
  s.newExteriorPhoto = t, s.newExteriorPhoto || (s.payoutSetting.store.exteriorPhoto = "");
72
72
  }
73
73
  async function V(t) {
74
74
  const A = new FileReader();
75
- return new Promise((b) => {
75
+ return new Promise((M) => {
76
76
  A.onload = (C) => {
77
77
  var H;
78
- b((H = C.target) == null ? void 0 : H.result);
78
+ M((H = C.target) == null ? void 0 : H.result);
79
79
  }, A.readAsDataURL(t);
80
80
  });
81
81
  }
@@ -89,7 +89,7 @@ const gA = _("mf-payment-payoutAccount", {
89
89
  const A = t ? await V(t) : "";
90
90
  m.value = A;
91
91
  }
92
- function c() {
92
+ function n() {
93
93
  g.emitData(s), g.emitAction("primary");
94
94
  }
95
95
  return p(() => s.payoutSetting.store.event, (t) => {
@@ -97,12 +97,12 @@ const gA = _("mf-payment-payoutAccount", {
97
97
  }, { immediate: !0 }), p(() => [s.newSSM, s.newBankStatement, s.newExteriorPhoto], (t) => {
98
98
  G.value = t.every((A) => A);
99
99
  }), (t, A) => {
100
- const b = Y("FmSelect"), C = Y("FmTextField"), H = Y("FmPhoneNumber"), P = Y("FmDropField"), Q = Y("FmButton"), i = Y("FmFormGroup"), Z = Y("FmForm");
101
- return n(), u(Z, {
100
+ const M = Y("FmSelect"), C = Y("FmTextField"), H = Y("FmPhoneNumber"), P = Y("FmDropField"), Q = Y("FmButton"), w = Y("FmFormGroup"), Z = Y("FmForm");
101
+ return c(), D(Z, {
102
102
  ref: d.value,
103
103
  disabled: !a.isNewAccount,
104
104
  class: "flex flex-col gap-16",
105
- onValidationSuccess: c
105
+ onValidationSuccess: n
106
106
  }, {
107
107
  default: E(() => {
108
108
  var h;
@@ -112,97 +112,97 @@ const gA = _("mf-payment-payoutAccount", {
112
112
  r("span", { class: "text-left mx-6 text-gray-500" }, "Account"),
113
113
  r("hr", { class: "flex-grow border-t border-gray-300" })
114
114
  ], -1)),
115
- D(b, {
115
+ i(M, {
116
116
  modelValue: s.payoutSetting.store.event,
117
117
  "onUpdate:modelValue": A[0] || (A[0] = (l) => s.payoutSetting.store.event = l),
118
118
  label: "Type",
119
119
  "label-mark": "required",
120
120
  items: a.storeEventOptions
121
121
  }, null, 8, ["modelValue", "items"]),
122
- D(b, {
122
+ i(M, {
123
123
  modelValue: s.payoutSetting.store.id,
124
124
  "onUpdate:modelValue": A[1] || (A[1] = (l) => s.payoutSetting.store.id = l),
125
125
  label: "For",
126
126
  "label-mark": "required",
127
127
  placeholder: "Select store",
128
- items: s.payoutSetting.store.event === w(y.F_PAYOUT_FOR).Enum.ORDERING ? a.restaurantOptions : a.businessOptions,
129
- rules: w(X)(w(x).string().min(1))
128
+ items: s.payoutSetting.store.event === u(y.F_PAYOUT_FOR).Enum.ORDERING ? a.restaurantOptions : a.businessOptions,
129
+ rules: u(X)(u(x).string().min(1))
130
130
  }, null, 8, ["modelValue", "items", "rules"]),
131
131
  A[15] || (A[15] = r("div", { class: "flex items-center my-8" }, [
132
132
  r("hr", { class: "w-[80px] border-t border-gray-300" }),
133
133
  r("span", { class: "text-left mx-6 text-gray-500" }, "Bank Info"),
134
134
  r("hr", { class: "flex-grow border-t border-gray-300" })
135
135
  ], -1)),
136
- D(b, {
136
+ i(M, {
137
137
  modelValue: s.payoutSetting.store.bank.name,
138
138
  "onUpdate:modelValue": A[2] || (A[2] = (l) => s.payoutSetting.store.bank.name = l),
139
139
  label: "Bank",
140
140
  "label-mark": "required",
141
141
  items: a.bankNameOptions,
142
- rules: w(X)(w(x).string().min(1))
142
+ rules: u(X)(u(x).string().min(1))
143
143
  }, null, 8, ["modelValue", "items", "rules"]),
144
- D(b, {
144
+ i(M, {
145
145
  "model-value": ((h = s.payoutSetting.store.bank) == null ? void 0 : h.type) ?? null,
146
146
  label: "Type",
147
147
  "label-mark": "required",
148
148
  items: a.bankTypeOptions
149
149
  }, null, 8, ["model-value", "items"]),
150
- D(C, {
150
+ i(C, {
151
151
  modelValue: s.payoutSetting.store.bank.accountNumber,
152
152
  "onUpdate:modelValue": A[3] || (A[3] = (l) => s.payoutSetting.store.bank.accountNumber = l),
153
153
  label: "Account Number",
154
154
  "label-mark": "required",
155
- rules: w(X)(w(x).string().min(1))
155
+ rules: u(X)(u(x).string().min(1))
156
156
  }, null, 8, ["modelValue", "rules"]),
157
- D(C, {
157
+ i(C, {
158
158
  modelValue: s.payoutSetting.store.bank.holderName,
159
159
  "onUpdate:modelValue": A[4] || (A[4] = (l) => s.payoutSetting.store.bank.holderName = l),
160
160
  label: "Holder name",
161
161
  "label-mark": "required",
162
- rules: w(X)(w(x).string().min(1))
162
+ rules: u(X)(u(x).string().min(1))
163
163
  }, null, 8, ["modelValue", "rules"]),
164
164
  A[16] || (A[16] = r("div", { class: "flex items-center my-8" }, [
165
165
  r("hr", { class: "w-[80px] border-t border-gray-300" }),
166
166
  r("span", { class: "text-left mx-6 text-gray-500" }, "Key Person"),
167
167
  r("hr", { class: "flex-grow border-t border-gray-300" })
168
168
  ], -1)),
169
- D(C, {
169
+ i(C, {
170
170
  modelValue: s.payoutSetting.store.keyPerson.name,
171
171
  "onUpdate:modelValue": A[5] || (A[5] = (l) => s.payoutSetting.store.keyPerson.name = l),
172
172
  label: "Name",
173
173
  "label-mark": "required",
174
- rules: w(X)(w(x).string().min(1))
174
+ rules: u(X)(u(x).string().min(1))
175
175
  }, null, 8, ["modelValue", "rules"]),
176
- D(H, {
176
+ i(H, {
177
177
  modelValue: s.payoutSetting.store.keyPerson.phone,
178
178
  "onUpdate:modelValue": A[6] || (A[6] = (l) => s.payoutSetting.store.keyPerson.phone = l),
179
179
  "default-country": "MY",
180
180
  label: "Phone No",
181
181
  "label-mark": "required",
182
- rules: w(X)(w(x).string().min(7))
182
+ rules: u(X)(u(x).string().min(7))
183
183
  }, null, 8, ["modelValue", "rules"]),
184
- D(C, {
184
+ i(C, {
185
185
  modelValue: s.payoutSetting.store.keyPerson.email,
186
186
  "onUpdate:modelValue": A[7] || (A[7] = (l) => s.payoutSetting.store.keyPerson.email = l),
187
187
  label: "Email",
188
188
  inputmode: "email",
189
189
  "label-mark": "required",
190
- rules: w(X)(w(x).string().email())
190
+ rules: u(X)(u(x).string().email())
191
191
  }, null, 8, ["modelValue", "rules"]),
192
192
  A[17] || (A[17] = r("div", { class: "flex items-center my-8" }, [
193
193
  r("hr", { class: "w-[80px] border-t border-gray-300" }),
194
194
  r("span", { class: "text-left mx-6 text-gray-500" }, "Legal Documents"),
195
195
  r("hr", { class: "flex-grow border-t border-gray-300" })
196
196
  ], -1)),
197
- a.isNewAccount && B.value === "" ? (n(), u(P, {
197
+ a.isNewAccount && B.value === "" ? (c(), D(P, {
198
198
  key: 0,
199
199
  class: "h-[300px] w-full",
200
200
  label: "Exterior Photo",
201
201
  "label-mark": "required",
202
202
  accept: ".png,.jpg,.jpeg,.webp",
203
203
  disabled: !a.isNewAccount,
204
- onFileUpload: M
205
- }, null, 8, ["disabled"])) : (n(), u(i, {
204
+ onFileUpload: b
205
+ }, null, 8, ["disabled"])) : (c(), D(w, {
206
206
  key: 1,
207
207
  modelValue: e.value,
208
208
  "onUpdate:modelValue": A[9] || (A[9] = (l) => e.value = l),
@@ -213,18 +213,18 @@ const gA = _("mf-payment-payoutAccount", {
213
213
  class: "h-[300px] w-full",
214
214
  src: B.value
215
215
  }, null, 8, rA),
216
- a.isNewAccount ? (n(), u(Q, {
216
+ a.isNewAccount ? (c(), D(Q, {
217
217
  key: 0,
218
218
  variant: "tertiary",
219
219
  label: "Remove",
220
220
  size: "md",
221
221
  "prepend-icon": "delete",
222
- onClick: A[8] || (A[8] = () => M(void 0))
222
+ onClick: A[8] || (A[8] = () => b(void 0))
223
223
  })) : I("", !0)
224
224
  ]),
225
225
  _: 1
226
226
  }, 8, ["modelValue"])),
227
- a.isNewAccount && e.value === "" ? (n(), u(P, {
227
+ a.isNewAccount && e.value === "" ? (c(), D(P, {
228
228
  key: 2,
229
229
  class: "h-[300px] w-full",
230
230
  label: "Bank Statement w/ Holder Name",
@@ -232,20 +232,20 @@ const gA = _("mf-payment-payoutAccount", {
232
232
  accept: ".pdf",
233
233
  disabled: !a.isNewAccount,
234
234
  onFileUpload: q
235
- }, null, 8, ["disabled"])) : (n(), u(i, {
235
+ }, null, 8, ["disabled"])) : (c(), D(w, {
236
236
  key: 3,
237
237
  modelValue: e.value,
238
238
  "onUpdate:modelValue": A[11] || (A[11] = (l) => e.value = l),
239
239
  label: "Bank Statement w/ Holder Name"
240
240
  }, {
241
241
  default: E(() => [
242
- D(J, {
242
+ i(K, {
243
243
  height: 300,
244
244
  pdf: e.value,
245
245
  "disable-text-layer": !0,
246
246
  "disable-annotation-layer": !0
247
247
  }, null, 8, ["pdf"]),
248
- a.isNewAccount ? (n(), u(Q, {
248
+ a.isNewAccount ? (c(), D(Q, {
249
249
  key: 0,
250
250
  variant: "tertiary",
251
251
  label: "Remove",
@@ -256,7 +256,7 @@ const gA = _("mf-payment-payoutAccount", {
256
256
  ]),
257
257
  _: 1
258
258
  }, 8, ["modelValue"])),
259
- a.isNewAccount && m.value === "" ? (n(), u(P, {
259
+ a.isNewAccount && m.value === "" ? (c(), D(P, {
260
260
  key: 4,
261
261
  class: "w-full h-[300px]",
262
262
  label: "SSM Certificate ( Form D )",
@@ -264,20 +264,20 @@ const gA = _("mf-payment-payoutAccount", {
264
264
  accept: ".pdf",
265
265
  disabled: !a.isNewAccount,
266
266
  onFileUpload: F
267
- }, null, 8, ["disabled"])) : (n(), u(i, {
267
+ }, null, 8, ["disabled"])) : (c(), D(w, {
268
268
  key: 5,
269
269
  modelValue: m.value,
270
270
  "onUpdate:modelValue": A[13] || (A[13] = (l) => m.value = l),
271
271
  label: "SSM Certificate ( Form D )"
272
272
  }, {
273
273
  default: E(() => [
274
- D(J, {
274
+ i(K, {
275
275
  height: 300,
276
276
  pdf: m.value,
277
277
  "disable-text-layer": !0,
278
278
  "disable-annotation-layer": !0
279
279
  }, null, 8, ["pdf"]),
280
- a.isNewAccount ? (n(), u(Q, {
280
+ a.isNewAccount ? (c(), D(Q, {
281
281
  key: 0,
282
282
  variant: "tertiary",
283
283
  label: "Remove",
@@ -288,8 +288,8 @@ const gA = _("mf-payment-payoutAccount", {
288
288
  ]),
289
289
  _: 1
290
290
  }, 8, ["modelValue"])),
291
- a.isNewAccount ? (n(), N("div", oA, [
292
- D(Q, {
291
+ a.isNewAccount ? (c(), N("div", oA, [
292
+ i(Q, {
293
293
  type: "submit",
294
294
  disabled: !G.value,
295
295
  variant: "primary",
@@ -316,12 +316,12 @@ const gA = _("mf-payment-payoutAccount", {
316
316
  }
317
317
  return (d, s) => {
318
318
  const G = Y("FmBadge");
319
- return n(), u(G, {
319
+ return c(), D(G, {
320
320
  inline: "",
321
321
  class: U(g())
322
322
  }, {
323
323
  default: E(() => [
324
- r("div", null, R(d.data), 1)
324
+ r("div", null, k(d.data), 1)
325
325
  ]),
326
326
  _: 1
327
327
  }, 8, ["class"]);
@@ -343,7 +343,7 @@ const gA = _("mf-payment-payoutAccount", {
343
343
  }
344
344
  return (s, G) => {
345
345
  const m = Y("FmIcon");
346
- return n(), u(m, {
346
+ return c(), D(m, {
347
347
  name: d(),
348
348
  color: g(),
349
349
  size: "lg"
@@ -362,14 +362,14 @@ const gA = _("mf-payment-payoutAccount", {
362
362
  }
363
363
  return (g, d) => {
364
364
  const s = Y("FmBadge"), G = Y("FmListItem");
365
- return n(), u(G, {
365
+ return c(), D(G, {
366
366
  label: g.row.original.holderName,
367
367
  sublabel: g.row.original.bankName + " - " + g.row.original.bankNumber,
368
368
  clickable: !1,
369
369
  tag: "label"
370
370
  }, {
371
371
  append: E(() => [
372
- D(s, {
372
+ i(s, {
373
373
  inline: "",
374
374
  class: U(o(g.row.original.bankReady))
375
375
  }, null, 8, ["class"])
@@ -390,14 +390,14 @@ const gA = _("mf-payment-payoutAccount", {
390
390
  }
391
391
  return (g, d) => {
392
392
  const s = Y("FmBadge"), G = Y("FmListItem");
393
- return n(), u(G, {
393
+ return c(), D(G, {
394
394
  label: g.row.original.picName,
395
395
  sublabel: g.row.original.picEmail + " - " + g.row.original.picPhone,
396
396
  clickable: !1,
397
397
  tag: "label"
398
398
  }, {
399
399
  append: E(() => [
400
- D(s, {
400
+ i(s, {
401
401
  inline: "",
402
402
  class: U(o(g.row.original.picReady))
403
403
  }, null, 8, ["class"])
@@ -471,13 +471,13 @@ const gA = _("mf-payment-payoutAccount", {
471
471
  bankName: e.store.bank.name,
472
472
  holderName: e.store.bank.holderName
473
473
  });
474
- const M = {
474
+ const b = {
475
475
  picReady: !1,
476
476
  picName: "",
477
477
  picPhone: "",
478
478
  picEmail: ""
479
479
  };
480
- e.store.keyPerson && Object.assign(M, {
480
+ e.store.keyPerson && Object.assign(b, {
481
481
  picReady: !0,
482
482
  picName: e.store.keyPerson.name,
483
483
  picPhone: e.store.keyPerson.phone,
@@ -491,12 +491,12 @@ const gA = _("mf-payment-payoutAccount", {
491
491
  status: e.status,
492
492
  isActive: e.enable,
493
493
  ...B,
494
- ...M
494
+ ...b
495
495
  };
496
496
  }));
497
497
  return (e, B) => {
498
- const M = Y("FmTable");
499
- return n(), u(M, {
498
+ const b = Y("FmTable");
499
+ return c(), D(b, {
500
500
  modelValue: s.value,
501
501
  "onUpdate:modelValue": B[0] || (B[0] = (V) => s.value = V),
502
502
  "row-data": m.value,
@@ -512,40 +512,40 @@ const gA = _("mf-payment-payoutAccount", {
512
512
  }, YA = { class: "hidden mr-6 lg:block lg:w-1/6" }, GA = ["src"], mA = { class: "w-full max-w-lg text-left" }, dA = { class: "py-4" }, CA = { class: "flex justify-end items-center mb-6" }, VA = { class: "flex space-x-4 items-center" }, jA = /* @__PURE__ */ f({
513
513
  __name: "PayoutAccount",
514
514
  setup(a) {
515
- const { currentBusiness: o, restaurants: g } = $(), { isLoading: d, startAsyncCall: s } = S(!0), G = eA(), m = gA(), e = j(() => m.getBusinessPayoutAccounts), B = j(() => g.value.filter((c) => e.value.findIndex((t) => t.store.id === c._id) === -1).map((c) => ({ label: c.profile.name, value: c._id }))), M = j(() => {
516
- var c, t;
517
- return [{ label: (c = o.value) == null ? void 0 : c.name, value: (t = o.value) == null ? void 0 : t._id }];
518
- }), V = j(() => B.value.length > 0 || !e.value.find((c) => c.store.event === "MARKETING"));
519
- async function q(c) {
515
+ const { currentBusiness: o, restaurants: g } = $(), { isLoading: d, startAsyncCall: s } = L(!0), G = eA(), m = gA(), e = j(() => m.getBusinessPayoutAccounts), B = j(() => g.value.filter((n) => e.value.findIndex((t) => t.store.id === n._id) === -1).map((n) => ({ label: n.profile.name, value: n._id }))), b = j(() => {
516
+ var n, t;
517
+ return [{ label: (n = o.value) == null ? void 0 : n.name, value: (t = o.value) == null ? void 0 : t._id }];
518
+ }), V = j(() => B.value.length > 0 || !e.value.find((n) => n.store.event === "MARKETING"));
519
+ async function q(n) {
520
520
  var Q;
521
- const t = (c == null ? void 0 : c.businessId) ?? ((Q = o.value) == null ? void 0 : Q._id);
521
+ const t = (n == null ? void 0 : n.businessId) ?? ((Q = o.value) == null ? void 0 : Q._id);
522
522
  if (!t) throw "Business id required";
523
- const A = v.initPayoutAccount(t, c), b = !c || c.status === K.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW, C = {
523
+ const A = v.initPayoutAccount(t, n), M = !n, C = {
524
524
  initialValue: { payoutSetting: A },
525
- isNewAccount: b,
525
+ isNewAccount: M,
526
526
  bankNameOptions: v.bankNameOptions,
527
527
  bankTypeOptions: v.bankTypeOptions,
528
528
  storeEventOptions: v.storeEventOptions,
529
- restaurantOptions: B.value,
530
- businessOptions: M.value
529
+ restaurantOptions: M ? B.value : g.value.map((w) => ({ label: w.profile.name, value: w._id })),
530
+ businessOptions: b.value
531
531
  };
532
- B.value.length === 0 && (C.storeEventOptions = C.storeEventOptions.filter((i) => i.value !== "ORDERING")), e.value.find((i) => i.store.event === "MARKETING") && (C.storeEventOptions = C.storeEventOptions.filter((i) => i.value !== "MARKETING"));
532
+ M && (B.value.length === 0 && (C.storeEventOptions = C.storeEventOptions.filter((w) => w.value !== "ORDERING")), e.value.find((w) => w.store.event === "MARKETING") && (C.storeEventOptions = C.storeEventOptions.filter((w) => w.value !== "MARKETING")));
533
533
  const H = G.open({
534
- title: b ? "Apply Payout Account" : "View Payout Account",
534
+ title: M ? "Apply Payout Account" : "View Payout Account",
535
535
  closeButton: !0,
536
536
  overlay: !0,
537
537
  contentComponent: BA,
538
538
  contentComponentProps: C
539
- }), P = async function(i) {
539
+ }), P = async function(w) {
540
540
  G.close(), s(async () => {
541
541
  const Z = await v.mergeData({
542
- businessId: i.payoutSetting.store.event === y.F_PAYOUT_FOR.Enum.MARKETING ? i.payoutSetting.store.id : void 0,
543
- restaurantId: i.payoutSetting.store.event === y.F_PAYOUT_FOR.Enum.ORDERING ? i.payoutSetting.store.id : void 0
544
- }, A, i);
545
- c ? await m.updateBusinessPayoutAccounts(Z._id, Z) : await m.createBusinessPayoutAccounts({
542
+ businessId: w.payoutSetting.store.event === y.F_PAYOUT_FOR.Enum.MARKETING ? w.payoutSetting.store.id : void 0,
543
+ restaurantId: w.payoutSetting.store.event === y.F_PAYOUT_FOR.Enum.ORDERING ? w.payoutSetting.store.id : void 0
544
+ }, A, w);
545
+ n ? await m.updateBusinessPayoutAccounts(Z._id, Z) : await m.createBusinessPayoutAccounts({
546
546
  ...Z,
547
547
  methods: void 0,
548
- status: K.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW
548
+ status: S.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW
549
549
  }), await F();
550
550
  });
551
551
  };
@@ -556,18 +556,18 @@ const gA = _("mf-payment-payoutAccount", {
556
556
  await m.readBusinessPayoutAccounts();
557
557
  });
558
558
  }
559
- return T(F), p(o, F), (c, t) => {
559
+ return R(F), p(o, F), (n, t) => {
560
560
  const A = Y("FmButton");
561
- return n(), u(tA, {
561
+ return c(), D(tA, {
562
562
  title: "Payout Accounts",
563
563
  description: "A Payout Account is an account used to receive payments or disbursements, such as earnings or refunds, typically linked to a bank.",
564
- loading: w(d)
564
+ loading: u(d)
565
565
  }, {
566
566
  default: E(() => [
567
- e.value.length ? (n(), N(L, { key: 1 }, [
567
+ e.value.length ? (c(), N(T, { key: 1 }, [
568
568
  r("div", CA, [
569
569
  r("div", VA, [
570
- V.value ? (n(), u(A, {
570
+ V.value ? (c(), D(A, {
571
571
  key: 0,
572
572
  "prepend-icon": "manage_accounts",
573
573
  variant: "primary",
@@ -576,15 +576,15 @@ const gA = _("mf-payment-payoutAccount", {
576
576
  })) : I("", !0)
577
577
  ])
578
578
  ]),
579
- D(uA, {
580
- loading: w(d),
579
+ i(uA, {
580
+ loading: u(d),
581
581
  data: e.value,
582
582
  onRowClick: q
583
583
  }, null, 8, ["loading", "data"])
584
- ], 64)) : (n(), N("div", iA, [
584
+ ], 64)) : (c(), N("div", iA, [
585
585
  r("div", YA, [
586
586
  r("img", {
587
- src: w(DA),
587
+ src: u(DA),
588
588
  alt: "Mascot",
589
589
  class: "w-full h-auto"
590
590
  }, null, 8, GA)
@@ -593,7 +593,7 @@ const gA = _("mf-payment-payoutAccount", {
593
593
  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)),
594
594
  t[3] || (t[3] = r("p", { class: "mb-2 mt-1" }, " Let's get you started—apply now and enjoy seamless payouts! ", -1)),
595
595
  r("div", dA, [
596
- D(A, {
596
+ i(A, {
597
597
  "prepend-icon": "manage_accounts",
598
598
  variant: "primary",
599
599
  label: "Apply Now",