@feedmepos/mf-payment 1.11.7-dev → 1.11.9-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-obFIUouj.js → Actions.vue_vue_type_script_setup_true_lang-C6iMpOG0.js} +1 -1
- package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-CqepwgDx.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-8zKYy8hm.js} +3 -3
- package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-Dx1XCkCx.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-UQfXH3aI.js} +3 -3
- package/dist/{Chargeback-COQpd3Yj.js → Chargeback-kuFUlTm0.js} +5 -5
- package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-C-dDqp7f.js → DocumentViewer.vue_vue_type_script_setup_true_lang-CI0hXqz-.js} +1 -1
- package/dist/{ExternalTerminal-CaOX3u4z.js → ExternalTerminal-BkIOJ1h6.js} +6 -6
- package/dist/{OnboardForm-DxmIw_3h.js → OnboardForm-DfQ-oxp2.js} +6 -6
- package/dist/OnboardForm-Di1scmsj.js +1896 -0
- package/dist/{OnboardSubmission-Tz031VAY.js → OnboardSubmission-6RgF8vIO.js} +3 -3
- package/dist/{OnboardSubmission-Dp_xhBsp.js → OnboardSubmission-BpRCyUDj.js} +6 -6
- package/dist/{PaymentCheckout-dJFEl1ft.js → PaymentCheckout-I--Ix7SY.js} +2 -2
- package/dist/{PayoutAccount-2gWMhM96.js → PayoutAccount-D8G26AUX.js} +5 -5
- package/dist/{PayoutAccount-DpRnWZDF.js → PayoutAccount-DkwA3XB4.js} +7 -7
- package/dist/{PayoutAccountSetting-sZLpu3Ak.js → PayoutAccountSetting-BvxNhGBZ.js} +6 -6
- package/dist/{Restaurant-D5QQJROI.js → Restaurant-CeEAWj7r.js} +4 -4
- package/dist/{RestaurantSetting-DElCauud.js → RestaurantSetting-CyiHBFzs.js} +3 -3
- package/dist/{Settlement-DvUcKGwJ.js → Settlement-DAphDz9g.js} +3 -3
- package/dist/{Settlement-CMlTq7mL.js → Settlement-DIetMLlh.js} +4 -4
- package/dist/{SettlementTransactions-DPnRI_W9.js → SettlementTransactions-BRSmqrGh.js} +5 -5
- package/dist/{SettlementTransactions-zghvREd6.js → SettlementTransactions-DDrvig__.js} +5 -5
- package/dist/{Status.vue_vue_type_script_setup_true_lang-CpE5cr5D.js → Status.vue_vue_type_script_setup_true_lang-fNF-thwY.js} +1 -1
- package/dist/{Terminal-CkSLN2nb.js → Terminal-C7yxl2gd.js} +6 -6
- package/dist/{TerminalSetting-CHTC15t8.js → TerminalSetting-CS2mIV98.js} +7 -7
- package/dist/{TerminalTemplate-BDXSq6bM.js → TerminalTemplate-D-E7SNj_.js} +5 -5
- package/dist/{TerminalTemplateSetting-BAGtTHck.js → TerminalTemplateSetting-BOVqJrB8.js} +5 -5
- package/dist/{Transaction-CoQw9RbA.js → Transaction-D1Z0pbZI.js} +10 -10
- package/dist/{Transaction-Cn4hwNBo.js → Transaction-jLre5qZN.js} +12 -12
- package/dist/{TransactionOld-yaH2tAak.js → TransactionOld-CHGUT0j5.js} +7 -7
- package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-DIwYZmKw.js → TransactionStatus.vue_vue_type_script_setup_true_lang-COGg7qwF.js} +1 -1
- package/dist/api/onboard-submission/index.d.ts +1 -2
- package/dist/{app-DI6MkNPJ.js → app-CO3_puu6.js} +26 -26
- package/dist/app.js +1 -1
- package/dist/{assets-C5gLfHW4.js → assets-B7E-RcJo.js} +1 -1
- package/dist/{grafana-OSu2vUDQ.js → grafana-CPFB-VRo.js} +1 -1
- package/dist/helpers/markdown.d.ts +43 -0
- package/dist/{index-DJ3hTO2H.js → index-C0R9YqGR.js} +1 -1
- package/dist/{index--0ba-UFm.js → index-CjRGu4TS.js} +1 -1
- package/dist/{index-BHev44Nh.js → index-CmWSO9Jh.js} +1 -1
- package/dist/{index-yQcKsZFL.js → index-CprcFTlw.js} +1 -1
- package/dist/{index-pm22lHhk.js → index-DHGk4YsX.js} +1 -1
- package/dist/{index-Beha55eS.js → index-DfkpG9yG.js} +1 -1
- package/dist/{index-BK3vU8O2.js → index-DhiYeu07.js} +1 -1
- package/dist/{index-D0fIU9RB.js → index-E_KBZ6So.js} +28 -36
- package/dist/{index-D_-9fVTA.js → index-KaGpyAuf.js} +1 -1
- package/dist/{index-Cg8P2DVM.js → index-QrLQheyX.js} +3461 -3528
- package/dist/{index-K6gOH66a.js → index-ngXaSTR8.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B55lbIBv.js → index.vue_vue_type_script_setup_true_lang-YMELZcS8.js} +1 -1
- package/dist/model/payout-account.d.ts +2 -2
- package/dist/{onboard-submission-63QqD2VM.js → onboard-submission-CUn9rG8I.js} +1 -1
- package/dist/package.json +2 -2
- package/dist/{payout-account-bOuqtG6j.js → payout-account-Bid6B__U.js} +3 -3
- package/dist/stores/payoutAccount.d.ts +4 -4
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useQuery-BSShTcQi.js → useQuery-CuxGX655.js} +1 -1
- package/dist/views/admin/onboard-submission/cell/AiSummary.vue.d.ts +15 -0
- package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +8 -0
- package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +8 -0
- package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +12 -4
- package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +8 -8
- package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +4 -4
- package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +8 -8
- 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/settlement/SettlementTable.vue.d.ts +28 -28
- package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/Information.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +2 -2
- package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +2 -2
- package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +4 -4
- package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +2 -2
- package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +2 -2
- package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +8 -8
- package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +60 -60
- package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +30 -30
- package/dist/views/settlement/SettlementTable.vue.d.ts +28 -28
- package/package.json +2 -2
- package/dist/OnboardForm-BvDzBi0Q.js +0 -1805
|
@@ -0,0 +1,1896 @@
|
|
|
1
|
+
import { defineComponent as J, ref as B, computed as j, resolveComponent as U, openBlock as i, createElementBlock as p, createElementVNode as s, toDisplayString as q, createBlock as L, withCtx as h, createCommentVNode as E, createVNode as o, unref as e, onMounted as ve, watch as he, Fragment as A, renderList as O, normalizeClass as ie, nextTick as Re, resolveDynamicComponent as ue, createTextVNode as Q } from "vue";
|
|
2
|
+
import { o as H } from "./index-E_KBZ6So.js";
|
|
3
|
+
import { u as ne, p as Ve } from "./index-QrLQheyX.js";
|
|
4
|
+
import { useRouter as Ie } from "vue-router";
|
|
5
|
+
import { z as g, a as y } from "./validator-CTlVogBQ.js";
|
|
6
|
+
import { D as qe, P as Ue } from "./payout-account-Bid6B__U.js";
|
|
7
|
+
import { a as $e } from "./onboard-submission-CUn9rG8I.js";
|
|
8
|
+
import { _ as ke } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-CI0hXqz-.js";
|
|
9
|
+
import { s as De } from "./vue-signature-pad.esm-IXPjf4fL.js";
|
|
10
|
+
import { _ as Ce } from "./Status.vue_vue_type_script_setup_true_lang-fNF-thwY.js";
|
|
11
|
+
import { useSnackbar as de } from "@feedmepos/ui-library";
|
|
12
|
+
import { u as G } from "./error-K1CakhA9.js";
|
|
13
|
+
const Fe = ["src"], pe = ".png, .jpg, .jpeg", be = ".pdf", T = /* @__PURE__ */ J({
|
|
14
|
+
__name: "UploadButton",
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: {},
|
|
17
|
+
label: {},
|
|
18
|
+
type: {},
|
|
19
|
+
restaurantId: {}
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(d, { emit: v }) {
|
|
23
|
+
const u = d, V = B(u.modelValue), b = v, m = (r) => {
|
|
24
|
+
const C = new FileReader();
|
|
25
|
+
C.onload = (c) => {
|
|
26
|
+
var P;
|
|
27
|
+
V.value = (P = c.target) == null ? void 0 : P.result, b("update:modelValue", r);
|
|
28
|
+
}, C.readAsDataURL(r);
|
|
29
|
+
}, f = (r) => {
|
|
30
|
+
window.open(r, "_blank", "noopener,noreferrer");
|
|
31
|
+
}, x = j(() => u.type === "image" ? pe : u.type === "pdf" ? be : `${pe}, ${be}`), a = (r) => u.type === "pdf" ? !0 : u.type === "image" ? !1 : r === "application/pdf";
|
|
32
|
+
return (r, C) => {
|
|
33
|
+
const c = U("FmButton"), P = U("FmDropField");
|
|
34
|
+
return i(), p("div", null, [
|
|
35
|
+
s("p", null, q(d.label), 1),
|
|
36
|
+
V.value ? (i(), L(ke, {
|
|
37
|
+
key: 0,
|
|
38
|
+
document: V.value,
|
|
39
|
+
"restaurant-id": d.restaurantId
|
|
40
|
+
}, {
|
|
41
|
+
default: h(({ src: D, type: N }) => [
|
|
42
|
+
a(N) ? (i(), L(c, {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "mt-4 w-full",
|
|
45
|
+
"prepend-icon": "manage_accounts",
|
|
46
|
+
label: "View Document",
|
|
47
|
+
variant: "primary",
|
|
48
|
+
onVnodeMounted: () => f(D),
|
|
49
|
+
onClick: () => f(D)
|
|
50
|
+
}, null, 8, ["onVnodeMounted", "onClick"])) : (i(), p("img", {
|
|
51
|
+
key: 0,
|
|
52
|
+
src: D
|
|
53
|
+
}, null, 8, Fe))
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, ["document", "restaurant-id"])) : (i(), L(P, {
|
|
57
|
+
key: 1,
|
|
58
|
+
accept: x.value,
|
|
59
|
+
onFileUpload: m
|
|
60
|
+
}, null, 8, ["accept"]))
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}), Te = ["src"], Ee = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "text-center text-red-700 py-4"
|
|
67
|
+
}, Le = { class: "flex justify-evenly py-3" }, Ae = /* @__PURE__ */ J({
|
|
68
|
+
__name: "SignatureBoard",
|
|
69
|
+
props: {
|
|
70
|
+
modelValue: {},
|
|
71
|
+
label: {},
|
|
72
|
+
restaurantId: {}
|
|
73
|
+
},
|
|
74
|
+
emits: ["update:modelValue"],
|
|
75
|
+
setup(d, { emit: v }) {
|
|
76
|
+
const u = d, V = v, b = B(u.modelValue), m = B(!1), f = B(), x = B(!1);
|
|
77
|
+
function a(C, c) {
|
|
78
|
+
var S;
|
|
79
|
+
const P = C.split(","), D = ((S = P[0].match(/:(.*?);/)) == null ? void 0 : S[1]) || "", N = atob(P[1]);
|
|
80
|
+
let R = N.length;
|
|
81
|
+
const k = new Uint8Array(R);
|
|
82
|
+
for (; R--; )
|
|
83
|
+
k[R] = N.charCodeAt(R);
|
|
84
|
+
return new File([k], c, { type: D });
|
|
85
|
+
}
|
|
86
|
+
const r = function() {
|
|
87
|
+
const { isEmpty: C, data: c } = f.value.saveSignature();
|
|
88
|
+
if (C)
|
|
89
|
+
return m.value = !0;
|
|
90
|
+
b.value = c, x.value = !1, V("update:modelValue", a(c, "signature.png"));
|
|
91
|
+
};
|
|
92
|
+
return (C, c) => {
|
|
93
|
+
const P = U("FmButton"), D = U("FmDialog");
|
|
94
|
+
return i(), p("div", null, [
|
|
95
|
+
s("p", null, q(d.label), 1),
|
|
96
|
+
b.value ? (i(), L(ke, {
|
|
97
|
+
key: 0,
|
|
98
|
+
document: b.value,
|
|
99
|
+
"restaurant-id": d.restaurantId
|
|
100
|
+
}, {
|
|
101
|
+
default: h(({ src: N }) => [
|
|
102
|
+
s("img", {
|
|
103
|
+
src: N,
|
|
104
|
+
alt: "Signature Preview",
|
|
105
|
+
class: "w-full h-auto"
|
|
106
|
+
}, null, 8, Te)
|
|
107
|
+
]),
|
|
108
|
+
_: 1
|
|
109
|
+
}, 8, ["document", "restaurant-id"])) : E("", !0),
|
|
110
|
+
b.value ? E("", !0) : (i(), L(D, {
|
|
111
|
+
key: 1,
|
|
112
|
+
modelValue: x.value,
|
|
113
|
+
"onUpdate:modelValue": c[1] || (c[1] = (N) => x.value = N)
|
|
114
|
+
}, {
|
|
115
|
+
"dialog-button": h(() => [
|
|
116
|
+
o(P, {
|
|
117
|
+
"prepend-icon": "signature",
|
|
118
|
+
class: "w-full",
|
|
119
|
+
label: "Signature"
|
|
120
|
+
})
|
|
121
|
+
]),
|
|
122
|
+
"dialog-header": h(() => [...c[2] || (c[2] = [
|
|
123
|
+
s("div", null, "Signature Board", -1)
|
|
124
|
+
])]),
|
|
125
|
+
default: h(() => [
|
|
126
|
+
o(e(De), {
|
|
127
|
+
ref_key: "signaturePad",
|
|
128
|
+
ref: f,
|
|
129
|
+
height: "300px",
|
|
130
|
+
customStyle: { border: "2px solid #ccc", borderRadius: "3px" },
|
|
131
|
+
options: { penColor: "#000000" }
|
|
132
|
+
}, null, 512),
|
|
133
|
+
m.value ? (i(), p("p", Ee, " Please sign your signature before saving. ")) : E("", !0),
|
|
134
|
+
s("div", Le, [
|
|
135
|
+
o(P, {
|
|
136
|
+
variant: "destructive",
|
|
137
|
+
label: "Clear",
|
|
138
|
+
"prepend-icon": "delete",
|
|
139
|
+
onClick: c[0] || (c[0] = (N) => f.value.clearSignature())
|
|
140
|
+
}),
|
|
141
|
+
o(P, {
|
|
142
|
+
label: "Save",
|
|
143
|
+
"prepend-icon": "save",
|
|
144
|
+
onClick: r
|
|
145
|
+
})
|
|
146
|
+
])
|
|
147
|
+
]),
|
|
148
|
+
_: 1
|
|
149
|
+
}, 8, ["modelValue"]))
|
|
150
|
+
]);
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}), _e = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), Be = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Oe = new RegExp("(\\d)(\\p{Ll})", "gu"), je = new RegExp("(\\p{L})(\\d)", "gu"), Me = /[^\p{L}\d]+/giu, ae = "$1\0$2";
|
|
154
|
+
function He(d, v = {}) {
|
|
155
|
+
let u = d.replace(_e, ae).replace(Be, ae);
|
|
156
|
+
v.separateNumbers && (u = u.replace(Oe, ae).replace(je, ae)), u = u.replace(Me, "\0");
|
|
157
|
+
let V = 0, b = u.length;
|
|
158
|
+
for (; u.charAt(V) === "\0"; )
|
|
159
|
+
V++;
|
|
160
|
+
if (V === b)
|
|
161
|
+
return [];
|
|
162
|
+
for (; u.charAt(b - 1) === "\0"; )
|
|
163
|
+
b--;
|
|
164
|
+
return u.slice(V, b).split(/\0/g);
|
|
165
|
+
}
|
|
166
|
+
function ze(d) {
|
|
167
|
+
return (v) => v.toLocaleLowerCase(d);
|
|
168
|
+
}
|
|
169
|
+
function We(d) {
|
|
170
|
+
return (v) => v.toLocaleUpperCase(d);
|
|
171
|
+
}
|
|
172
|
+
function ce(d, v) {
|
|
173
|
+
const u = ze(v == null ? void 0 : v.locale), V = We(v == null ? void 0 : v.locale);
|
|
174
|
+
return He(d).map((b, m) => m === 0 ? V(b[0]) + u(b.slice(1)) : u(b)).join(" ");
|
|
175
|
+
}
|
|
176
|
+
const Ye = {
|
|
177
|
+
key: 0,
|
|
178
|
+
class: "text-sm text-gray-500"
|
|
179
|
+
}, Qe = { class: "flex min-w-max items-start pt-1" }, Ge = {
|
|
180
|
+
key: 0,
|
|
181
|
+
class: "absolute left-0 top-[7px] h-[2px] w-1/2 bg-gray-200"
|
|
182
|
+
}, Je = {
|
|
183
|
+
key: 1,
|
|
184
|
+
class: "absolute right-0 top-[7px] h-[2px] w-1/2 bg-gray-200"
|
|
185
|
+
}, Ke = { class: "mt-1 text-sm font-medium leading-snug text-gray-900" }, Xe = {
|
|
186
|
+
key: 2,
|
|
187
|
+
class: "mt-1 rounded bg-gray-100 px-2 py-[2px] text-xs text-gray-600"
|
|
188
|
+
}, Ze = { class: "mt-1 text-xs text-gray-500" }, et = { class: "text-xs text-gray-500" }, tt = {
|
|
189
|
+
key: 4,
|
|
190
|
+
class: "mt-1 text-xs text-gray-500"
|
|
191
|
+
}, lt = {
|
|
192
|
+
key: 5,
|
|
193
|
+
class: "mt-1 whitespace-pre-line break-words text-xs text-gray-700"
|
|
194
|
+
}, xe = /* @__PURE__ */ J({
|
|
195
|
+
__name: "Timeline",
|
|
196
|
+
props: {
|
|
197
|
+
entries: {
|
|
198
|
+
type: Array,
|
|
199
|
+
default: () => []
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
setup(d) {
|
|
203
|
+
const v = d, u = {
|
|
204
|
+
submission: { label: "Submitted", icon: "upload_file", color: "bg-blue-400" },
|
|
205
|
+
resubmission: {
|
|
206
|
+
label: "Resubmitted",
|
|
207
|
+
icon: "upload_file",
|
|
208
|
+
color: "bg-blue-400"
|
|
209
|
+
},
|
|
210
|
+
"send-for-review": {
|
|
211
|
+
label: "Sent for Review",
|
|
212
|
+
icon: "send",
|
|
213
|
+
color: "bg-indigo-400"
|
|
214
|
+
},
|
|
215
|
+
"submission-review-approved": {
|
|
216
|
+
label: "Review Approved",
|
|
217
|
+
icon: "check_circle",
|
|
218
|
+
color: "bg-green-400"
|
|
219
|
+
},
|
|
220
|
+
"submission-review-rejected": {
|
|
221
|
+
label: "Review Rejected",
|
|
222
|
+
icon: "cancel",
|
|
223
|
+
color: "bg-red-400"
|
|
224
|
+
},
|
|
225
|
+
"submission-review-ready": {
|
|
226
|
+
label: "Marked as Ready",
|
|
227
|
+
icon: "task_alt",
|
|
228
|
+
color: "bg-green-400"
|
|
229
|
+
},
|
|
230
|
+
"additional-document": {
|
|
231
|
+
label: "Additional Document Added",
|
|
232
|
+
icon: "attach_file",
|
|
233
|
+
color: "bg-gray-400"
|
|
234
|
+
},
|
|
235
|
+
reminder: {
|
|
236
|
+
label: "Reminder Sent",
|
|
237
|
+
icon: "notifications",
|
|
238
|
+
color: "bg-yellow-400"
|
|
239
|
+
},
|
|
240
|
+
"pending-merchant": {
|
|
241
|
+
label: "Pending Merchant",
|
|
242
|
+
icon: "storefront",
|
|
243
|
+
color: "bg-yellow-400"
|
|
244
|
+
},
|
|
245
|
+
"pending-fasspay": {
|
|
246
|
+
label: "Pending FassPay",
|
|
247
|
+
icon: "hourglass_top",
|
|
248
|
+
color: "bg-orange-400"
|
|
249
|
+
},
|
|
250
|
+
"complete-fasspay": {
|
|
251
|
+
label: "FassPay Completed",
|
|
252
|
+
icon: "task_alt",
|
|
253
|
+
color: "bg-green-400"
|
|
254
|
+
},
|
|
255
|
+
"complete-credit-card": {
|
|
256
|
+
label: "Credit Card Completed",
|
|
257
|
+
icon: "credit_card",
|
|
258
|
+
color: "bg-green-400"
|
|
259
|
+
},
|
|
260
|
+
"provider-update": {
|
|
261
|
+
label: "Provider Update",
|
|
262
|
+
icon: "update",
|
|
263
|
+
color: "bg-orange-400"
|
|
264
|
+
}
|
|
265
|
+
}, V = {
|
|
266
|
+
approved: "bg-green-400",
|
|
267
|
+
ready: "bg-green-400",
|
|
268
|
+
rejected: "bg-red-400",
|
|
269
|
+
submitted: "bg-blue-400",
|
|
270
|
+
pending: "bg-yellow-400"
|
|
271
|
+
};
|
|
272
|
+
function b(a) {
|
|
273
|
+
const r = u[a];
|
|
274
|
+
if (r) return r;
|
|
275
|
+
if (a.startsWith("status-update-")) {
|
|
276
|
+
const C = a.replace("status-update-", "");
|
|
277
|
+
return {
|
|
278
|
+
label: `Status Updated to ${ce(C)}`,
|
|
279
|
+
icon: "sync",
|
|
280
|
+
color: V[C] ?? "bg-gray-400"
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
return {
|
|
284
|
+
label: ce(a.replace(/-/g, " ")),
|
|
285
|
+
icon: "radio_button_checked",
|
|
286
|
+
color: "bg-gray-400"
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
const m = j(
|
|
290
|
+
() => (v.entries ?? []).map((a) => ({
|
|
291
|
+
...a,
|
|
292
|
+
...b(a.action),
|
|
293
|
+
at: qe(a.timestamp)
|
|
294
|
+
})).sort((a, r) => a.at.valueOf() - r.at.valueOf())
|
|
295
|
+
), f = B(null), x = async () => {
|
|
296
|
+
await Re(), f.value && (f.value.scrollLeft = f.value.scrollWidth);
|
|
297
|
+
};
|
|
298
|
+
return ve(x), he(() => m.value.length, x), (a, r) => {
|
|
299
|
+
const C = U("FmIcon");
|
|
300
|
+
return m.value.length ? (i(), p("div", {
|
|
301
|
+
key: 1,
|
|
302
|
+
ref_key: "rail",
|
|
303
|
+
ref: f,
|
|
304
|
+
class: "overflow-x-auto mt-6 pb-6"
|
|
305
|
+
}, [
|
|
306
|
+
s("ol", Qe, [
|
|
307
|
+
(i(!0), p(A, null, O(m.value, (c, P) => (i(), p("li", {
|
|
308
|
+
key: `${c.action}-${c.timestamp}-${P}`,
|
|
309
|
+
class: "relative flex w-[160px] shrink-0 flex-col items-center px-8 text-center"
|
|
310
|
+
}, [
|
|
311
|
+
P > 0 ? (i(), p("span", Ge)) : E("", !0),
|
|
312
|
+
P < m.value.length - 1 ? (i(), p("span", Je)) : E("", !0),
|
|
313
|
+
s("span", {
|
|
314
|
+
class: ie([
|
|
315
|
+
"relative z-10 h-4 w-4 rounded-full ring-4 ring-white",
|
|
316
|
+
c.color
|
|
317
|
+
])
|
|
318
|
+
}, null, 2),
|
|
319
|
+
o(C, {
|
|
320
|
+
name: c.icon,
|
|
321
|
+
size: "sm",
|
|
322
|
+
class: "mt-3 text-gray-500"
|
|
323
|
+
}, null, 8, ["name"]),
|
|
324
|
+
s("span", Ke, q(c.label), 1),
|
|
325
|
+
P === m.value.length - 1 ? (i(), p("span", Xe, " Latest ")) : E("", !0),
|
|
326
|
+
c.at.isValid() ? (i(), p(A, { key: 3 }, [
|
|
327
|
+
s("span", Ze, q(c.at.format("DD MMM YYYY")), 1),
|
|
328
|
+
s("span", et, q(c.at.format("HH:mm")), 1)
|
|
329
|
+
], 64)) : (i(), p("span", tt, q(c.timestamp), 1)),
|
|
330
|
+
c.description ? (i(), p("span", lt, q(c.description), 1)) : E("", !0)
|
|
331
|
+
]))), 128))
|
|
332
|
+
])
|
|
333
|
+
], 512)) : (i(), p("p", Ye, " No activity recorded yet. "));
|
|
334
|
+
};
|
|
335
|
+
}
|
|
336
|
+
}), se = "\0", at = /^(#{1,6})\s+(.*)$/, st = /^[-*+]\s+(.*)$/, nt = /^\d+[.)]\s+(.*)$/, ot = /^(-{3,}|\*{3,}|_{3,})$/, rt = /^>\s?(.*)$/, ge = /^\|(.+)\|$/, it = /^\|[\s:|-]+\|$/;
|
|
337
|
+
function ye(d) {
|
|
338
|
+
return d.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
339
|
+
}
|
|
340
|
+
function ee(d) {
|
|
341
|
+
const v = [], u = d.replace(/`([^`]+)`/g, (b, m) => (v.push(m), `${se}${v.length - 1}${se}`));
|
|
342
|
+
return ye(u).replace(
|
|
343
|
+
/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
|
|
344
|
+
'<a href="$2" target="_blank" rel="noopener noreferrer" class="text-blue-600 underline">$1</a>'
|
|
345
|
+
).replace(
|
|
346
|
+
/\*\*\*(.+?)\*\*\*/g,
|
|
347
|
+
'<strong class="font-semibold text-gray-900"><em>$1</em></strong>'
|
|
348
|
+
).replace(
|
|
349
|
+
/\*\*(.+?)\*\*/g,
|
|
350
|
+
'<strong class="font-semibold text-gray-900">$1</strong>'
|
|
351
|
+
).replace(/(^|[^*])\*(\S(?:[^*\n]*\S)?)\*/g, "$1<em>$2</em>").replace(
|
|
352
|
+
new RegExp(`${se}(\\d+)${se}`, "g"),
|
|
353
|
+
(b, m) => `<code class="rounded bg-gray-100 px-1 py-[1px] text-[13px]">${ye(
|
|
354
|
+
v[Number(m)]
|
|
355
|
+
)}</code>`
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
function ut(d) {
|
|
359
|
+
return d.slice(1, -1).split("|").map((v) => ee(v.trim()));
|
|
360
|
+
}
|
|
361
|
+
function dt(d) {
|
|
362
|
+
const v = (d ?? "").replace(/\r\n/g, `
|
|
363
|
+
`).split(`
|
|
364
|
+
`), u = [];
|
|
365
|
+
let V = [], b = [];
|
|
366
|
+
const m = () => {
|
|
367
|
+
V.length && (u.push({
|
|
368
|
+
type: "paragraph",
|
|
369
|
+
html: ee(V.join(" "))
|
|
370
|
+
}), V = []);
|
|
371
|
+
}, f = () => {
|
|
372
|
+
b.length && (u.push({ type: "quote", html: ee(b.join(" ")) }), b = []);
|
|
373
|
+
}, x = () => {
|
|
374
|
+
m(), f();
|
|
375
|
+
};
|
|
376
|
+
for (let a = 0; a < v.length; a += 1) {
|
|
377
|
+
const r = v[a].replace(/\t/g, " "), C = r.trim();
|
|
378
|
+
if (C.startsWith("```")) {
|
|
379
|
+
x();
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
if (!C) {
|
|
383
|
+
x();
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
const c = C.match(at);
|
|
387
|
+
if (c) {
|
|
388
|
+
x(), u.push({
|
|
389
|
+
type: "heading",
|
|
390
|
+
level: c[1].length,
|
|
391
|
+
html: ee(c[2])
|
|
392
|
+
});
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
if (ot.test(C)) {
|
|
396
|
+
x(), u.push({ type: "rule" });
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
const P = C.match(rt);
|
|
400
|
+
if (P) {
|
|
401
|
+
m(), b.push(P[1]);
|
|
402
|
+
continue;
|
|
403
|
+
}
|
|
404
|
+
if (ge.test(C)) {
|
|
405
|
+
x();
|
|
406
|
+
const R = [];
|
|
407
|
+
let k = [];
|
|
408
|
+
for (; a < v.length; ) {
|
|
409
|
+
const S = v[a].trim();
|
|
410
|
+
if (!ge.test(S)) break;
|
|
411
|
+
it.test(S) ? k = R.shift() ?? [] : R.push(ut(S)), a += 1;
|
|
412
|
+
}
|
|
413
|
+
a -= 1, u.push({ type: "table", head: k, rows: R });
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
const D = C.match(st), N = C.match(nt);
|
|
417
|
+
if (D || N) {
|
|
418
|
+
x();
|
|
419
|
+
const R = (D ?? N)[1], k = r.length - r.trimStart().length, S = u[u.length - 1];
|
|
420
|
+
if (k >= 2 && (S == null ? void 0 : S.type) === "list" && S.items.length) {
|
|
421
|
+
S.items[S.items.length - 1].children.push(ee(R));
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
const z = { html: ee(R), children: [] };
|
|
425
|
+
(S == null ? void 0 : S.type) === "list" && S.ordered === !!N ? S.items.push(z) : u.push({
|
|
426
|
+
type: "list",
|
|
427
|
+
ordered: !!N,
|
|
428
|
+
items: [z]
|
|
429
|
+
});
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
f(), V.push(C);
|
|
433
|
+
}
|
|
434
|
+
return x(), u;
|
|
435
|
+
}
|
|
436
|
+
const mt = {
|
|
437
|
+
key: 0,
|
|
438
|
+
class: "text-sm text-gray-500"
|
|
439
|
+
}, pt = {
|
|
440
|
+
key: 1,
|
|
441
|
+
class: "space-y-3 rounded-lg border border-gray-200 bg-gray-50 p-6 text-sm leading-relaxed text-gray-700"
|
|
442
|
+
}, bt = ["innerHTML"], ct = {
|
|
443
|
+
key: 0,
|
|
444
|
+
class: "mt-1 list-[circle] space-y-1 pl-5"
|
|
445
|
+
}, gt = ["innerHTML"], yt = {
|
|
446
|
+
key: 2,
|
|
447
|
+
class: "overflow-x-auto"
|
|
448
|
+
}, ft = { class: "w-full border-collapse text-left" }, vt = { key: 0 }, Vt = ["innerHTML"], kt = ["innerHTML"], Ct = ["innerHTML"], xt = {
|
|
449
|
+
key: 4,
|
|
450
|
+
class: "border-gray-200"
|
|
451
|
+
}, wt = ["innerHTML"], St = /* @__PURE__ */ J({
|
|
452
|
+
__name: "AiSummary",
|
|
453
|
+
props: {
|
|
454
|
+
summary: {
|
|
455
|
+
type: String,
|
|
456
|
+
default: null
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
setup(d) {
|
|
460
|
+
const v = d, u = j(() => dt(v.summary));
|
|
461
|
+
return (V, b) => u.value.length ? (i(), p("div", pt, [
|
|
462
|
+
(i(!0), p(A, null, O(u.value, (m, f) => (i(), p(A, { key: f }, [
|
|
463
|
+
m.type === "heading" ? (i(), L(ue(m.level <= 2 ? "h4" : "h5"), {
|
|
464
|
+
key: 0,
|
|
465
|
+
class: ie(["pt-2 font-semibold text-gray-900 first:pt-0", m.level <= 2 ? "text-base" : "text-sm"]),
|
|
466
|
+
innerHTML: m.html
|
|
467
|
+
}, null, 8, ["class", "innerHTML"])) : m.type === "list" ? (i(), L(ue(m.ordered ? "ol" : "ul"), {
|
|
468
|
+
key: 1,
|
|
469
|
+
class: ie(["space-y-1 pl-5", m.ordered ? "list-decimal" : "list-disc"])
|
|
470
|
+
}, {
|
|
471
|
+
default: h(() => [
|
|
472
|
+
(i(!0), p(A, null, O(m.items, (x, a) => (i(), p("li", { key: a }, [
|
|
473
|
+
s("span", {
|
|
474
|
+
innerHTML: x.html
|
|
475
|
+
}, null, 8, bt),
|
|
476
|
+
x.children.length ? (i(), p("ul", ct, [
|
|
477
|
+
(i(!0), p(A, null, O(x.children, (r, C) => (i(), p("li", { key: C }, [
|
|
478
|
+
s("span", { innerHTML: r }, null, 8, gt)
|
|
479
|
+
]))), 128))
|
|
480
|
+
])) : E("", !0)
|
|
481
|
+
]))), 128))
|
|
482
|
+
]),
|
|
483
|
+
_: 2
|
|
484
|
+
}, 1032, ["class"])) : m.type === "table" ? (i(), p("div", yt, [
|
|
485
|
+
s("table", ft, [
|
|
486
|
+
m.head.length ? (i(), p("thead", vt, [
|
|
487
|
+
s("tr", null, [
|
|
488
|
+
(i(!0), p(A, null, O(m.head, (x, a) => (i(), p("th", {
|
|
489
|
+
key: a,
|
|
490
|
+
class: "border-b border-gray-300 px-2 py-1 font-semibold text-gray-900",
|
|
491
|
+
innerHTML: x
|
|
492
|
+
}, null, 8, Vt))), 128))
|
|
493
|
+
])
|
|
494
|
+
])) : E("", !0),
|
|
495
|
+
s("tbody", null, [
|
|
496
|
+
(i(!0), p(A, null, O(m.rows, (x, a) => (i(), p("tr", { key: a }, [
|
|
497
|
+
(i(!0), p(A, null, O(x, (r, C) => (i(), p("td", {
|
|
498
|
+
key: C,
|
|
499
|
+
class: "border-b border-gray-200 px-2 py-1 align-top",
|
|
500
|
+
innerHTML: r
|
|
501
|
+
}, null, 8, kt))), 128))
|
|
502
|
+
]))), 128))
|
|
503
|
+
])
|
|
504
|
+
])
|
|
505
|
+
])) : m.type === "quote" ? (i(), p("blockquote", {
|
|
506
|
+
key: 3,
|
|
507
|
+
class: "border-l-2 border-gray-300 pl-3 italic",
|
|
508
|
+
innerHTML: m.html
|
|
509
|
+
}, null, 8, Ct)) : m.type === "rule" ? (i(), p("hr", xt)) : (i(), p("p", {
|
|
510
|
+
key: 5,
|
|
511
|
+
innerHTML: m.html
|
|
512
|
+
}, null, 8, wt))
|
|
513
|
+
], 64))), 128))
|
|
514
|
+
])) : (i(), p("p", mt, " No review generated for this submission. "));
|
|
515
|
+
}
|
|
516
|
+
}), Nt = { class: "space-y-2" }, Pt = { class: "text-gray-900" }, ht = { class: "text-gray-900" }, Rt = { class: "text-gray-900" }, It = { class: "text-gray-900" }, qt = { class: "text-gray-900" }, Ut = { class: "text-gray-900" }, $t = { class: "grid grid-cols-4 gap-6" }, Dt = ["src"], Ft = {
|
|
517
|
+
key: 1,
|
|
518
|
+
class: "mt-2 truncate text-gray-700"
|
|
519
|
+
}, Tt = { key: 0 }, Et = {
|
|
520
|
+
key: 0,
|
|
521
|
+
class: "w-full flex justify-end mt-6"
|
|
522
|
+
}, Lt = { class: "mt-6 grid grid-cols-4 gap-24" }, At = { class: "grid grid-cols-4 gap-6" }, _t = { class: "w-full flex justify-end mt-6" }, Bt = { class: "mt-6 grid grid-cols-4 gap-24" }, Ot = { class: "col-span-2" }, jt = { class: "col-span-2" }, Mt = { class: "col-span-2" }, Ht = { class: "col-span-2" }, zt = { class: "col-span-2" }, Wt = { class: "col-span-2" }, Yt = { class: "col-span-2" }, Qt = { class: "col-span-2" }, Gt = { class: "col-start-1 col-span-2" }, Jt = { class: "col-span-2" }, Kt = { class: "col-span-2" }, Xt = { class: "col-span-2" }, Zt = { class: "mt-6 grid grid-cols-4 gap-6" }, el = { class: "mt-6 grid grid-cols-4 gap-6" }, tl = { class: "mt-6 grid grid-cols-4 gap-6" }, ll = { 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" }, nl = {
|
|
523
|
+
key: 2,
|
|
524
|
+
class: "text-sm text-gray-500"
|
|
525
|
+
}, ol = { class: "mt-6 grid grid-cols-2 gap-24" }, fe = 30, rl = /* @__PURE__ */ J({
|
|
526
|
+
__name: "SoftspaceSubmission",
|
|
527
|
+
props: {
|
|
528
|
+
submission: {
|
|
529
|
+
type: Object,
|
|
530
|
+
required: !0
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
emits: ["update:submission"],
|
|
534
|
+
setup(d, { emit: v }) {
|
|
535
|
+
var le;
|
|
536
|
+
const u = d, V = v, b = de(), m = B(!1), { isLoading: f, startAsyncCall: x } = ne(), { fields: a, documents: r, restaurantId: C, profile: c, status: P, statusReason: D } = u.submission, N = B(""), R = B(
|
|
537
|
+
parseInt(((le = u.submission.fields) == null ? void 0 : le.numberOfDevices) ?? 1)
|
|
538
|
+
), k = B(
|
|
539
|
+
u.submission.rates ? Object.fromEntries(
|
|
540
|
+
Object.entries(u.submission.rates).map(([w, t]) => [w, `${t}`])
|
|
541
|
+
) : {
|
|
542
|
+
duitNow: "0.8",
|
|
543
|
+
mydebitCard: "0.5",
|
|
544
|
+
localDebit: "0.5",
|
|
545
|
+
localCredit: "1.1",
|
|
546
|
+
foreignCard: "3.0",
|
|
547
|
+
jcbStandard: "2.2",
|
|
548
|
+
jcbPlatinum: "2.2"
|
|
549
|
+
}
|
|
550
|
+
), S = j(
|
|
551
|
+
() => Object.values(k.value).every((w) => parseFloat(w) > 0)
|
|
552
|
+
), z = j(
|
|
553
|
+
() => Object.keys(u.submission.documents).filter((w) => /^authorizedPersonID\d+$/.test(w)).sort(
|
|
554
|
+
(w, t) => Number(w.replace("authorizedPersonID", "")) - Number(t.replace("authorizedPersonID", ""))
|
|
555
|
+
)
|
|
556
|
+
), { isLoading: K, startAsyncCall: X } = ne(), M = B([]), te = (w) => Number(w.replace("additionalDocument", "")), I = j(
|
|
557
|
+
() => Object.keys(u.submission.documents).filter((w) => /^additionalDocument\d+$/.test(w)).sort((w, t) => te(w) - te(t))
|
|
558
|
+
), n = j(
|
|
559
|
+
() => I.value.length + M.value.length
|
|
560
|
+
), F = (w) => {
|
|
561
|
+
if (!(n.value >= fe)) {
|
|
562
|
+
if (w.type.startsWith("image/")) {
|
|
563
|
+
const t = new FileReader();
|
|
564
|
+
t.onload = (_) => {
|
|
565
|
+
var W;
|
|
566
|
+
return M.value.push({
|
|
567
|
+
file: w,
|
|
568
|
+
preview: String(((W = _.target) == null ? void 0 : W.result) ?? "")
|
|
569
|
+
});
|
|
570
|
+
}, t.readAsDataURL(w);
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
M.value.push({ file: w, preview: "" });
|
|
574
|
+
}
|
|
575
|
+
}, Z = () => X(async () => {
|
|
576
|
+
try {
|
|
577
|
+
let w = I.value.reduce(
|
|
578
|
+
(_, W) => Math.max(_, te(W)),
|
|
579
|
+
0
|
|
580
|
+
);
|
|
581
|
+
const t = {};
|
|
582
|
+
for (const { file: _ } of M.value) {
|
|
583
|
+
const W = `additionalDocument${++w}`;
|
|
584
|
+
t[W] = await H.uploadDocument(
|
|
585
|
+
C,
|
|
586
|
+
W,
|
|
587
|
+
_
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
V(
|
|
591
|
+
"update:submission",
|
|
592
|
+
await H.addAdditionalDocuments(
|
|
593
|
+
u.submission._id,
|
|
594
|
+
t
|
|
595
|
+
)
|
|
596
|
+
), M.value = [], b.open({ type: "success", title: "Documents saved" });
|
|
597
|
+
} catch (w) {
|
|
598
|
+
b.open({
|
|
599
|
+
type: "error",
|
|
600
|
+
title: "Error occurs when sending additional documents",
|
|
601
|
+
message: G(w)
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
}), oe = () => x(async () => {
|
|
605
|
+
try {
|
|
606
|
+
const w = await H.reviewById(
|
|
607
|
+
u.submission._id,
|
|
608
|
+
{
|
|
609
|
+
numberOfDevices: R.value.toString(),
|
|
610
|
+
rates: {
|
|
611
|
+
duitNow: parseFloat(k.value.duitNow),
|
|
612
|
+
mydebitCard: parseFloat(k.value.mydebitCard),
|
|
613
|
+
localDebit: parseFloat(k.value.localDebit),
|
|
614
|
+
localCredit: parseFloat(k.value.localCredit),
|
|
615
|
+
foreignCard: parseFloat(k.value.foreignCard),
|
|
616
|
+
jcbStandard: parseFloat(k.value.jcbStandard),
|
|
617
|
+
jcbPlatinum: parseFloat(k.value.jcbPlatinum)
|
|
618
|
+
},
|
|
619
|
+
status: "approved"
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
V("update:submission", w), m.value = !1, b.open({
|
|
623
|
+
type: "success",
|
|
624
|
+
title: "Submission updated successfully"
|
|
625
|
+
});
|
|
626
|
+
} catch (w) {
|
|
627
|
+
b.open({
|
|
628
|
+
type: "error",
|
|
629
|
+
title: "Error occurs when updating submission",
|
|
630
|
+
message: G(w)
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
}), re = () => x(async () => {
|
|
634
|
+
try {
|
|
635
|
+
const w = await H.reviewById(
|
|
636
|
+
u.submission._id,
|
|
637
|
+
{
|
|
638
|
+
status: "rejected",
|
|
639
|
+
statusReason: N.value
|
|
640
|
+
}
|
|
641
|
+
);
|
|
642
|
+
V("update:submission", w), m.value = !1, b.open({
|
|
643
|
+
type: "success",
|
|
644
|
+
title: "Submission updated successfully"
|
|
645
|
+
});
|
|
646
|
+
} catch (w) {
|
|
647
|
+
b.open({
|
|
648
|
+
type: "error",
|
|
649
|
+
title: "Error occurs when updating submission",
|
|
650
|
+
message: G(w)
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
});
|
|
654
|
+
return (w, t) => {
|
|
655
|
+
const _ = U("FmButton"), W = U("FmDropField"), $ = U("FmTextField"), we = U("FmTextarea"), Se = U("FmDialog"), Ne = U("FmPhoneNumber"), me = U("FmSelect"), Pe = U("FmForm");
|
|
656
|
+
return i(), p(A, null, [
|
|
657
|
+
s("div", Nt, [
|
|
658
|
+
s("div", null, [
|
|
659
|
+
t[38] || (t[38] = s("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
|
|
660
|
+
s("span", Pt, q(e(C)), 1)
|
|
661
|
+
]),
|
|
662
|
+
s("div", null, [
|
|
663
|
+
t[39] || (t[39] = s("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
|
|
664
|
+
s("span", ht, q(e(c).name) + " ( " + q(e(c).legalName) + " )", 1)
|
|
665
|
+
]),
|
|
666
|
+
s("div", null, [
|
|
667
|
+
t[40] || (t[40] = s("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
|
|
668
|
+
s("span", Rt, q(e(c).email), 1)
|
|
669
|
+
]),
|
|
670
|
+
s("div", null, [
|
|
671
|
+
t[41] || (t[41] = s("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
|
|
672
|
+
s("span", It, q(e(c).phoneNo), 1)
|
|
673
|
+
]),
|
|
674
|
+
s("div", null, [
|
|
675
|
+
t[42] || (t[42] = s("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
|
|
676
|
+
s("span", qt, [
|
|
677
|
+
o(Ce, { data: e(P) }, null, 8, ["data"])
|
|
678
|
+
])
|
|
679
|
+
]),
|
|
680
|
+
s("div", null, [
|
|
681
|
+
t[43] || (t[43] = s("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
|
|
682
|
+
s("span", Ut, q(e(D)), 1)
|
|
683
|
+
])
|
|
684
|
+
]),
|
|
685
|
+
t[61] || (t[61] = s("div", { class: "flex items-center gap-2 border-b pb-1 mt-6 mb-6" }, [
|
|
686
|
+
s("h3", { class: "font-semibold text-lg" }, "AI Review"),
|
|
687
|
+
s("span", { class: "rounded bg-gray-100 px-2 py-[2px] text-xs text-gray-600" }, " FIRST SUBMISSION ")
|
|
688
|
+
], -1)),
|
|
689
|
+
o(St, {
|
|
690
|
+
summary: d.submission.aiSummary
|
|
691
|
+
}, null, 8, ["summary"]),
|
|
692
|
+
t[62] || (t[62] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Timeline", -1)),
|
|
693
|
+
o(xe, {
|
|
694
|
+
entries: d.submission.timeline
|
|
695
|
+
}, null, 8, ["entries"]),
|
|
696
|
+
t[63] || (t[63] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " (SharePoint) Additional Requested Documents ", -1)),
|
|
697
|
+
s("div", $t, [
|
|
698
|
+
(i(!0), p(A, null, O(I.value, (l) => (i(), L(T, {
|
|
699
|
+
key: l,
|
|
700
|
+
label: l.replace("additionalDocument", "Document "),
|
|
701
|
+
type: /\.pdf$/i.test(u.submission.documents[l]) ? "pdf" : "image",
|
|
702
|
+
modelValue: u.submission.documents[l],
|
|
703
|
+
"onUpdate:modelValue": (Y) => u.submission.documents[l] = Y,
|
|
704
|
+
"restaurant-id": e(C)
|
|
705
|
+
}, null, 8, ["label", "type", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128)),
|
|
706
|
+
(i(!0), p(A, null, O(M.value, (l, Y) => (i(), p("div", {
|
|
707
|
+
key: `new-${Y}`
|
|
708
|
+
}, [
|
|
709
|
+
s("p", null, "Document " + q(I.value.length + Y + 1), 1),
|
|
710
|
+
l.file.type.startsWith("image/") ? (i(), p("img", {
|
|
711
|
+
key: 0,
|
|
712
|
+
src: l.preview,
|
|
713
|
+
class: "mt-2 rounded border"
|
|
714
|
+
}, null, 8, Dt)) : (i(), p("p", Ft, q(l.file.name), 1)),
|
|
715
|
+
o(_, {
|
|
716
|
+
class: "mt-4",
|
|
717
|
+
"prepend-icon": "delete",
|
|
718
|
+
label: "Remove",
|
|
719
|
+
variant: "destructive",
|
|
720
|
+
onClick: (Tl) => M.value.splice(Y, 1)
|
|
721
|
+
}, null, 8, ["onClick"])
|
|
722
|
+
]))), 128)),
|
|
723
|
+
n.value < fe ? (i(), p("div", Tt, [
|
|
724
|
+
s("p", null, "Document " + q(n.value + 1), 1),
|
|
725
|
+
o(W, {
|
|
726
|
+
accept: ".png, .jpg, .jpeg, .pdf",
|
|
727
|
+
onFileUpload: F
|
|
728
|
+
})
|
|
729
|
+
])) : E("", !0)
|
|
730
|
+
]),
|
|
731
|
+
M.value.length ? (i(), p("div", Et, [
|
|
732
|
+
o(_, {
|
|
733
|
+
type: "button",
|
|
734
|
+
variant: "primary",
|
|
735
|
+
"prepend-icon": "cloud_upload",
|
|
736
|
+
label: "Save documents",
|
|
737
|
+
loading: e(K),
|
|
738
|
+
onClick: Z
|
|
739
|
+
}, null, 8, ["loading"])
|
|
740
|
+
])) : E("", !0),
|
|
741
|
+
t[64] || (t[64] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Rate Settings", -1)),
|
|
742
|
+
s("div", Lt, [
|
|
743
|
+
o($, {
|
|
744
|
+
modelValue: k.value.duitNow,
|
|
745
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => k.value.duitNow = l),
|
|
746
|
+
label: "DuitNow QR",
|
|
747
|
+
"label-mark": "required",
|
|
748
|
+
type: "number",
|
|
749
|
+
inputmode: "numeric",
|
|
750
|
+
decimal: 2,
|
|
751
|
+
rules: e(g)(
|
|
752
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
753
|
+
)
|
|
754
|
+
}, {
|
|
755
|
+
append: h(() => [...t[44] || (t[44] = [
|
|
756
|
+
Q("%", -1)
|
|
757
|
+
])]),
|
|
758
|
+
_: 1
|
|
759
|
+
}, 8, ["modelValue", "rules"]),
|
|
760
|
+
o($, {
|
|
761
|
+
modelValue: k.value.mydebitCard,
|
|
762
|
+
"onUpdate:modelValue": t[1] || (t[1] = (l) => k.value.mydebitCard = l),
|
|
763
|
+
label: "myDebit Card",
|
|
764
|
+
"label-mark": "required",
|
|
765
|
+
type: "number",
|
|
766
|
+
inputmode: "numeric",
|
|
767
|
+
decimal: 2,
|
|
768
|
+
rules: e(g)(
|
|
769
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
770
|
+
)
|
|
771
|
+
}, {
|
|
772
|
+
append: h(() => [...t[45] || (t[45] = [
|
|
773
|
+
Q("%", -1)
|
|
774
|
+
])]),
|
|
775
|
+
_: 1
|
|
776
|
+
}, 8, ["modelValue", "rules"]),
|
|
777
|
+
o($, {
|
|
778
|
+
modelValue: k.value.localDebit,
|
|
779
|
+
"onUpdate:modelValue": t[2] || (t[2] = (l) => k.value.localDebit = l),
|
|
780
|
+
label: "Local Debit Card",
|
|
781
|
+
"label-mark": "required",
|
|
782
|
+
type: "number",
|
|
783
|
+
inputmode: "numeric",
|
|
784
|
+
decimal: 2,
|
|
785
|
+
rules: e(g)(
|
|
786
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
787
|
+
)
|
|
788
|
+
}, {
|
|
789
|
+
append: h(() => [...t[46] || (t[46] = [
|
|
790
|
+
Q("%", -1)
|
|
791
|
+
])]),
|
|
792
|
+
_: 1
|
|
793
|
+
}, 8, ["modelValue", "rules"]),
|
|
794
|
+
o($, {
|
|
795
|
+
modelValue: k.value.localCredit,
|
|
796
|
+
"onUpdate:modelValue": t[3] || (t[3] = (l) => k.value.localCredit = l),
|
|
797
|
+
label: "Local Credit Card",
|
|
798
|
+
"label-mark": "required",
|
|
799
|
+
type: "number",
|
|
800
|
+
inputmode: "numeric",
|
|
801
|
+
decimal: 2,
|
|
802
|
+
rules: e(g)(
|
|
803
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
804
|
+
)
|
|
805
|
+
}, {
|
|
806
|
+
append: h(() => [...t[47] || (t[47] = [
|
|
807
|
+
Q("%", -1)
|
|
808
|
+
])]),
|
|
809
|
+
_: 1
|
|
810
|
+
}, 8, ["modelValue", "rules"]),
|
|
811
|
+
o($, {
|
|
812
|
+
modelValue: k.value.foreignCard,
|
|
813
|
+
"onUpdate:modelValue": t[4] || (t[4] = (l) => k.value.foreignCard = l),
|
|
814
|
+
label: "Foreign Card",
|
|
815
|
+
"label-mark": "required",
|
|
816
|
+
type: "number",
|
|
817
|
+
inputmode: "numeric",
|
|
818
|
+
decimal: 2,
|
|
819
|
+
rules: e(g)(
|
|
820
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
821
|
+
)
|
|
822
|
+
}, {
|
|
823
|
+
append: h(() => [...t[48] || (t[48] = [
|
|
824
|
+
Q("%", -1)
|
|
825
|
+
])]),
|
|
826
|
+
_: 1
|
|
827
|
+
}, 8, ["modelValue", "rules"]),
|
|
828
|
+
o($, {
|
|
829
|
+
modelValue: k.value.jcbStandard,
|
|
830
|
+
"onUpdate:modelValue": t[5] || (t[5] = (l) => k.value.jcbStandard = l),
|
|
831
|
+
label: "JCB Standard",
|
|
832
|
+
"label-mark": "required",
|
|
833
|
+
type: "number",
|
|
834
|
+
inputmode: "numeric",
|
|
835
|
+
decimal: 2,
|
|
836
|
+
rules: e(g)(
|
|
837
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
838
|
+
)
|
|
839
|
+
}, {
|
|
840
|
+
append: h(() => [...t[49] || (t[49] = [
|
|
841
|
+
Q("%", -1)
|
|
842
|
+
])]),
|
|
843
|
+
_: 1
|
|
844
|
+
}, 8, ["modelValue", "rules"]),
|
|
845
|
+
o($, {
|
|
846
|
+
modelValue: k.value.jcbPlatinum,
|
|
847
|
+
"onUpdate:modelValue": t[6] || (t[6] = (l) => k.value.jcbPlatinum = l),
|
|
848
|
+
label: "JCB Platinum",
|
|
849
|
+
"label-mark": "required",
|
|
850
|
+
type: "number",
|
|
851
|
+
inputmode: "numeric",
|
|
852
|
+
decimal: 2,
|
|
853
|
+
rules: e(g)(
|
|
854
|
+
e(y).string().min(1, "Rate is required").transform((l) => parseFloat(l)).refine((l) => !isNaN(l), { message: "Rate must be a number" })
|
|
855
|
+
)
|
|
856
|
+
}, {
|
|
857
|
+
append: h(() => [...t[50] || (t[50] = [
|
|
858
|
+
Q("%", -1)
|
|
859
|
+
])]),
|
|
860
|
+
_: 1
|
|
861
|
+
}, 8, ["modelValue", "rules"])
|
|
862
|
+
]),
|
|
863
|
+
t[65] || (t[65] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-6" }, "Extra Settings", -1)),
|
|
864
|
+
s("div", At, [
|
|
865
|
+
o($, {
|
|
866
|
+
modelValue: R.value,
|
|
867
|
+
"onUpdate:modelValue": t[7] || (t[7] = (l) => R.value = l),
|
|
868
|
+
label: "Number of Devices",
|
|
869
|
+
"label-mark": "required",
|
|
870
|
+
type: "number",
|
|
871
|
+
inputmode: "numeric"
|
|
872
|
+
}, null, 8, ["modelValue"])
|
|
873
|
+
]),
|
|
874
|
+
s("div", _t, [
|
|
875
|
+
o(Se, {
|
|
876
|
+
modelValue: m.value,
|
|
877
|
+
"onUpdate:modelValue": t[9] || (t[9] = (l) => m.value = l)
|
|
878
|
+
}, {
|
|
879
|
+
"dialog-button": h(() => [
|
|
880
|
+
o(_, {
|
|
881
|
+
class: "mr-6",
|
|
882
|
+
type: "button",
|
|
883
|
+
variant: "destructive",
|
|
884
|
+
"prepend-icon": "block",
|
|
885
|
+
loading: e(f),
|
|
886
|
+
label: "Reject Submission"
|
|
887
|
+
}, null, 8, ["loading"])
|
|
888
|
+
]),
|
|
889
|
+
"dialog-header": h(() => [...t[51] || (t[51] = [
|
|
890
|
+
s("div", null, "Rejecting Submission", -1)
|
|
891
|
+
])]),
|
|
892
|
+
default: h(() => [
|
|
893
|
+
o(we, {
|
|
894
|
+
modelValue: N.value,
|
|
895
|
+
"onUpdate:modelValue": t[8] || (t[8] = (l) => N.value = l),
|
|
896
|
+
label: "Reason for Rejection",
|
|
897
|
+
"label-mark": "optional",
|
|
898
|
+
"helper-text": "Please provide a reason for rejection."
|
|
899
|
+
}, null, 8, ["modelValue"]),
|
|
900
|
+
o(_, {
|
|
901
|
+
class: "mb-2 mt-6 w-full",
|
|
902
|
+
label: "Submit",
|
|
903
|
+
"prepend-icon": "save",
|
|
904
|
+
onClick: re,
|
|
905
|
+
loading: e(f)
|
|
906
|
+
}, null, 8, ["loading"])
|
|
907
|
+
]),
|
|
908
|
+
_: 1
|
|
909
|
+
}, 8, ["modelValue"]),
|
|
910
|
+
o(_, {
|
|
911
|
+
type: "button",
|
|
912
|
+
variant: "primary",
|
|
913
|
+
"prepend-icon": "approval",
|
|
914
|
+
disabled: !S.value,
|
|
915
|
+
label: "Approve Submission with Rates",
|
|
916
|
+
onClick: oe,
|
|
917
|
+
loading: e(f)
|
|
918
|
+
}, null, 8, ["disabled", "loading"])
|
|
919
|
+
]),
|
|
920
|
+
o(Pe, { disabled: !0 }, {
|
|
921
|
+
default: h(() => [
|
|
922
|
+
t[52] || (t[52] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
|
|
923
|
+
s("div", Bt, [
|
|
924
|
+
s("div", Ot, [
|
|
925
|
+
o($, {
|
|
926
|
+
modelValue: e(a).picName,
|
|
927
|
+
"onUpdate:modelValue": t[10] || (t[10] = (l) => e(a).picName = l),
|
|
928
|
+
label: "Owner/Director Name",
|
|
929
|
+
placeholder: "Enter your name",
|
|
930
|
+
"label-mark": "required",
|
|
931
|
+
rules: e(g)(e(y).string().min(1, "Owner/Director Name is required"))
|
|
932
|
+
}, null, 8, ["modelValue", "rules"])
|
|
933
|
+
]),
|
|
934
|
+
s("div", jt, [
|
|
935
|
+
o($, {
|
|
936
|
+
modelValue: e(a).picRole,
|
|
937
|
+
"onUpdate:modelValue": t[11] || (t[11] = (l) => e(a).picRole = l),
|
|
938
|
+
label: "Owner/Director Role",
|
|
939
|
+
placeholder: "Enter your role",
|
|
940
|
+
"label-mark": "required",
|
|
941
|
+
rules: e(g)(e(y).string().min(1, "Owner/Director Role is required"))
|
|
942
|
+
}, null, 8, ["modelValue", "rules"])
|
|
943
|
+
]),
|
|
944
|
+
s("div", Mt, [
|
|
945
|
+
o($, {
|
|
946
|
+
modelValue: e(a).picEmail,
|
|
947
|
+
"onUpdate:modelValue": t[12] || (t[12] = (l) => e(a).picEmail = l),
|
|
948
|
+
label: "Owner/Director Email",
|
|
949
|
+
type: "email",
|
|
950
|
+
placeholder: "Enter your email address",
|
|
951
|
+
"label-mark": "required",
|
|
952
|
+
rules: e(g)(e(y).string().min(1, "Owner/Director Email is required"))
|
|
953
|
+
}, null, 8, ["modelValue", "rules"])
|
|
954
|
+
]),
|
|
955
|
+
s("div", Ht, [
|
|
956
|
+
o(Ne, {
|
|
957
|
+
"model-value": e(a).picContact,
|
|
958
|
+
"onUpdate:modelValue": t[13] || (t[13] = (l) => e(a).picContact = l),
|
|
959
|
+
"default-country": "MY",
|
|
960
|
+
label: "Owner/Director Contact",
|
|
961
|
+
"label-mark": "required",
|
|
962
|
+
rules: e(g)(e(y).string().min(1, "Owner/Director Contact is required"))
|
|
963
|
+
}, null, 8, ["model-value", "rules"])
|
|
964
|
+
]),
|
|
965
|
+
s("div", zt, [
|
|
966
|
+
o($, {
|
|
967
|
+
modelValue: e(a).nric,
|
|
968
|
+
"onUpdate:modelValue": t[14] || (t[14] = (l) => e(a).nric = l),
|
|
969
|
+
label: "Owner/Director NRIC No",
|
|
970
|
+
placeholder: "Enter your NRIC number",
|
|
971
|
+
"label-mark": "required",
|
|
972
|
+
rules: e(g)(e(y).string().min(1, "NRIC No is required"))
|
|
973
|
+
}, null, 8, ["modelValue", "rules"])
|
|
974
|
+
]),
|
|
975
|
+
s("div", Wt, [
|
|
976
|
+
o($, {
|
|
977
|
+
modelValue: e(a).tradingName,
|
|
978
|
+
"onUpdate:modelValue": t[15] || (t[15] = (l) => e(a).tradingName = l),
|
|
979
|
+
label: "Trading Name",
|
|
980
|
+
placeholder: "Enter trading name",
|
|
981
|
+
"label-mark": "required",
|
|
982
|
+
rules: e(g)(e(y).string().min(1, "Trading Name is required"))
|
|
983
|
+
}, null, 8, ["modelValue", "rules"])
|
|
984
|
+
]),
|
|
985
|
+
s("div", Yt, [
|
|
986
|
+
o($, {
|
|
987
|
+
modelValue: e(a).outletName,
|
|
988
|
+
"onUpdate:modelValue": t[16] || (t[16] = (l) => e(a).outletName = l),
|
|
989
|
+
label: "Registered Name",
|
|
990
|
+
placeholder: "Enter registered name",
|
|
991
|
+
"label-mark": "required",
|
|
992
|
+
rules: e(g)(e(y).string().min(1, "Registered Name is required"))
|
|
993
|
+
}, null, 8, ["modelValue", "rules"])
|
|
994
|
+
]),
|
|
995
|
+
s("div", Qt, [
|
|
996
|
+
o($, {
|
|
997
|
+
modelValue: e(a).outletAddress,
|
|
998
|
+
"onUpdate:modelValue": t[17] || (t[17] = (l) => e(a).outletAddress = l),
|
|
999
|
+
label: "Outlet Address",
|
|
1000
|
+
placeholder: "Enter outlet address",
|
|
1001
|
+
"label-mark": "required",
|
|
1002
|
+
rules: e(g)(e(y).string().min(1, "Address is required"))
|
|
1003
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1004
|
+
]),
|
|
1005
|
+
o($, {
|
|
1006
|
+
modelValue: e(a).outletPostCode,
|
|
1007
|
+
"onUpdate:modelValue": t[18] || (t[18] = (l) => e(a).outletPostCode = l),
|
|
1008
|
+
label: "Postal Code",
|
|
1009
|
+
placeholder: "Enter postal code",
|
|
1010
|
+
"label-mark": "required",
|
|
1011
|
+
rules: e(g)(e(y).string().min(1, "Postal Code is required"))
|
|
1012
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1013
|
+
o($, {
|
|
1014
|
+
modelValue: e(a).outletState,
|
|
1015
|
+
"onUpdate:modelValue": t[19] || (t[19] = (l) => e(a).outletState = l),
|
|
1016
|
+
label: "State",
|
|
1017
|
+
placeholder: "Enter state",
|
|
1018
|
+
"label-mark": "required",
|
|
1019
|
+
rules: e(g)(e(y).string().min(1, "State is required"))
|
|
1020
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1021
|
+
o($, {
|
|
1022
|
+
modelValue: e(a).outletCity,
|
|
1023
|
+
"onUpdate:modelValue": t[20] || (t[20] = (l) => e(a).outletCity = l),
|
|
1024
|
+
label: "City",
|
|
1025
|
+
placeholder: "Enter city",
|
|
1026
|
+
"label-mark": "required",
|
|
1027
|
+
rules: e(g)(e(y).string().min(1, "City is required"))
|
|
1028
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1029
|
+
s("div", Gt, [
|
|
1030
|
+
o(me, {
|
|
1031
|
+
modelValue: e(a).businessType,
|
|
1032
|
+
"onUpdate:modelValue": t[21] || (t[21] = (l) => e(a).businessType = l),
|
|
1033
|
+
label: "Type",
|
|
1034
|
+
placeholder: "Select business type",
|
|
1035
|
+
"label-mark": "required",
|
|
1036
|
+
rules: e(g)(e(y).string().min(1, "Business Type is required")),
|
|
1037
|
+
items: [
|
|
1038
|
+
{ label: "Sole Proprietorship", value: "sole_proprietorship" },
|
|
1039
|
+
{ label: "Partnership", value: "partnership" },
|
|
1040
|
+
{
|
|
1041
|
+
label: "Private Limited Company (Sdn Bhd)",
|
|
1042
|
+
value: "private_limited"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
label: "Public Limited Company (Berhad)",
|
|
1046
|
+
value: "public_limited"
|
|
1047
|
+
}
|
|
1048
|
+
]
|
|
1049
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1050
|
+
]),
|
|
1051
|
+
s("div", Jt, [
|
|
1052
|
+
o($, {
|
|
1053
|
+
modelValue: e(a).businessRegNo,
|
|
1054
|
+
"onUpdate:modelValue": t[22] || (t[22] = (l) => e(a).businessRegNo = l),
|
|
1055
|
+
label: "Registration No",
|
|
1056
|
+
placeholder: "Enter registration number",
|
|
1057
|
+
"label-mark": "required",
|
|
1058
|
+
rules: e(g)(e(y).string().min(1, "Reg No is required"))
|
|
1059
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1060
|
+
]),
|
|
1061
|
+
s("div", Kt, [
|
|
1062
|
+
o($, {
|
|
1063
|
+
modelValue: e(a).tinNo,
|
|
1064
|
+
"onUpdate:modelValue": t[23] || (t[23] = (l) => e(a).tinNo = l),
|
|
1065
|
+
label: "Tax Identification No (TIN)",
|
|
1066
|
+
placeholder: "Enter your TIN number",
|
|
1067
|
+
"label-mark": "required",
|
|
1068
|
+
rules: e(g)(e(y).string().min(1, "TIN is required"))
|
|
1069
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1070
|
+
]),
|
|
1071
|
+
s("div", Xt, [
|
|
1072
|
+
o($, {
|
|
1073
|
+
modelValue: e(a).sstNo,
|
|
1074
|
+
"onUpdate:modelValue": t[24] || (t[24] = (l) => e(a).sstNo = l),
|
|
1075
|
+
label: "SST Registration No (SST)",
|
|
1076
|
+
placeholder: "Enter your SST number",
|
|
1077
|
+
"label-mark": "optional"
|
|
1078
|
+
}, null, 8, ["modelValue"])
|
|
1079
|
+
])
|
|
1080
|
+
]),
|
|
1081
|
+
t[53] || (t[53] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information ", -1)),
|
|
1082
|
+
s("div", Zt, [
|
|
1083
|
+
o(me, {
|
|
1084
|
+
modelValue: e(a).bankName,
|
|
1085
|
+
"onUpdate:modelValue": t[25] || (t[25] = (l) => e(a).bankName = l),
|
|
1086
|
+
label: "Bank",
|
|
1087
|
+
placeholder: "Select bank type",
|
|
1088
|
+
"label-mark": "required",
|
|
1089
|
+
rules: e(g)(e(y).string().min(1, "Bank Type is required")),
|
|
1090
|
+
items: e(Ue).bankNameOptions()
|
|
1091
|
+
}, null, 8, ["modelValue", "rules", "items"]),
|
|
1092
|
+
o($, {
|
|
1093
|
+
modelValue: e(a).bankHolderName,
|
|
1094
|
+
"onUpdate:modelValue": t[26] || (t[26] = (l) => e(a).bankHolderName = l),
|
|
1095
|
+
label: "Beneficiary Name",
|
|
1096
|
+
placeholder: "Enter Beneficiary Name",
|
|
1097
|
+
"label-mark": "required",
|
|
1098
|
+
rules: e(g)(e(y).string().min(1, "Beneficiary Name is required"))
|
|
1099
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1100
|
+
o($, {
|
|
1101
|
+
modelValue: e(a).bankAccountNo,
|
|
1102
|
+
"onUpdate:modelValue": t[27] || (t[27] = (l) => e(a).bankAccountNo = l),
|
|
1103
|
+
label: "Account Number",
|
|
1104
|
+
placeholder: "Enter Account Number",
|
|
1105
|
+
"label-mark": "required",
|
|
1106
|
+
rules: e(g)(e(y).string().min(1, "Account Number is required"))
|
|
1107
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1108
|
+
]),
|
|
1109
|
+
t[54] || (t[54] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Documents", -1)),
|
|
1110
|
+
t[55] || (t[55] = s("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 1. All Directors/Owner ICs ", -1)),
|
|
1111
|
+
s("div", el, [
|
|
1112
|
+
o(T, {
|
|
1113
|
+
label: "Authorized Person ID",
|
|
1114
|
+
modelValue: e(r).authorizedPersonID,
|
|
1115
|
+
"onUpdate:modelValue": t[28] || (t[28] = (l) => e(r).authorizedPersonID = l),
|
|
1116
|
+
type: "image",
|
|
1117
|
+
"restaurant-id": d.submission.restaurantId
|
|
1118
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1119
|
+
(i(!0), p(A, null, O(z.value, (l) => (i(), L(T, {
|
|
1120
|
+
key: l,
|
|
1121
|
+
label: `Authorized Person ID ${l.replace("authorizedPersonID", "")}`,
|
|
1122
|
+
modelValue: e(r)[l],
|
|
1123
|
+
"onUpdate:modelValue": (Y) => e(r)[l] = Y,
|
|
1124
|
+
type: "image",
|
|
1125
|
+
"restaurant-id": d.submission.restaurantId
|
|
1126
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128))
|
|
1127
|
+
]),
|
|
1128
|
+
t[56] || (t[56] = s("h4", { class: "font-semibold border-b pb-1 mt-6 mb-6" }, " Section 2. Business Information ", -1)),
|
|
1129
|
+
s("div", tl, [
|
|
1130
|
+
e(a).businessType === "private_limited" || e(a).businessType === "public_limited" ? (i(), L(T, {
|
|
1131
|
+
key: 0,
|
|
1132
|
+
label: "Superform",
|
|
1133
|
+
type: "pdf",
|
|
1134
|
+
modelValue: e(r).certificate,
|
|
1135
|
+
"onUpdate:modelValue": t[29] || (t[29] = (l) => e(r).certificate = l),
|
|
1136
|
+
"restaurant-id": d.submission.restaurantId
|
|
1137
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1138
|
+
e(a).businessType === "sole_proprietorship" || e(a).businessType === "partnership" ? (i(), L(T, {
|
|
1139
|
+
key: 1,
|
|
1140
|
+
label: "Business Registration Document",
|
|
1141
|
+
type: "pdf",
|
|
1142
|
+
modelValue: e(r).certificate,
|
|
1143
|
+
"onUpdate:modelValue": t[30] || (t[30] = (l) => e(r).certificate = l),
|
|
1144
|
+
"restaurant-id": d.submission.restaurantId
|
|
1145
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1146
|
+
e(r).interiorPhoto ? (i(), L(T, {
|
|
1147
|
+
key: 2,
|
|
1148
|
+
label: "Interior Photo",
|
|
1149
|
+
modelValue: e(r).interiorPhoto,
|
|
1150
|
+
"onUpdate:modelValue": t[31] || (t[31] = (l) => e(r).interiorPhoto = l),
|
|
1151
|
+
type: "image",
|
|
1152
|
+
"restaurant-id": d.submission.restaurantId
|
|
1153
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1154
|
+
o(T, {
|
|
1155
|
+
label: "Outlet Photo",
|
|
1156
|
+
modelValue: e(r).outletPhoto,
|
|
1157
|
+
"onUpdate:modelValue": t[32] || (t[32] = (l) => e(r).outletPhoto = l),
|
|
1158
|
+
type: "image-or-pdf",
|
|
1159
|
+
"restaurant-id": d.submission.restaurantId
|
|
1160
|
+
}, null, 8, ["modelValue", "restaurant-id"])
|
|
1161
|
+
]),
|
|
1162
|
+
t[57] || (t[57] = s("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 3. Payout Information ", -1)),
|
|
1163
|
+
s("div", ll, [
|
|
1164
|
+
o(T, {
|
|
1165
|
+
label: "Latest Bank Statement",
|
|
1166
|
+
modelValue: e(r).bankStatement,
|
|
1167
|
+
"onUpdate:modelValue": t[33] || (t[33] = (l) => e(r).bankStatement = l),
|
|
1168
|
+
type: "pdf",
|
|
1169
|
+
"restaurant-id": d.submission.restaurantId
|
|
1170
|
+
}, null, 8, ["modelValue", "restaurant-id"])
|
|
1171
|
+
]),
|
|
1172
|
+
t[58] || (t[58] = s("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 4. Site Photos ", -1)),
|
|
1173
|
+
s("div", al, [
|
|
1174
|
+
(i(!0), p(A, null, O([1, 2, 3, 4, 5].filter(
|
|
1175
|
+
(l) => !!e(r)[`onsitePhoto${l}`]
|
|
1176
|
+
), (l) => (i(), L(T, {
|
|
1177
|
+
key: l,
|
|
1178
|
+
label: e($e)[l - 1],
|
|
1179
|
+
modelValue: e(r)[`onsitePhoto${l}`],
|
|
1180
|
+
"onUpdate:modelValue": (Y) => e(r)[`onsitePhoto${l}`] = Y,
|
|
1181
|
+
type: "image",
|
|
1182
|
+
"restaurant-id": d.submission.restaurantId
|
|
1183
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue", "restaurant-id"]))), 128))
|
|
1184
|
+
]),
|
|
1185
|
+
t[59] || (t[59] = s("h4", { class: "font-semibold border-b pb-1 mt-6 mb-4" }, " Section 5. Additional Documents ", -1)),
|
|
1186
|
+
s("div", sl, [
|
|
1187
|
+
e(r).liquorLicense ? (i(), L(T, {
|
|
1188
|
+
key: 0,
|
|
1189
|
+
label: "Liquor License",
|
|
1190
|
+
modelValue: e(r).liquorLicense,
|
|
1191
|
+
"onUpdate:modelValue": t[34] || (t[34] = (l) => e(r).liquorLicense = l),
|
|
1192
|
+
type: "image-or-pdf",
|
|
1193
|
+
"restaurant-id": d.submission.restaurantId
|
|
1194
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1195
|
+
e(r).appendixC ? (i(), L(T, {
|
|
1196
|
+
key: 1,
|
|
1197
|
+
label: "Appendix C",
|
|
1198
|
+
modelValue: e(r).appendixC,
|
|
1199
|
+
"onUpdate:modelValue": t[35] || (t[35] = (l) => e(r).appendixC = l),
|
|
1200
|
+
type: "pdf",
|
|
1201
|
+
"restaurant-id": d.submission.restaurantId
|
|
1202
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1203
|
+
!e(r).liquorLicense && !e(r).appendixC ? (i(), p("p", nl, " No additional documents submitted. ")) : E("", !0)
|
|
1204
|
+
]),
|
|
1205
|
+
t[60] || (t[60] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
|
|
1206
|
+
s("div", ol, [
|
|
1207
|
+
o(Ae, {
|
|
1208
|
+
modelValue: e(r).signature,
|
|
1209
|
+
"onUpdate:modelValue": t[36] || (t[36] = (l) => e(r).signature = l),
|
|
1210
|
+
"restaurant-id": d.submission.restaurantId,
|
|
1211
|
+
label: "Signature"
|
|
1212
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1213
|
+
o(T, {
|
|
1214
|
+
label: "Company Stamp",
|
|
1215
|
+
type: "image",
|
|
1216
|
+
modelValue: e(r).companyStamp,
|
|
1217
|
+
"onUpdate:modelValue": t[37] || (t[37] = (l) => e(r).companyStamp = l),
|
|
1218
|
+
"restaurant-id": d.submission.restaurantId
|
|
1219
|
+
}, null, 8, ["modelValue", "restaurant-id"])
|
|
1220
|
+
])
|
|
1221
|
+
]),
|
|
1222
|
+
_: 1
|
|
1223
|
+
})
|
|
1224
|
+
], 64);
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
}), il = { class: "space-y-2" }, ul = { class: "text-gray-900" }, dl = { class: "text-gray-900" }, ml = { class: "text-gray-900" }, pl = { class: "text-gray-900" }, bl = { class: "text-gray-900" }, cl = { class: "text-gray-900" }, gl = { class: "mt-6 grid grid-cols-4 gap-24" }, yl = { class: "w-full flex justify-end mt-6" }, fl = { class: "mt-6 grid grid-cols-4 gap-24" }, vl = { class: "col-span-2" }, Vl = { class: "col-span-2" }, kl = { class: "col-span-2" }, Cl = { class: "col-span-2" }, xl = { class: "mt-6 grid grid-cols-4 gap-24" }, wl = { class: "mt-6 grid grid-cols-4 gap-24" }, Sl = { class: "mt-6 grid grid-cols-4 gap-24" }, Nl = { class: "col-span-2" }, Pl = { class: "col-span-2" }, hl = { class: "col-span-2" }, Rl = { class: "col-span-2" }, Il = { class: "col-span-2" }, ql = { class: "col-span-2" }, Ul = /* @__PURE__ */ J({
|
|
1228
|
+
__name: "NTTSubmission",
|
|
1229
|
+
props: {
|
|
1230
|
+
submission: {
|
|
1231
|
+
type: Object,
|
|
1232
|
+
required: !0
|
|
1233
|
+
}
|
|
1234
|
+
},
|
|
1235
|
+
emits: ["update:submission"],
|
|
1236
|
+
setup(d, { emit: v }) {
|
|
1237
|
+
const u = d, V = v, b = de(), m = B(!1), { isLoading: f, startAsyncCall: x } = ne(), { fields: a, documents: r, restaurantId: C, profile: c, status: P, statusReason: D } = u.submission, N = B(""), R = [
|
|
1238
|
+
{ key: "localCardDebit", label: "Local Card (Debit)", defaultValue: "2.3" },
|
|
1239
|
+
{
|
|
1240
|
+
key: "localCardStandard",
|
|
1241
|
+
label: "Local Card (Standard)",
|
|
1242
|
+
defaultValue: "2.3"
|
|
1243
|
+
},
|
|
1244
|
+
{
|
|
1245
|
+
key: "localCardPremium",
|
|
1246
|
+
label: "Local Card (Premium)",
|
|
1247
|
+
defaultValue: "2.3"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
key: "localCardSuperPremium",
|
|
1251
|
+
label: "Local Card (Super Premium)",
|
|
1252
|
+
defaultValue: "2.3"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
key: "internationalCard",
|
|
1256
|
+
label: "International Card",
|
|
1257
|
+
defaultValue: "3.1"
|
|
1258
|
+
},
|
|
1259
|
+
{ key: "upiCard", label: "UPI Card", defaultValue: "3" },
|
|
1260
|
+
{ key: "jcbCard", label: "JCB Card", defaultValue: "3" },
|
|
1261
|
+
{ key: "dciCard", label: "DCI Card", defaultValue: "3" },
|
|
1262
|
+
{ key: "amexCard", label: "Amex Card", defaultValue: "3" },
|
|
1263
|
+
{ key: "alipay", label: "Alipay", defaultValue: "2.3" },
|
|
1264
|
+
{ key: "alipayPlus", label: "Alipay+", defaultValue: "2.3" },
|
|
1265
|
+
{ key: "trueMoney", label: "TrueMoney", defaultValue: "2.3" },
|
|
1266
|
+
{ key: "shopeePay", label: "ShopeePay", defaultValue: "2.3" },
|
|
1267
|
+
{ key: "linePay", label: "LinePay", defaultValue: "2.1" },
|
|
1268
|
+
{ key: "thaiQr", label: "ThaiQR", defaultValue: "0.5" }
|
|
1269
|
+
], k = Object.fromEntries(
|
|
1270
|
+
R.map((I) => [I.key, I.defaultValue])
|
|
1271
|
+
), S = B(
|
|
1272
|
+
u.submission.rates ? Object.fromEntries(
|
|
1273
|
+
Object.entries(u.submission.rates).map(([I, n]) => [I, `${n}`])
|
|
1274
|
+
) : { ...k }
|
|
1275
|
+
), z = j(
|
|
1276
|
+
() => Object.values(S.value).every((I) => parseFloat(I) > 0)
|
|
1277
|
+
), K = j(() => a.businessType === "juristic" ? "Juristic" : a.businessType === "individual" ? "Individual" : a.businessType || "-"), X = () => x(async () => {
|
|
1278
|
+
try {
|
|
1279
|
+
const I = await H.reviewById(
|
|
1280
|
+
u.submission._id,
|
|
1281
|
+
{
|
|
1282
|
+
status: Ve.FdoOnboardStatus.enum.ready
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
V("update:submission", I), b.open({
|
|
1286
|
+
type: "success",
|
|
1287
|
+
title: "Submission marked as ready"
|
|
1288
|
+
});
|
|
1289
|
+
} catch (I) {
|
|
1290
|
+
b.open({
|
|
1291
|
+
type: "error",
|
|
1292
|
+
title: "Error occurs when marking submission as ready",
|
|
1293
|
+
message: G(I)
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
}), M = () => x(async () => {
|
|
1297
|
+
try {
|
|
1298
|
+
const I = await H.reviewById(
|
|
1299
|
+
u.submission._id,
|
|
1300
|
+
{
|
|
1301
|
+
rates: Object.fromEntries(
|
|
1302
|
+
R.map((n) => [
|
|
1303
|
+
n.key,
|
|
1304
|
+
parseFloat(S.value[n.key])
|
|
1305
|
+
])
|
|
1306
|
+
),
|
|
1307
|
+
status: "approved"
|
|
1308
|
+
}
|
|
1309
|
+
);
|
|
1310
|
+
V("update:submission", I), b.open({
|
|
1311
|
+
type: "success",
|
|
1312
|
+
title: "Submission updated successfully"
|
|
1313
|
+
});
|
|
1314
|
+
} catch (I) {
|
|
1315
|
+
b.open({
|
|
1316
|
+
type: "error",
|
|
1317
|
+
title: "Error occurs when updating submission",
|
|
1318
|
+
message: G(I)
|
|
1319
|
+
});
|
|
1320
|
+
}
|
|
1321
|
+
}), te = () => x(async () => {
|
|
1322
|
+
try {
|
|
1323
|
+
const I = await H.reviewById(
|
|
1324
|
+
u.submission._id,
|
|
1325
|
+
{
|
|
1326
|
+
status: "rejected",
|
|
1327
|
+
statusReason: N.value
|
|
1328
|
+
}
|
|
1329
|
+
);
|
|
1330
|
+
V("update:submission", I), m.value = !1, b.open({
|
|
1331
|
+
type: "success",
|
|
1332
|
+
title: "Submission updated successfully"
|
|
1333
|
+
});
|
|
1334
|
+
} catch (I) {
|
|
1335
|
+
b.open({
|
|
1336
|
+
type: "error",
|
|
1337
|
+
title: "Error occurs when updating submission",
|
|
1338
|
+
message: G(I)
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1342
|
+
return (I, n) => {
|
|
1343
|
+
const F = U("FmTextField"), Z = U("FmButton"), oe = U("FmTextarea"), re = U("FmDialog"), le = U("FmPhoneNumber"), w = U("FmForm");
|
|
1344
|
+
return i(), p(A, null, [
|
|
1345
|
+
s("div", il, [
|
|
1346
|
+
s("div", null, [
|
|
1347
|
+
n[31] || (n[31] = s("span", { class: "w-40 font-medium text-gray-600" }, "Restaurant: ", -1)),
|
|
1348
|
+
s("span", ul, q(e(C)), 1)
|
|
1349
|
+
]),
|
|
1350
|
+
s("div", null, [
|
|
1351
|
+
n[32] || (n[32] = s("span", { class: "w-40 font-medium text-gray-600" }, "Profile: ", -1)),
|
|
1352
|
+
s("span", dl, q(e(c).name) + " ( " + q(e(c).legalName) + " )", 1)
|
|
1353
|
+
]),
|
|
1354
|
+
s("div", null, [
|
|
1355
|
+
n[33] || (n[33] = s("span", { class: "w-40 font-medium text-gray-600" }, "Email: ", -1)),
|
|
1356
|
+
s("span", ml, q(e(c).email), 1)
|
|
1357
|
+
]),
|
|
1358
|
+
s("div", null, [
|
|
1359
|
+
n[34] || (n[34] = s("span", { class: "w-40 font-medium text-gray-600" }, "Phone: ", -1)),
|
|
1360
|
+
s("span", pl, q(e(c).phoneNo), 1)
|
|
1361
|
+
]),
|
|
1362
|
+
s("div", null, [
|
|
1363
|
+
n[35] || (n[35] = s("span", { class: "w-40 font-medium text-gray-600" }, "Status: ", -1)),
|
|
1364
|
+
s("span", bl, [
|
|
1365
|
+
o(Ce, { data: e(P) }, null, 8, ["data"])
|
|
1366
|
+
])
|
|
1367
|
+
]),
|
|
1368
|
+
s("div", null, [
|
|
1369
|
+
n[36] || (n[36] = s("span", { class: "w-40 font-medium text-gray-600" }, "Status Reason: ", -1)),
|
|
1370
|
+
s("span", cl, q(e(D)), 1)
|
|
1371
|
+
])
|
|
1372
|
+
]),
|
|
1373
|
+
n[43] || (n[43] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Rate Settings", -1)),
|
|
1374
|
+
s("div", gl, [
|
|
1375
|
+
(i(), p(A, null, O(R, (t) => o(F, {
|
|
1376
|
+
key: t.key,
|
|
1377
|
+
modelValue: S.value[t.key],
|
|
1378
|
+
"onUpdate:modelValue": (_) => S.value[t.key] = _,
|
|
1379
|
+
label: t.label,
|
|
1380
|
+
"label-mark": "required",
|
|
1381
|
+
type: "number",
|
|
1382
|
+
inputmode: "numeric",
|
|
1383
|
+
decimal: 2,
|
|
1384
|
+
rules: e(g)(
|
|
1385
|
+
e(y).string().min(1, "Rate is required").transform((_) => parseFloat(_)).refine((_) => !isNaN(_), { message: "Rate must be a number" })
|
|
1386
|
+
)
|
|
1387
|
+
}, {
|
|
1388
|
+
append: h(() => [...n[37] || (n[37] = [
|
|
1389
|
+
Q("%", -1)
|
|
1390
|
+
])]),
|
|
1391
|
+
_: 1
|
|
1392
|
+
}, 8, ["modelValue", "onUpdate:modelValue", "label", "rules"])), 64))
|
|
1393
|
+
]),
|
|
1394
|
+
s("div", yl, [
|
|
1395
|
+
o(re, {
|
|
1396
|
+
modelValue: m.value,
|
|
1397
|
+
"onUpdate:modelValue": n[1] || (n[1] = (t) => m.value = t)
|
|
1398
|
+
}, {
|
|
1399
|
+
"dialog-button": h(() => [
|
|
1400
|
+
o(Z, {
|
|
1401
|
+
class: "mr-6",
|
|
1402
|
+
type: "button",
|
|
1403
|
+
variant: "destructive",
|
|
1404
|
+
"prepend-icon": "block",
|
|
1405
|
+
loading: e(f),
|
|
1406
|
+
label: "Reject Submission"
|
|
1407
|
+
}, null, 8, ["loading"])
|
|
1408
|
+
]),
|
|
1409
|
+
"dialog-header": h(() => [...n[38] || (n[38] = [
|
|
1410
|
+
s("div", null, "Rejecting Submission", -1)
|
|
1411
|
+
])]),
|
|
1412
|
+
default: h(() => [
|
|
1413
|
+
o(oe, {
|
|
1414
|
+
modelValue: N.value,
|
|
1415
|
+
"onUpdate:modelValue": n[0] || (n[0] = (t) => N.value = t),
|
|
1416
|
+
label: "Reason for Rejection",
|
|
1417
|
+
"label-mark": "optional",
|
|
1418
|
+
"helper-text": "Please provide a reason for rejection."
|
|
1419
|
+
}, null, 8, ["modelValue"]),
|
|
1420
|
+
o(Z, {
|
|
1421
|
+
class: "mb-2 mt-6 w-full",
|
|
1422
|
+
label: "Submit",
|
|
1423
|
+
"prepend-icon": "save",
|
|
1424
|
+
onClick: te,
|
|
1425
|
+
loading: e(f)
|
|
1426
|
+
}, null, 8, ["loading"])
|
|
1427
|
+
]),
|
|
1428
|
+
_: 1
|
|
1429
|
+
}, 8, ["modelValue"]),
|
|
1430
|
+
o(Z, {
|
|
1431
|
+
type: "button",
|
|
1432
|
+
variant: "primary",
|
|
1433
|
+
"prepend-icon": "approval",
|
|
1434
|
+
label: "Approve Submission with Rates",
|
|
1435
|
+
disabled: !z.value,
|
|
1436
|
+
onClick: M,
|
|
1437
|
+
loading: e(f)
|
|
1438
|
+
}, null, 8, ["disabled", "loading"]),
|
|
1439
|
+
e(P) === "approved" ? (i(), L(Z, {
|
|
1440
|
+
key: 0,
|
|
1441
|
+
type: "button",
|
|
1442
|
+
variant: "secondary",
|
|
1443
|
+
"prepend-icon": "check_circle",
|
|
1444
|
+
label: "Mark as Ready",
|
|
1445
|
+
class: "ml-6",
|
|
1446
|
+
onClick: X,
|
|
1447
|
+
loading: e(f)
|
|
1448
|
+
}, null, 8, ["loading"])) : E("", !0)
|
|
1449
|
+
]),
|
|
1450
|
+
o(w, { disabled: !0 }, {
|
|
1451
|
+
default: h(() => [
|
|
1452
|
+
n[39] || (n[39] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Outlet Information ", -1)),
|
|
1453
|
+
s("div", fl, [
|
|
1454
|
+
s("div", vl, [
|
|
1455
|
+
o(F, {
|
|
1456
|
+
modelValue: e(a).companyName,
|
|
1457
|
+
"onUpdate:modelValue": n[2] || (n[2] = (t) => e(a).companyName = t),
|
|
1458
|
+
label: "Company Name",
|
|
1459
|
+
"label-mark": "required",
|
|
1460
|
+
rules: e(g)(e(y).string().min(1, "Company Name is required"))
|
|
1461
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1462
|
+
]),
|
|
1463
|
+
s("div", Vl, [
|
|
1464
|
+
o(F, {
|
|
1465
|
+
modelValue: e(a).outletName,
|
|
1466
|
+
"onUpdate:modelValue": n[3] || (n[3] = (t) => e(a).outletName = t),
|
|
1467
|
+
label: "Outlet Name (Thai)",
|
|
1468
|
+
"label-mark": "required",
|
|
1469
|
+
rules: e(g)(e(y).string().min(1, "Outlet Name is required"))
|
|
1470
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1471
|
+
]),
|
|
1472
|
+
s("div", kl, [
|
|
1473
|
+
o(F, {
|
|
1474
|
+
modelValue: e(a).outletNameEnglish,
|
|
1475
|
+
"onUpdate:modelValue": n[4] || (n[4] = (t) => e(a).outletNameEnglish = t),
|
|
1476
|
+
label: "Outlet Name (English)",
|
|
1477
|
+
"label-mark": "required",
|
|
1478
|
+
rules: e(g)(e(y).string().min(1, "Outlet Name English is required"))
|
|
1479
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1480
|
+
]),
|
|
1481
|
+
s("div", Cl, [
|
|
1482
|
+
o(F, {
|
|
1483
|
+
modelValue: e(a).outletAddress,
|
|
1484
|
+
"onUpdate:modelValue": n[5] || (n[5] = (t) => e(a).outletAddress = t),
|
|
1485
|
+
label: "Outlet Address",
|
|
1486
|
+
"label-mark": "required",
|
|
1487
|
+
rules: e(g)(e(y).string().min(1, "Outlet Address is required"))
|
|
1488
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1489
|
+
]),
|
|
1490
|
+
o(F, {
|
|
1491
|
+
modelValue: e(a).outletPostCode,
|
|
1492
|
+
"onUpdate:modelValue": n[6] || (n[6] = (t) => e(a).outletPostCode = t),
|
|
1493
|
+
label: "Post Code",
|
|
1494
|
+
"label-mark": "required",
|
|
1495
|
+
rules: e(g)(e(y).string().min(1, "Post Code is required"))
|
|
1496
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1497
|
+
o(F, {
|
|
1498
|
+
modelValue: e(a).outletState,
|
|
1499
|
+
"onUpdate:modelValue": n[7] || (n[7] = (t) => e(a).outletState = t),
|
|
1500
|
+
label: "State",
|
|
1501
|
+
"label-mark": "required",
|
|
1502
|
+
rules: e(g)(e(y).string().min(1, "State is required"))
|
|
1503
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1504
|
+
o(F, {
|
|
1505
|
+
modelValue: e(a).outletCity,
|
|
1506
|
+
"onUpdate:modelValue": n[8] || (n[8] = (t) => e(a).outletCity = t),
|
|
1507
|
+
label: "City",
|
|
1508
|
+
"label-mark": "required",
|
|
1509
|
+
rules: e(g)(e(y).string().min(1, "City is required"))
|
|
1510
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1511
|
+
o(F, {
|
|
1512
|
+
"model-value": K.value,
|
|
1513
|
+
label: "Business Type",
|
|
1514
|
+
"label-mark": "required"
|
|
1515
|
+
}, null, 8, ["model-value"]),
|
|
1516
|
+
o(F, {
|
|
1517
|
+
modelValue: e(a).numberOfDevices,
|
|
1518
|
+
"onUpdate:modelValue": n[9] || (n[9] = (t) => e(a).numberOfDevices = t),
|
|
1519
|
+
label: "Number of Devices",
|
|
1520
|
+
"label-mark": "required"
|
|
1521
|
+
}, null, 8, ["modelValue"])
|
|
1522
|
+
]),
|
|
1523
|
+
n[40] || (n[40] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Payout Information ", -1)),
|
|
1524
|
+
s("div", xl, [
|
|
1525
|
+
o(F, {
|
|
1526
|
+
modelValue: e(a).bankName,
|
|
1527
|
+
"onUpdate:modelValue": n[10] || (n[10] = (t) => e(a).bankName = t),
|
|
1528
|
+
label: "Bank Name",
|
|
1529
|
+
"label-mark": "required",
|
|
1530
|
+
rules: e(g)(e(y).string().min(1, "Bank Name is required"))
|
|
1531
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1532
|
+
o(F, {
|
|
1533
|
+
modelValue: e(a).bankHolderName,
|
|
1534
|
+
"onUpdate:modelValue": n[11] || (n[11] = (t) => e(a).bankHolderName = t),
|
|
1535
|
+
label: "Bank Holder Name",
|
|
1536
|
+
"label-mark": "required",
|
|
1537
|
+
rules: e(g)(e(y).string().min(1, "Bank Holder Name is required"))
|
|
1538
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1539
|
+
o(F, {
|
|
1540
|
+
modelValue: e(a).bankAccountNo,
|
|
1541
|
+
"onUpdate:modelValue": n[12] || (n[12] = (t) => e(a).bankAccountNo = t),
|
|
1542
|
+
label: "Bank Account No",
|
|
1543
|
+
"label-mark": "required",
|
|
1544
|
+
rules: e(g)(e(y).string().min(1, "Bank Account No is required"))
|
|
1545
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1546
|
+
o(F, {
|
|
1547
|
+
modelValue: e(a).bankBranch,
|
|
1548
|
+
"onUpdate:modelValue": n[13] || (n[13] = (t) => e(a).bankBranch = t),
|
|
1549
|
+
label: "Bank Branch",
|
|
1550
|
+
"label-mark": "required",
|
|
1551
|
+
rules: e(g)(e(y).string().min(1, "Bank Branch is required"))
|
|
1552
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
1553
|
+
o(F, {
|
|
1554
|
+
modelValue: e(a).bankBranchCode,
|
|
1555
|
+
"onUpdate:modelValue": n[14] || (n[14] = (t) => e(a).bankBranchCode = t),
|
|
1556
|
+
label: "Bank Branch Code",
|
|
1557
|
+
"label-mark": "required",
|
|
1558
|
+
rules: e(g)(e(y).string().min(1, "Bank Branch Code is required"))
|
|
1559
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1560
|
+
]),
|
|
1561
|
+
n[41] || (n[41] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, "Documents", -1)),
|
|
1562
|
+
s("div", wl, [
|
|
1563
|
+
o(T, {
|
|
1564
|
+
label: "Authorized Person ID",
|
|
1565
|
+
modelValue: e(r).authorizedPersonID,
|
|
1566
|
+
"onUpdate:modelValue": n[15] || (n[15] = (t) => e(r).authorizedPersonID = t),
|
|
1567
|
+
type: "image",
|
|
1568
|
+
"restaurant-id": d.submission.restaurantId
|
|
1569
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1570
|
+
o(T, {
|
|
1571
|
+
label: "Outlet Photo",
|
|
1572
|
+
modelValue: e(r).outletPhoto,
|
|
1573
|
+
"onUpdate:modelValue": n[16] || (n[16] = (t) => e(r).outletPhoto = t),
|
|
1574
|
+
type: "image",
|
|
1575
|
+
"restaurant-id": d.submission.restaurantId
|
|
1576
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1577
|
+
o(T, {
|
|
1578
|
+
label: "Interior Photo",
|
|
1579
|
+
modelValue: e(r).interiorPhoto,
|
|
1580
|
+
"onUpdate:modelValue": n[17] || (n[17] = (t) => e(r).interiorPhoto = t),
|
|
1581
|
+
type: "image",
|
|
1582
|
+
"restaurant-id": d.submission.restaurantId
|
|
1583
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1584
|
+
o(T, {
|
|
1585
|
+
label: "Bank Statement",
|
|
1586
|
+
modelValue: e(r).bankStatement,
|
|
1587
|
+
"onUpdate:modelValue": n[18] || (n[18] = (t) => e(r).bankStatement = t),
|
|
1588
|
+
type: "pdf",
|
|
1589
|
+
"restaurant-id": d.submission.restaurantId
|
|
1590
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1591
|
+
e(a).businessType === "juristic" ? (i(), L(T, {
|
|
1592
|
+
key: 0,
|
|
1593
|
+
label: "Company Certificate",
|
|
1594
|
+
type: "pdf",
|
|
1595
|
+
modelValue: e(r).companyCertificate,
|
|
1596
|
+
"onUpdate:modelValue": n[19] || (n[19] = (t) => e(r).companyCertificate = t),
|
|
1597
|
+
"restaurant-id": d.submission.restaurantId
|
|
1598
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1599
|
+
e(a).businessType === "juristic" ? (i(), L(T, {
|
|
1600
|
+
key: 1,
|
|
1601
|
+
label: "VAT Certificate",
|
|
1602
|
+
type: "pdf",
|
|
1603
|
+
modelValue: e(r).vatCertificate,
|
|
1604
|
+
"onUpdate:modelValue": n[20] || (n[20] = (t) => e(r).vatCertificate = t),
|
|
1605
|
+
"restaurant-id": d.submission.restaurantId
|
|
1606
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0),
|
|
1607
|
+
e(a).businessType === "individual" ? (i(), L(T, {
|
|
1608
|
+
key: 2,
|
|
1609
|
+
label: "Commercial Certificate",
|
|
1610
|
+
type: "pdf",
|
|
1611
|
+
modelValue: e(r).commercialCertificate,
|
|
1612
|
+
"onUpdate:modelValue": n[21] || (n[21] = (t) => e(r).commercialCertificate = t),
|
|
1613
|
+
"restaurant-id": d.submission.restaurantId
|
|
1614
|
+
}, null, 8, ["modelValue", "restaurant-id"])) : E("", !0)
|
|
1615
|
+
]),
|
|
1616
|
+
n[42] || (n[42] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-4" }, " Declaration Information ", -1)),
|
|
1617
|
+
s("div", Sl, [
|
|
1618
|
+
s("div", Nl, [
|
|
1619
|
+
o(F, {
|
|
1620
|
+
modelValue: e(a).picName,
|
|
1621
|
+
"onUpdate:modelValue": n[22] || (n[22] = (t) => e(a).picName = t),
|
|
1622
|
+
label: "PIC Name",
|
|
1623
|
+
"label-mark": "required",
|
|
1624
|
+
rules: e(g)(e(y).string().min(1, "PIC Name is required"))
|
|
1625
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1626
|
+
]),
|
|
1627
|
+
s("div", Pl, [
|
|
1628
|
+
o(F, {
|
|
1629
|
+
modelValue: e(a).picRole,
|
|
1630
|
+
"onUpdate:modelValue": n[23] || (n[23] = (t) => e(a).picRole = t),
|
|
1631
|
+
label: "PIC Role",
|
|
1632
|
+
"label-mark": "required",
|
|
1633
|
+
rules: e(g)(e(y).string().min(1, "PIC Role is required"))
|
|
1634
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1635
|
+
]),
|
|
1636
|
+
s("div", hl, [
|
|
1637
|
+
o(F, {
|
|
1638
|
+
modelValue: e(a).picEmail,
|
|
1639
|
+
"onUpdate:modelValue": n[24] || (n[24] = (t) => e(a).picEmail = t),
|
|
1640
|
+
label: "PIC Email",
|
|
1641
|
+
"label-mark": "required",
|
|
1642
|
+
rules: e(g)(e(y).string().min(1, "PIC Email is required"))
|
|
1643
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1644
|
+
]),
|
|
1645
|
+
s("div", Rl, [
|
|
1646
|
+
o(le, {
|
|
1647
|
+
"model-value": e(a).picContact,
|
|
1648
|
+
"onUpdate:modelValue": n[25] || (n[25] = (t) => e(a).picContact = t),
|
|
1649
|
+
"default-country": "TH",
|
|
1650
|
+
label: "PIC Contact",
|
|
1651
|
+
"label-mark": "required",
|
|
1652
|
+
rules: e(g)(e(y).string().min(1, "PIC Contact is required"))
|
|
1653
|
+
}, null, 8, ["model-value", "rules"])
|
|
1654
|
+
]),
|
|
1655
|
+
s("div", Il, [
|
|
1656
|
+
o(F, {
|
|
1657
|
+
modelValue: e(a).witnessName,
|
|
1658
|
+
"onUpdate:modelValue": n[26] || (n[26] = (t) => e(a).witnessName = t),
|
|
1659
|
+
label: "Witness Name",
|
|
1660
|
+
"label-mark": "required",
|
|
1661
|
+
rules: e(g)(e(y).string().min(1, "Witness Name is required"))
|
|
1662
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1663
|
+
]),
|
|
1664
|
+
s("div", ql, [
|
|
1665
|
+
o(F, {
|
|
1666
|
+
modelValue: e(a).witnessRole,
|
|
1667
|
+
"onUpdate:modelValue": n[27] || (n[27] = (t) => e(a).witnessRole = t),
|
|
1668
|
+
label: "Witness Role",
|
|
1669
|
+
"label-mark": "required",
|
|
1670
|
+
rules: e(g)(e(y).string().min(1, "Witness Role is required"))
|
|
1671
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1672
|
+
]),
|
|
1673
|
+
o(T, {
|
|
1674
|
+
label: "Signature",
|
|
1675
|
+
type: "image",
|
|
1676
|
+
modelValue: e(r).signature,
|
|
1677
|
+
"onUpdate:modelValue": n[28] || (n[28] = (t) => e(r).signature = t),
|
|
1678
|
+
"restaurant-id": d.submission.restaurantId
|
|
1679
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1680
|
+
o(T, {
|
|
1681
|
+
label: "Witness Signature",
|
|
1682
|
+
type: "image",
|
|
1683
|
+
modelValue: e(r).witnessSignature,
|
|
1684
|
+
"onUpdate:modelValue": n[29] || (n[29] = (t) => e(r).witnessSignature = t),
|
|
1685
|
+
"restaurant-id": d.submission.restaurantId
|
|
1686
|
+
}, null, 8, ["modelValue", "restaurant-id"]),
|
|
1687
|
+
o(T, {
|
|
1688
|
+
label: "Company Stamp",
|
|
1689
|
+
type: "image",
|
|
1690
|
+
modelValue: e(r).companyStamp,
|
|
1691
|
+
"onUpdate:modelValue": n[30] || (n[30] = (t) => e(r).companyStamp = t),
|
|
1692
|
+
"restaurant-id": d.submission.restaurantId
|
|
1693
|
+
}, null, 8, ["modelValue", "restaurant-id"])
|
|
1694
|
+
])
|
|
1695
|
+
]),
|
|
1696
|
+
_: 1
|
|
1697
|
+
})
|
|
1698
|
+
], 64);
|
|
1699
|
+
};
|
|
1700
|
+
}
|
|
1701
|
+
}), $l = /* @__PURE__ */ J({
|
|
1702
|
+
__name: "TyroSubmission",
|
|
1703
|
+
props: {
|
|
1704
|
+
submission: {
|
|
1705
|
+
type: Object,
|
|
1706
|
+
required: !0
|
|
1707
|
+
}
|
|
1708
|
+
},
|
|
1709
|
+
emits: ["update:submission"],
|
|
1710
|
+
setup(d) {
|
|
1711
|
+
const v = d, u = j(() => {
|
|
1712
|
+
const V = v.submission.fields || {}, b = (m) => V[m] || "N/A";
|
|
1713
|
+
return [
|
|
1714
|
+
{
|
|
1715
|
+
label: "Tyro POS Reference ID",
|
|
1716
|
+
value: b("tyroPosReference")
|
|
1717
|
+
},
|
|
1718
|
+
{
|
|
1719
|
+
label: "Tyro Merchant ID",
|
|
1720
|
+
value: b("tyroMerchantId")
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
label: "Tyro Merchant Name",
|
|
1724
|
+
value: b("tyroMerchantDisplayName")
|
|
1725
|
+
},
|
|
1726
|
+
{
|
|
1727
|
+
label: "Authorised",
|
|
1728
|
+
value: b("tyroIsAuthorised")
|
|
1729
|
+
}
|
|
1730
|
+
];
|
|
1731
|
+
});
|
|
1732
|
+
return (V, b) => {
|
|
1733
|
+
const m = U("FmCardHeader"), f = U("FmCardSection"), x = U("FmCard");
|
|
1734
|
+
return i(), L(x, {
|
|
1735
|
+
class: "max-w-3xl mt-8 p-6",
|
|
1736
|
+
variant: "elevated"
|
|
1737
|
+
}, {
|
|
1738
|
+
default: h(() => [
|
|
1739
|
+
o(f, { class: "flex flex-col gap-16 justify-between" }, {
|
|
1740
|
+
default: h(() => [
|
|
1741
|
+
o(m, {
|
|
1742
|
+
class: "p-0",
|
|
1743
|
+
title: "Tyro Authorisation",
|
|
1744
|
+
subtitle: ""
|
|
1745
|
+
}),
|
|
1746
|
+
o(f, { class: "p-0" }, {
|
|
1747
|
+
default: h(() => [
|
|
1748
|
+
(i(!0), p(A, null, O(u.value, (a) => (i(), p("p", {
|
|
1749
|
+
key: a.label,
|
|
1750
|
+
class: "text-sm text-gray-900 break-all mb-4 last:mb-0"
|
|
1751
|
+
}, [
|
|
1752
|
+
s("b", null, q(a.label), 1),
|
|
1753
|
+
Q(": " + q(a.value), 1)
|
|
1754
|
+
]))), 128))
|
|
1755
|
+
]),
|
|
1756
|
+
_: 1
|
|
1757
|
+
})
|
|
1758
|
+
]),
|
|
1759
|
+
_: 1
|
|
1760
|
+
})
|
|
1761
|
+
]),
|
|
1762
|
+
_: 1
|
|
1763
|
+
});
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
}), Dl = {
|
|
1767
|
+
key: 0,
|
|
1768
|
+
class: "flex items-center justify-center min-h-[80vh]"
|
|
1769
|
+
}, Fl = { class: "px-32 pb-32" }, Ql = /* @__PURE__ */ J({
|
|
1770
|
+
__name: "OnboardForm",
|
|
1771
|
+
props: {
|
|
1772
|
+
submissionId: {
|
|
1773
|
+
type: String,
|
|
1774
|
+
required: !0
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
setup(d) {
|
|
1778
|
+
const { startAsyncCall: v, isLoading: u } = ne(), V = de(), b = d, m = Ie(), f = B(null), x = j(
|
|
1779
|
+
() => {
|
|
1780
|
+
var D;
|
|
1781
|
+
return ((D = f.value) == null ? void 0 : D.type) === Ve.FdoOnboardType.enum.tyro;
|
|
1782
|
+
}
|
|
1783
|
+
), a = () => {
|
|
1784
|
+
if (window.history.length > 1) {
|
|
1785
|
+
m.back();
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
m.push({ name: "mf-payment-admin.onboard-submission" });
|
|
1789
|
+
};
|
|
1790
|
+
ve(() => {
|
|
1791
|
+
v(async () => {
|
|
1792
|
+
f.value = await H.readById(b.submissionId);
|
|
1793
|
+
});
|
|
1794
|
+
});
|
|
1795
|
+
const r = j(() => {
|
|
1796
|
+
if (!f.value) return null;
|
|
1797
|
+
switch (f.value.type) {
|
|
1798
|
+
case "softspace":
|
|
1799
|
+
return rl;
|
|
1800
|
+
case "ntt":
|
|
1801
|
+
return Ul;
|
|
1802
|
+
case "tyro":
|
|
1803
|
+
return $l;
|
|
1804
|
+
default:
|
|
1805
|
+
return null;
|
|
1806
|
+
}
|
|
1807
|
+
}), C = B(0);
|
|
1808
|
+
function c(D) {
|
|
1809
|
+
f.value = D, C.value = Date.now();
|
|
1810
|
+
}
|
|
1811
|
+
const P = async (D) => {
|
|
1812
|
+
var N, R;
|
|
1813
|
+
if (f.value)
|
|
1814
|
+
switch (D) {
|
|
1815
|
+
case "preview":
|
|
1816
|
+
let k;
|
|
1817
|
+
try {
|
|
1818
|
+
k = V.open({
|
|
1819
|
+
message: "Generating preview document...",
|
|
1820
|
+
type: "info"
|
|
1821
|
+
}), await H.previewDocument((N = f.value) == null ? void 0 : N._id);
|
|
1822
|
+
} catch (S) {
|
|
1823
|
+
V.open({
|
|
1824
|
+
type: "error",
|
|
1825
|
+
title: "Error occurs when generating submission document",
|
|
1826
|
+
message: G(S)
|
|
1827
|
+
});
|
|
1828
|
+
} finally {
|
|
1829
|
+
k && V.close(k);
|
|
1830
|
+
}
|
|
1831
|
+
break;
|
|
1832
|
+
case "send":
|
|
1833
|
+
try {
|
|
1834
|
+
V.open({
|
|
1835
|
+
message: "Sending onboarding document...",
|
|
1836
|
+
type: "info"
|
|
1837
|
+
}), await H.sendDocument((R = f.value) == null ? void 0 : R._id), V.open({
|
|
1838
|
+
type: "success",
|
|
1839
|
+
title: "Submission documents send successfully"
|
|
1840
|
+
});
|
|
1841
|
+
} catch (S) {
|
|
1842
|
+
V.open({
|
|
1843
|
+
type: "error",
|
|
1844
|
+
title: "Error occurs when sending document",
|
|
1845
|
+
message: G(S)
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
};
|
|
1851
|
+
return (D, N) => {
|
|
1852
|
+
var S, z, K, X;
|
|
1853
|
+
const R = U("FmCircularProgress"), k = U("FmPageHead");
|
|
1854
|
+
return e(u) ? (i(), p("div", Dl, [
|
|
1855
|
+
o(R, { size: "xxl" })
|
|
1856
|
+
])) : (i(), p(A, { key: 1 }, [
|
|
1857
|
+
o(k, {
|
|
1858
|
+
title: `Submission - ${(S = f.value) == null ? void 0 : S.type}`,
|
|
1859
|
+
description: `ID - ${(z = f.value) == null ? void 0 : z._id}`,
|
|
1860
|
+
"back-button": !0,
|
|
1861
|
+
"onClick:back": a,
|
|
1862
|
+
"onClick:action": P,
|
|
1863
|
+
actions: x.value ? [] : [
|
|
1864
|
+
{
|
|
1865
|
+
label: "Preview Document",
|
|
1866
|
+
value: "preview",
|
|
1867
|
+
prependIcon: "preview"
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
label: "Send for Review",
|
|
1871
|
+
value: "send",
|
|
1872
|
+
isPrimary: !0,
|
|
1873
|
+
prependIcon: "send"
|
|
1874
|
+
}
|
|
1875
|
+
]
|
|
1876
|
+
}, null, 8, ["title", "description", "actions"]),
|
|
1877
|
+
s("div", Fl, [
|
|
1878
|
+
(i(), L(ue(r.value), {
|
|
1879
|
+
key: C.value,
|
|
1880
|
+
submission: f.value,
|
|
1881
|
+
"onUpdate:submission": c
|
|
1882
|
+
}, null, 40, ["submission"])),
|
|
1883
|
+
((K = f.value) == null ? void 0 : K.type) !== "softspace" ? (i(), p(A, { key: 0 }, [
|
|
1884
|
+
N[0] || (N[0] = s("h3", { class: "font-semibold text-lg border-b pb-1 mt-6 mb-6" }, "Timeline", -1)),
|
|
1885
|
+
o(xe, {
|
|
1886
|
+
entries: (X = f.value) == null ? void 0 : X.timeline
|
|
1887
|
+
}, null, 8, ["entries"])
|
|
1888
|
+
], 64)) : E("", !0)
|
|
1889
|
+
])
|
|
1890
|
+
], 64));
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
});
|
|
1894
|
+
export {
|
|
1895
|
+
Ql as default
|
|
1896
|
+
};
|