@feedmepos/mf-payment 1.2.29 → 1.2.30

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.
@@ -1,14 +1,14 @@
1
- import { defineComponent as $, ref as N, computed as L, resolveComponent as v, openBlock as y, createElementBlock as x, createElementVNode as o, toDisplayString as I, Fragment as z, createBlock as j, withCtx as c, createVNode as n, createCommentVNode as E, unref as e, createTextVNode as B, onMounted as X, resolveDynamicComponent as Z } from "vue";
2
- import { o as T } from "./index-MqVn-IaA.js";
1
+ import { defineComponent as $, ref as w, computed as L, resolveComponent as y, openBlock as v, createElementBlock as N, createElementVNode as a, toDisplayString as D, Fragment as z, createBlock as _, withCtx as c, createVNode as n, createCommentVNode as E, unref as e, createTextVNode as I, onMounted as X, resolveDynamicComponent as Z } from "vue";
2
+ import { o as j } from "./index-mIFz6n66.js";
3
3
  import { u as M } from "./index-BasdAonL.js";
4
4
  import { useRouter as h } from "vue-router";
5
- import { z as d, a as m } from "./validator-D5jtpt9A.js";
6
- import { P as ee } from "./payout-account-6yMkxM2O.js";
5
+ import { z as u, a as d } from "./validator-D5jtpt9A.js";
6
+ import { P as ee } from "./payout-account-CE1OxSdW.js";
7
7
  import { P as le } from "./PDFViewer-DlSCBBxr.js";
8
8
  import { _ as te } from "./Status.vue_vue_type_script_setup_true_lang-wrcEbNj3.js";
9
9
  import { useSnackbar as J } from "@feedmepos/ui-library";
10
10
  import { u as A } from "./error-K1CakhA9.js";
11
- const ae = ["src"], _ = /* @__PURE__ */ $({
11
+ const oe = ["src"], B = /* @__PURE__ */ $({
12
12
  __name: "UploadButton",
13
13
  props: {
14
14
  modelValue: {},
@@ -16,32 +16,32 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
16
16
  type: {}
17
17
  },
18
18
  emits: ["update:modelValue"],
19
- setup(R, { emit: D }) {
20
- const S = R, b = N(S.modelValue), f = D, F = (g) => {
21
- const a = new FileReader();
22
- a.onload = (u) => {
23
- var k;
24
- b.value = (k = u.target) == null ? void 0 : k.result, f("update:modelValue", g);
25
- }, a.readAsDataURL(g);
26
- }, i = L(() => S.type === "image" ? ".png, .jpg, .jpeg" : ".pdf");
27
- return (g, a) => {
28
- const u = v("FmButton"), k = v("FmDialog"), r = v("FmDropField");
29
- return y(), x("div", null, [
30
- o("p", null, I(g.label), 1),
31
- b.value ? (y(), x(z, { key: 0 }, [
32
- g.type === "pdf" ? (y(), j(k, {
19
+ setup(x, { emit: U }) {
20
+ const S = x, b = w(S.modelValue), k = U, F = (g) => {
21
+ const o = new FileReader();
22
+ o.onload = (i) => {
23
+ var C;
24
+ b.value = (C = i.target) == null ? void 0 : C.result, k("update:modelValue", g);
25
+ }, o.readAsDataURL(g);
26
+ }, m = L(() => S.type === "image" ? ".png, .jpg, .jpeg" : ".pdf");
27
+ return (g, o) => {
28
+ const i = y("FmButton"), C = y("FmDialog"), r = y("FmDropField");
29
+ return v(), N("div", null, [
30
+ a("p", null, D(g.label), 1),
31
+ b.value ? (v(), N(z, { key: 0 }, [
32
+ g.type === "pdf" ? (v(), _(C, {
33
33
  key: 0,
34
34
  '"': ""
35
35
  }, {
36
36
  "dialog-button": c(() => [
37
- n(u, {
37
+ n(i, {
38
38
  class: "mt-4",
39
39
  "prepend-icon": "preview",
40
40
  label: "Preview"
41
41
  })
42
42
  ]),
43
- "dialog-header": c(() => a[0] || (a[0] = [
44
- o("div", null, "Document Preview", -1)
43
+ "dialog-header": c(() => o[0] || (o[0] = [
44
+ a("div", null, "Document Preview", -1)
45
45
  ])),
46
46
  default: c(() => [
47
47
  n(le, {
@@ -53,19 +53,19 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
53
53
  ]),
54
54
  _: 1
55
55
  })) : E("", !0),
56
- g.type === "image" ? (y(), x("img", {
56
+ g.type === "image" ? (v(), N("img", {
57
57
  key: 1,
58
58
  src: b.value
59
- }, null, 8, ae)) : E("", !0)
60
- ], 64)) : (y(), j(r, {
59
+ }, null, 8, oe)) : E("", !0)
60
+ ], 64)) : (v(), _(r, {
61
61
  key: 1,
62
- accept: i.value,
62
+ accept: m.value,
63
63
  onFileUpload: F
64
64
  }, null, 8, ["accept"]))
65
65
  ]);
66
66
  };
67
67
  }
68
- }), oe = ["src"], ne = {
68
+ }), ae = ["src"], ne = {
69
69
  key: 0,
70
70
  class: "text-center text-red-700 py-4"
71
71
  }, se = { class: "flex justify-evenly py-3" }, re = /* @__PURE__ */ $({
@@ -75,33 +75,33 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
75
75
  label: {}
76
76
  },
77
77
  emits: ["update:modelValue"],
78
- setup(R, { emit: D }) {
79
- const S = R, b = D, f = N(S.modelValue), F = N(!1), i = N(), g = N(!1);
80
- function a(k, r) {
81
- var U;
82
- const V = k.split(","), w = ((U = V[0].match(/:(.*?);/)) == null ? void 0 : U[1]) || "", C = atob(V[1]);
83
- let s = C.length;
84
- const q = new Uint8Array(s);
78
+ setup(x, { emit: U }) {
79
+ const S = x, b = U, k = w(S.modelValue), F = w(!1), m = w(), g = w(!1);
80
+ function o(C, r) {
81
+ var T;
82
+ const V = C.split(","), q = ((T = V[0].match(/:(.*?);/)) == null ? void 0 : T[1]) || "", f = atob(V[1]);
83
+ let s = f.length;
84
+ const R = new Uint8Array(s);
85
85
  for (; s--; )
86
- q[s] = C.charCodeAt(s);
87
- return new File([q], r, { type: w });
86
+ R[s] = f.charCodeAt(s);
87
+ return new File([R], r, { type: q });
88
88
  }
89
- const u = function() {
90
- const { isEmpty: k, data: r } = i.value.saveSignature();
91
- if (k)
89
+ const i = function() {
90
+ const { isEmpty: C, data: r } = m.value.saveSignature();
91
+ if (C)
92
92
  return F.value = !0;
93
- f.value = r, g.value = !1, b("update:modelValue", a(r, "signature.png"));
93
+ k.value = r, g.value = !1, b("update:modelValue", o(r, "signature.png"));
94
94
  };
95
- return (k, r) => {
96
- const V = v("FmButton"), w = v("VueSignaturePad"), C = v("FmDialog");
97
- return y(), x("div", null, [
98
- f.value ? (y(), x("img", {
95
+ return (C, r) => {
96
+ const V = y("FmButton"), q = y("VueSignaturePad"), f = y("FmDialog");
97
+ return v(), N("div", null, [
98
+ k.value ? (v(), N("img", {
99
99
  key: 0,
100
- src: f.value,
100
+ src: k.value,
101
101
  alt: "Signature Preview",
102
102
  class: "w-full h-auto"
103
- }, null, 8, oe)) : E("", !0),
104
- f.value ? E("", !0) : (y(), j(C, {
103
+ }, null, 8, ae)) : E("", !0),
104
+ k.value ? E("", !0) : (v(), _(f, {
105
105
  key: 1,
106
106
  modelValue: g.value,
107
107
  "onUpdate:modelValue": r[1] || (r[1] = (s) => g.value = s)
@@ -114,28 +114,28 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
114
114
  })
115
115
  ]),
116
116
  "dialog-header": c(() => r[2] || (r[2] = [
117
- o("div", null, "Signature Board", -1)
117
+ a("div", null, "Signature Board", -1)
118
118
  ])),
119
119
  default: c(() => [
120
- n(w, {
120
+ n(q, {
121
121
  ref_key: "signaturePad",
122
- ref: i,
122
+ ref: m,
123
123
  height: "300px",
124
124
  customStyle: { border: "2px solid #ccc", borderRadius: "3px" },
125
125
  options: { penColor: "#000000" }
126
126
  }, null, 512),
127
- F.value ? (y(), x("p", ne, " Please sign your signature before saving. ")) : E("", !0),
128
- o("div", se, [
127
+ F.value ? (v(), N("p", ne, " Please sign your signature before saving. ")) : E("", !0),
128
+ a("div", se, [
129
129
  n(V, {
130
130
  variant: "destructive",
131
131
  label: "Clear",
132
132
  "prepend-icon": "delete",
133
- onClick: r[0] || (r[0] = (s) => i.value.clearSignature())
133
+ onClick: r[0] || (r[0] = (s) => m.value.clearSignature())
134
134
  }),
135
135
  n(V, {
136
136
  label: "Save",
137
137
  "prepend-icon": "save",
138
- onClick: u
138
+ onClick: i
139
139
  })
140
140
  ])
141
141
  ]),
@@ -144,7 +144,7 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
144
144
  ]);
145
145
  };
146
146
  }
147
- }), ie = { class: "space-y-2" }, ue = { class: "text-gray-900" }, de = { class: "text-gray-900" }, me = { class: "text-gray-900" }, pe = { class: "text-gray-900" }, be = { class: "text-gray-900" }, ce = { class: "text-gray-900" }, ge = { class: "mt-6 grid grid-cols-4 gap-24" }, ve = { class: "w-full flex justify-end mt-6" }, ye = { class: "mt-6 grid grid-cols-4 gap-24" }, Ve = { class: "col-span-2" }, fe = { class: "col-span-2" }, ke = { class: "col-span-2" }, Ce = { class: "col-span-2" }, Se = { class: "col-span-2" }, Pe = { class: "col-span-2" }, Fe = { class: "col-start-1 col-span-2" }, qe = { class: "col-span-2" }, we = { class: "col-span-2" }, Ne = { class: "col-span-2" }, xe = { class: "mt-6 grid grid-cols-4 gap-24" }, Ue = { class: "mt-6 grid grid-cols-2 gap-24" }, Re = /* @__PURE__ */ $({
147
+ }), ie = { class: "space-y-2" }, ue = { class: "text-gray-900" }, de = { class: "text-gray-900" }, me = { class: "text-gray-900" }, pe = { class: "text-gray-900" }, be = { class: "text-gray-900" }, ce = { class: "text-gray-900" }, ge = { class: "mt-6 grid grid-cols-4 gap-24" }, ye = { class: "w-full flex justify-end mt-6" }, ve = { class: "mt-6 grid grid-cols-4 gap-24" }, Ve = { class: "col-span-2" }, fe = { class: "col-span-2" }, ke = { class: "col-span-2" }, Ce = { class: "col-span-2" }, Se = { class: "col-span-2" }, Pe = { class: "col-span-2" }, Fe = { class: "col-start-1 col-span-2" }, qe = { class: "col-span-2" }, we = { class: "col-span-2" }, Ne = { class: "col-span-2" }, xe = { class: "mt-6 grid grid-cols-4 gap-24" }, Ue = { class: "mt-6 grid grid-cols-2 gap-24" }, Re = /* @__PURE__ */ $({
148
148
  __name: "SoftspaceSubmission",
149
149
  props: {
150
150
  submission: {
@@ -153,19 +153,19 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
153
153
  }
154
154
  },
155
155
  emits: ["update:submission"],
156
- setup(R, { emit: D }) {
157
- const S = R, b = D, f = J(), F = N(!1), { isLoading: i, startAsyncCall: g } = M(), { fields: a, documents: u, restaurantId: k, profile: r, status: V, statusReason: w } = S.submission, C = N(""), s = N(S.submission.rates ? Object.fromEntries(Object.entries(S.submission.rates).map(([P, l]) => [P, `${l}`])) : {
156
+ setup(x, { emit: U }) {
157
+ const S = x, b = U, k = J(), F = w(!1), { isLoading: m, startAsyncCall: g } = M(), { fields: o, documents: i, restaurantId: C, profile: r, status: V, statusReason: q } = S.submission, f = w(""), s = w(S.submission.rates ? Object.fromEntries(Object.entries(S.submission.rates).map(([P, l]) => [P, `${l}`])) : {
158
158
  mydebitCard: "0",
159
159
  localDebit: "0",
160
160
  localCredit: "0",
161
161
  foreignCard: "0",
162
162
  jcbStandard: "0",
163
163
  jcbPlatinum: "0"
164
- }), q = L(
164
+ }), R = L(
165
165
  () => Object.values(s.value).every((P) => parseFloat(P) > 0)
166
- ), U = () => g(async () => {
166
+ ), T = () => g(async () => {
167
167
  try {
168
- const P = await T.reviewById(S.submission._id, {
168
+ const P = await j.reviewById(S.submission._id, {
169
169
  rates: {
170
170
  mydebitCard: parseFloat(s.value.mydebitCard),
171
171
  localDebit: parseFloat(s.value.localDebit),
@@ -176,12 +176,12 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
176
176
  },
177
177
  status: "approved"
178
178
  });
179
- b("update:submission", P), F.value = !1, f.open({
179
+ b("update:submission", P), F.value = !1, k.open({
180
180
  type: "success",
181
181
  title: "Submission updated successfully"
182
182
  });
183
183
  } catch (P) {
184
- f.open({
184
+ k.open({
185
185
  type: "error",
186
186
  title: "Error occurs when updating submission",
187
187
  message: A(P)
@@ -189,16 +189,16 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
189
189
  }
190
190
  }), G = () => g(async () => {
191
191
  try {
192
- const P = await T.reviewById(S.submission._id, {
192
+ const P = await j.reviewById(S.submission._id, {
193
193
  status: "rejected",
194
- statusReason: C.value
194
+ statusReason: f.value
195
195
  });
196
- b("update:submission", P), F.value = !1, f.open({
196
+ b("update:submission", P), F.value = !1, k.open({
197
197
  type: "success",
198
198
  title: "Submission updated successfully"
199
199
  });
200
200
  } catch (P) {
201
- f.open({
201
+ k.open({
202
202
  type: "error",
203
203
  title: "Error occurs when updating submission",
204
204
  message: A(P)
@@ -206,38 +206,38 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
206
206
  }
207
207
  });
208
208
  return (P, l) => {
209
- const p = v("FmTextField"), O = v("FmButton"), K = v("FmTextarea"), Y = v("FmDialog"), Q = v("FmPhoneNumber"), H = v("FmSelect"), W = v("FmForm");
210
- return y(), x(z, null, [
211
- o("div", ie, [
212
- o("div", null, [
213
- l[31] || (l[31] = o("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
214
- o("span", ue, I(e(k)), 1)
209
+ const p = y("FmTextField"), O = y("FmButton"), K = y("FmTextarea"), Y = y("FmDialog"), Q = y("FmPhoneNumber"), H = y("FmSelect"), W = y("FmForm");
210
+ return v(), N(z, null, [
211
+ a("div", ie, [
212
+ a("div", null, [
213
+ l[31] || (l[31] = a("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
214
+ a("span", ue, D(e(C)), 1)
215
215
  ]),
216
- o("div", null, [
217
- l[32] || (l[32] = o("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
218
- o("span", de, I(e(r).name) + " ( " + I(e(r).legalName) + " )", 1)
216
+ a("div", null, [
217
+ l[32] || (l[32] = a("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
218
+ a("span", de, D(e(r).name) + " ( " + D(e(r).legalName) + " )", 1)
219
219
  ]),
220
- o("div", null, [
221
- l[33] || (l[33] = o("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
222
- o("span", me, I(e(r).email), 1)
220
+ a("div", null, [
221
+ l[33] || (l[33] = a("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
222
+ a("span", me, D(e(r).email), 1)
223
223
  ]),
224
- o("div", null, [
225
- l[34] || (l[34] = o("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
226
- o("span", pe, I(e(r).phoneNo), 1)
224
+ a("div", null, [
225
+ l[34] || (l[34] = a("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
226
+ a("span", pe, D(e(r).phoneNo), 1)
227
227
  ]),
228
- o("div", null, [
229
- l[35] || (l[35] = o("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
230
- o("span", be, [
228
+ a("div", null, [
229
+ l[35] || (l[35] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
230
+ a("span", be, [
231
231
  n(te, { data: e(V) }, null, 8, ["data"])
232
232
  ])
233
233
  ]),
234
- o("div", null, [
235
- l[36] || (l[36] = o("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
236
- o("span", ce, I(e(w)), 1)
234
+ a("div", null, [
235
+ l[36] || (l[36] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
236
+ a("span", ce, D(e(q)), 1)
237
237
  ])
238
238
  ]),
239
- l[47] || (l[47] = o("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Rate Settings ", -1)),
240
- o("div", ge, [
239
+ l[47] || (l[47] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Rate Settings ", -1)),
240
+ a("div", ge, [
241
241
  n(p, {
242
242
  modelValue: s.value.mydebitCard,
243
243
  "onUpdate:modelValue": l[0] || (l[0] = (t) => s.value.mydebitCard = t),
@@ -246,10 +246,10 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
246
246
  type: "number",
247
247
  inputmode: "numeric",
248
248
  decimal: 2,
249
- rules: e(d)(e(m).string().min(1, "Rate is required"))
249
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
250
250
  }, {
251
251
  append: c(() => l[37] || (l[37] = [
252
- B("%")
252
+ I("%")
253
253
  ])),
254
254
  _: 1
255
255
  }, 8, ["modelValue", "rules"]),
@@ -261,10 +261,10 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
261
261
  type: "number",
262
262
  inputmode: "numeric",
263
263
  decimal: 2,
264
- rules: e(d)(e(m).string().min(1, "Rate is required"))
264
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
265
265
  }, {
266
266
  append: c(() => l[38] || (l[38] = [
267
- B("%")
267
+ I("%")
268
268
  ])),
269
269
  _: 1
270
270
  }, 8, ["modelValue", "rules"]),
@@ -276,10 +276,10 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
276
276
  type: "number",
277
277
  inputmode: "numeric",
278
278
  decimal: 2,
279
- rules: e(d)(e(m).string().min(1, "Rate is required"))
279
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
280
280
  }, {
281
281
  append: c(() => l[39] || (l[39] = [
282
- B("%")
282
+ I("%")
283
283
  ])),
284
284
  _: 1
285
285
  }, 8, ["modelValue", "rules"]),
@@ -291,10 +291,10 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
291
291
  type: "number",
292
292
  inputmode: "numeric",
293
293
  decimal: 2,
294
- rules: e(d)(e(m).string().min(1, "Rate is required"))
294
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
295
295
  }, {
296
296
  append: c(() => l[40] || (l[40] = [
297
- B("%")
297
+ I("%")
298
298
  ])),
299
299
  _: 1
300
300
  }, 8, ["modelValue", "rules"]),
@@ -306,10 +306,10 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
306
306
  type: "number",
307
307
  inputmode: "numeric",
308
308
  decimal: 2,
309
- rules: e(d)(e(m).string().min(1, "Rate is required"))
309
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
310
310
  }, {
311
311
  append: c(() => l[41] || (l[41] = [
312
- B("%")
312
+ I("%")
313
313
  ])),
314
314
  _: 1
315
315
  }, 8, ["modelValue", "rules"]),
@@ -321,15 +321,15 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
321
321
  type: "number",
322
322
  inputmode: "numeric",
323
323
  decimal: 2,
324
- rules: e(d)(e(m).string().min(1, "Rate is required"))
324
+ rules: e(u)(e(d).string().min(1, "Rate is required"))
325
325
  }, {
326
326
  append: c(() => l[42] || (l[42] = [
327
- B("%")
327
+ I("%")
328
328
  ])),
329
329
  _: 1
330
330
  }, 8, ["modelValue", "rules"])
331
331
  ]),
332
- o("div", ve, [
332
+ a("div", ye, [
333
333
  n(Y, {
334
334
  modelValue: F.value,
335
335
  "onUpdate:modelValue": l[7] || (l[7] = (t) => F.value = t)
@@ -340,17 +340,17 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
340
340
  type: "button",
341
341
  variant: "destructive",
342
342
  "prepend-icon": "block",
343
- loading: e(i),
343
+ loading: e(m),
344
344
  label: "Reject Submission"
345
345
  }, null, 8, ["loading"])
346
346
  ]),
347
347
  "dialog-header": c(() => l[43] || (l[43] = [
348
- o("div", null, "Rejecting Submission", -1)
348
+ a("div", null, "Rejecting Submission", -1)
349
349
  ])),
350
350
  default: c(() => [
351
351
  n(K, {
352
- modelValue: C.value,
353
- "onUpdate:modelValue": l[6] || (l[6] = (t) => C.value = t),
352
+ modelValue: f.value,
353
+ "onUpdate:modelValue": l[6] || (l[6] = (t) => f.value = t),
354
354
  label: "Reason for Rejection",
355
355
  "label-mark": "optional",
356
356
  "helper-text": "Please provide a reason for rejection."
@@ -360,7 +360,7 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
360
360
  label: "Submit",
361
361
  "prepend-icon": "save",
362
362
  onClick: G,
363
- loading: e(i)
363
+ loading: e(m)
364
364
  }, null, 8, ["loading"])
365
365
  ]),
366
366
  _: 1
@@ -369,109 +369,109 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
369
369
  type: "button",
370
370
  variant: "primary",
371
371
  "prepend-icon": "approval",
372
- disabled: !q.value,
372
+ disabled: !R.value,
373
373
  label: "Approve Submission with Rates",
374
- onClick: U,
375
- loading: e(i)
374
+ onClick: T,
375
+ loading: e(m)
376
376
  }, null, 8, ["disabled", "loading"])
377
377
  ]),
378
378
  n(W, { disabled: !0 }, {
379
379
  default: c(() => [
380
- l[44] || (l[44] = o("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
381
- o("div", ye, [
382
- o("div", Ve, [
380
+ l[44] || (l[44] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
381
+ a("div", ve, [
382
+ a("div", Ve, [
383
383
  n(p, {
384
- modelValue: e(a).picName,
385
- "onUpdate:modelValue": l[8] || (l[8] = (t) => e(a).picName = t),
384
+ modelValue: e(o).picName,
385
+ "onUpdate:modelValue": l[8] || (l[8] = (t) => e(o).picName = t),
386
386
  label: "PIC Name",
387
387
  placeholder: "Enter your name",
388
388
  "label-mark": "required",
389
- rules: e(d)(e(m).string().min(1, "PIC Name is required"))
389
+ rules: e(u)(e(d).string().min(1, "PIC Name is required"))
390
390
  }, null, 8, ["modelValue", "rules"])
391
391
  ]),
392
- o("div", fe, [
392
+ a("div", fe, [
393
393
  n(p, {
394
- modelValue: e(a).picRole,
395
- "onUpdate:modelValue": l[9] || (l[9] = (t) => e(a).picRole = t),
394
+ modelValue: e(o).picRole,
395
+ "onUpdate:modelValue": l[9] || (l[9] = (t) => e(o).picRole = t),
396
396
  label: "PIC Role",
397
397
  placeholder: "Enter your role",
398
398
  "label-mark": "required",
399
- rules: e(d)(e(m).string().min(1, "PIC Role is required"))
399
+ rules: e(u)(e(d).string().min(1, "PIC Role is required"))
400
400
  }, null, 8, ["modelValue", "rules"])
401
401
  ]),
402
- o("div", ke, [
402
+ a("div", ke, [
403
403
  n(p, {
404
- modelValue: e(a).picEmail,
405
- "onUpdate:modelValue": l[10] || (l[10] = (t) => e(a).picEmail = t),
404
+ modelValue: e(o).picEmail,
405
+ "onUpdate:modelValue": l[10] || (l[10] = (t) => e(o).picEmail = t),
406
406
  label: "PIC Email",
407
407
  type: "email",
408
408
  placeholder: "Enter your email address",
409
409
  "label-mark": "required",
410
- rules: e(d)(e(m).string().min(1, "PIC Email is required"))
410
+ rules: e(u)(e(d).string().min(1, "PIC Email is required"))
411
411
  }, null, 8, ["modelValue", "rules"])
412
412
  ]),
413
- o("div", Ce, [
413
+ a("div", Ce, [
414
414
  n(Q, {
415
- "model-value": e(a).picContact,
416
- "onUpdate:modelValue": l[11] || (l[11] = (t) => e(a).picContact = t),
415
+ "model-value": e(o).picContact,
416
+ "onUpdate:modelValue": l[11] || (l[11] = (t) => e(o).picContact = t),
417
417
  "default-country": "MY",
418
418
  label: "PIC Contact",
419
419
  "label-mark": "required",
420
- rules: e(d)(e(m).string().min(1, "PIC Contact is required"))
420
+ rules: e(u)(e(d).string().min(1, "PIC Contact is required"))
421
421
  }, null, 8, ["model-value", "rules"])
422
422
  ]),
423
- o("div", Se, [
423
+ a("div", Se, [
424
424
  n(p, {
425
- modelValue: e(a).outletName,
426
- "onUpdate:modelValue": l[12] || (l[12] = (t) => e(a).outletName = t),
425
+ modelValue: e(o).outletName,
426
+ "onUpdate:modelValue": l[12] || (l[12] = (t) => e(o).outletName = t),
427
427
  label: "Outlet Name",
428
428
  placeholder: "Enter outlet name",
429
429
  "label-mark": "required",
430
- rules: e(d)(e(m).string().min(1, "Outlet Name is required"))
430
+ rules: e(u)(e(d).string().min(1, "Outlet Name is required"))
431
431
  }, null, 8, ["modelValue", "rules"])
432
432
  ]),
433
- o("div", Pe, [
433
+ a("div", Pe, [
434
434
  n(p, {
435
- modelValue: e(a).outletAddress,
436
- "onUpdate:modelValue": l[13] || (l[13] = (t) => e(a).outletAddress = t),
435
+ modelValue: e(o).outletAddress,
436
+ "onUpdate:modelValue": l[13] || (l[13] = (t) => e(o).outletAddress = t),
437
437
  label: "Outlet Address",
438
438
  placeholder: "Enter outlet address",
439
439
  "label-mark": "required",
440
- rules: e(d)(e(m).string().min(1, "Address is required"))
440
+ rules: e(u)(e(d).string().min(1, "Address is required"))
441
441
  }, null, 8, ["modelValue", "rules"])
442
442
  ]),
443
443
  n(p, {
444
- modelValue: e(a).outletPostCode,
445
- "onUpdate:modelValue": l[14] || (l[14] = (t) => e(a).outletPostCode = t),
444
+ modelValue: e(o).outletPostCode,
445
+ "onUpdate:modelValue": l[14] || (l[14] = (t) => e(o).outletPostCode = t),
446
446
  label: "Postal Code",
447
447
  placeholder: "Enter postal code",
448
448
  "label-mark": "required",
449
- rules: e(d)(e(m).string().min(1, "Postal Code is required"))
449
+ rules: e(u)(e(d).string().min(1, "Postal Code is required"))
450
450
  }, null, 8, ["modelValue", "rules"]),
451
451
  n(p, {
452
- modelValue: e(a).outletState,
453
- "onUpdate:modelValue": l[15] || (l[15] = (t) => e(a).outletState = t),
452
+ modelValue: e(o).outletState,
453
+ "onUpdate:modelValue": l[15] || (l[15] = (t) => e(o).outletState = t),
454
454
  label: "State",
455
455
  placeholder: "Enter state",
456
456
  "label-mark": "required",
457
- rules: e(d)(e(m).string().min(1, "State is required"))
457
+ rules: e(u)(e(d).string().min(1, "State is required"))
458
458
  }, null, 8, ["modelValue", "rules"]),
459
459
  n(p, {
460
- modelValue: e(a).outletCity,
461
- "onUpdate:modelValue": l[16] || (l[16] = (t) => e(a).outletCity = t),
460
+ modelValue: e(o).outletCity,
461
+ "onUpdate:modelValue": l[16] || (l[16] = (t) => e(o).outletCity = t),
462
462
  label: "City",
463
463
  placeholder: "Enter city",
464
464
  "label-mark": "required",
465
- rules: e(d)(e(m).string().min(1, "City is required"))
465
+ rules: e(u)(e(d).string().min(1, "City is required"))
466
466
  }, null, 8, ["modelValue", "rules"]),
467
- o("div", Fe, [
467
+ a("div", Fe, [
468
468
  n(H, {
469
- modelValue: e(a).businessType,
470
- "onUpdate:modelValue": l[17] || (l[17] = (t) => e(a).businessType = t),
469
+ modelValue: e(o).businessType,
470
+ "onUpdate:modelValue": l[17] || (l[17] = (t) => e(o).businessType = t),
471
471
  label: "Type",
472
472
  placeholder: "Select business type",
473
473
  "label-mark": "required",
474
- rules: e(d)(e(m).string().min(1, "Business Type is required")),
474
+ rules: e(u)(e(d).string().min(1, "Business Type is required")),
475
475
  items: [
476
476
  { label: "Sole Proprietorship", value: "sole_proprietorship" },
477
477
  { label: "Partnership", value: "partnership" },
@@ -480,109 +480,109 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
480
480
  ]
481
481
  }, null, 8, ["modelValue", "rules"])
482
482
  ]),
483
- o("div", qe, [
483
+ a("div", qe, [
484
484
  n(p, {
485
- modelValue: e(a).businessRegNo,
486
- "onUpdate:modelValue": l[18] || (l[18] = (t) => e(a).businessRegNo = t),
485
+ modelValue: e(o).businessRegNo,
486
+ "onUpdate:modelValue": l[18] || (l[18] = (t) => e(o).businessRegNo = t),
487
487
  label: "Registration No",
488
488
  placeholder: "Enter registration number",
489
489
  "label-mark": "required",
490
- rules: e(d)(e(m).string().min(1, "Reg No is required"))
490
+ rules: e(u)(e(d).string().min(1, "Reg No is required"))
491
491
  }, null, 8, ["modelValue", "rules"])
492
492
  ]),
493
- o("div", we, [
493
+ a("div", we, [
494
494
  n(p, {
495
- modelValue: e(a).tinNo,
496
- "onUpdate:modelValue": l[19] || (l[19] = (t) => e(a).tinNo = t),
495
+ modelValue: e(o).tinNo,
496
+ "onUpdate:modelValue": l[19] || (l[19] = (t) => e(o).tinNo = t),
497
497
  label: "Tax Identification No (TIN)",
498
498
  placeholder: "Enter your TIN number",
499
499
  "label-mark": "required",
500
- rules: e(d)(e(m).string().min(1, "TIN is required"))
500
+ rules: e(u)(e(d).string().min(1, "TIN is required"))
501
501
  }, null, 8, ["modelValue", "rules"])
502
502
  ]),
503
- o("div", Ne, [
503
+ a("div", Ne, [
504
504
  n(p, {
505
- modelValue: e(a).sstNo,
506
- "onUpdate:modelValue": l[20] || (l[20] = (t) => e(a).sstNo = t),
505
+ modelValue: e(o).sstNo,
506
+ "onUpdate:modelValue": l[20] || (l[20] = (t) => e(o).sstNo = t),
507
507
  label: "SST Registration No (SST)",
508
508
  placeholder: "Enter your SST number",
509
509
  "label-mark": "required",
510
- rules: e(d)(e(m).string().min(1, "SST No is required"))
510
+ rules: e(u)(e(d).string().min(1, "SST No is required"))
511
511
  }, null, 8, ["modelValue", "rules"])
512
512
  ])
513
513
  ]),
514
- l[45] || (l[45] = o("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information & Documents ", -1)),
515
- o("div", xe, [
514
+ l[45] || (l[45] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information & Documents ", -1)),
515
+ a("div", xe, [
516
516
  n(H, {
517
- modelValue: e(a).bankName,
518
- "onUpdate:modelValue": l[21] || (l[21] = (t) => e(a).bankName = t),
517
+ modelValue: e(o).bankName,
518
+ "onUpdate:modelValue": l[21] || (l[21] = (t) => e(o).bankName = t),
519
519
  label: "Bank",
520
520
  placeholder: "Select bank type",
521
521
  "label-mark": "required",
522
- rules: e(d)(e(m).string().min(1, "Bank Type is required")),
522
+ rules: e(u)(e(d).string().min(1, "Bank Type is required")),
523
523
  items: e(ee).bankNameOptions()
524
524
  }, null, 8, ["modelValue", "rules", "items"]),
525
525
  n(p, {
526
- modelValue: e(a).bankHolderName,
527
- "onUpdate:modelValue": l[22] || (l[22] = (t) => e(a).bankHolderName = t),
526
+ modelValue: e(o).bankHolderName,
527
+ "onUpdate:modelValue": l[22] || (l[22] = (t) => e(o).bankHolderName = t),
528
528
  label: "Beneficiary Name",
529
529
  placeholder: "Enter Beneficiary Name",
530
530
  "label-mark": "required",
531
- rules: e(d)(e(m).string().min(1, "Beneficiary Name is required"))
531
+ rules: e(u)(e(d).string().min(1, "Beneficiary Name is required"))
532
532
  }, null, 8, ["modelValue", "rules"]),
533
533
  n(p, {
534
- modelValue: e(a).bankAccountNo,
535
- "onUpdate:modelValue": l[23] || (l[23] = (t) => e(a).bankAccountNo = t),
534
+ modelValue: e(o).bankAccountNo,
535
+ "onUpdate:modelValue": l[23] || (l[23] = (t) => e(o).bankAccountNo = t),
536
536
  label: "Account Number",
537
537
  placeholder: "Enter Account Number",
538
538
  "label-mark": "required",
539
- rules: e(d)(e(m).string().min(1, "Account Number is required"))
539
+ rules: e(u)(e(d).string().min(1, "Account Number is required"))
540
540
  }, null, 8, ["modelValue", "rules"]),
541
- n(_, {
541
+ n(B, {
542
542
  label: "Authorized Person ID",
543
- modelValue: e(u).authorizedPersonID,
544
- "onUpdate:modelValue": l[24] || (l[24] = (t) => e(u).authorizedPersonID = t),
543
+ modelValue: e(i).authorizedPersonID,
544
+ "onUpdate:modelValue": l[24] || (l[24] = (t) => e(i).authorizedPersonID = t),
545
545
  type: "image"
546
546
  }, null, 8, ["modelValue"]),
547
- n(_, {
547
+ n(B, {
548
548
  label: "Outlet Photo",
549
- modelValue: e(u).outletPhoto,
550
- "onUpdate:modelValue": l[25] || (l[25] = (t) => e(u).outletPhoto = t),
549
+ modelValue: e(i).outletPhoto,
550
+ "onUpdate:modelValue": l[25] || (l[25] = (t) => e(i).outletPhoto = t),
551
551
  type: "image"
552
552
  }, null, 8, ["modelValue"]),
553
- n(_, {
553
+ n(B, {
554
554
  label: "Latest Bank Statement",
555
- modelValue: e(u).bankStatement,
556
- "onUpdate:modelValue": l[26] || (l[26] = (t) => e(u).bankStatement = t),
555
+ modelValue: e(i).bankStatement,
556
+ "onUpdate:modelValue": l[26] || (l[26] = (t) => e(i).bankStatement = t),
557
557
  type: "pdf"
558
558
  }, null, 8, ["modelValue"]),
559
- e(a).businessType === "private_limited" || e(a).businessType === "public_limited" ? (y(), j(_, {
559
+ e(o).businessType === "private_limited" || e(o).businessType === "public_limited" ? (v(), _(B, {
560
560
  key: 0,
561
561
  label: "Superform",
562
562
  type: "pdf",
563
- modelValue: e(u).certificate,
564
- "onUpdate:modelValue": l[27] || (l[27] = (t) => e(u).certificate = t)
563
+ modelValue: e(i).certificate,
564
+ "onUpdate:modelValue": l[27] || (l[27] = (t) => e(i).certificate = t)
565
565
  }, null, 8, ["modelValue"])) : E("", !0),
566
- e(a).businessType === "sole_proprietorship" || e(a).businessType === "partnership" ? (y(), j(_, {
566
+ e(o).businessType === "sole_proprietorship" || e(o).businessType === "partnership" ? (v(), _(B, {
567
567
  key: 1,
568
568
  label: "SSM Certificate & Info",
569
569
  type: "pdf",
570
- modelValue: e(u).certificate,
571
- "onUpdate:modelValue": l[28] || (l[28] = (t) => e(u).certificate = t)
570
+ modelValue: e(i).certificate,
571
+ "onUpdate:modelValue": l[28] || (l[28] = (t) => e(i).certificate = t)
572
572
  }, null, 8, ["modelValue"])) : E("", !0)
573
573
  ]),
574
- l[46] || (l[46] = o("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
575
- o("div", Ue, [
574
+ l[46] || (l[46] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
575
+ a("div", Ue, [
576
576
  n(re, {
577
- modelValue: e(u).signature,
578
- "onUpdate:modelValue": l[29] || (l[29] = (t) => e(u).signature = t),
577
+ modelValue: e(i).signature,
578
+ "onUpdate:modelValue": l[29] || (l[29] = (t) => e(i).signature = t),
579
579
  label: "Signature"
580
580
  }, null, 8, ["modelValue"]),
581
- n(_, {
581
+ n(B, {
582
582
  label: "Company Stamp",
583
583
  type: "image",
584
- modelValue: e(u).companyStamp,
585
- "onUpdate:modelValue": l[30] || (l[30] = (t) => e(u).companyStamp = t)
584
+ modelValue: e(i).companyStamp,
585
+ "onUpdate:modelValue": l[30] || (l[30] = (t) => e(i).companyStamp = t)
586
586
  }, null, 8, ["modelValue"])
587
587
  ])
588
588
  ]),
@@ -594,7 +594,7 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
594
594
  }), De = {
595
595
  key: 0,
596
596
  class: "flex items-center justify-center min-h-[80vh]"
597
- }, Ie = { class: "px-32 pb-32" }, He = /* @__PURE__ */ $({
597
+ }, Ee = { class: "px-32 pb-32" }, He = /* @__PURE__ */ $({
598
598
  __name: "OnboardForm",
599
599
  props: {
600
600
  submissionId: {
@@ -602,47 +602,46 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
602
602
  required: !0
603
603
  }
604
604
  },
605
- setup(R) {
606
- const { startAsyncCall: D, isLoading: S } = M(), b = J(), f = R, F = h(), i = N(null);
605
+ setup(x) {
606
+ const { startAsyncCall: U, isLoading: S } = M(), b = J(), k = x, F = h(), m = w(null);
607
607
  X(() => {
608
- D(async () => {
609
- i.value = await T.readById(f.submissionId);
608
+ U(async () => {
609
+ m.value = await j.readById(k.submissionId);
610
610
  });
611
611
  });
612
612
  const g = L(() => {
613
- if (!i.value) return null;
614
- switch (i.value.type) {
613
+ if (!m.value) return null;
614
+ switch (m.value.type) {
615
615
  case "softspace":
616
616
  return Re;
617
617
  default:
618
618
  return null;
619
619
  }
620
- }), a = N(0);
621
- function u(r) {
622
- i.value = r, a.value = Date.now();
620
+ }), o = w(0);
621
+ function i(r) {
622
+ m.value = r, o.value = Date.now();
623
623
  }
624
- const k = async (r) => {
625
- var V, w, C, s;
626
- if (i.value)
624
+ const C = async (r) => {
625
+ var V, q;
626
+ if (m.value)
627
627
  switch (r) {
628
628
  case "preview":
629
- let q;
629
+ let f;
630
630
  try {
631
- q = b.open({
631
+ f = b.open({
632
632
  message: "Generating preview document...",
633
633
  type: "info"
634
- }), await T.previewDocument(
635
- (V = i.value) == null ? void 0 : V.restaurantId,
636
- (w = i.value) == null ? void 0 : w._id
634
+ }), await j.previewDocument(
635
+ (V = m.value) == null ? void 0 : V._id
637
636
  );
638
- } catch (U) {
637
+ } catch (s) {
639
638
  b.open({
640
639
  type: "error",
641
640
  title: "Error occurs when generating submission document",
642
- message: A(U)
641
+ message: A(s)
643
642
  });
644
643
  } finally {
645
- q && b.close(q);
644
+ f && b.close(f);
646
645
  }
647
646
  break;
648
647
  case "send":
@@ -650,35 +649,34 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
650
649
  b.open({
651
650
  message: "Sending onboarding document...",
652
651
  type: "info"
653
- }), await T.sendDocument(
654
- (C = i.value) == null ? void 0 : C.restaurantId,
655
- (s = i.value) == null ? void 0 : s._id
652
+ }), await j.sendDocument(
653
+ (q = m.value) == null ? void 0 : q._id
656
654
  ), b.open({
657
655
  type: "success",
658
656
  title: "Submission documents send successfully"
659
657
  });
660
- } catch (U) {
658
+ } catch (s) {
661
659
  b.open({
662
660
  type: "error",
663
661
  title: "Error occurs when sending document",
664
- message: A(U)
662
+ message: A(s)
665
663
  });
666
664
  }
667
665
  break;
668
666
  }
669
667
  };
670
668
  return (r, V) => {
671
- var s, q;
672
- const w = v("FmCircularProgress"), C = v("FmPageHead");
673
- return e(S) ? (y(), x("div", De, [
674
- n(w, { size: "xxl" })
675
- ])) : (y(), x(z, { key: 1 }, [
676
- n(C, {
677
- title: `Submission - ${(s = i.value) == null ? void 0 : s.type}`,
678
- description: `ID - ${(q = i.value) == null ? void 0 : q._id}`,
669
+ var s, R;
670
+ const q = y("FmCircularProgress"), f = y("FmPageHead");
671
+ return e(S) ? (v(), N("div", De, [
672
+ n(q, { size: "xxl" })
673
+ ])) : (v(), N(z, { key: 1 }, [
674
+ n(f, {
675
+ title: `Submission - ${(s = m.value) == null ? void 0 : s.type}`,
676
+ description: `ID - ${(R = m.value) == null ? void 0 : R._id}`,
679
677
  "back-button": !0,
680
678
  "onClick:back": V[0] || (V[0] = () => e(F).back()),
681
- "onClick:action": k,
679
+ "onClick:action": C,
682
680
  actions: [
683
681
  {
684
682
  label: "Preview Document",
@@ -693,11 +691,11 @@ const ae = ["src"], _ = /* @__PURE__ */ $({
693
691
  }
694
692
  ]
695
693
  }, null, 8, ["title", "description"]),
696
- o("div", Ie, [
697
- (y(), j(Z(g.value), {
698
- key: a.value,
699
- submission: i.value,
700
- "onUpdate:submission": u
694
+ a("div", Ee, [
695
+ (v(), _(Z(g.value), {
696
+ key: o.value,
697
+ submission: m.value,
698
+ "onUpdate:submission": i
701
699
  }, null, 40, ["submission"]))
702
700
  ])
703
701
  ], 64));