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