@feedmepos/mf-payment 1.10.12-dev → 1.11.2-dev
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/{Actions.vue_vue_type_script_setup_true_lang-DQ6b6ka6.js → Actions.vue_vue_type_script_setup_true_lang-CqIH_Wgb.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-o9d1MbP6.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-B_xS0a4g.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DPX2tK6O.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-DT0T1HyB.js} +3 -3
- package/dist/{Chargeback-BK3Knpvw.js → Chargeback-It_ypMRE.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-BHjfNVE1.js → DocumentViewer.vue_vue_type_script_setup_true_lang-a-bX5Lqt.js} +1 -1
- package/dist/{ExternalTerminal-CjJ1_NWZ.js → ExternalTerminal-CE8tlcy4.js} +6 -6
- package/dist/OnboardForm-BeDDUdY1.js +1665 -0
- package/dist/{OnboardForm-CC9evxPa.js → OnboardForm-CMWpL-JX.js} +6 -6
- package/dist/{OnboardSubmission-Q3TFyj7q.js → OnboardSubmission-0iohV3ip.js} +6 -6
- package/dist/{OnboardSubmission-Bq17sJEw.js → OnboardSubmission-C6-zMQAT.js} +3 -3
- package/dist/{PaymentCheckout-DuBWXJ7J.js → PaymentCheckout-BoPQVDtI.js} +2 -2
- package/dist/{PayoutAccount-BtpxwPIL.js → PayoutAccount-Bsmw4uY_.js} +7 -7
- package/dist/{PayoutAccount-JuYzRI09.js → PayoutAccount-D82rrOiB.js} +5 -5
- package/dist/{PayoutAccountSetting-BUxg8C3e.js → PayoutAccountSetting-CXqXa7kJ.js} +6 -6
- package/dist/{Restaurant-CUXKmf5_.js → Restaurant-Da_0RO2P.js} +4 -4
- package/dist/{RestaurantSetting-ahYgoZQu.js → RestaurantSetting-CyN2zPoR.js} +3 -3
- package/dist/{Settlement-CUV-HfVC.js → Settlement-CJMu94mC.js} +3 -3
- package/dist/{Settlement-DPb549PU.js → Settlement-D1lIUjuP.js} +4 -4
- package/dist/{SettlementTransactions-DNNLmFfY.js → SettlementTransactions-i6dvSl8W.js} +5 -5
- package/dist/{SettlementTransactions-l3b8YO2c.js → SettlementTransactions-nLyTOQ-V.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-v7piP5aI.js → Status.vue_vue_type_script_setup_true_lang-DHG1EsIG.js} +1 -1
- package/dist/{Terminal-C8jwG3Cv.js → Terminal-BXruPbvM.js} +6 -6
- package/dist/{TerminalSetting-wW8AIAGH.js → TerminalSetting-CIGLCOnF.js} +7 -7
- package/dist/{TerminalTemplate-DHiugzSC.js → TerminalTemplate-z1A0N8mF.js} +5 -5
- package/dist/{TerminalTemplateSetting-DA50VCKg.js → TerminalTemplateSetting-D2Jid3yh.js} +5 -5
- package/dist/{Transaction-CzTTkQri.js → Transaction-DL80OHFr.js} +10 -10
- package/dist/{Transaction-CZRCv-3t.js → Transaction-xsD36tW9.js} +12 -12
- package/dist/{TransactionOld-D-4iUrDw.js → TransactionOld-DrKIK5TU.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-CHcGrTSW.js → TransactionStatus.vue_vue_type_script_setup_true_lang-DPh45qkC.js} +1 -1
- package/dist/{app-BmFJOd-Z.js → app-CwZzGMXK.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/assets-KuiA079r.js +96 -0
- package/dist/{grafana-DhemMHSo.js → grafana-BZzc7TR-.js} +1 -1
- package/dist/{index-_O7z64Rk.js → index-BVoFRJi1.js} +1 -1
- package/dist/{index-Dtk_lPn7.js → index-BnZM1Wro.js} +1 -1
- package/dist/{index-RC1zD9dC.js → index-Bz6BKvMi.js} +1 -1
- package/dist/{index-CUSLUawv.js → index-C7DEHzTj.js} +2 -2
- package/dist/{index-fs6f3Sbe.js → index-CFxKxXOi.js} +1 -1
- package/dist/{index-DjHETHgh.js → index-COlUvaZo.js} +1 -1
- package/dist/{index-BSmZ1Vyk.js → index-D0glLFof.js} +1 -1
- package/dist/{index-CVCyz5Yi.js → index-Df1bsmVD.js} +1 -1
- package/dist/{index-D4pYdk0h.js → index-VKGN9Hxm.js} +1 -1
- package/dist/{index-3wP84h0B.js → index-hp52-LCN.js} +1 -1
- package/dist/{index-C8AxHnhC.js → index-ltUJL3fo.js} +26 -13
- package/dist/{index.vue_vue_type_script_setup_true_lang-DuAmnioV.js → index.vue_vue_type_script_setup_true_lang-CO65xxRe.js} +1 -1
- package/dist/{onboard-submission-D66nrLNT.js → onboard-submission-BiO6l0wG.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-DZIq3q35.js → payout-account-BUu5dzD8.js} +16 -15
- package/dist/stores/payoutAccount.d.ts +12 -12
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useQuery-D4qzUQ-g.js → useQuery-BJBSQTRU.js} +1 -1
- package/dist/views/admin/external-terminal/ExternalTerminalPairDialog.vue.d.ts +28 -18
- package/dist/views/admin/external-terminal/ExternalTerminalSideSheet.vue.d.ts +46 -26
- package/dist/views/admin/external-terminal/pair/BRITerminal.vue.d.ts +28 -18
- package/dist/views/admin/external-terminal/pair/BeamTerminal.vue.d.ts +28 -18
- package/dist/views/admin/onboard-submission/cell/Timeline.vue.d.ts +20 -0
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +28 -0
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +28 -0
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +28 -0
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +12 -12
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +12 -12
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +12 -12
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +16 -16
- package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
- 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/KsherGateway.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/gateway/TyroGateway.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
- package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
- package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
- 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 +4 -4
- package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -6
- package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +8 -8
- package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -6
- package/dist/views/admin/settlement/SettlementTable.vue.d.ts +12 -12
- package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +66 -66
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +66 -66
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +26 -26
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +14 -14
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +14 -14
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +24 -24
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +56 -56
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +28 -28
- package/dist/views/settlement/SettlementTable.vue.d.ts +12 -12
- package/package.json +2 -2
- package/dist/OnboardForm-fd3VsDJx.js +0 -1520
- package/dist/assets-CTtKWVYg.js +0 -96
|
@@ -1,1520 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, ref as j, computed as z, resolveComponent as N, openBlock as d, createElementBlock as w, createElementVNode as a, toDisplayString as F, createBlock as D, withCtx as f, createCommentVNode as $, createVNode as n, unref as e, Fragment as K, renderList as G, createTextVNode as J, onMounted as Ve, resolveDynamicComponent as ve } from "vue";
|
|
2
|
-
import { o as M } from "./index-CUSLUawv.js";
|
|
3
|
-
import { u as ee, p as de } from "./index-C8AxHnhC.js";
|
|
4
|
-
import { useRouter as fe } from "vue-router";
|
|
5
|
-
import { z as i, a as u } from "./validator-CTlVogBQ.js";
|
|
6
|
-
import { P as ke } from "./payout-account-DZIq3q35.js";
|
|
7
|
-
import { a as Ce } from "./onboard-submission-D66nrLNT.js";
|
|
8
|
-
import { _ as me } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-BHjfNVE1.js";
|
|
9
|
-
import { s as Ne } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
10
|
-
import { _ as pe } from "./Status.vue_vue_type_script_setup_true_lang-v7piP5aI.js";
|
|
11
|
-
import { useSnackbar as oe } from "@feedmepos/ui-library";
|
|
12
|
-
import { u as Q } from "./error-K1CakhA9.js";
|
|
13
|
-
const Se = ["src"], re = ".png, .jpg, .jpeg", ie = ".pdf", P = /* @__PURE__ */ X({
|
|
14
|
-
__name: "UploadButton",
|
|
15
|
-
props: {
|
|
16
|
-
modelValue: {},
|
|
17
|
-
label: {},
|
|
18
|
-
type: {},
|
|
19
|
-
restaurantId: {}
|
|
20
|
-
},
|
|
21
|
-
emits: ["update:modelValue"],
|
|
22
|
-
setup(m, { emit: O }) {
|
|
23
|
-
const c = m, k = j(c.modelValue), y = O, I = (r) => {
|
|
24
|
-
const R = new FileReader();
|
|
25
|
-
R.onload = (V) => {
|
|
26
|
-
var U;
|
|
27
|
-
k.value = (U = V.target) == null ? void 0 : U.result, y("update:modelValue", r);
|
|
28
|
-
}, R.readAsDataURL(r);
|
|
29
|
-
}, g = (r) => {
|
|
30
|
-
window.open(r, "_blank", "noopener,noreferrer");
|
|
31
|
-
}, B = z(() => c.type === "image" ? re : c.type === "pdf" ? ie : `${re}, ${ie}`), o = (r) => c.type === "pdf" ? !0 : c.type === "image" ? !1 : r === "application/pdf";
|
|
32
|
-
return (r, R) => {
|
|
33
|
-
const V = N("FmButton"), U = N("FmDropField");
|
|
34
|
-
return d(), w("div", null, [
|
|
35
|
-
a("p", null, F(m.label), 1),
|
|
36
|
-
k.value ? (d(), D(me, {
|
|
37
|
-
key: 0,
|
|
38
|
-
document: k.value,
|
|
39
|
-
"restaurant-id": m.restaurantId
|
|
40
|
-
}, {
|
|
41
|
-
default: f(({ src: x, type: q }) => [
|
|
42
|
-
o(q) ? (d(), D(V, {
|
|
43
|
-
key: 1,
|
|
44
|
-
class: "mt-4 w-full",
|
|
45
|
-
"prepend-icon": "manage_accounts",
|
|
46
|
-
label: "View Document",
|
|
47
|
-
variant: "primary",
|
|
48
|
-
onVnodeMounted: () => g(x),
|
|
49
|
-
onClick: () => g(x)
|
|
50
|
-
}, null, 8, ["onVnodeMounted", "onClick"])) : (d(), w("img", {
|
|
51
|
-
key: 0,
|
|
52
|
-
src: x
|
|
53
|
-
}, null, 8, Se))
|
|
54
|
-
]),
|
|
55
|
-
_: 1
|
|
56
|
-
}, 8, ["document", "restaurant-id"])) : (d(), D(U, {
|
|
57
|
-
key: 1,
|
|
58
|
-
accept: B.value,
|
|
59
|
-
onFileUpload: I
|
|
60
|
-
}, null, 8, ["accept"]))
|
|
61
|
-
]);
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
}), Pe = ["src"], qe = {
|
|
65
|
-
key: 0,
|
|
66
|
-
class: "text-center text-red-700 py-4"
|
|
67
|
-
}, we = { class: "flex justify-evenly py-3" }, Ie = /* @__PURE__ */ X({
|
|
68
|
-
__name: "SignatureBoard",
|
|
69
|
-
props: {
|
|
70
|
-
modelValue: {},
|
|
71
|
-
label: {},
|
|
72
|
-
restaurantId: {}
|
|
73
|
-
},
|
|
74
|
-
emits: ["update:modelValue"],
|
|
75
|
-
setup(m, { emit: O }) {
|
|
76
|
-
const c = m, k = O, y = j(c.modelValue), I = j(!1), g = j(), B = j(!1);
|
|
77
|
-
function o(R, V) {
|
|
78
|
-
var E;
|
|
79
|
-
const U = R.split(","), x = ((E = U[0].match(/:(.*?);/)) == null ? void 0 : E[1]) || "", q = atob(U[1]);
|
|
80
|
-
let A = q.length;
|
|
81
|
-
const p = new Uint8Array(A);
|
|
82
|
-
for (; A--; )
|
|
83
|
-
p[A] = q.charCodeAt(A);
|
|
84
|
-
return new File([p], V, { type: x });
|
|
85
|
-
}
|
|
86
|
-
const r = function() {
|
|
87
|
-
const { isEmpty: R, data: V } = g.value.saveSignature();
|
|
88
|
-
if (R)
|
|
89
|
-
return I.value = !0;
|
|
90
|
-
y.value = V, B.value = !1, k("update:modelValue", o(V, "signature.png"));
|
|
91
|
-
};
|
|
92
|
-
return (R, V) => {
|
|
93
|
-
const U = N("FmButton"), x = N("FmDialog");
|
|
94
|
-
return d(), w("div", null, [
|
|
95
|
-
a("p", null, F(m.label), 1),
|
|
96
|
-
y.value ? (d(), D(me, {
|
|
97
|
-
key: 0,
|
|
98
|
-
document: y.value,
|
|
99
|
-
"restaurant-id": m.restaurantId
|
|
100
|
-
}, {
|
|
101
|
-
default: f(({ src: q }) => [
|
|
102
|
-
a("img", {
|
|
103
|
-
src: q,
|
|
104
|
-
alt: "Signature Preview",
|
|
105
|
-
class: "w-full h-auto"
|
|
106
|
-
}, null, 8, Pe)
|
|
107
|
-
]),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 8, ["document", "restaurant-id"])) : $("", !0),
|
|
110
|
-
y.value ? $("", !0) : (d(), D(x, {
|
|
111
|
-
key: 1,
|
|
112
|
-
modelValue: B.value,
|
|
113
|
-
"onUpdate:modelValue": V[1] || (V[1] = (q) => B.value = q)
|
|
114
|
-
}, {
|
|
115
|
-
"dialog-button": f(() => [
|
|
116
|
-
n(U, {
|
|
117
|
-
"prepend-icon": "signature",
|
|
118
|
-
class: "w-full",
|
|
119
|
-
label: "Signature"
|
|
120
|
-
})
|
|
121
|
-
]),
|
|
122
|
-
"dialog-header": f(() => [...V[2] || (V[2] = [
|
|
123
|
-
a("div", null, "Signature Board", -1)
|
|
124
|
-
])]),
|
|
125
|
-
default: f(() => [
|
|
126
|
-
n(e(Ne), {
|
|
127
|
-
ref_key: "signaturePad",
|
|
128
|
-
ref: g,
|
|
129
|
-
height: "300px",
|
|
130
|
-
customStyle: { border: "2px solid #ccc", borderRadius: "3px" },
|
|
131
|
-
options: { penColor: "#000000" }
|
|
132
|
-
}, null, 512),
|
|
133
|
-
I.value ? (d(), w("p", qe, " Please sign your signature before saving. ")) : $("", !0),
|
|
134
|
-
a("div", we, [
|
|
135
|
-
n(U, {
|
|
136
|
-
variant: "destructive",
|
|
137
|
-
label: "Clear",
|
|
138
|
-
"prepend-icon": "delete",
|
|
139
|
-
onClick: V[0] || (V[0] = (q) => g.value.clearSignature())
|
|
140
|
-
}),
|
|
141
|
-
n(U, {
|
|
142
|
-
label: "Save",
|
|
143
|
-
"prepend-icon": "save",
|
|
144
|
-
onClick: r
|
|
145
|
-
})
|
|
146
|
-
])
|
|
147
|
-
]),
|
|
148
|
-
_: 1
|
|
149
|
-
}, 8, ["modelValue"]))
|
|
150
|
-
]);
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
}), xe = { class: "space-y-2" }, Fe = { class: "text-gray-900" }, De = { class: "text-gray-900" }, Ue = { class: "text-gray-900" }, Re = { class: "text-gray-900" }, Ae = { class: "text-gray-900" }, Te = { class: "text-gray-900" }, Be = { class: "grid grid-cols-4 gap-6" }, Ee = ["src"], $e = {
|
|
154
|
-
key: 1,
|
|
155
|
-
class: "mt-2 truncate text-gray-700"
|
|
156
|
-
}, je = { key: 0 }, Oe = {
|
|
157
|
-
key: 0,
|
|
158
|
-
class: "w-full flex justify-end mt-6"
|
|
159
|
-
}, Le = { class: "mt-6 grid grid-cols-4 gap-24" }, ze = { class: "grid grid-cols-4 gap-6" }, Me = { class: "w-full flex justify-end mt-6" }, He = { class: "mt-6 grid grid-cols-4 gap-24" }, We = { class: "col-span-2" }, Je = { class: "col-span-2" }, Ke = { class: "col-span-2" }, Qe = { class: "col-span-2" }, Ye = { class: "col-span-2" }, he = { class: "col-span-2" }, Ge = { class: "col-span-2" }, Xe = { class: "col-span-2" }, Ze = { class: "col-start-1 col-span-2" }, _e = { class: "col-span-2" }, el = { class: "col-span-2" }, ll = { class: "col-span-2" }, tl = { class: "mt-6 grid grid-cols-4 gap-6" }, al = { class: "mt-6 grid grid-cols-4 gap-6" }, sl = { class: "mt-6 grid grid-cols-4 gap-6" }, ol = { class: "mt-6 grid grid-cols-4 gap-6" }, nl = { class: "mt-6 grid grid-cols-4 gap-6" }, rl = { class: "mt-6 grid grid-cols-4 gap-6" }, il = {
|
|
160
|
-
key: 2,
|
|
161
|
-
class: "text-sm text-gray-500"
|
|
162
|
-
}, ul = { class: "mt-6 grid grid-cols-2 gap-24" }, ue = 30, dl = /* @__PURE__ */ X({
|
|
163
|
-
__name: "SoftspaceSubmission",
|
|
164
|
-
props: {
|
|
165
|
-
submission: {
|
|
166
|
-
type: Object,
|
|
167
|
-
required: !0
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
emits: ["update:submission"],
|
|
171
|
-
setup(m, { emit: O }) {
|
|
172
|
-
var _;
|
|
173
|
-
const c = m, k = O, y = oe(), I = j(!1), { isLoading: g, startAsyncCall: B } = ee(), { fields: o, documents: r, restaurantId: R, profile: V, status: U, statusReason: x } = c.submission, q = j(""), A = j(
|
|
174
|
-
parseInt(((_ = c.submission.fields) == null ? void 0 : _.numberOfDevices) ?? 1)
|
|
175
|
-
), p = j(
|
|
176
|
-
c.submission.rates ? Object.fromEntries(
|
|
177
|
-
Object.entries(c.submission.rates).map(([b, l]) => [b, `${l}`])
|
|
178
|
-
) : {
|
|
179
|
-
duitNow: "0.8",
|
|
180
|
-
mydebitCard: "0.5",
|
|
181
|
-
localDebit: "0.5",
|
|
182
|
-
localCredit: "1.1",
|
|
183
|
-
foreignCard: "3.0",
|
|
184
|
-
jcbStandard: "2.2",
|
|
185
|
-
jcbPlatinum: "2.2"
|
|
186
|
-
}
|
|
187
|
-
), E = z(
|
|
188
|
-
() => Object.values(p.value).every((b) => parseFloat(b) > 0)
|
|
189
|
-
), Y = z(
|
|
190
|
-
() => Object.keys(c.submission.documents).filter((b) => /^authorizedPersonID\d+$/.test(b)).sort(
|
|
191
|
-
(b, l) => Number(b.replace("authorizedPersonID", "")) - Number(l.replace("authorizedPersonID", ""))
|
|
192
|
-
)
|
|
193
|
-
), { isLoading: le, startAsyncCall: te } = ee(), L = j([]), Z = (b) => Number(b.replace("additionalDocument", "")), v = z(
|
|
194
|
-
() => Object.keys(c.submission.documents).filter((b) => /^additionalDocument\d+$/.test(b)).sort((b, l) => Z(b) - Z(l))
|
|
195
|
-
), s = z(
|
|
196
|
-
() => v.value.length + L.value.length
|
|
197
|
-
), S = (b) => {
|
|
198
|
-
if (!(s.value >= ue)) {
|
|
199
|
-
if (b.type.startsWith("image/")) {
|
|
200
|
-
const l = new FileReader();
|
|
201
|
-
l.onload = (T) => {
|
|
202
|
-
var H;
|
|
203
|
-
return L.value.push({
|
|
204
|
-
file: b,
|
|
205
|
-
preview: String(((H = T.target) == null ? void 0 : H.result) ?? "")
|
|
206
|
-
});
|
|
207
|
-
}, l.readAsDataURL(b);
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
L.value.push({ file: b, preview: "" });
|
|
211
|
-
}
|
|
212
|
-
}, h = () => te(async () => {
|
|
213
|
-
try {
|
|
214
|
-
let b = v.value.reduce(
|
|
215
|
-
(T, H) => Math.max(T, Z(H)),
|
|
216
|
-
0
|
|
217
|
-
);
|
|
218
|
-
const l = {};
|
|
219
|
-
for (const { file: T } of L.value) {
|
|
220
|
-
const H = `additionalDocument${++b}`;
|
|
221
|
-
l[H] = await M.uploadDocument(
|
|
222
|
-
R,
|
|
223
|
-
H,
|
|
224
|
-
T
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
k(
|
|
228
|
-
"update:submission",
|
|
229
|
-
await M.addAdditionalDocuments(
|
|
230
|
-
c.submission._id,
|
|
231
|
-
l
|
|
232
|
-
)
|
|
233
|
-
), L.value = [], y.open({ type: "success", title: "Documents saved" });
|
|
234
|
-
} catch (b) {
|
|
235
|
-
y.open({
|
|
236
|
-
type: "error",
|
|
237
|
-
title: "Error occurs when sending additional documents",
|
|
238
|
-
message: Q(b)
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
}), ae = () => B(async () => {
|
|
242
|
-
try {
|
|
243
|
-
const b = await M.reviewById(
|
|
244
|
-
c.submission._id,
|
|
245
|
-
{
|
|
246
|
-
numberOfDevices: A.value.toString(),
|
|
247
|
-
rates: {
|
|
248
|
-
duitNow: parseFloat(p.value.duitNow),
|
|
249
|
-
mydebitCard: parseFloat(p.value.mydebitCard),
|
|
250
|
-
localDebit: parseFloat(p.value.localDebit),
|
|
251
|
-
localCredit: parseFloat(p.value.localCredit),
|
|
252
|
-
foreignCard: parseFloat(p.value.foreignCard),
|
|
253
|
-
jcbStandard: parseFloat(p.value.jcbStandard),
|
|
254
|
-
jcbPlatinum: parseFloat(p.value.jcbPlatinum)
|
|
255
|
-
},
|
|
256
|
-
status: "approved"
|
|
257
|
-
}
|
|
258
|
-
);
|
|
259
|
-
k("update:submission", b), I.value = !1, y.open({
|
|
260
|
-
type: "success",
|
|
261
|
-
title: "Submission updated successfully"
|
|
262
|
-
});
|
|
263
|
-
} catch (b) {
|
|
264
|
-
y.open({
|
|
265
|
-
type: "error",
|
|
266
|
-
title: "Error occurs when updating submission",
|
|
267
|
-
message: Q(b)
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
}), se = () => B(async () => {
|
|
271
|
-
try {
|
|
272
|
-
const b = await M.reviewById(
|
|
273
|
-
c.submission._id,
|
|
274
|
-
{
|
|
275
|
-
status: "rejected",
|
|
276
|
-
statusReason: q.value
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
k("update:submission", b), I.value = !1, y.open({
|
|
280
|
-
type: "success",
|
|
281
|
-
title: "Submission updated successfully"
|
|
282
|
-
});
|
|
283
|
-
} catch (b) {
|
|
284
|
-
y.open({
|
|
285
|
-
type: "error",
|
|
286
|
-
title: "Error occurs when updating submission",
|
|
287
|
-
message: Q(b)
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
});
|
|
291
|
-
return (b, l) => {
|
|
292
|
-
const T = N("FmButton"), H = N("FmDropField"), C = N("FmTextField"), be = N("FmTextarea"), ce = N("FmDialog"), ge = N("FmPhoneNumber"), ne = N("FmSelect"), ye = N("FmForm");
|
|
293
|
-
return d(), w(K, null, [
|
|
294
|
-
a("div", xe, [
|
|
295
|
-
a("div", null, [
|
|
296
|
-
l[38] || (l[38] = a("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
|
|
297
|
-
a("span", Fe, F(e(R)), 1)
|
|
298
|
-
]),
|
|
299
|
-
a("div", null, [
|
|
300
|
-
l[39] || (l[39] = a("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
|
|
301
|
-
a("span", De, F(e(V).name) + " ( " + F(e(V).legalName) + " )", 1)
|
|
302
|
-
]),
|
|
303
|
-
a("div", null, [
|
|
304
|
-
l[40] || (l[40] = a("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
|
|
305
|
-
a("span", Ue, F(e(V).email), 1)
|
|
306
|
-
]),
|
|
307
|
-
a("div", null, [
|
|
308
|
-
l[41] || (l[41] = a("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
|
|
309
|
-
a("span", Re, F(e(V).phoneNo), 1)
|
|
310
|
-
]),
|
|
311
|
-
a("div", null, [
|
|
312
|
-
l[42] || (l[42] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
|
|
313
|
-
a("span", Ae, [
|
|
314
|
-
n(pe, { data: e(U) }, null, 8, ["data"])
|
|
315
|
-
])
|
|
316
|
-
]),
|
|
317
|
-
a("div", null, [
|
|
318
|
-
l[43] || (l[43] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
|
|
319
|
-
a("span", Te, F(e(x)), 1)
|
|
320
|
-
])
|
|
321
|
-
]),
|
|
322
|
-
l[61] || (l[61] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " (SharePoint) Additional Requested Documents ", -1)),
|
|
323
|
-
a("div", Be, [
|
|
324
|
-
(d(!0), w(K, null, G(v.value, (t) => (d(), D(P, {
|
|
325
|
-
key: t,
|
|
326
|
-
label: t.replace("additionalDocument", "Document "),
|
|
327
|
-
type: /\.pdf$/i.test(c.submission.documents[t]) ? "pdf" : "image",
|
|
328
|
-
modelValue: c.submission.documents[t],
|
|
329
|
-
"onUpdate:modelValue": (W) => c.submission.documents[t] = W,
|
|
330
|
-
"restaurant-id": e(R)
|
|
331
|
-
}, null, 8, ["label", "type", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128)),
|
|
332
|
-
(d(!0), w(K, null, G(L.value, (t, W) => (d(), w("div", {
|
|
333
|
-
key: `new-${W}`
|
|
334
|
-
}, [
|
|
335
|
-
a("p", null, "Document " + F(v.value.length + W + 1), 1),
|
|
336
|
-
t.file.type.startsWith("image/") ? (d(), w("img", {
|
|
337
|
-
key: 0,
|
|
338
|
-
src: t.preview,
|
|
339
|
-
class: "mt-2 rounded border"
|
|
340
|
-
}, null, 8, Ee)) : (d(), w("p", $e, F(t.file.name), 1)),
|
|
341
|
-
n(T, {
|
|
342
|
-
class: "mt-4",
|
|
343
|
-
"prepend-icon": "delete",
|
|
344
|
-
label: "Remove",
|
|
345
|
-
variant: "destructive",
|
|
346
|
-
onClick: (jl) => L.value.splice(W, 1)
|
|
347
|
-
}, null, 8, ["onClick"])
|
|
348
|
-
]))), 128)),
|
|
349
|
-
s.value < ue ? (d(), w("div", je, [
|
|
350
|
-
a("p", null, "Document " + F(s.value + 1), 1),
|
|
351
|
-
n(H, {
|
|
352
|
-
accept: ".png, .jpg, .jpeg, .pdf",
|
|
353
|
-
onFileUpload: S
|
|
354
|
-
})
|
|
355
|
-
])) : $("", !0)
|
|
356
|
-
]),
|
|
357
|
-
L.value.length ? (d(), w("div", Oe, [
|
|
358
|
-
n(T, {
|
|
359
|
-
type: "button",
|
|
360
|
-
variant: "primary",
|
|
361
|
-
"prepend-icon": "cloud_upload",
|
|
362
|
-
label: "Save documents",
|
|
363
|
-
loading: e(le),
|
|
364
|
-
onClick: h
|
|
365
|
-
}, null, 8, ["loading"])
|
|
366
|
-
])) : $("", !0),
|
|
367
|
-
l[62] || (l[62] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Rate Settings", -1)),
|
|
368
|
-
a("div", Le, [
|
|
369
|
-
n(C, {
|
|
370
|
-
modelValue: p.value.duitNow,
|
|
371
|
-
"onUpdate:modelValue": l[0] || (l[0] = (t) => p.value.duitNow = t),
|
|
372
|
-
label: "DuitNow QR",
|
|
373
|
-
"label-mark": "required",
|
|
374
|
-
type: "number",
|
|
375
|
-
inputmode: "numeric",
|
|
376
|
-
decimal: 2,
|
|
377
|
-
rules: e(i)(
|
|
378
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
379
|
-
)
|
|
380
|
-
}, {
|
|
381
|
-
append: f(() => [...l[44] || (l[44] = [
|
|
382
|
-
J("%", -1)
|
|
383
|
-
])]),
|
|
384
|
-
_: 1
|
|
385
|
-
}, 8, ["modelValue", "rules"]),
|
|
386
|
-
n(C, {
|
|
387
|
-
modelValue: p.value.mydebitCard,
|
|
388
|
-
"onUpdate:modelValue": l[1] || (l[1] = (t) => p.value.mydebitCard = t),
|
|
389
|
-
label: "myDebit Card",
|
|
390
|
-
"label-mark": "required",
|
|
391
|
-
type: "number",
|
|
392
|
-
inputmode: "numeric",
|
|
393
|
-
decimal: 2,
|
|
394
|
-
rules: e(i)(
|
|
395
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
396
|
-
)
|
|
397
|
-
}, {
|
|
398
|
-
append: f(() => [...l[45] || (l[45] = [
|
|
399
|
-
J("%", -1)
|
|
400
|
-
])]),
|
|
401
|
-
_: 1
|
|
402
|
-
}, 8, ["modelValue", "rules"]),
|
|
403
|
-
n(C, {
|
|
404
|
-
modelValue: p.value.localDebit,
|
|
405
|
-
"onUpdate:modelValue": l[2] || (l[2] = (t) => p.value.localDebit = t),
|
|
406
|
-
label: "Local Debit Card",
|
|
407
|
-
"label-mark": "required",
|
|
408
|
-
type: "number",
|
|
409
|
-
inputmode: "numeric",
|
|
410
|
-
decimal: 2,
|
|
411
|
-
rules: e(i)(
|
|
412
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
413
|
-
)
|
|
414
|
-
}, {
|
|
415
|
-
append: f(() => [...l[46] || (l[46] = [
|
|
416
|
-
J("%", -1)
|
|
417
|
-
])]),
|
|
418
|
-
_: 1
|
|
419
|
-
}, 8, ["modelValue", "rules"]),
|
|
420
|
-
n(C, {
|
|
421
|
-
modelValue: p.value.localCredit,
|
|
422
|
-
"onUpdate:modelValue": l[3] || (l[3] = (t) => p.value.localCredit = t),
|
|
423
|
-
label: "Local Credit Card",
|
|
424
|
-
"label-mark": "required",
|
|
425
|
-
type: "number",
|
|
426
|
-
inputmode: "numeric",
|
|
427
|
-
decimal: 2,
|
|
428
|
-
rules: e(i)(
|
|
429
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
430
|
-
)
|
|
431
|
-
}, {
|
|
432
|
-
append: f(() => [...l[47] || (l[47] = [
|
|
433
|
-
J("%", -1)
|
|
434
|
-
])]),
|
|
435
|
-
_: 1
|
|
436
|
-
}, 8, ["modelValue", "rules"]),
|
|
437
|
-
n(C, {
|
|
438
|
-
modelValue: p.value.foreignCard,
|
|
439
|
-
"onUpdate:modelValue": l[4] || (l[4] = (t) => p.value.foreignCard = t),
|
|
440
|
-
label: "Foreign Card",
|
|
441
|
-
"label-mark": "required",
|
|
442
|
-
type: "number",
|
|
443
|
-
inputmode: "numeric",
|
|
444
|
-
decimal: 2,
|
|
445
|
-
rules: e(i)(
|
|
446
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
447
|
-
)
|
|
448
|
-
}, {
|
|
449
|
-
append: f(() => [...l[48] || (l[48] = [
|
|
450
|
-
J("%", -1)
|
|
451
|
-
])]),
|
|
452
|
-
_: 1
|
|
453
|
-
}, 8, ["modelValue", "rules"]),
|
|
454
|
-
n(C, {
|
|
455
|
-
modelValue: p.value.jcbStandard,
|
|
456
|
-
"onUpdate:modelValue": l[5] || (l[5] = (t) => p.value.jcbStandard = t),
|
|
457
|
-
label: "JCB Standard",
|
|
458
|
-
"label-mark": "required",
|
|
459
|
-
type: "number",
|
|
460
|
-
inputmode: "numeric",
|
|
461
|
-
decimal: 2,
|
|
462
|
-
rules: e(i)(
|
|
463
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
464
|
-
)
|
|
465
|
-
}, {
|
|
466
|
-
append: f(() => [...l[49] || (l[49] = [
|
|
467
|
-
J("%", -1)
|
|
468
|
-
])]),
|
|
469
|
-
_: 1
|
|
470
|
-
}, 8, ["modelValue", "rules"]),
|
|
471
|
-
n(C, {
|
|
472
|
-
modelValue: p.value.jcbPlatinum,
|
|
473
|
-
"onUpdate:modelValue": l[6] || (l[6] = (t) => p.value.jcbPlatinum = t),
|
|
474
|
-
label: "JCB Platinum",
|
|
475
|
-
"label-mark": "required",
|
|
476
|
-
type: "number",
|
|
477
|
-
inputmode: "numeric",
|
|
478
|
-
decimal: 2,
|
|
479
|
-
rules: e(i)(
|
|
480
|
-
e(u).string().min(1, "Rate is required").transform((t) => parseFloat(t)).refine((t) => !isNaN(t), { message: "Rate must be a number" })
|
|
481
|
-
)
|
|
482
|
-
}, {
|
|
483
|
-
append: f(() => [...l[50] || (l[50] = [
|
|
484
|
-
J("%", -1)
|
|
485
|
-
])]),
|
|
486
|
-
_: 1
|
|
487
|
-
}, 8, ["modelValue", "rules"])
|
|
488
|
-
]),
|
|
489
|
-
l[63] || (l[63] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-6" }, "Extra Settings", -1)),
|
|
490
|
-
a("div", ze, [
|
|
491
|
-
n(C, {
|
|
492
|
-
modelValue: A.value,
|
|
493
|
-
"onUpdate:modelValue": l[7] || (l[7] = (t) => A.value = t),
|
|
494
|
-
label: "Number of Devices",
|
|
495
|
-
"label-mark": "required",
|
|
496
|
-
type: "number",
|
|
497
|
-
inputmode: "numeric"
|
|
498
|
-
}, null, 8, ["modelValue"])
|
|
499
|
-
]),
|
|
500
|
-
a("div", Me, [
|
|
501
|
-
n(ce, {
|
|
502
|
-
modelValue: I.value,
|
|
503
|
-
"onUpdate:modelValue": l[9] || (l[9] = (t) => I.value = t)
|
|
504
|
-
}, {
|
|
505
|
-
"dialog-button": f(() => [
|
|
506
|
-
n(T, {
|
|
507
|
-
class: "mr-6",
|
|
508
|
-
type: "button",
|
|
509
|
-
variant: "destructive",
|
|
510
|
-
"prepend-icon": "block",
|
|
511
|
-
loading: e(g),
|
|
512
|
-
label: "Reject Submission"
|
|
513
|
-
}, null, 8, ["loading"])
|
|
514
|
-
]),
|
|
515
|
-
"dialog-header": f(() => [...l[51] || (l[51] = [
|
|
516
|
-
a("div", null, "Rejecting Submission", -1)
|
|
517
|
-
])]),
|
|
518
|
-
default: f(() => [
|
|
519
|
-
n(be, {
|
|
520
|
-
modelValue: q.value,
|
|
521
|
-
"onUpdate:modelValue": l[8] || (l[8] = (t) => q.value = t),
|
|
522
|
-
label: "Reason for Rejection",
|
|
523
|
-
"label-mark": "optional",
|
|
524
|
-
"helper-text": "Please provide a reason for rejection."
|
|
525
|
-
}, null, 8, ["modelValue"]),
|
|
526
|
-
n(T, {
|
|
527
|
-
class: "mb-2 mt-6 w-full",
|
|
528
|
-
label: "Submit",
|
|
529
|
-
"prepend-icon": "save",
|
|
530
|
-
onClick: se,
|
|
531
|
-
loading: e(g)
|
|
532
|
-
}, null, 8, ["loading"])
|
|
533
|
-
]),
|
|
534
|
-
_: 1
|
|
535
|
-
}, 8, ["modelValue"]),
|
|
536
|
-
n(T, {
|
|
537
|
-
type: "button",
|
|
538
|
-
variant: "primary",
|
|
539
|
-
"prepend-icon": "approval",
|
|
540
|
-
disabled: !E.value,
|
|
541
|
-
label: "Approve Submission with Rates",
|
|
542
|
-
onClick: ae,
|
|
543
|
-
loading: e(g)
|
|
544
|
-
}, null, 8, ["disabled", "loading"])
|
|
545
|
-
]),
|
|
546
|
-
n(ye, { disabled: !0 }, {
|
|
547
|
-
default: f(() => [
|
|
548
|
-
l[52] || (l[52] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
|
|
549
|
-
a("div", He, [
|
|
550
|
-
a("div", We, [
|
|
551
|
-
n(C, {
|
|
552
|
-
modelValue: e(o).picName,
|
|
553
|
-
"onUpdate:modelValue": l[10] || (l[10] = (t) => e(o).picName = t),
|
|
554
|
-
label: "Owner/Director Name",
|
|
555
|
-
placeholder: "Enter your name",
|
|
556
|
-
"label-mark": "required",
|
|
557
|
-
rules: e(i)(e(u).string().min(1, "Owner/Director Name is required"))
|
|
558
|
-
}, null, 8, ["modelValue", "rules"])
|
|
559
|
-
]),
|
|
560
|
-
a("div", Je, [
|
|
561
|
-
n(C, {
|
|
562
|
-
modelValue: e(o).picRole,
|
|
563
|
-
"onUpdate:modelValue": l[11] || (l[11] = (t) => e(o).picRole = t),
|
|
564
|
-
label: "Owner/Director Role",
|
|
565
|
-
placeholder: "Enter your role",
|
|
566
|
-
"label-mark": "required",
|
|
567
|
-
rules: e(i)(e(u).string().min(1, "Owner/Director Role is required"))
|
|
568
|
-
}, null, 8, ["modelValue", "rules"])
|
|
569
|
-
]),
|
|
570
|
-
a("div", Ke, [
|
|
571
|
-
n(C, {
|
|
572
|
-
modelValue: e(o).picEmail,
|
|
573
|
-
"onUpdate:modelValue": l[12] || (l[12] = (t) => e(o).picEmail = t),
|
|
574
|
-
label: "Owner/Director Email",
|
|
575
|
-
type: "email",
|
|
576
|
-
placeholder: "Enter your email address",
|
|
577
|
-
"label-mark": "required",
|
|
578
|
-
rules: e(i)(e(u).string().min(1, "Owner/Director Email is required"))
|
|
579
|
-
}, null, 8, ["modelValue", "rules"])
|
|
580
|
-
]),
|
|
581
|
-
a("div", Qe, [
|
|
582
|
-
n(ge, {
|
|
583
|
-
"model-value": e(o).picContact,
|
|
584
|
-
"onUpdate:modelValue": l[13] || (l[13] = (t) => e(o).picContact = t),
|
|
585
|
-
"default-country": "MY",
|
|
586
|
-
label: "Owner/Director Contact",
|
|
587
|
-
"label-mark": "required",
|
|
588
|
-
rules: e(i)(e(u).string().min(1, "Owner/Director Contact is required"))
|
|
589
|
-
}, null, 8, ["model-value", "rules"])
|
|
590
|
-
]),
|
|
591
|
-
a("div", Ye, [
|
|
592
|
-
n(C, {
|
|
593
|
-
modelValue: e(o).nric,
|
|
594
|
-
"onUpdate:modelValue": l[14] || (l[14] = (t) => e(o).nric = t),
|
|
595
|
-
label: "Owner/Director NRIC No",
|
|
596
|
-
placeholder: "Enter your NRIC number",
|
|
597
|
-
"label-mark": "required",
|
|
598
|
-
rules: e(i)(e(u).string().min(1, "NRIC No is required"))
|
|
599
|
-
}, null, 8, ["modelValue", "rules"])
|
|
600
|
-
]),
|
|
601
|
-
a("div", he, [
|
|
602
|
-
n(C, {
|
|
603
|
-
modelValue: e(o).tradingName,
|
|
604
|
-
"onUpdate:modelValue": l[15] || (l[15] = (t) => e(o).tradingName = t),
|
|
605
|
-
label: "Trading Name",
|
|
606
|
-
placeholder: "Enter trading name",
|
|
607
|
-
"label-mark": "required",
|
|
608
|
-
rules: e(i)(e(u).string().min(1, "Trading Name is required"))
|
|
609
|
-
}, null, 8, ["modelValue", "rules"])
|
|
610
|
-
]),
|
|
611
|
-
a("div", Ge, [
|
|
612
|
-
n(C, {
|
|
613
|
-
modelValue: e(o).outletName,
|
|
614
|
-
"onUpdate:modelValue": l[16] || (l[16] = (t) => e(o).outletName = t),
|
|
615
|
-
label: "Registered Name",
|
|
616
|
-
placeholder: "Enter registered name",
|
|
617
|
-
"label-mark": "required",
|
|
618
|
-
rules: e(i)(e(u).string().min(1, "Registered Name is required"))
|
|
619
|
-
}, null, 8, ["modelValue", "rules"])
|
|
620
|
-
]),
|
|
621
|
-
a("div", Xe, [
|
|
622
|
-
n(C, {
|
|
623
|
-
modelValue: e(o).outletAddress,
|
|
624
|
-
"onUpdate:modelValue": l[17] || (l[17] = (t) => e(o).outletAddress = t),
|
|
625
|
-
label: "Outlet Address",
|
|
626
|
-
placeholder: "Enter outlet address",
|
|
627
|
-
"label-mark": "required",
|
|
628
|
-
rules: e(i)(e(u).string().min(1, "Address is required"))
|
|
629
|
-
}, null, 8, ["modelValue", "rules"])
|
|
630
|
-
]),
|
|
631
|
-
n(C, {
|
|
632
|
-
modelValue: e(o).outletPostCode,
|
|
633
|
-
"onUpdate:modelValue": l[18] || (l[18] = (t) => e(o).outletPostCode = t),
|
|
634
|
-
label: "Postal Code",
|
|
635
|
-
placeholder: "Enter postal code",
|
|
636
|
-
"label-mark": "required",
|
|
637
|
-
rules: e(i)(e(u).string().min(1, "Postal Code is required"))
|
|
638
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
639
|
-
n(C, {
|
|
640
|
-
modelValue: e(o).outletState,
|
|
641
|
-
"onUpdate:modelValue": l[19] || (l[19] = (t) => e(o).outletState = t),
|
|
642
|
-
label: "State",
|
|
643
|
-
placeholder: "Enter state",
|
|
644
|
-
"label-mark": "required",
|
|
645
|
-
rules: e(i)(e(u).string().min(1, "State is required"))
|
|
646
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
647
|
-
n(C, {
|
|
648
|
-
modelValue: e(o).outletCity,
|
|
649
|
-
"onUpdate:modelValue": l[20] || (l[20] = (t) => e(o).outletCity = t),
|
|
650
|
-
label: "City",
|
|
651
|
-
placeholder: "Enter city",
|
|
652
|
-
"label-mark": "required",
|
|
653
|
-
rules: e(i)(e(u).string().min(1, "City is required"))
|
|
654
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
655
|
-
a("div", Ze, [
|
|
656
|
-
n(ne, {
|
|
657
|
-
modelValue: e(o).businessType,
|
|
658
|
-
"onUpdate:modelValue": l[21] || (l[21] = (t) => e(o).businessType = t),
|
|
659
|
-
label: "Type",
|
|
660
|
-
placeholder: "Select business type",
|
|
661
|
-
"label-mark": "required",
|
|
662
|
-
rules: e(i)(e(u).string().min(1, "Business Type is required")),
|
|
663
|
-
items: [
|
|
664
|
-
{ label: "Sole Proprietorship", value: "sole_proprietorship" },
|
|
665
|
-
{ label: "Partnership", value: "partnership" },
|
|
666
|
-
{
|
|
667
|
-
label: "Private Limited Company (Sdn Bhd)",
|
|
668
|
-
value: "private_limited"
|
|
669
|
-
},
|
|
670
|
-
{
|
|
671
|
-
label: "Public Limited Company (Berhad)",
|
|
672
|
-
value: "public_limited"
|
|
673
|
-
}
|
|
674
|
-
]
|
|
675
|
-
}, null, 8, ["modelValue", "rules"])
|
|
676
|
-
]),
|
|
677
|
-
a("div", _e, [
|
|
678
|
-
n(C, {
|
|
679
|
-
modelValue: e(o).businessRegNo,
|
|
680
|
-
"onUpdate:modelValue": l[22] || (l[22] = (t) => e(o).businessRegNo = t),
|
|
681
|
-
label: "Registration No",
|
|
682
|
-
placeholder: "Enter registration number",
|
|
683
|
-
"label-mark": "required",
|
|
684
|
-
rules: e(i)(e(u).string().min(1, "Reg No is required"))
|
|
685
|
-
}, null, 8, ["modelValue", "rules"])
|
|
686
|
-
]),
|
|
687
|
-
a("div", el, [
|
|
688
|
-
n(C, {
|
|
689
|
-
modelValue: e(o).tinNo,
|
|
690
|
-
"onUpdate:modelValue": l[23] || (l[23] = (t) => e(o).tinNo = t),
|
|
691
|
-
label: "Tax Identification No (TIN)",
|
|
692
|
-
placeholder: "Enter your TIN number",
|
|
693
|
-
"label-mark": "required",
|
|
694
|
-
rules: e(i)(e(u).string().min(1, "TIN is required"))
|
|
695
|
-
}, null, 8, ["modelValue", "rules"])
|
|
696
|
-
]),
|
|
697
|
-
a("div", ll, [
|
|
698
|
-
n(C, {
|
|
699
|
-
modelValue: e(o).sstNo,
|
|
700
|
-
"onUpdate:modelValue": l[24] || (l[24] = (t) => e(o).sstNo = t),
|
|
701
|
-
label: "SST Registration No (SST)",
|
|
702
|
-
placeholder: "Enter your SST number",
|
|
703
|
-
"label-mark": "optional"
|
|
704
|
-
}, null, 8, ["modelValue"])
|
|
705
|
-
])
|
|
706
|
-
]),
|
|
707
|
-
l[53] || (l[53] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information ", -1)),
|
|
708
|
-
a("div", tl, [
|
|
709
|
-
n(ne, {
|
|
710
|
-
modelValue: e(o).bankName,
|
|
711
|
-
"onUpdate:modelValue": l[25] || (l[25] = (t) => e(o).bankName = t),
|
|
712
|
-
label: "Bank",
|
|
713
|
-
placeholder: "Select bank type",
|
|
714
|
-
"label-mark": "required",
|
|
715
|
-
rules: e(i)(e(u).string().min(1, "Bank Type is required")),
|
|
716
|
-
items: e(ke).bankNameOptions()
|
|
717
|
-
}, null, 8, ["modelValue", "rules", "items"]),
|
|
718
|
-
n(C, {
|
|
719
|
-
modelValue: e(o).bankHolderName,
|
|
720
|
-
"onUpdate:modelValue": l[26] || (l[26] = (t) => e(o).bankHolderName = t),
|
|
721
|
-
label: "Beneficiary Name",
|
|
722
|
-
placeholder: "Enter Beneficiary Name",
|
|
723
|
-
"label-mark": "required",
|
|
724
|
-
rules: e(i)(e(u).string().min(1, "Beneficiary Name is required"))
|
|
725
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
726
|
-
n(C, {
|
|
727
|
-
modelValue: e(o).bankAccountNo,
|
|
728
|
-
"onUpdate:modelValue": l[27] || (l[27] = (t) => e(o).bankAccountNo = t),
|
|
729
|
-
label: "Account Number",
|
|
730
|
-
placeholder: "Enter Account Number",
|
|
731
|
-
"label-mark": "required",
|
|
732
|
-
rules: e(i)(e(u).string().min(1, "Account Number is required"))
|
|
733
|
-
}, null, 8, ["modelValue", "rules"])
|
|
734
|
-
]),
|
|
735
|
-
l[54] || (l[54] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Documents", -1)),
|
|
736
|
-
l[55] || (l[55] = a("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 1. All Directors/Owner ICs ", -1)),
|
|
737
|
-
a("div", al, [
|
|
738
|
-
n(P, {
|
|
739
|
-
label: "Authorized Person ID",
|
|
740
|
-
modelValue: e(r).authorizedPersonID,
|
|
741
|
-
"onUpdate:modelValue": l[28] || (l[28] = (t) => e(r).authorizedPersonID = t),
|
|
742
|
-
type: "image",
|
|
743
|
-
"restaurant-id": m.submission.restaurantId
|
|
744
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
745
|
-
(d(!0), w(K, null, G(Y.value, (t) => (d(), D(P, {
|
|
746
|
-
key: t,
|
|
747
|
-
label: `Authorized Person ID ${t.replace("authorizedPersonID", "")}`,
|
|
748
|
-
modelValue: e(r)[t],
|
|
749
|
-
"onUpdate:modelValue": (W) => e(r)[t] = W,
|
|
750
|
-
type: "image",
|
|
751
|
-
"restaurant-id": m.submission.restaurantId
|
|
752
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128))
|
|
753
|
-
]),
|
|
754
|
-
l[56] || (l[56] = a("h4", { class: "font-semibold border-b pb-1 mt-6 mb-6" }, " Section 2. Business Information ", -1)),
|
|
755
|
-
a("div", sl, [
|
|
756
|
-
e(o).businessType === "private_limited" || e(o).businessType === "public_limited" ? (d(), D(P, {
|
|
757
|
-
key: 0,
|
|
758
|
-
label: "Superform",
|
|
759
|
-
type: "pdf",
|
|
760
|
-
modelValue: e(r).certificate,
|
|
761
|
-
"onUpdate:modelValue": l[29] || (l[29] = (t) => e(r).certificate = t),
|
|
762
|
-
"restaurant-id": m.submission.restaurantId
|
|
763
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
764
|
-
e(o).businessType === "sole_proprietorship" || e(o).businessType === "partnership" ? (d(), D(P, {
|
|
765
|
-
key: 1,
|
|
766
|
-
label: "Business Registration Document",
|
|
767
|
-
type: "pdf",
|
|
768
|
-
modelValue: e(r).certificate,
|
|
769
|
-
"onUpdate:modelValue": l[30] || (l[30] = (t) => e(r).certificate = t),
|
|
770
|
-
"restaurant-id": m.submission.restaurantId
|
|
771
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
772
|
-
e(r).interiorPhoto ? (d(), D(P, {
|
|
773
|
-
key: 2,
|
|
774
|
-
label: "Interior Photo",
|
|
775
|
-
modelValue: e(r).interiorPhoto,
|
|
776
|
-
"onUpdate:modelValue": l[31] || (l[31] = (t) => e(r).interiorPhoto = t),
|
|
777
|
-
type: "image",
|
|
778
|
-
"restaurant-id": m.submission.restaurantId
|
|
779
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
780
|
-
n(P, {
|
|
781
|
-
label: "Outlet Photo",
|
|
782
|
-
modelValue: e(r).outletPhoto,
|
|
783
|
-
"onUpdate:modelValue": l[32] || (l[32] = (t) => e(r).outletPhoto = t),
|
|
784
|
-
type: "image-or-pdf",
|
|
785
|
-
"restaurant-id": m.submission.restaurantId
|
|
786
|
-
}, null, 8, ["modelValue", "restaurant-id"])
|
|
787
|
-
]),
|
|
788
|
-
l[57] || (l[57] = a("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 3. Payout Information ", -1)),
|
|
789
|
-
a("div", ol, [
|
|
790
|
-
n(P, {
|
|
791
|
-
label: "Latest Bank Statement",
|
|
792
|
-
modelValue: e(r).bankStatement,
|
|
793
|
-
"onUpdate:modelValue": l[33] || (l[33] = (t) => e(r).bankStatement = t),
|
|
794
|
-
type: "pdf",
|
|
795
|
-
"restaurant-id": m.submission.restaurantId
|
|
796
|
-
}, null, 8, ["modelValue", "restaurant-id"])
|
|
797
|
-
]),
|
|
798
|
-
l[58] || (l[58] = a("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 4. Site Photos ", -1)),
|
|
799
|
-
a("div", nl, [
|
|
800
|
-
(d(!0), w(K, null, G([1, 2, 3, 4, 5].filter(
|
|
801
|
-
(t) => !!e(r)[`onsitePhoto${t}`]
|
|
802
|
-
), (t) => (d(), D(P, {
|
|
803
|
-
key: t,
|
|
804
|
-
label: e(Ce)[t - 1],
|
|
805
|
-
modelValue: e(r)[`onsitePhoto${t}`],
|
|
806
|
-
"onUpdate:modelValue": (W) => e(r)[`onsitePhoto${t}`] = W,
|
|
807
|
-
type: "image",
|
|
808
|
-
"restaurant-id": m.submission.restaurantId
|
|
809
|
-
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128))
|
|
810
|
-
]),
|
|
811
|
-
l[59] || (l[59] = a("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 5. Additional Documents ", -1)),
|
|
812
|
-
a("div", rl, [
|
|
813
|
-
e(r).liquorLicense ? (d(), D(P, {
|
|
814
|
-
key: 0,
|
|
815
|
-
label: "Liquor License",
|
|
816
|
-
modelValue: e(r).liquorLicense,
|
|
817
|
-
"onUpdate:modelValue": l[34] || (l[34] = (t) => e(r).liquorLicense = t),
|
|
818
|
-
type: "image-or-pdf",
|
|
819
|
-
"restaurant-id": m.submission.restaurantId
|
|
820
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
821
|
-
e(r).appendixC ? (d(), D(P, {
|
|
822
|
-
key: 1,
|
|
823
|
-
label: "Appendix C",
|
|
824
|
-
modelValue: e(r).appendixC,
|
|
825
|
-
"onUpdate:modelValue": l[35] || (l[35] = (t) => e(r).appendixC = t),
|
|
826
|
-
type: "pdf",
|
|
827
|
-
"restaurant-id": m.submission.restaurantId
|
|
828
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
829
|
-
!e(r).liquorLicense && !e(r).appendixC ? (d(), w("p", il, " No additional documents submitted. ")) : $("", !0)
|
|
830
|
-
]),
|
|
831
|
-
l[60] || (l[60] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
|
|
832
|
-
a("div", ul, [
|
|
833
|
-
n(Ie, {
|
|
834
|
-
modelValue: e(r).signature,
|
|
835
|
-
"onUpdate:modelValue": l[36] || (l[36] = (t) => e(r).signature = t),
|
|
836
|
-
"restaurant-id": m.submission.restaurantId,
|
|
837
|
-
label: "Signature"
|
|
838
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
839
|
-
n(P, {
|
|
840
|
-
label: "Company Stamp",
|
|
841
|
-
type: "image",
|
|
842
|
-
modelValue: e(r).companyStamp,
|
|
843
|
-
"onUpdate:modelValue": l[37] || (l[37] = (t) => e(r).companyStamp = t),
|
|
844
|
-
"restaurant-id": m.submission.restaurantId
|
|
845
|
-
}, null, 8, ["modelValue", "restaurant-id"])
|
|
846
|
-
])
|
|
847
|
-
]),
|
|
848
|
-
_: 1
|
|
849
|
-
})
|
|
850
|
-
], 64);
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
}), ml = { class: "space-y-2" }, pl = { class: "text-gray-900" }, bl = { class: "text-gray-900" }, cl = { class: "text-gray-900" }, gl = { class: "text-gray-900" }, yl = { class: "text-gray-900" }, Vl = { class: "text-gray-900" }, vl = { class: "mt-6 grid grid-cols-4 gap-24" }, fl = { class: "w-full flex justify-end mt-6" }, kl = { class: "mt-6 grid grid-cols-4 gap-24" }, Cl = { class: "col-span-2" }, Nl = { class: "col-span-2" }, Sl = { class: "col-span-2" }, Pl = { class: "col-span-2" }, ql = { class: "mt-6 grid grid-cols-4 gap-24" }, wl = { class: "mt-6 grid grid-cols-4 gap-24" }, Il = { class: "mt-6 grid grid-cols-4 gap-24" }, xl = { class: "col-span-2" }, Fl = { class: "col-span-2" }, Dl = { class: "col-span-2" }, Ul = { class: "col-span-2" }, Rl = { class: "col-span-2" }, Al = { class: "col-span-2" }, Tl = /* @__PURE__ */ X({
|
|
854
|
-
__name: "NTTSubmission",
|
|
855
|
-
props: {
|
|
856
|
-
submission: {
|
|
857
|
-
type: Object,
|
|
858
|
-
required: !0
|
|
859
|
-
}
|
|
860
|
-
},
|
|
861
|
-
emits: ["update:submission"],
|
|
862
|
-
setup(m, { emit: O }) {
|
|
863
|
-
const c = m, k = O, y = oe(), I = j(!1), { isLoading: g, startAsyncCall: B } = ee(), { fields: o, documents: r, restaurantId: R, profile: V, status: U, statusReason: x } = c.submission, q = j(""), A = [
|
|
864
|
-
{ key: "localCardDebit", label: "Local Card (Debit)", defaultValue: "2.3" },
|
|
865
|
-
{
|
|
866
|
-
key: "localCardStandard",
|
|
867
|
-
label: "Local Card (Standard)",
|
|
868
|
-
defaultValue: "2.3"
|
|
869
|
-
},
|
|
870
|
-
{
|
|
871
|
-
key: "localCardPremium",
|
|
872
|
-
label: "Local Card (Premium)",
|
|
873
|
-
defaultValue: "2.3"
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
key: "localCardSuperPremium",
|
|
877
|
-
label: "Local Card (Super Premium)",
|
|
878
|
-
defaultValue: "2.3"
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
key: "internationalCard",
|
|
882
|
-
label: "International Card",
|
|
883
|
-
defaultValue: "3.1"
|
|
884
|
-
},
|
|
885
|
-
{ key: "upiCard", label: "UPI Card", defaultValue: "3" },
|
|
886
|
-
{ key: "jcbCard", label: "JCB Card", defaultValue: "3" },
|
|
887
|
-
{ key: "dciCard", label: "DCI Card", defaultValue: "3" },
|
|
888
|
-
{ key: "amexCard", label: "Amex Card", defaultValue: "3" },
|
|
889
|
-
{ key: "alipay", label: "Alipay", defaultValue: "2.3" },
|
|
890
|
-
{ key: "alipayPlus", label: "Alipay+", defaultValue: "2.3" },
|
|
891
|
-
{ key: "trueMoney", label: "TrueMoney", defaultValue: "2.3" },
|
|
892
|
-
{ key: "shopeePay", label: "ShopeePay", defaultValue: "2.3" },
|
|
893
|
-
{ key: "linePay", label: "LinePay", defaultValue: "2.1" },
|
|
894
|
-
{ key: "thaiQr", label: "ThaiQR", defaultValue: "0.5" }
|
|
895
|
-
], p = Object.fromEntries(
|
|
896
|
-
A.map((v) => [v.key, v.defaultValue])
|
|
897
|
-
), E = j(
|
|
898
|
-
c.submission.rates ? Object.fromEntries(
|
|
899
|
-
Object.entries(c.submission.rates).map(([v, s]) => [v, `${s}`])
|
|
900
|
-
) : { ...p }
|
|
901
|
-
), Y = z(
|
|
902
|
-
() => Object.values(E.value).every((v) => parseFloat(v) > 0)
|
|
903
|
-
), le = z(() => o.businessType === "juristic" ? "Juristic" : o.businessType === "individual" ? "Individual" : o.businessType || "-"), te = () => B(async () => {
|
|
904
|
-
try {
|
|
905
|
-
const v = await M.reviewById(
|
|
906
|
-
c.submission._id,
|
|
907
|
-
{
|
|
908
|
-
status: de.FdoOnboardStatus.enum.ready
|
|
909
|
-
}
|
|
910
|
-
);
|
|
911
|
-
k("update:submission", v), y.open({
|
|
912
|
-
type: "success",
|
|
913
|
-
title: "Submission marked as ready"
|
|
914
|
-
});
|
|
915
|
-
} catch (v) {
|
|
916
|
-
y.open({
|
|
917
|
-
type: "error",
|
|
918
|
-
title: "Error occurs when marking submission as ready",
|
|
919
|
-
message: Q(v)
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
}), L = () => B(async () => {
|
|
923
|
-
try {
|
|
924
|
-
const v = await M.reviewById(
|
|
925
|
-
c.submission._id,
|
|
926
|
-
{
|
|
927
|
-
rates: Object.fromEntries(
|
|
928
|
-
A.map((s) => [
|
|
929
|
-
s.key,
|
|
930
|
-
parseFloat(E.value[s.key])
|
|
931
|
-
])
|
|
932
|
-
),
|
|
933
|
-
status: "approved"
|
|
934
|
-
}
|
|
935
|
-
);
|
|
936
|
-
k("update:submission", v), y.open({
|
|
937
|
-
type: "success",
|
|
938
|
-
title: "Submission updated successfully"
|
|
939
|
-
});
|
|
940
|
-
} catch (v) {
|
|
941
|
-
y.open({
|
|
942
|
-
type: "error",
|
|
943
|
-
title: "Error occurs when updating submission",
|
|
944
|
-
message: Q(v)
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
}), Z = () => B(async () => {
|
|
948
|
-
try {
|
|
949
|
-
const v = await M.reviewById(
|
|
950
|
-
c.submission._id,
|
|
951
|
-
{
|
|
952
|
-
status: "rejected",
|
|
953
|
-
statusReason: q.value
|
|
954
|
-
}
|
|
955
|
-
);
|
|
956
|
-
k("update:submission", v), I.value = !1, y.open({
|
|
957
|
-
type: "success",
|
|
958
|
-
title: "Submission updated successfully"
|
|
959
|
-
});
|
|
960
|
-
} catch (v) {
|
|
961
|
-
y.open({
|
|
962
|
-
type: "error",
|
|
963
|
-
title: "Error occurs when updating submission",
|
|
964
|
-
message: Q(v)
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
});
|
|
968
|
-
return (v, s) => {
|
|
969
|
-
const S = N("FmTextField"), h = N("FmButton"), ae = N("FmTextarea"), se = N("FmDialog"), _ = N("FmPhoneNumber"), b = N("FmForm");
|
|
970
|
-
return d(), w(K, null, [
|
|
971
|
-
a("div", ml, [
|
|
972
|
-
a("div", null, [
|
|
973
|
-
s[31] || (s[31] = a("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
|
|
974
|
-
a("span", pl, F(e(R)), 1)
|
|
975
|
-
]),
|
|
976
|
-
a("div", null, [
|
|
977
|
-
s[32] || (s[32] = a("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
|
|
978
|
-
a("span", bl, F(e(V).name) + " ( " + F(e(V).legalName) + " )", 1)
|
|
979
|
-
]),
|
|
980
|
-
a("div", null, [
|
|
981
|
-
s[33] || (s[33] = a("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
|
|
982
|
-
a("span", cl, F(e(V).email), 1)
|
|
983
|
-
]),
|
|
984
|
-
a("div", null, [
|
|
985
|
-
s[34] || (s[34] = a("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
|
|
986
|
-
a("span", gl, F(e(V).phoneNo), 1)
|
|
987
|
-
]),
|
|
988
|
-
a("div", null, [
|
|
989
|
-
s[35] || (s[35] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
|
|
990
|
-
a("span", yl, [
|
|
991
|
-
n(pe, { data: e(U) }, null, 8, ["data"])
|
|
992
|
-
])
|
|
993
|
-
]),
|
|
994
|
-
a("div", null, [
|
|
995
|
-
s[36] || (s[36] = a("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
|
|
996
|
-
a("span", Vl, F(e(x)), 1)
|
|
997
|
-
])
|
|
998
|
-
]),
|
|
999
|
-
s[43] || (s[43] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Rate Settings", -1)),
|
|
1000
|
-
a("div", vl, [
|
|
1001
|
-
(d(), w(K, null, G(A, (l) => n(S, {
|
|
1002
|
-
key: l.key,
|
|
1003
|
-
modelValue: E.value[l.key],
|
|
1004
|
-
"onUpdate:modelValue": (T) => E.value[l.key] = T,
|
|
1005
|
-
label: l.label,
|
|
1006
|
-
"label-mark": "required",
|
|
1007
|
-
type: "number",
|
|
1008
|
-
inputmode: "numeric",
|
|
1009
|
-
decimal: 2,
|
|
1010
|
-
rules: e(i)(
|
|
1011
|
-
e(u).string().min(1, "Rate is required").transform((T) => parseFloat(T)).refine((T) => !isNaN(T), { message: "Rate must be a number" })
|
|
1012
|
-
)
|
|
1013
|
-
}, {
|
|
1014
|
-
append: f(() => [...s[37] || (s[37] = [
|
|
1015
|
-
J("%", -1)
|
|
1016
|
-
])]),
|
|
1017
|
-
_: 1
|
|
1018
|
-
}, 8, ["modelValue", "onUpdate:modelValue", "label", "rules"])), 64))
|
|
1019
|
-
]),
|
|
1020
|
-
a("div", fl, [
|
|
1021
|
-
n(se, {
|
|
1022
|
-
modelValue: I.value,
|
|
1023
|
-
"onUpdate:modelValue": s[1] || (s[1] = (l) => I.value = l)
|
|
1024
|
-
}, {
|
|
1025
|
-
"dialog-button": f(() => [
|
|
1026
|
-
n(h, {
|
|
1027
|
-
class: "mr-6",
|
|
1028
|
-
type: "button",
|
|
1029
|
-
variant: "destructive",
|
|
1030
|
-
"prepend-icon": "block",
|
|
1031
|
-
loading: e(g),
|
|
1032
|
-
label: "Reject Submission"
|
|
1033
|
-
}, null, 8, ["loading"])
|
|
1034
|
-
]),
|
|
1035
|
-
"dialog-header": f(() => [...s[38] || (s[38] = [
|
|
1036
|
-
a("div", null, "Rejecting Submission", -1)
|
|
1037
|
-
])]),
|
|
1038
|
-
default: f(() => [
|
|
1039
|
-
n(ae, {
|
|
1040
|
-
modelValue: q.value,
|
|
1041
|
-
"onUpdate:modelValue": s[0] || (s[0] = (l) => q.value = l),
|
|
1042
|
-
label: "Reason for Rejection",
|
|
1043
|
-
"label-mark": "optional",
|
|
1044
|
-
"helper-text": "Please provide a reason for rejection."
|
|
1045
|
-
}, null, 8, ["modelValue"]),
|
|
1046
|
-
n(h, {
|
|
1047
|
-
class: "mb-2 mt-6 w-full",
|
|
1048
|
-
label: "Submit",
|
|
1049
|
-
"prepend-icon": "save",
|
|
1050
|
-
onClick: Z,
|
|
1051
|
-
loading: e(g)
|
|
1052
|
-
}, null, 8, ["loading"])
|
|
1053
|
-
]),
|
|
1054
|
-
_: 1
|
|
1055
|
-
}, 8, ["modelValue"]),
|
|
1056
|
-
n(h, {
|
|
1057
|
-
type: "button",
|
|
1058
|
-
variant: "primary",
|
|
1059
|
-
"prepend-icon": "approval",
|
|
1060
|
-
label: "Approve Submission with Rates",
|
|
1061
|
-
disabled: !Y.value,
|
|
1062
|
-
onClick: L,
|
|
1063
|
-
loading: e(g)
|
|
1064
|
-
}, null, 8, ["disabled", "loading"]),
|
|
1065
|
-
e(U) === "approved" ? (d(), D(h, {
|
|
1066
|
-
key: 0,
|
|
1067
|
-
type: "button",
|
|
1068
|
-
variant: "secondary",
|
|
1069
|
-
"prepend-icon": "check_circle",
|
|
1070
|
-
label: "Mark as Ready",
|
|
1071
|
-
class: "ml-6",
|
|
1072
|
-
onClick: te,
|
|
1073
|
-
loading: e(g)
|
|
1074
|
-
}, null, 8, ["loading"])) : $("", !0)
|
|
1075
|
-
]),
|
|
1076
|
-
n(b, { disabled: !0 }, {
|
|
1077
|
-
default: f(() => [
|
|
1078
|
-
s[39] || (s[39] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
|
|
1079
|
-
a("div", kl, [
|
|
1080
|
-
a("div", Cl, [
|
|
1081
|
-
n(S, {
|
|
1082
|
-
modelValue: e(o).companyName,
|
|
1083
|
-
"onUpdate:modelValue": s[2] || (s[2] = (l) => e(o).companyName = l),
|
|
1084
|
-
label: "Company Name",
|
|
1085
|
-
"label-mark": "required",
|
|
1086
|
-
rules: e(i)(e(u).string().min(1, "Company Name is required"))
|
|
1087
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1088
|
-
]),
|
|
1089
|
-
a("div", Nl, [
|
|
1090
|
-
n(S, {
|
|
1091
|
-
modelValue: e(o).outletName,
|
|
1092
|
-
"onUpdate:modelValue": s[3] || (s[3] = (l) => e(o).outletName = l),
|
|
1093
|
-
label: "Outlet Name (Thai)",
|
|
1094
|
-
"label-mark": "required",
|
|
1095
|
-
rules: e(i)(e(u).string().min(1, "Outlet Name is required"))
|
|
1096
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1097
|
-
]),
|
|
1098
|
-
a("div", Sl, [
|
|
1099
|
-
n(S, {
|
|
1100
|
-
modelValue: e(o).outletNameEnglish,
|
|
1101
|
-
"onUpdate:modelValue": s[4] || (s[4] = (l) => e(o).outletNameEnglish = l),
|
|
1102
|
-
label: "Outlet Name (English)",
|
|
1103
|
-
"label-mark": "required",
|
|
1104
|
-
rules: e(i)(e(u).string().min(1, "Outlet Name English is required"))
|
|
1105
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1106
|
-
]),
|
|
1107
|
-
a("div", Pl, [
|
|
1108
|
-
n(S, {
|
|
1109
|
-
modelValue: e(o).outletAddress,
|
|
1110
|
-
"onUpdate:modelValue": s[5] || (s[5] = (l) => e(o).outletAddress = l),
|
|
1111
|
-
label: "Outlet Address",
|
|
1112
|
-
"label-mark": "required",
|
|
1113
|
-
rules: e(i)(e(u).string().min(1, "Outlet Address is required"))
|
|
1114
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1115
|
-
]),
|
|
1116
|
-
n(S, {
|
|
1117
|
-
modelValue: e(o).outletPostCode,
|
|
1118
|
-
"onUpdate:modelValue": s[6] || (s[6] = (l) => e(o).outletPostCode = l),
|
|
1119
|
-
label: "Post Code",
|
|
1120
|
-
"label-mark": "required",
|
|
1121
|
-
rules: e(i)(e(u).string().min(1, "Post Code is required"))
|
|
1122
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1123
|
-
n(S, {
|
|
1124
|
-
modelValue: e(o).outletState,
|
|
1125
|
-
"onUpdate:modelValue": s[7] || (s[7] = (l) => e(o).outletState = l),
|
|
1126
|
-
label: "State",
|
|
1127
|
-
"label-mark": "required",
|
|
1128
|
-
rules: e(i)(e(u).string().min(1, "State is required"))
|
|
1129
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1130
|
-
n(S, {
|
|
1131
|
-
modelValue: e(o).outletCity,
|
|
1132
|
-
"onUpdate:modelValue": s[8] || (s[8] = (l) => e(o).outletCity = l),
|
|
1133
|
-
label: "City",
|
|
1134
|
-
"label-mark": "required",
|
|
1135
|
-
rules: e(i)(e(u).string().min(1, "City is required"))
|
|
1136
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1137
|
-
n(S, {
|
|
1138
|
-
"model-value": le.value,
|
|
1139
|
-
label: "Business Type",
|
|
1140
|
-
"label-mark": "required"
|
|
1141
|
-
}, null, 8, ["model-value"]),
|
|
1142
|
-
n(S, {
|
|
1143
|
-
modelValue: e(o).numberOfDevices,
|
|
1144
|
-
"onUpdate:modelValue": s[9] || (s[9] = (l) => e(o).numberOfDevices = l),
|
|
1145
|
-
label: "Number of Devices",
|
|
1146
|
-
"label-mark": "required"
|
|
1147
|
-
}, null, 8, ["modelValue"])
|
|
1148
|
-
]),
|
|
1149
|
-
s[40] || (s[40] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information ", -1)),
|
|
1150
|
-
a("div", ql, [
|
|
1151
|
-
n(S, {
|
|
1152
|
-
modelValue: e(o).bankName,
|
|
1153
|
-
"onUpdate:modelValue": s[10] || (s[10] = (l) => e(o).bankName = l),
|
|
1154
|
-
label: "Bank Name",
|
|
1155
|
-
"label-mark": "required",
|
|
1156
|
-
rules: e(i)(e(u).string().min(1, "Bank Name is required"))
|
|
1157
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1158
|
-
n(S, {
|
|
1159
|
-
modelValue: e(o).bankHolderName,
|
|
1160
|
-
"onUpdate:modelValue": s[11] || (s[11] = (l) => e(o).bankHolderName = l),
|
|
1161
|
-
label: "Bank Holder Name",
|
|
1162
|
-
"label-mark": "required",
|
|
1163
|
-
rules: e(i)(e(u).string().min(1, "Bank Holder Name is required"))
|
|
1164
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1165
|
-
n(S, {
|
|
1166
|
-
modelValue: e(o).bankAccountNo,
|
|
1167
|
-
"onUpdate:modelValue": s[12] || (s[12] = (l) => e(o).bankAccountNo = l),
|
|
1168
|
-
label: "Bank Account No",
|
|
1169
|
-
"label-mark": "required",
|
|
1170
|
-
rules: e(i)(e(u).string().min(1, "Bank Account No is required"))
|
|
1171
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1172
|
-
n(S, {
|
|
1173
|
-
modelValue: e(o).bankBranch,
|
|
1174
|
-
"onUpdate:modelValue": s[13] || (s[13] = (l) => e(o).bankBranch = l),
|
|
1175
|
-
label: "Bank Branch",
|
|
1176
|
-
"label-mark": "required",
|
|
1177
|
-
rules: e(i)(e(u).string().min(1, "Bank Branch is required"))
|
|
1178
|
-
}, null, 8, ["modelValue", "rules"]),
|
|
1179
|
-
n(S, {
|
|
1180
|
-
modelValue: e(o).bankBranchCode,
|
|
1181
|
-
"onUpdate:modelValue": s[14] || (s[14] = (l) => e(o).bankBranchCode = l),
|
|
1182
|
-
label: "Bank Branch Code",
|
|
1183
|
-
"label-mark": "required",
|
|
1184
|
-
rules: e(i)(e(u).string().min(1, "Bank Branch Code is required"))
|
|
1185
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1186
|
-
]),
|
|
1187
|
-
s[41] || (s[41] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Documents", -1)),
|
|
1188
|
-
a("div", wl, [
|
|
1189
|
-
n(P, {
|
|
1190
|
-
label: "Authorized Person ID",
|
|
1191
|
-
modelValue: e(r).authorizedPersonID,
|
|
1192
|
-
"onUpdate:modelValue": s[15] || (s[15] = (l) => e(r).authorizedPersonID = l),
|
|
1193
|
-
type: "image",
|
|
1194
|
-
"restaurant-id": m.submission.restaurantId
|
|
1195
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1196
|
-
n(P, {
|
|
1197
|
-
label: "Outlet Photo",
|
|
1198
|
-
modelValue: e(r).outletPhoto,
|
|
1199
|
-
"onUpdate:modelValue": s[16] || (s[16] = (l) => e(r).outletPhoto = l),
|
|
1200
|
-
type: "image",
|
|
1201
|
-
"restaurant-id": m.submission.restaurantId
|
|
1202
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1203
|
-
n(P, {
|
|
1204
|
-
label: "Interior Photo",
|
|
1205
|
-
modelValue: e(r).interiorPhoto,
|
|
1206
|
-
"onUpdate:modelValue": s[17] || (s[17] = (l) => e(r).interiorPhoto = l),
|
|
1207
|
-
type: "image",
|
|
1208
|
-
"restaurant-id": m.submission.restaurantId
|
|
1209
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1210
|
-
n(P, {
|
|
1211
|
-
label: "Bank Statement",
|
|
1212
|
-
modelValue: e(r).bankStatement,
|
|
1213
|
-
"onUpdate:modelValue": s[18] || (s[18] = (l) => e(r).bankStatement = l),
|
|
1214
|
-
type: "pdf",
|
|
1215
|
-
"restaurant-id": m.submission.restaurantId
|
|
1216
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1217
|
-
e(o).businessType === "juristic" ? (d(), D(P, {
|
|
1218
|
-
key: 0,
|
|
1219
|
-
label: "Company Certificate",
|
|
1220
|
-
type: "pdf",
|
|
1221
|
-
modelValue: e(r).companyCertificate,
|
|
1222
|
-
"onUpdate:modelValue": s[19] || (s[19] = (l) => e(r).companyCertificate = l),
|
|
1223
|
-
"restaurant-id": m.submission.restaurantId
|
|
1224
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
1225
|
-
e(o).businessType === "juristic" ? (d(), D(P, {
|
|
1226
|
-
key: 1,
|
|
1227
|
-
label: "VAT Certificate",
|
|
1228
|
-
type: "pdf",
|
|
1229
|
-
modelValue: e(r).vatCertificate,
|
|
1230
|
-
"onUpdate:modelValue": s[20] || (s[20] = (l) => e(r).vatCertificate = l),
|
|
1231
|
-
"restaurant-id": m.submission.restaurantId
|
|
1232
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0),
|
|
1233
|
-
e(o).businessType === "individual" ? (d(), D(P, {
|
|
1234
|
-
key: 2,
|
|
1235
|
-
label: "Commercial Certificate",
|
|
1236
|
-
type: "pdf",
|
|
1237
|
-
modelValue: e(r).commercialCertificate,
|
|
1238
|
-
"onUpdate:modelValue": s[21] || (s[21] = (l) => e(r).commercialCertificate = l),
|
|
1239
|
-
"restaurant-id": m.submission.restaurantId
|
|
1240
|
-
}, null, 8, ["modelValue", "restaurant-id"])) : $("", !0)
|
|
1241
|
-
]),
|
|
1242
|
-
s[42] || (s[42] = a("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
|
|
1243
|
-
a("div", Il, [
|
|
1244
|
-
a("div", xl, [
|
|
1245
|
-
n(S, {
|
|
1246
|
-
modelValue: e(o).picName,
|
|
1247
|
-
"onUpdate:modelValue": s[22] || (s[22] = (l) => e(o).picName = l),
|
|
1248
|
-
label: "PIC Name",
|
|
1249
|
-
"label-mark": "required",
|
|
1250
|
-
rules: e(i)(e(u).string().min(1, "PIC Name is required"))
|
|
1251
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1252
|
-
]),
|
|
1253
|
-
a("div", Fl, [
|
|
1254
|
-
n(S, {
|
|
1255
|
-
modelValue: e(o).picRole,
|
|
1256
|
-
"onUpdate:modelValue": s[23] || (s[23] = (l) => e(o).picRole = l),
|
|
1257
|
-
label: "PIC Role",
|
|
1258
|
-
"label-mark": "required",
|
|
1259
|
-
rules: e(i)(e(u).string().min(1, "PIC Role is required"))
|
|
1260
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1261
|
-
]),
|
|
1262
|
-
a("div", Dl, [
|
|
1263
|
-
n(S, {
|
|
1264
|
-
modelValue: e(o).picEmail,
|
|
1265
|
-
"onUpdate:modelValue": s[24] || (s[24] = (l) => e(o).picEmail = l),
|
|
1266
|
-
label: "PIC Email",
|
|
1267
|
-
"label-mark": "required",
|
|
1268
|
-
rules: e(i)(e(u).string().min(1, "PIC Email is required"))
|
|
1269
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1270
|
-
]),
|
|
1271
|
-
a("div", Ul, [
|
|
1272
|
-
n(_, {
|
|
1273
|
-
"model-value": e(o).picContact,
|
|
1274
|
-
"onUpdate:modelValue": s[25] || (s[25] = (l) => e(o).picContact = l),
|
|
1275
|
-
"default-country": "TH",
|
|
1276
|
-
label: "PIC Contact",
|
|
1277
|
-
"label-mark": "required",
|
|
1278
|
-
rules: e(i)(e(u).string().min(1, "PIC Contact is required"))
|
|
1279
|
-
}, null, 8, ["model-value", "rules"])
|
|
1280
|
-
]),
|
|
1281
|
-
a("div", Rl, [
|
|
1282
|
-
n(S, {
|
|
1283
|
-
modelValue: e(o).witnessName,
|
|
1284
|
-
"onUpdate:modelValue": s[26] || (s[26] = (l) => e(o).witnessName = l),
|
|
1285
|
-
label: "Witness Name",
|
|
1286
|
-
"label-mark": "required",
|
|
1287
|
-
rules: e(i)(e(u).string().min(1, "Witness Name is required"))
|
|
1288
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1289
|
-
]),
|
|
1290
|
-
a("div", Al, [
|
|
1291
|
-
n(S, {
|
|
1292
|
-
modelValue: e(o).witnessRole,
|
|
1293
|
-
"onUpdate:modelValue": s[27] || (s[27] = (l) => e(o).witnessRole = l),
|
|
1294
|
-
label: "Witness Role",
|
|
1295
|
-
"label-mark": "required",
|
|
1296
|
-
rules: e(i)(e(u).string().min(1, "Witness Role is required"))
|
|
1297
|
-
}, null, 8, ["modelValue", "rules"])
|
|
1298
|
-
]),
|
|
1299
|
-
n(P, {
|
|
1300
|
-
label: "Signature",
|
|
1301
|
-
type: "image",
|
|
1302
|
-
modelValue: e(r).signature,
|
|
1303
|
-
"onUpdate:modelValue": s[28] || (s[28] = (l) => e(r).signature = l),
|
|
1304
|
-
"restaurant-id": m.submission.restaurantId
|
|
1305
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1306
|
-
n(P, {
|
|
1307
|
-
label: "Witness Signature",
|
|
1308
|
-
type: "image",
|
|
1309
|
-
modelValue: e(r).witnessSignature,
|
|
1310
|
-
"onUpdate:modelValue": s[29] || (s[29] = (l) => e(r).witnessSignature = l),
|
|
1311
|
-
"restaurant-id": m.submission.restaurantId
|
|
1312
|
-
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1313
|
-
n(P, {
|
|
1314
|
-
label: "Company Stamp",
|
|
1315
|
-
type: "image",
|
|
1316
|
-
modelValue: e(r).companyStamp,
|
|
1317
|
-
"onUpdate:modelValue": s[30] || (s[30] = (l) => e(r).companyStamp = l),
|
|
1318
|
-
"restaurant-id": m.submission.restaurantId
|
|
1319
|
-
}, null, 8, ["modelValue", "restaurant-id"])
|
|
1320
|
-
])
|
|
1321
|
-
]),
|
|
1322
|
-
_: 1
|
|
1323
|
-
})
|
|
1324
|
-
], 64);
|
|
1325
|
-
};
|
|
1326
|
-
}
|
|
1327
|
-
}), Bl = /* @__PURE__ */ X({
|
|
1328
|
-
__name: "TyroSubmission",
|
|
1329
|
-
props: {
|
|
1330
|
-
submission: {
|
|
1331
|
-
type: Object,
|
|
1332
|
-
required: !0
|
|
1333
|
-
}
|
|
1334
|
-
},
|
|
1335
|
-
emits: ["update:submission"],
|
|
1336
|
-
setup(m) {
|
|
1337
|
-
const O = m, c = z(() => {
|
|
1338
|
-
const k = O.submission.fields || {}, y = (I) => k[I] || "N/A";
|
|
1339
|
-
return [
|
|
1340
|
-
{
|
|
1341
|
-
label: "Tyro POS Reference ID",
|
|
1342
|
-
value: y("tyroPosReference")
|
|
1343
|
-
},
|
|
1344
|
-
{
|
|
1345
|
-
label: "Tyro Merchant ID",
|
|
1346
|
-
value: y("tyroMerchantId")
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
label: "Tyro Merchant Name",
|
|
1350
|
-
value: y("tyroMerchantDisplayName")
|
|
1351
|
-
},
|
|
1352
|
-
{
|
|
1353
|
-
label: "Authorised",
|
|
1354
|
-
value: y("tyroIsAuthorised")
|
|
1355
|
-
}
|
|
1356
|
-
];
|
|
1357
|
-
});
|
|
1358
|
-
return (k, y) => {
|
|
1359
|
-
const I = N("FmCardHeader"), g = N("FmCardSection"), B = N("FmCard");
|
|
1360
|
-
return d(), D(B, {
|
|
1361
|
-
class: "max-w-3xl mt-8 p-6",
|
|
1362
|
-
variant: "elevated"
|
|
1363
|
-
}, {
|
|
1364
|
-
default: f(() => [
|
|
1365
|
-
n(g, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1366
|
-
default: f(() => [
|
|
1367
|
-
n(I, {
|
|
1368
|
-
class: "p-0",
|
|
1369
|
-
title: "Tyro Authorisation",
|
|
1370
|
-
subtitle: ""
|
|
1371
|
-
}),
|
|
1372
|
-
n(g, { class: "p-0" }, {
|
|
1373
|
-
default: f(() => [
|
|
1374
|
-
(d(!0), w(K, null, G(c.value, (o) => (d(), w("p", {
|
|
1375
|
-
key: o.label,
|
|
1376
|
-
class: "text-sm text-gray-900 break-all mb-4 last:mb-0"
|
|
1377
|
-
}, [
|
|
1378
|
-
a("b", null, F(o.label), 1),
|
|
1379
|
-
J(": " + F(o.value), 1)
|
|
1380
|
-
]))), 128))
|
|
1381
|
-
]),
|
|
1382
|
-
_: 1
|
|
1383
|
-
})
|
|
1384
|
-
]),
|
|
1385
|
-
_: 1
|
|
1386
|
-
})
|
|
1387
|
-
]),
|
|
1388
|
-
_: 1
|
|
1389
|
-
});
|
|
1390
|
-
};
|
|
1391
|
-
}
|
|
1392
|
-
}), El = {
|
|
1393
|
-
key: 0,
|
|
1394
|
-
class: "flex items-center justify-center min-h-[80vh]"
|
|
1395
|
-
}, $l = { class: "px-32 pb-32" }, Xl = /* @__PURE__ */ X({
|
|
1396
|
-
__name: "OnboardForm",
|
|
1397
|
-
props: {
|
|
1398
|
-
submissionId: {
|
|
1399
|
-
type: String,
|
|
1400
|
-
required: !0
|
|
1401
|
-
}
|
|
1402
|
-
},
|
|
1403
|
-
setup(m) {
|
|
1404
|
-
const { startAsyncCall: O, isLoading: c } = ee(), k = oe(), y = m, I = fe(), g = j(null), B = z(
|
|
1405
|
-
() => {
|
|
1406
|
-
var x;
|
|
1407
|
-
return ((x = g.value) == null ? void 0 : x.type) === de.FdoOnboardType.enum.tyro;
|
|
1408
|
-
}
|
|
1409
|
-
), o = () => {
|
|
1410
|
-
if (window.history.length > 1) {
|
|
1411
|
-
I.back();
|
|
1412
|
-
return;
|
|
1413
|
-
}
|
|
1414
|
-
I.push({ name: "mf-payment-admin.onboard-submission" });
|
|
1415
|
-
};
|
|
1416
|
-
Ve(() => {
|
|
1417
|
-
O(async () => {
|
|
1418
|
-
g.value = await M.readById(y.submissionId);
|
|
1419
|
-
});
|
|
1420
|
-
});
|
|
1421
|
-
const r = z(() => {
|
|
1422
|
-
if (!g.value) return null;
|
|
1423
|
-
switch (g.value.type) {
|
|
1424
|
-
case "softspace":
|
|
1425
|
-
return dl;
|
|
1426
|
-
case "ntt":
|
|
1427
|
-
return Tl;
|
|
1428
|
-
case "tyro":
|
|
1429
|
-
return Bl;
|
|
1430
|
-
default:
|
|
1431
|
-
return null;
|
|
1432
|
-
}
|
|
1433
|
-
}), R = j(0);
|
|
1434
|
-
function V(x) {
|
|
1435
|
-
g.value = x, R.value = Date.now();
|
|
1436
|
-
}
|
|
1437
|
-
const U = async (x) => {
|
|
1438
|
-
var q, A;
|
|
1439
|
-
if (g.value)
|
|
1440
|
-
switch (x) {
|
|
1441
|
-
case "preview":
|
|
1442
|
-
let p;
|
|
1443
|
-
try {
|
|
1444
|
-
p = k.open({
|
|
1445
|
-
message: "Generating preview document...",
|
|
1446
|
-
type: "info"
|
|
1447
|
-
}), await M.previewDocument(
|
|
1448
|
-
(q = g.value) == null ? void 0 : q._id
|
|
1449
|
-
);
|
|
1450
|
-
} catch (E) {
|
|
1451
|
-
k.open({
|
|
1452
|
-
type: "error",
|
|
1453
|
-
title: "Error occurs when generating submission document",
|
|
1454
|
-
message: Q(E)
|
|
1455
|
-
});
|
|
1456
|
-
} finally {
|
|
1457
|
-
p && k.close(p);
|
|
1458
|
-
}
|
|
1459
|
-
break;
|
|
1460
|
-
case "send":
|
|
1461
|
-
try {
|
|
1462
|
-
k.open({
|
|
1463
|
-
message: "Sending onboarding document...",
|
|
1464
|
-
type: "info"
|
|
1465
|
-
}), await M.sendDocument(
|
|
1466
|
-
(A = g.value) == null ? void 0 : A._id
|
|
1467
|
-
), k.open({
|
|
1468
|
-
type: "success",
|
|
1469
|
-
title: "Submission documents send successfully"
|
|
1470
|
-
});
|
|
1471
|
-
} catch (E) {
|
|
1472
|
-
k.open({
|
|
1473
|
-
type: "error",
|
|
1474
|
-
title: "Error occurs when sending document",
|
|
1475
|
-
message: Q(E)
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
break;
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
|
-
return (x, q) => {
|
|
1482
|
-
var E, Y;
|
|
1483
|
-
const A = N("FmCircularProgress"), p = N("FmPageHead");
|
|
1484
|
-
return e(c) ? (d(), w("div", El, [
|
|
1485
|
-
n(A, { size: "xxl" })
|
|
1486
|
-
])) : (d(), w(K, { key: 1 }, [
|
|
1487
|
-
n(p, {
|
|
1488
|
-
title: `Submission - ${(E = g.value) == null ? void 0 : E.type}`,
|
|
1489
|
-
description: `ID - ${(Y = g.value) == null ? void 0 : Y._id}`,
|
|
1490
|
-
"back-button": !0,
|
|
1491
|
-
"onClick:back": o,
|
|
1492
|
-
"onClick:action": U,
|
|
1493
|
-
actions: B.value ? [] : [
|
|
1494
|
-
{
|
|
1495
|
-
label: "Preview Document",
|
|
1496
|
-
value: "preview",
|
|
1497
|
-
prependIcon: "preview"
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
label: "Send for Review",
|
|
1501
|
-
value: "send",
|
|
1502
|
-
isPrimary: !0,
|
|
1503
|
-
prependIcon: "send"
|
|
1504
|
-
}
|
|
1505
|
-
]
|
|
1506
|
-
}, null, 8, ["title", "description", "actions"]),
|
|
1507
|
-
a("div", $l, [
|
|
1508
|
-
(d(), D(ve(r.value), {
|
|
1509
|
-
key: R.value,
|
|
1510
|
-
submission: g.value,
|
|
1511
|
-
"onUpdate:submission": V
|
|
1512
|
-
}, null, 40, ["submission"]))
|
|
1513
|
-
])
|
|
1514
|
-
], 64));
|
|
1515
|
-
};
|
|
1516
|
-
}
|
|
1517
|
-
});
|
|
1518
|
-
export {
|
|
1519
|
-
Xl as default
|
|
1520
|
-
};
|