@feedmepos/mf-payment 1.2.27 → 1.2.29
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-BwHRuUJ2.js +709 -0
- package/dist/OnboardForm-DtdgTAfM.js +671 -0
- package/dist/OnboardSubmission-Cuzay_2u.js +148 -0
- package/dist/OnboardSubmission-TvoVrbT8.js +146 -0
- package/dist/{PDFViewer-xrBtzrlR.js → PDFViewer-DlSCBBxr.js} +14 -12
- package/dist/{PayoutAccount-mlaDc7_i.js → PayoutAccount-DM-Uh5AW.js} +8 -7
- package/dist/{PayoutAccount-DI5YpzGm.js → PayoutAccount-D_oz3IN_.js} +5 -5
- 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-DB_fctP1.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-MqVn-IaA.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-6yMkxM2O.js +458 -0
- package/dist/plugins-BLG_oAxW.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,709 @@
|
|
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";
|
3
|
+
import { u as M } from "./index-BasdAonL.js";
|
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";
|
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 ae = ["src"], _ = /* @__PURE__ */ $({
|
12
|
+
__name: "UploadButton",
|
13
|
+
props: {
|
14
|
+
modelValue: {},
|
15
|
+
label: {},
|
16
|
+
type: {}
|
17
|
+
},
|
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, {
|
33
|
+
key: 0,
|
34
|
+
'"': ""
|
35
|
+
}, {
|
36
|
+
"dialog-button": c(() => [
|
37
|
+
n(u, {
|
38
|
+
class: "mt-4",
|
39
|
+
"prepend-icon": "preview",
|
40
|
+
label: "Preview"
|
41
|
+
})
|
42
|
+
]),
|
43
|
+
"dialog-header": c(() => a[0] || (a[0] = [
|
44
|
+
o("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" ? (y(), x("img", {
|
57
|
+
key: 1,
|
58
|
+
src: b.value
|
59
|
+
}, null, 8, ae)) : E("", !0)
|
60
|
+
], 64)) : (y(), j(r, {
|
61
|
+
key: 1,
|
62
|
+
accept: i.value,
|
63
|
+
onFileUpload: F
|
64
|
+
}, null, 8, ["accept"]))
|
65
|
+
]);
|
66
|
+
};
|
67
|
+
}
|
68
|
+
}), oe = ["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(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);
|
85
|
+
for (; s--; )
|
86
|
+
q[s] = C.charCodeAt(s);
|
87
|
+
return new File([q], r, { type: w });
|
88
|
+
}
|
89
|
+
const u = function() {
|
90
|
+
const { isEmpty: k, data: r } = i.value.saveSignature();
|
91
|
+
if (k)
|
92
|
+
return F.value = !0;
|
93
|
+
f.value = r, g.value = !1, b("update:modelValue", a(r, "signature.png"));
|
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", {
|
99
|
+
key: 0,
|
100
|
+
src: f.value,
|
101
|
+
alt: "Signature Preview",
|
102
|
+
class: "w-full h-auto"
|
103
|
+
}, null, 8, oe)) : E("", !0),
|
104
|
+
f.value ? E("", !0) : (y(), j(C, {
|
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
|
+
o("div", null, "Signature Board", -1)
|
118
|
+
])),
|
119
|
+
default: c(() => [
|
120
|
+
n(w, {
|
121
|
+
ref_key: "signaturePad",
|
122
|
+
ref: i,
|
123
|
+
height: "300px",
|
124
|
+
customStyle: { border: "2px solid #ccc", borderRadius: "3px" },
|
125
|
+
options: { penColor: "#000000" }
|
126
|
+
}, null, 512),
|
127
|
+
F.value ? (y(), x("p", ne, " Please sign your signature before saving. ")) : E("", !0),
|
128
|
+
o("div", se, [
|
129
|
+
n(V, {
|
130
|
+
variant: "destructive",
|
131
|
+
label: "Clear",
|
132
|
+
"prepend-icon": "delete",
|
133
|
+
onClick: r[0] || (r[0] = (s) => i.value.clearSignature())
|
134
|
+
}),
|
135
|
+
n(V, {
|
136
|
+
label: "Save",
|
137
|
+
"prepend-icon": "save",
|
138
|
+
onClick: u
|
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" }, 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__ */ $({
|
148
|
+
__name: "SoftspaceSubmission",
|
149
|
+
props: {
|
150
|
+
submission: {
|
151
|
+
type: Object,
|
152
|
+
required: !0
|
153
|
+
}
|
154
|
+
},
|
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}`])) : {
|
158
|
+
mydebitCard: "0",
|
159
|
+
localDebit: "0",
|
160
|
+
localCredit: "0",
|
161
|
+
foreignCard: "0",
|
162
|
+
jcbStandard: "0",
|
163
|
+
jcbPlatinum: "0"
|
164
|
+
}), q = L(
|
165
|
+
() => Object.values(s.value).every((P) => parseFloat(P) > 0)
|
166
|
+
), U = () => g(async () => {
|
167
|
+
try {
|
168
|
+
const P = await T.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, f.open({
|
180
|
+
type: "success",
|
181
|
+
title: "Submission updated successfully"
|
182
|
+
});
|
183
|
+
} catch (P) {
|
184
|
+
f.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 T.reviewById(S.submission._id, {
|
193
|
+
status: "rejected",
|
194
|
+
statusReason: C.value
|
195
|
+
});
|
196
|
+
b("update:submission", P), F.value = !1, f.open({
|
197
|
+
type: "success",
|
198
|
+
title: "Submission updated successfully"
|
199
|
+
});
|
200
|
+
} catch (P) {
|
201
|
+
f.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 = 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)
|
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)
|
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)
|
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)
|
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, [
|
231
|
+
n(te, { data: e(V) }, null, 8, ["data"])
|
232
|
+
])
|
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)
|
237
|
+
])
|
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, [
|
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(d)(e(m).string().min(1, "Rate is required"))
|
250
|
+
}, {
|
251
|
+
append: c(() => l[37] || (l[37] = [
|
252
|
+
B("%")
|
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(d)(e(m).string().min(1, "Rate is required"))
|
265
|
+
}, {
|
266
|
+
append: c(() => l[38] || (l[38] = [
|
267
|
+
B("%")
|
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(d)(e(m).string().min(1, "Rate is required"))
|
280
|
+
}, {
|
281
|
+
append: c(() => l[39] || (l[39] = [
|
282
|
+
B("%")
|
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(d)(e(m).string().min(1, "Rate is required"))
|
295
|
+
}, {
|
296
|
+
append: c(() => l[40] || (l[40] = [
|
297
|
+
B("%")
|
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(d)(e(m).string().min(1, "Rate is required"))
|
310
|
+
}, {
|
311
|
+
append: c(() => l[41] || (l[41] = [
|
312
|
+
B("%")
|
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(d)(e(m).string().min(1, "Rate is required"))
|
325
|
+
}, {
|
326
|
+
append: c(() => l[42] || (l[42] = [
|
327
|
+
B("%")
|
328
|
+
])),
|
329
|
+
_: 1
|
330
|
+
}, 8, ["modelValue", "rules"])
|
331
|
+
]),
|
332
|
+
o("div", ve, [
|
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(i),
|
344
|
+
label: "Reject Submission"
|
345
|
+
}, null, 8, ["loading"])
|
346
|
+
]),
|
347
|
+
"dialog-header": c(() => l[43] || (l[43] = [
|
348
|
+
o("div", null, "Rejecting Submission", -1)
|
349
|
+
])),
|
350
|
+
default: c(() => [
|
351
|
+
n(K, {
|
352
|
+
modelValue: C.value,
|
353
|
+
"onUpdate:modelValue": l[6] || (l[6] = (t) => C.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(i)
|
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: !q.value,
|
373
|
+
label: "Approve Submission with Rates",
|
374
|
+
onClick: U,
|
375
|
+
loading: e(i)
|
376
|
+
}, null, 8, ["disabled", "loading"])
|
377
|
+
]),
|
378
|
+
n(W, { disabled: !0 }, {
|
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, [
|
383
|
+
n(p, {
|
384
|
+
modelValue: e(a).picName,
|
385
|
+
"onUpdate:modelValue": l[8] || (l[8] = (t) => e(a).picName = t),
|
386
|
+
label: "PIC Name",
|
387
|
+
placeholder: "Enter your name",
|
388
|
+
"label-mark": "required",
|
389
|
+
rules: e(d)(e(m).string().min(1, "PIC Name is required"))
|
390
|
+
}, null, 8, ["modelValue", "rules"])
|
391
|
+
]),
|
392
|
+
o("div", fe, [
|
393
|
+
n(p, {
|
394
|
+
modelValue: e(a).picRole,
|
395
|
+
"onUpdate:modelValue": l[9] || (l[9] = (t) => e(a).picRole = t),
|
396
|
+
label: "PIC Role",
|
397
|
+
placeholder: "Enter your role",
|
398
|
+
"label-mark": "required",
|
399
|
+
rules: e(d)(e(m).string().min(1, "PIC Role is required"))
|
400
|
+
}, null, 8, ["modelValue", "rules"])
|
401
|
+
]),
|
402
|
+
o("div", ke, [
|
403
|
+
n(p, {
|
404
|
+
modelValue: e(a).picEmail,
|
405
|
+
"onUpdate:modelValue": l[10] || (l[10] = (t) => e(a).picEmail = t),
|
406
|
+
label: "PIC Email",
|
407
|
+
type: "email",
|
408
|
+
placeholder: "Enter your email address",
|
409
|
+
"label-mark": "required",
|
410
|
+
rules: e(d)(e(m).string().min(1, "PIC Email is required"))
|
411
|
+
}, null, 8, ["modelValue", "rules"])
|
412
|
+
]),
|
413
|
+
o("div", Ce, [
|
414
|
+
n(Q, {
|
415
|
+
"model-value": e(a).picContact,
|
416
|
+
"onUpdate:modelValue": l[11] || (l[11] = (t) => e(a).picContact = t),
|
417
|
+
"default-country": "MY",
|
418
|
+
label: "PIC Contact",
|
419
|
+
"label-mark": "required",
|
420
|
+
rules: e(d)(e(m).string().min(1, "PIC Contact is required"))
|
421
|
+
}, null, 8, ["model-value", "rules"])
|
422
|
+
]),
|
423
|
+
o("div", Se, [
|
424
|
+
n(p, {
|
425
|
+
modelValue: e(a).outletName,
|
426
|
+
"onUpdate:modelValue": l[12] || (l[12] = (t) => e(a).outletName = t),
|
427
|
+
label: "Outlet Name",
|
428
|
+
placeholder: "Enter outlet name",
|
429
|
+
"label-mark": "required",
|
430
|
+
rules: e(d)(e(m).string().min(1, "Outlet Name is required"))
|
431
|
+
}, null, 8, ["modelValue", "rules"])
|
432
|
+
]),
|
433
|
+
o("div", Pe, [
|
434
|
+
n(p, {
|
435
|
+
modelValue: e(a).outletAddress,
|
436
|
+
"onUpdate:modelValue": l[13] || (l[13] = (t) => e(a).outletAddress = t),
|
437
|
+
label: "Outlet Address",
|
438
|
+
placeholder: "Enter outlet address",
|
439
|
+
"label-mark": "required",
|
440
|
+
rules: e(d)(e(m).string().min(1, "Address is required"))
|
441
|
+
}, null, 8, ["modelValue", "rules"])
|
442
|
+
]),
|
443
|
+
n(p, {
|
444
|
+
modelValue: e(a).outletPostCode,
|
445
|
+
"onUpdate:modelValue": l[14] || (l[14] = (t) => e(a).outletPostCode = t),
|
446
|
+
label: "Postal Code",
|
447
|
+
placeholder: "Enter postal code",
|
448
|
+
"label-mark": "required",
|
449
|
+
rules: e(d)(e(m).string().min(1, "Postal Code is required"))
|
450
|
+
}, null, 8, ["modelValue", "rules"]),
|
451
|
+
n(p, {
|
452
|
+
modelValue: e(a).outletState,
|
453
|
+
"onUpdate:modelValue": l[15] || (l[15] = (t) => e(a).outletState = t),
|
454
|
+
label: "State",
|
455
|
+
placeholder: "Enter state",
|
456
|
+
"label-mark": "required",
|
457
|
+
rules: e(d)(e(m).string().min(1, "State is required"))
|
458
|
+
}, null, 8, ["modelValue", "rules"]),
|
459
|
+
n(p, {
|
460
|
+
modelValue: e(a).outletCity,
|
461
|
+
"onUpdate:modelValue": l[16] || (l[16] = (t) => e(a).outletCity = t),
|
462
|
+
label: "City",
|
463
|
+
placeholder: "Enter city",
|
464
|
+
"label-mark": "required",
|
465
|
+
rules: e(d)(e(m).string().min(1, "City is required"))
|
466
|
+
}, null, 8, ["modelValue", "rules"]),
|
467
|
+
o("div", Fe, [
|
468
|
+
n(H, {
|
469
|
+
modelValue: e(a).businessType,
|
470
|
+
"onUpdate:modelValue": l[17] || (l[17] = (t) => e(a).businessType = t),
|
471
|
+
label: "Type",
|
472
|
+
placeholder: "Select business type",
|
473
|
+
"label-mark": "required",
|
474
|
+
rules: e(d)(e(m).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
|
+
o("div", qe, [
|
484
|
+
n(p, {
|
485
|
+
modelValue: e(a).businessRegNo,
|
486
|
+
"onUpdate:modelValue": l[18] || (l[18] = (t) => e(a).businessRegNo = t),
|
487
|
+
label: "Registration No",
|
488
|
+
placeholder: "Enter registration number",
|
489
|
+
"label-mark": "required",
|
490
|
+
rules: e(d)(e(m).string().min(1, "Reg No is required"))
|
491
|
+
}, null, 8, ["modelValue", "rules"])
|
492
|
+
]),
|
493
|
+
o("div", we, [
|
494
|
+
n(p, {
|
495
|
+
modelValue: e(a).tinNo,
|
496
|
+
"onUpdate:modelValue": l[19] || (l[19] = (t) => e(a).tinNo = t),
|
497
|
+
label: "Tax Identification No (TIN)",
|
498
|
+
placeholder: "Enter your TIN number",
|
499
|
+
"label-mark": "required",
|
500
|
+
rules: e(d)(e(m).string().min(1, "TIN is required"))
|
501
|
+
}, null, 8, ["modelValue", "rules"])
|
502
|
+
]),
|
503
|
+
o("div", Ne, [
|
504
|
+
n(p, {
|
505
|
+
modelValue: e(a).sstNo,
|
506
|
+
"onUpdate:modelValue": l[20] || (l[20] = (t) => e(a).sstNo = t),
|
507
|
+
label: "SST Registration No (SST)",
|
508
|
+
placeholder: "Enter your SST number",
|
509
|
+
"label-mark": "required",
|
510
|
+
rules: e(d)(e(m).string().min(1, "SST No is required"))
|
511
|
+
}, null, 8, ["modelValue", "rules"])
|
512
|
+
])
|
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, [
|
516
|
+
n(H, {
|
517
|
+
modelValue: e(a).bankName,
|
518
|
+
"onUpdate:modelValue": l[21] || (l[21] = (t) => e(a).bankName = t),
|
519
|
+
label: "Bank",
|
520
|
+
placeholder: "Select bank type",
|
521
|
+
"label-mark": "required",
|
522
|
+
rules: e(d)(e(m).string().min(1, "Bank Type is required")),
|
523
|
+
items: e(ee).bankNameOptions()
|
524
|
+
}, null, 8, ["modelValue", "rules", "items"]),
|
525
|
+
n(p, {
|
526
|
+
modelValue: e(a).bankHolderName,
|
527
|
+
"onUpdate:modelValue": l[22] || (l[22] = (t) => e(a).bankHolderName = t),
|
528
|
+
label: "Beneficiary Name",
|
529
|
+
placeholder: "Enter Beneficiary Name",
|
530
|
+
"label-mark": "required",
|
531
|
+
rules: e(d)(e(m).string().min(1, "Beneficiary Name is required"))
|
532
|
+
}, null, 8, ["modelValue", "rules"]),
|
533
|
+
n(p, {
|
534
|
+
modelValue: e(a).bankAccountNo,
|
535
|
+
"onUpdate:modelValue": l[23] || (l[23] = (t) => e(a).bankAccountNo = t),
|
536
|
+
label: "Account Number",
|
537
|
+
placeholder: "Enter Account Number",
|
538
|
+
"label-mark": "required",
|
539
|
+
rules: e(d)(e(m).string().min(1, "Account Number is required"))
|
540
|
+
}, null, 8, ["modelValue", "rules"]),
|
541
|
+
n(_, {
|
542
|
+
label: "Authorized Person ID",
|
543
|
+
modelValue: e(u).authorizedPersonID,
|
544
|
+
"onUpdate:modelValue": l[24] || (l[24] = (t) => e(u).authorizedPersonID = t),
|
545
|
+
type: "image"
|
546
|
+
}, null, 8, ["modelValue"]),
|
547
|
+
n(_, {
|
548
|
+
label: "Outlet Photo",
|
549
|
+
modelValue: e(u).outletPhoto,
|
550
|
+
"onUpdate:modelValue": l[25] || (l[25] = (t) => e(u).outletPhoto = t),
|
551
|
+
type: "image"
|
552
|
+
}, null, 8, ["modelValue"]),
|
553
|
+
n(_, {
|
554
|
+
label: "Latest Bank Statement",
|
555
|
+
modelValue: e(u).bankStatement,
|
556
|
+
"onUpdate:modelValue": l[26] || (l[26] = (t) => e(u).bankStatement = t),
|
557
|
+
type: "pdf"
|
558
|
+
}, null, 8, ["modelValue"]),
|
559
|
+
e(a).businessType === "private_limited" || e(a).businessType === "public_limited" ? (y(), j(_, {
|
560
|
+
key: 0,
|
561
|
+
label: "Superform",
|
562
|
+
type: "pdf",
|
563
|
+
modelValue: e(u).certificate,
|
564
|
+
"onUpdate:modelValue": l[27] || (l[27] = (t) => e(u).certificate = t)
|
565
|
+
}, null, 8, ["modelValue"])) : E("", !0),
|
566
|
+
e(a).businessType === "sole_proprietorship" || e(a).businessType === "partnership" ? (y(), j(_, {
|
567
|
+
key: 1,
|
568
|
+
label: "SSM Certificate & Info",
|
569
|
+
type: "pdf",
|
570
|
+
modelValue: e(u).certificate,
|
571
|
+
"onUpdate:modelValue": l[28] || (l[28] = (t) => e(u).certificate = t)
|
572
|
+
}, null, 8, ["modelValue"])) : E("", !0)
|
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, [
|
576
|
+
n(re, {
|
577
|
+
modelValue: e(u).signature,
|
578
|
+
"onUpdate:modelValue": l[29] || (l[29] = (t) => e(u).signature = t),
|
579
|
+
label: "Signature"
|
580
|
+
}, null, 8, ["modelValue"]),
|
581
|
+
n(_, {
|
582
|
+
label: "Company Stamp",
|
583
|
+
type: "image",
|
584
|
+
modelValue: e(u).companyStamp,
|
585
|
+
"onUpdate:modelValue": l[30] || (l[30] = (t) => e(u).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
|
+
}, Ie = { class: "px-32 pb-32" }, He = /* @__PURE__ */ $({
|
598
|
+
__name: "OnboardForm",
|
599
|
+
props: {
|
600
|
+
submissionId: {
|
601
|
+
type: String,
|
602
|
+
required: !0
|
603
|
+
}
|
604
|
+
},
|
605
|
+
setup(R) {
|
606
|
+
const { startAsyncCall: D, isLoading: S } = M(), b = J(), f = R, F = h(), i = N(null);
|
607
|
+
X(() => {
|
608
|
+
D(async () => {
|
609
|
+
i.value = await T.readById(f.submissionId);
|
610
|
+
});
|
611
|
+
});
|
612
|
+
const g = L(() => {
|
613
|
+
if (!i.value) return null;
|
614
|
+
switch (i.value.type) {
|
615
|
+
case "softspace":
|
616
|
+
return Re;
|
617
|
+
default:
|
618
|
+
return null;
|
619
|
+
}
|
620
|
+
}), a = N(0);
|
621
|
+
function u(r) {
|
622
|
+
i.value = r, a.value = Date.now();
|
623
|
+
}
|
624
|
+
const k = async (r) => {
|
625
|
+
var V, w, C, s;
|
626
|
+
if (i.value)
|
627
|
+
switch (r) {
|
628
|
+
case "preview":
|
629
|
+
let q;
|
630
|
+
try {
|
631
|
+
q = b.open({
|
632
|
+
message: "Generating preview document...",
|
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
|
637
|
+
);
|
638
|
+
} catch (U) {
|
639
|
+
b.open({
|
640
|
+
type: "error",
|
641
|
+
title: "Error occurs when generating submission document",
|
642
|
+
message: A(U)
|
643
|
+
});
|
644
|
+
} finally {
|
645
|
+
q && b.close(q);
|
646
|
+
}
|
647
|
+
break;
|
648
|
+
case "send":
|
649
|
+
try {
|
650
|
+
b.open({
|
651
|
+
message: "Sending onboarding document...",
|
652
|
+
type: "info"
|
653
|
+
}), await T.sendDocument(
|
654
|
+
(C = i.value) == null ? void 0 : C.restaurantId,
|
655
|
+
(s = i.value) == null ? void 0 : s._id
|
656
|
+
), b.open({
|
657
|
+
type: "success",
|
658
|
+
title: "Submission documents send successfully"
|
659
|
+
});
|
660
|
+
} catch (U) {
|
661
|
+
b.open({
|
662
|
+
type: "error",
|
663
|
+
title: "Error occurs when sending document",
|
664
|
+
message: A(U)
|
665
|
+
});
|
666
|
+
}
|
667
|
+
break;
|
668
|
+
}
|
669
|
+
};
|
670
|
+
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}`,
|
679
|
+
"back-button": !0,
|
680
|
+
"onClick:back": V[0] || (V[0] = () => e(F).back()),
|
681
|
+
"onClick:action": k,
|
682
|
+
actions: [
|
683
|
+
{
|
684
|
+
label: "Preview Document",
|
685
|
+
value: "preview",
|
686
|
+
prependIcon: "preview"
|
687
|
+
},
|
688
|
+
{
|
689
|
+
label: "Send for Review",
|
690
|
+
value: "send",
|
691
|
+
isPrimary: !0,
|
692
|
+
prependIcon: "send"
|
693
|
+
}
|
694
|
+
]
|
695
|
+
}, 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
|
701
|
+
}, null, 40, ["submission"]))
|
702
|
+
])
|
703
|
+
], 64));
|
704
|
+
};
|
705
|
+
}
|
706
|
+
});
|
707
|
+
export {
|
708
|
+
He as default
|
709
|
+
};
|