@feedmepos/mf-payment 1.2.27 → 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.
- package/dist/OnboardForm-DOZ9futX.js +671 -0
- package/dist/OnboardForm-SZXqGGPm.js +707 -0
- package/dist/OnboardSubmission-BlVBKz-H.js +146 -0
- package/dist/OnboardSubmission-CjsvLPVX.js +152 -0
- package/dist/{PDFViewer-xrBtzrlR.js → PDFViewer-DlSCBBxr.js} +14 -12
- package/dist/{PayoutAccount-DI5YpzGm.js → PayoutAccount-BHbqJwXB.js} +5 -5
- package/dist/{PayoutAccount-mlaDc7_i.js → PayoutAccount-Ctd7j0SZ.js} +8 -7
- package/dist/{PayoutAccountSetting-IgBRFN0A.js → PayoutAccountSetting-CUlmHkw3.js} +4 -4
- package/dist/{Restaurant-CIGhOFvk.js → Restaurant-DDebeSrf.js} +4 -4
- package/dist/{RestaurantSetting-0CbusLcz.js → RestaurantSetting-Cf63FkWQ.js} +291 -222
- package/dist/{Settlement-DmG5-VSP.js → Settlement-C_V-iTDy.js} +3 -3
- package/dist/{Settlement-CUmpNHMN.js → Settlement-CctMzPsZ.js} +3 -3
- package/dist/{SettlementTransactions-DhjGSAg4.js → SettlementTransactions-9p3tYV0n.js} +3 -3
- package/dist/{SettlementTransactions-CcMUINyi.js → SettlementTransactions-DYvhz0Yh.js} +3 -3
- package/dist/Status.vue_vue_type_script_setup_true_lang-wrcEbNj3.js +29 -0
- package/dist/{Terminal-KE_9M2jr.js → Terminal-D3QDgPY6.js} +5 -5
- package/dist/{TerminalSetting-DdJl_9JJ.js → TerminalSetting-ehm_sRqf.js} +3 -3
- package/dist/{Transaction-E9_hSpx4.js → Transaction-DIz_ArbY.js} +6 -6
- package/dist/{Transaction-CA9RQ8qT.js → Transaction-DzIzAIbO.js} +5 -5
- package/dist/{TransactionOld-lPUiTl8n.js → TransactionOld-CagUKhjR.js} +4 -4
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-B03g8Jum.js → TransactionTable.vue_vue_type_script_setup_true_lang-ChuhuUKc.js} +3 -3
- package/dist/api/index.d.ts +1 -0
- package/dist/api/onboard-submission/index.d.ts +17 -0
- package/dist/api/payment-gateway/index.d.ts +3 -1
- package/dist/api/payout/index.d.ts +1 -0
- package/dist/{app-BohCgZld.js → app-Djt4efuB.js} +212 -131
- package/dist/app.d.ts +46 -0
- package/dist/app.js +1 -1
- package/dist/{assets-Dttfej_E.js → assets-ha4XB2PU.js} +1 -1
- package/dist/{grafana-DCGA3gMb.js → grafana-DRZOKr8c.js} +1 -1
- package/dist/{index-BQtW6X1l.js → index-8Xu0hCTB.js} +1 -1
- package/dist/{index-CZKvrBM7.js → index-B6GVzj7l.js} +1 -1
- package/dist/{index-tCobqIDD.js → index-BasdAonL.js} +4930 -4857
- package/dist/{index-BOwfUR6x.js → index-DGF3hKwg.js} +1 -1
- package/dist/{index-BYLzp2JB.js → index-Dg_mEOso.js} +1 -1
- package/dist/{index-JCMXdVSJ.js → index-DoD23lHB.js} +8 -1
- package/dist/index-mIFz6n66.js +68 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DpAWcXVU.js → index.vue_vue_type_script_setup_true_lang-D4bLM6th.js} +1 -1
- package/dist/modules.d.ts +1 -0
- package/dist/package.json +9 -8
- package/dist/payout-account-CE1OxSdW.js +458 -0
- package/dist/plugins-ClNUIkc0.js +1366 -0
- package/dist/stores/payoutAccount.d.ts +16 -16
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/onboard-submission/OnboardForm.vue.d.ts +12 -0
- package/dist/views/admin/onboard-submission/OnboardSubmission.vue.d.ts +2 -0
- package/dist/views/admin/onboard-submission/cell/SignatureBoard.vue.d.ts +10 -0
- package/dist/views/admin/onboard-submission/cell/Status.vue.d.ts +5 -0
- package/dist/views/admin/onboard-submission/cell/UploadButton.vue.d.ts +11 -0
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +81 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +20 -20
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/LocalIntegration.vue.d.ts +803 -0
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
- package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/GhlGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/TerminalGateway.vue.d.ts +8 -8
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +8 -8
- package/dist/views/onboard-submission/OnboardForm.vue.d.ts +14 -0
- package/dist/views/onboard-submission/OnboardSubmission.vue.d.ts +2 -0
- package/dist/views/onboard-submission/cell/SignatureBoard.vue.d.ts +10 -0
- package/dist/views/onboard-submission/cell/UploadButton.vue.d.ts +11 -0
- package/dist/views/onboard-submission/form/SoftSpaceSubmission.vue.d.ts +5 -0
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +32 -32
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +48 -48
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +24 -24
- package/dist/views/settlement/SettlementTable.vue.d.ts +4 -4
- package/package.json +9 -8
- package/dist/payout-account-rJmG1Gi5.js +0 -1819
@@ -0,0 +1,707 @@
|
|
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
|
+
import { u as M } from "./index-BasdAonL.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-CE1OxSdW.js";
|
7
|
+
import { P as le } from "./PDFViewer-DlSCBBxr.js";
|
8
|
+
import { _ as te } from "./Status.vue_vue_type_script_setup_true_lang-wrcEbNj3.js";
|
9
|
+
import { useSnackbar as J } from "@feedmepos/ui-library";
|
10
|
+
import { u as A } from "./error-K1CakhA9.js";
|
11
|
+
const oe = ["src"], B = /* @__PURE__ */ $({
|
12
|
+
__name: "UploadButton",
|
13
|
+
props: {
|
14
|
+
modelValue: {},
|
15
|
+
label: {},
|
16
|
+
type: {}
|
17
|
+
},
|
18
|
+
emits: ["update:modelValue"],
|
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
|
+
key: 0,
|
34
|
+
'"': ""
|
35
|
+
}, {
|
36
|
+
"dialog-button": c(() => [
|
37
|
+
n(i, {
|
38
|
+
class: "mt-4",
|
39
|
+
"prepend-icon": "preview",
|
40
|
+
label: "Preview"
|
41
|
+
})
|
42
|
+
]),
|
43
|
+
"dialog-header": c(() => o[0] || (o[0] = [
|
44
|
+
a("div", null, "Document Preview", -1)
|
45
|
+
])),
|
46
|
+
default: c(() => [
|
47
|
+
n(le, {
|
48
|
+
height: 450,
|
49
|
+
pdf: b.value,
|
50
|
+
"disable-text-layer": !0,
|
51
|
+
"disable-annotation-layer": !0
|
52
|
+
}, null, 8, ["pdf"])
|
53
|
+
]),
|
54
|
+
_: 1
|
55
|
+
})) : E("", !0),
|
56
|
+
g.type === "image" ? (v(), N("img", {
|
57
|
+
key: 1,
|
58
|
+
src: b.value
|
59
|
+
}, null, 8, oe)) : E("", !0)
|
60
|
+
], 64)) : (v(), _(r, {
|
61
|
+
key: 1,
|
62
|
+
accept: m.value,
|
63
|
+
onFileUpload: F
|
64
|
+
}, null, 8, ["accept"]))
|
65
|
+
]);
|
66
|
+
};
|
67
|
+
}
|
68
|
+
}), ae = ["src"], ne = {
|
69
|
+
key: 0,
|
70
|
+
class: "text-center text-red-700 py-4"
|
71
|
+
}, se = { class: "flex justify-evenly py-3" }, re = /* @__PURE__ */ $({
|
72
|
+
__name: "SignatureBoard",
|
73
|
+
props: {
|
74
|
+
modelValue: {},
|
75
|
+
label: {}
|
76
|
+
},
|
77
|
+
emits: ["update:modelValue"],
|
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
|
+
for (; s--; )
|
86
|
+
R[s] = f.charCodeAt(s);
|
87
|
+
return new File([R], r, { type: q });
|
88
|
+
}
|
89
|
+
const i = function() {
|
90
|
+
const { isEmpty: C, data: r } = m.value.saveSignature();
|
91
|
+
if (C)
|
92
|
+
return F.value = !0;
|
93
|
+
k.value = r, g.value = !1, b("update:modelValue", o(r, "signature.png"));
|
94
|
+
};
|
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
|
+
key: 0,
|
100
|
+
src: k.value,
|
101
|
+
alt: "Signature Preview",
|
102
|
+
class: "w-full h-auto"
|
103
|
+
}, null, 8, ae)) : E("", !0),
|
104
|
+
k.value ? E("", !0) : (v(), _(f, {
|
105
|
+
key: 1,
|
106
|
+
modelValue: g.value,
|
107
|
+
"onUpdate:modelValue": r[1] || (r[1] = (s) => g.value = s)
|
108
|
+
}, {
|
109
|
+
"dialog-button": c(() => [
|
110
|
+
n(V, {
|
111
|
+
"prepend-icon": "signature",
|
112
|
+
class: "w-full",
|
113
|
+
label: "Signature"
|
114
|
+
})
|
115
|
+
]),
|
116
|
+
"dialog-header": c(() => r[2] || (r[2] = [
|
117
|
+
a("div", null, "Signature Board", -1)
|
118
|
+
])),
|
119
|
+
default: c(() => [
|
120
|
+
n(q, {
|
121
|
+
ref_key: "signaturePad",
|
122
|
+
ref: m,
|
123
|
+
height: "300px",
|
124
|
+
customStyle: { border: "2px solid #ccc", borderRadius: "3px" },
|
125
|
+
options: { penColor: "#000000" }
|
126
|
+
}, null, 512),
|
127
|
+
F.value ? (v(), N("p", ne, " Please sign your signature before saving. ")) : E("", !0),
|
128
|
+
a("div", se, [
|
129
|
+
n(V, {
|
130
|
+
variant: "destructive",
|
131
|
+
label: "Clear",
|
132
|
+
"prepend-icon": "delete",
|
133
|
+
onClick: r[0] || (r[0] = (s) => m.value.clearSignature())
|
134
|
+
}),
|
135
|
+
n(V, {
|
136
|
+
label: "Save",
|
137
|
+
"prepend-icon": "save",
|
138
|
+
onClick: i
|
139
|
+
})
|
140
|
+
])
|
141
|
+
]),
|
142
|
+
_: 1
|
143
|
+
}, 8, ["modelValue"]))
|
144
|
+
]);
|
145
|
+
};
|
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" }, 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
|
+
__name: "SoftspaceSubmission",
|
149
|
+
props: {
|
150
|
+
submission: {
|
151
|
+
type: Object,
|
152
|
+
required: !0
|
153
|
+
}
|
154
|
+
},
|
155
|
+
emits: ["update:submission"],
|
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
|
+
mydebitCard: "0",
|
159
|
+
localDebit: "0",
|
160
|
+
localCredit: "0",
|
161
|
+
foreignCard: "0",
|
162
|
+
jcbStandard: "0",
|
163
|
+
jcbPlatinum: "0"
|
164
|
+
}), R = L(
|
165
|
+
() => Object.values(s.value).every((P) => parseFloat(P) > 0)
|
166
|
+
), T = () => g(async () => {
|
167
|
+
try {
|
168
|
+
const P = await j.reviewById(S.submission._id, {
|
169
|
+
rates: {
|
170
|
+
mydebitCard: parseFloat(s.value.mydebitCard),
|
171
|
+
localDebit: parseFloat(s.value.localDebit),
|
172
|
+
localCredit: parseFloat(s.value.localCredit),
|
173
|
+
foreignCard: parseFloat(s.value.foreignCard),
|
174
|
+
jcbStandard: parseFloat(s.value.jcbStandard),
|
175
|
+
jcbPlatinum: parseFloat(s.value.jcbPlatinum)
|
176
|
+
},
|
177
|
+
status: "approved"
|
178
|
+
});
|
179
|
+
b("update:submission", P), F.value = !1, k.open({
|
180
|
+
type: "success",
|
181
|
+
title: "Submission updated successfully"
|
182
|
+
});
|
183
|
+
} catch (P) {
|
184
|
+
k.open({
|
185
|
+
type: "error",
|
186
|
+
title: "Error occurs when updating submission",
|
187
|
+
message: A(P)
|
188
|
+
});
|
189
|
+
}
|
190
|
+
}), G = () => g(async () => {
|
191
|
+
try {
|
192
|
+
const P = await j.reviewById(S.submission._id, {
|
193
|
+
status: "rejected",
|
194
|
+
statusReason: f.value
|
195
|
+
});
|
196
|
+
b("update:submission", P), F.value = !1, k.open({
|
197
|
+
type: "success",
|
198
|
+
title: "Submission updated successfully"
|
199
|
+
});
|
200
|
+
} catch (P) {
|
201
|
+
k.open({
|
202
|
+
type: "error",
|
203
|
+
title: "Error occurs when updating submission",
|
204
|
+
message: A(P)
|
205
|
+
});
|
206
|
+
}
|
207
|
+
});
|
208
|
+
return (P, l) => {
|
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
|
+
]),
|
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
|
+
]),
|
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
|
+
]),
|
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
|
+
]),
|
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
|
+
n(te, { data: e(V) }, null, 8, ["data"])
|
232
|
+
])
|
233
|
+
]),
|
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
|
+
])
|
238
|
+
]),
|
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
|
+
n(p, {
|
242
|
+
modelValue: s.value.mydebitCard,
|
243
|
+
"onUpdate:modelValue": l[0] || (l[0] = (t) => s.value.mydebitCard = t),
|
244
|
+
label: "myDebit Card",
|
245
|
+
"label-mark": "required",
|
246
|
+
type: "number",
|
247
|
+
inputmode: "numeric",
|
248
|
+
decimal: 2,
|
249
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
250
|
+
}, {
|
251
|
+
append: c(() => l[37] || (l[37] = [
|
252
|
+
I("%")
|
253
|
+
])),
|
254
|
+
_: 1
|
255
|
+
}, 8, ["modelValue", "rules"]),
|
256
|
+
n(p, {
|
257
|
+
modelValue: s.value.localDebit,
|
258
|
+
"onUpdate:modelValue": l[1] || (l[1] = (t) => s.value.localDebit = t),
|
259
|
+
label: "Local Debit Card",
|
260
|
+
"label-mark": "required",
|
261
|
+
type: "number",
|
262
|
+
inputmode: "numeric",
|
263
|
+
decimal: 2,
|
264
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
265
|
+
}, {
|
266
|
+
append: c(() => l[38] || (l[38] = [
|
267
|
+
I("%")
|
268
|
+
])),
|
269
|
+
_: 1
|
270
|
+
}, 8, ["modelValue", "rules"]),
|
271
|
+
n(p, {
|
272
|
+
modelValue: s.value.localCredit,
|
273
|
+
"onUpdate:modelValue": l[2] || (l[2] = (t) => s.value.localCredit = t),
|
274
|
+
label: "Local Credit Card",
|
275
|
+
"label-mark": "required",
|
276
|
+
type: "number",
|
277
|
+
inputmode: "numeric",
|
278
|
+
decimal: 2,
|
279
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
280
|
+
}, {
|
281
|
+
append: c(() => l[39] || (l[39] = [
|
282
|
+
I("%")
|
283
|
+
])),
|
284
|
+
_: 1
|
285
|
+
}, 8, ["modelValue", "rules"]),
|
286
|
+
n(p, {
|
287
|
+
modelValue: s.value.foreignCard,
|
288
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => s.value.foreignCard = t),
|
289
|
+
label: "Foreign Card",
|
290
|
+
"label-mark": "required",
|
291
|
+
type: "number",
|
292
|
+
inputmode: "numeric",
|
293
|
+
decimal: 2,
|
294
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
295
|
+
}, {
|
296
|
+
append: c(() => l[40] || (l[40] = [
|
297
|
+
I("%")
|
298
|
+
])),
|
299
|
+
_: 1
|
300
|
+
}, 8, ["modelValue", "rules"]),
|
301
|
+
n(p, {
|
302
|
+
modelValue: s.value.jcbStandard,
|
303
|
+
"onUpdate:modelValue": l[4] || (l[4] = (t) => s.value.jcbStandard = t),
|
304
|
+
label: "JCB Standard",
|
305
|
+
"label-mark": "required",
|
306
|
+
type: "number",
|
307
|
+
inputmode: "numeric",
|
308
|
+
decimal: 2,
|
309
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
310
|
+
}, {
|
311
|
+
append: c(() => l[41] || (l[41] = [
|
312
|
+
I("%")
|
313
|
+
])),
|
314
|
+
_: 1
|
315
|
+
}, 8, ["modelValue", "rules"]),
|
316
|
+
n(p, {
|
317
|
+
modelValue: s.value.jcbPlatinum,
|
318
|
+
"onUpdate:modelValue": l[5] || (l[5] = (t) => s.value.jcbPlatinum = t),
|
319
|
+
label: "JCB Platinum",
|
320
|
+
"label-mark": "required",
|
321
|
+
type: "number",
|
322
|
+
inputmode: "numeric",
|
323
|
+
decimal: 2,
|
324
|
+
rules: e(u)(e(d).string().min(1, "Rate is required"))
|
325
|
+
}, {
|
326
|
+
append: c(() => l[42] || (l[42] = [
|
327
|
+
I("%")
|
328
|
+
])),
|
329
|
+
_: 1
|
330
|
+
}, 8, ["modelValue", "rules"])
|
331
|
+
]),
|
332
|
+
a("div", ye, [
|
333
|
+
n(Y, {
|
334
|
+
modelValue: F.value,
|
335
|
+
"onUpdate:modelValue": l[7] || (l[7] = (t) => F.value = t)
|
336
|
+
}, {
|
337
|
+
"dialog-button": c(() => [
|
338
|
+
n(O, {
|
339
|
+
class: "mr-6",
|
340
|
+
type: "button",
|
341
|
+
variant: "destructive",
|
342
|
+
"prepend-icon": "block",
|
343
|
+
loading: e(m),
|
344
|
+
label: "Reject Submission"
|
345
|
+
}, null, 8, ["loading"])
|
346
|
+
]),
|
347
|
+
"dialog-header": c(() => l[43] || (l[43] = [
|
348
|
+
a("div", null, "Rejecting Submission", -1)
|
349
|
+
])),
|
350
|
+
default: c(() => [
|
351
|
+
n(K, {
|
352
|
+
modelValue: f.value,
|
353
|
+
"onUpdate:modelValue": l[6] || (l[6] = (t) => f.value = t),
|
354
|
+
label: "Reason for Rejection",
|
355
|
+
"label-mark": "optional",
|
356
|
+
"helper-text": "Please provide a reason for rejection."
|
357
|
+
}, null, 8, ["modelValue"]),
|
358
|
+
n(O, {
|
359
|
+
class: "mb-2 mt-6 w-full",
|
360
|
+
label: "Submit",
|
361
|
+
"prepend-icon": "save",
|
362
|
+
onClick: G,
|
363
|
+
loading: e(m)
|
364
|
+
}, null, 8, ["loading"])
|
365
|
+
]),
|
366
|
+
_: 1
|
367
|
+
}, 8, ["modelValue"]),
|
368
|
+
n(O, {
|
369
|
+
type: "button",
|
370
|
+
variant: "primary",
|
371
|
+
"prepend-icon": "approval",
|
372
|
+
disabled: !R.value,
|
373
|
+
label: "Approve Submission with Rates",
|
374
|
+
onClick: T,
|
375
|
+
loading: e(m)
|
376
|
+
}, null, 8, ["disabled", "loading"])
|
377
|
+
]),
|
378
|
+
n(W, { disabled: !0 }, {
|
379
|
+
default: c(() => [
|
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
|
+
n(p, {
|
384
|
+
modelValue: e(o).picName,
|
385
|
+
"onUpdate:modelValue": l[8] || (l[8] = (t) => e(o).picName = t),
|
386
|
+
label: "PIC Name",
|
387
|
+
placeholder: "Enter your name",
|
388
|
+
"label-mark": "required",
|
389
|
+
rules: e(u)(e(d).string().min(1, "PIC Name is required"))
|
390
|
+
}, null, 8, ["modelValue", "rules"])
|
391
|
+
]),
|
392
|
+
a("div", fe, [
|
393
|
+
n(p, {
|
394
|
+
modelValue: e(o).picRole,
|
395
|
+
"onUpdate:modelValue": l[9] || (l[9] = (t) => e(o).picRole = t),
|
396
|
+
label: "PIC Role",
|
397
|
+
placeholder: "Enter your role",
|
398
|
+
"label-mark": "required",
|
399
|
+
rules: e(u)(e(d).string().min(1, "PIC Role is required"))
|
400
|
+
}, null, 8, ["modelValue", "rules"])
|
401
|
+
]),
|
402
|
+
a("div", ke, [
|
403
|
+
n(p, {
|
404
|
+
modelValue: e(o).picEmail,
|
405
|
+
"onUpdate:modelValue": l[10] || (l[10] = (t) => e(o).picEmail = t),
|
406
|
+
label: "PIC Email",
|
407
|
+
type: "email",
|
408
|
+
placeholder: "Enter your email address",
|
409
|
+
"label-mark": "required",
|
410
|
+
rules: e(u)(e(d).string().min(1, "PIC Email is required"))
|
411
|
+
}, null, 8, ["modelValue", "rules"])
|
412
|
+
]),
|
413
|
+
a("div", Ce, [
|
414
|
+
n(Q, {
|
415
|
+
"model-value": e(o).picContact,
|
416
|
+
"onUpdate:modelValue": l[11] || (l[11] = (t) => e(o).picContact = t),
|
417
|
+
"default-country": "MY",
|
418
|
+
label: "PIC Contact",
|
419
|
+
"label-mark": "required",
|
420
|
+
rules: e(u)(e(d).string().min(1, "PIC Contact is required"))
|
421
|
+
}, null, 8, ["model-value", "rules"])
|
422
|
+
]),
|
423
|
+
a("div", Se, [
|
424
|
+
n(p, {
|
425
|
+
modelValue: e(o).outletName,
|
426
|
+
"onUpdate:modelValue": l[12] || (l[12] = (t) => e(o).outletName = t),
|
427
|
+
label: "Outlet Name",
|
428
|
+
placeholder: "Enter outlet name",
|
429
|
+
"label-mark": "required",
|
430
|
+
rules: e(u)(e(d).string().min(1, "Outlet Name is required"))
|
431
|
+
}, null, 8, ["modelValue", "rules"])
|
432
|
+
]),
|
433
|
+
a("div", Pe, [
|
434
|
+
n(p, {
|
435
|
+
modelValue: e(o).outletAddress,
|
436
|
+
"onUpdate:modelValue": l[13] || (l[13] = (t) => e(o).outletAddress = t),
|
437
|
+
label: "Outlet Address",
|
438
|
+
placeholder: "Enter outlet address",
|
439
|
+
"label-mark": "required",
|
440
|
+
rules: e(u)(e(d).string().min(1, "Address is required"))
|
441
|
+
}, null, 8, ["modelValue", "rules"])
|
442
|
+
]),
|
443
|
+
n(p, {
|
444
|
+
modelValue: e(o).outletPostCode,
|
445
|
+
"onUpdate:modelValue": l[14] || (l[14] = (t) => e(o).outletPostCode = t),
|
446
|
+
label: "Postal Code",
|
447
|
+
placeholder: "Enter postal code",
|
448
|
+
"label-mark": "required",
|
449
|
+
rules: e(u)(e(d).string().min(1, "Postal Code is required"))
|
450
|
+
}, null, 8, ["modelValue", "rules"]),
|
451
|
+
n(p, {
|
452
|
+
modelValue: e(o).outletState,
|
453
|
+
"onUpdate:modelValue": l[15] || (l[15] = (t) => e(o).outletState = t),
|
454
|
+
label: "State",
|
455
|
+
placeholder: "Enter state",
|
456
|
+
"label-mark": "required",
|
457
|
+
rules: e(u)(e(d).string().min(1, "State is required"))
|
458
|
+
}, null, 8, ["modelValue", "rules"]),
|
459
|
+
n(p, {
|
460
|
+
modelValue: e(o).outletCity,
|
461
|
+
"onUpdate:modelValue": l[16] || (l[16] = (t) => e(o).outletCity = t),
|
462
|
+
label: "City",
|
463
|
+
placeholder: "Enter city",
|
464
|
+
"label-mark": "required",
|
465
|
+
rules: e(u)(e(d).string().min(1, "City is required"))
|
466
|
+
}, null, 8, ["modelValue", "rules"]),
|
467
|
+
a("div", Fe, [
|
468
|
+
n(H, {
|
469
|
+
modelValue: e(o).businessType,
|
470
|
+
"onUpdate:modelValue": l[17] || (l[17] = (t) => e(o).businessType = t),
|
471
|
+
label: "Type",
|
472
|
+
placeholder: "Select business type",
|
473
|
+
"label-mark": "required",
|
474
|
+
rules: e(u)(e(d).string().min(1, "Business Type is required")),
|
475
|
+
items: [
|
476
|
+
{ label: "Sole Proprietorship", value: "sole_proprietorship" },
|
477
|
+
{ label: "Partnership", value: "partnership" },
|
478
|
+
{ label: "Private Limited Company (Sdn Bhd)", value: "private_limited" },
|
479
|
+
{ label: "Public Limited Company (Berhad)", value: "public_limited" }
|
480
|
+
]
|
481
|
+
}, null, 8, ["modelValue", "rules"])
|
482
|
+
]),
|
483
|
+
a("div", qe, [
|
484
|
+
n(p, {
|
485
|
+
modelValue: e(o).businessRegNo,
|
486
|
+
"onUpdate:modelValue": l[18] || (l[18] = (t) => e(o).businessRegNo = t),
|
487
|
+
label: "Registration No",
|
488
|
+
placeholder: "Enter registration number",
|
489
|
+
"label-mark": "required",
|
490
|
+
rules: e(u)(e(d).string().min(1, "Reg No is required"))
|
491
|
+
}, null, 8, ["modelValue", "rules"])
|
492
|
+
]),
|
493
|
+
a("div", we, [
|
494
|
+
n(p, {
|
495
|
+
modelValue: e(o).tinNo,
|
496
|
+
"onUpdate:modelValue": l[19] || (l[19] = (t) => e(o).tinNo = t),
|
497
|
+
label: "Tax Identification No (TIN)",
|
498
|
+
placeholder: "Enter your TIN number",
|
499
|
+
"label-mark": "required",
|
500
|
+
rules: e(u)(e(d).string().min(1, "TIN is required"))
|
501
|
+
}, null, 8, ["modelValue", "rules"])
|
502
|
+
]),
|
503
|
+
a("div", Ne, [
|
504
|
+
n(p, {
|
505
|
+
modelValue: e(o).sstNo,
|
506
|
+
"onUpdate:modelValue": l[20] || (l[20] = (t) => e(o).sstNo = t),
|
507
|
+
label: "SST Registration No (SST)",
|
508
|
+
placeholder: "Enter your SST number",
|
509
|
+
"label-mark": "required",
|
510
|
+
rules: e(u)(e(d).string().min(1, "SST No is required"))
|
511
|
+
}, null, 8, ["modelValue", "rules"])
|
512
|
+
])
|
513
|
+
]),
|
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
|
+
n(H, {
|
517
|
+
modelValue: e(o).bankName,
|
518
|
+
"onUpdate:modelValue": l[21] || (l[21] = (t) => e(o).bankName = t),
|
519
|
+
label: "Bank",
|
520
|
+
placeholder: "Select bank type",
|
521
|
+
"label-mark": "required",
|
522
|
+
rules: e(u)(e(d).string().min(1, "Bank Type is required")),
|
523
|
+
items: e(ee).bankNameOptions()
|
524
|
+
}, null, 8, ["modelValue", "rules", "items"]),
|
525
|
+
n(p, {
|
526
|
+
modelValue: e(o).bankHolderName,
|
527
|
+
"onUpdate:modelValue": l[22] || (l[22] = (t) => e(o).bankHolderName = t),
|
528
|
+
label: "Beneficiary Name",
|
529
|
+
placeholder: "Enter Beneficiary Name",
|
530
|
+
"label-mark": "required",
|
531
|
+
rules: e(u)(e(d).string().min(1, "Beneficiary Name is required"))
|
532
|
+
}, null, 8, ["modelValue", "rules"]),
|
533
|
+
n(p, {
|
534
|
+
modelValue: e(o).bankAccountNo,
|
535
|
+
"onUpdate:modelValue": l[23] || (l[23] = (t) => e(o).bankAccountNo = t),
|
536
|
+
label: "Account Number",
|
537
|
+
placeholder: "Enter Account Number",
|
538
|
+
"label-mark": "required",
|
539
|
+
rules: e(u)(e(d).string().min(1, "Account Number is required"))
|
540
|
+
}, null, 8, ["modelValue", "rules"]),
|
541
|
+
n(B, {
|
542
|
+
label: "Authorized Person ID",
|
543
|
+
modelValue: e(i).authorizedPersonID,
|
544
|
+
"onUpdate:modelValue": l[24] || (l[24] = (t) => e(i).authorizedPersonID = t),
|
545
|
+
type: "image"
|
546
|
+
}, null, 8, ["modelValue"]),
|
547
|
+
n(B, {
|
548
|
+
label: "Outlet Photo",
|
549
|
+
modelValue: e(i).outletPhoto,
|
550
|
+
"onUpdate:modelValue": l[25] || (l[25] = (t) => e(i).outletPhoto = t),
|
551
|
+
type: "image"
|
552
|
+
}, null, 8, ["modelValue"]),
|
553
|
+
n(B, {
|
554
|
+
label: "Latest Bank Statement",
|
555
|
+
modelValue: e(i).bankStatement,
|
556
|
+
"onUpdate:modelValue": l[26] || (l[26] = (t) => e(i).bankStatement = t),
|
557
|
+
type: "pdf"
|
558
|
+
}, null, 8, ["modelValue"]),
|
559
|
+
e(o).businessType === "private_limited" || e(o).businessType === "public_limited" ? (v(), _(B, {
|
560
|
+
key: 0,
|
561
|
+
label: "Superform",
|
562
|
+
type: "pdf",
|
563
|
+
modelValue: e(i).certificate,
|
564
|
+
"onUpdate:modelValue": l[27] || (l[27] = (t) => e(i).certificate = t)
|
565
|
+
}, null, 8, ["modelValue"])) : E("", !0),
|
566
|
+
e(o).businessType === "sole_proprietorship" || e(o).businessType === "partnership" ? (v(), _(B, {
|
567
|
+
key: 1,
|
568
|
+
label: "SSM Certificate & Info",
|
569
|
+
type: "pdf",
|
570
|
+
modelValue: e(i).certificate,
|
571
|
+
"onUpdate:modelValue": l[28] || (l[28] = (t) => e(i).certificate = t)
|
572
|
+
}, null, 8, ["modelValue"])) : E("", !0)
|
573
|
+
]),
|
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
|
+
n(re, {
|
577
|
+
modelValue: e(i).signature,
|
578
|
+
"onUpdate:modelValue": l[29] || (l[29] = (t) => e(i).signature = t),
|
579
|
+
label: "Signature"
|
580
|
+
}, null, 8, ["modelValue"]),
|
581
|
+
n(B, {
|
582
|
+
label: "Company Stamp",
|
583
|
+
type: "image",
|
584
|
+
modelValue: e(i).companyStamp,
|
585
|
+
"onUpdate:modelValue": l[30] || (l[30] = (t) => e(i).companyStamp = t)
|
586
|
+
}, null, 8, ["modelValue"])
|
587
|
+
])
|
588
|
+
]),
|
589
|
+
_: 1
|
590
|
+
})
|
591
|
+
], 64);
|
592
|
+
};
|
593
|
+
}
|
594
|
+
}), De = {
|
595
|
+
key: 0,
|
596
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
597
|
+
}, Ee = { class: "px-32 pb-32" }, He = /* @__PURE__ */ $({
|
598
|
+
__name: "OnboardForm",
|
599
|
+
props: {
|
600
|
+
submissionId: {
|
601
|
+
type: String,
|
602
|
+
required: !0
|
603
|
+
}
|
604
|
+
},
|
605
|
+
setup(x) {
|
606
|
+
const { startAsyncCall: U, isLoading: S } = M(), b = J(), k = x, F = h(), m = w(null);
|
607
|
+
X(() => {
|
608
|
+
U(async () => {
|
609
|
+
m.value = await j.readById(k.submissionId);
|
610
|
+
});
|
611
|
+
});
|
612
|
+
const g = L(() => {
|
613
|
+
if (!m.value) return null;
|
614
|
+
switch (m.value.type) {
|
615
|
+
case "softspace":
|
616
|
+
return Re;
|
617
|
+
default:
|
618
|
+
return null;
|
619
|
+
}
|
620
|
+
}), o = w(0);
|
621
|
+
function i(r) {
|
622
|
+
m.value = r, o.value = Date.now();
|
623
|
+
}
|
624
|
+
const C = async (r) => {
|
625
|
+
var V, q;
|
626
|
+
if (m.value)
|
627
|
+
switch (r) {
|
628
|
+
case "preview":
|
629
|
+
let f;
|
630
|
+
try {
|
631
|
+
f = b.open({
|
632
|
+
message: "Generating preview document...",
|
633
|
+
type: "info"
|
634
|
+
}), await j.previewDocument(
|
635
|
+
(V = m.value) == null ? void 0 : V._id
|
636
|
+
);
|
637
|
+
} catch (s) {
|
638
|
+
b.open({
|
639
|
+
type: "error",
|
640
|
+
title: "Error occurs when generating submission document",
|
641
|
+
message: A(s)
|
642
|
+
});
|
643
|
+
} finally {
|
644
|
+
f && b.close(f);
|
645
|
+
}
|
646
|
+
break;
|
647
|
+
case "send":
|
648
|
+
try {
|
649
|
+
b.open({
|
650
|
+
message: "Sending onboarding document...",
|
651
|
+
type: "info"
|
652
|
+
}), await j.sendDocument(
|
653
|
+
(q = m.value) == null ? void 0 : q._id
|
654
|
+
), b.open({
|
655
|
+
type: "success",
|
656
|
+
title: "Submission documents send successfully"
|
657
|
+
});
|
658
|
+
} catch (s) {
|
659
|
+
b.open({
|
660
|
+
type: "error",
|
661
|
+
title: "Error occurs when sending document",
|
662
|
+
message: A(s)
|
663
|
+
});
|
664
|
+
}
|
665
|
+
break;
|
666
|
+
}
|
667
|
+
};
|
668
|
+
return (r, V) => {
|
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}`,
|
677
|
+
"back-button": !0,
|
678
|
+
"onClick:back": V[0] || (V[0] = () => e(F).back()),
|
679
|
+
"onClick:action": C,
|
680
|
+
actions: [
|
681
|
+
{
|
682
|
+
label: "Preview Document",
|
683
|
+
value: "preview",
|
684
|
+
prependIcon: "preview"
|
685
|
+
},
|
686
|
+
{
|
687
|
+
label: "Send for Review",
|
688
|
+
value: "send",
|
689
|
+
isPrimary: !0,
|
690
|
+
prependIcon: "send"
|
691
|
+
}
|
692
|
+
]
|
693
|
+
}, null, 8, ["title", "description"]),
|
694
|
+
a("div", Ee, [
|
695
|
+
(v(), _(Z(g.value), {
|
696
|
+
key: o.value,
|
697
|
+
submission: m.value,
|
698
|
+
"onUpdate:submission": i
|
699
|
+
}, null, 40, ["submission"]))
|
700
|
+
])
|
701
|
+
], 64));
|
702
|
+
};
|
703
|
+
}
|
704
|
+
});
|
705
|
+
export {
|
706
|
+
He as default
|
707
|
+
};
|