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