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