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