@feedmepos/mf-payment 1.11.16-dev → 1.11.17-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 (145) hide show
  1. package/dist/Actions.vue_vue_type_script_setup_true_lang-COGP4bH0.js +64 -0
  2. package/dist/{AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BvhrP3i-.js → AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DpSmJgWn.js} +3 -3
  3. package/dist/{AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BjGEcK8R.js → AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BVqrbU1b.js} +3 -3
  4. package/dist/{Chargeback-CCzx9M4d.js → Chargeback-BqQYNBGo.js} +6 -6
  5. package/dist/{DocumentViewer.vue_vue_type_script_setup_true_lang-Cgetk-s9.js → DocumentViewer.vue_vue_type_script_setup_true_lang-DERNbQ3k.js} +473 -473
  6. package/dist/{ExternalTerminal-BL5sEkJK.js → ExternalTerminal-fNOdfUBA.js} +7 -7
  7. package/dist/FoodCourtPayoutAccount-DNAcTdWF.js +187 -0
  8. package/dist/FoodCourtSettlement-CTtJEJ7Q.js +68 -0
  9. package/dist/FoodCourtTransaction-BaqOpZ2h.js +212 -0
  10. package/dist/Method.vue_vue_type_script_setup_true_lang-CYxMDr_T.js +58 -0
  11. package/dist/{OnboardForm-CHBL2xs2.js → OnboardForm-B4r4MFFi.js} +6 -6
  12. package/dist/{OnboardForm-CwoQ-u0X.js → OnboardForm-Bz_kBQ_2.js} +6 -6
  13. package/dist/{OnboardSubmission-De50hDlQ.js → OnboardSubmission-D_Mi1LR5.js} +6 -6
  14. package/dist/{OnboardSubmission-CwdA6Fh0.js → OnboardSubmission-GAG1q9Cu.js} +4 -4
  15. package/dist/{PaymentCheckout-C4zXAkTu.js → PaymentCheckout-BCy5_Qc8.js} +2 -2
  16. package/dist/{PayoutAccount-ChqGHuRR.js → PayoutAccount-9jZqReid.js} +7 -7
  17. package/dist/PayoutAccount-BDdUpPUJ.js +405 -0
  18. package/dist/{PayoutAccountSetting-SjFMSEu9.js → PayoutAccountSetting-CbRrZ-uL.js} +7 -7
  19. package/dist/{Restaurant-CYJ-XLRZ.js → Restaurant-yzTw6u3J.js} +5 -5
  20. package/dist/{RestaurantSetting-BdXl1yPZ.js → RestaurantSetting-LtwUZbiZ.js} +4 -4
  21. package/dist/Settlement-BTNKWaS6.js +510 -0
  22. package/dist/{Settlement-DFRxxs_m.js → Settlement-DKC-8m5B.js} +3 -3
  23. package/dist/SettlementTable.vue_vue_type_script_setup_true_lang-hjz9Xw5x.js +132 -0
  24. package/dist/{SettlementTransactions-C3Fsm_X9.js → SettlementTransactions-B0wn4zEK.js} +106 -97
  25. package/dist/{SettlementTransactions-CGBKh1GN.js → SettlementTransactions-BA8lVRms.js} +5 -5
  26. package/dist/{Status.vue_vue_type_script_setup_true_lang-B64OGluJ.js → Status.vue_vue_type_script_setup_true_lang-B8QvOL7Z.js} +1 -1
  27. package/dist/{Terminal-C-rbyBC8.js → Terminal-jqcSPL2f.js} +7 -7
  28. package/dist/{TerminalSetting-CcTRaKIt.js → TerminalSetting-IkoP5RPL.js} +8 -8
  29. package/dist/{TerminalTemplate-DLaa9wUZ.js → TerminalTemplate-kSeKVJ-C.js} +5 -5
  30. package/dist/{TerminalTemplateSetting-YzhPDF8J.js → TerminalTemplateSetting-C7Q0ofoT.js} +6 -6
  31. package/dist/{Transaction-ou3zdIBB.js → Transaction-B9E6DQye.js} +16 -15
  32. package/dist/{Transaction-Bk8usnmd.js → Transaction-CauQVnjl.js} +54 -52
  33. package/dist/{TransactionOld-0X1celu9.js → TransactionOld-fdLtZOUV.js} +10 -9
  34. package/dist/{TransactionStatus.vue_vue_type_script_setup_true_lang-BS4AYaq1.js → TransactionStatus.vue_vue_type_script_setup_true_lang-Cm-r2le1.js} +1 -1
  35. package/dist/api/document/index.d.ts +2 -0
  36. package/dist/api/food-court/index.d.ts +31 -0
  37. package/dist/{app-obftSkFb.js → app-LpRZG5SK.js} +2420 -2351
  38. package/dist/app.js +1 -1
  39. package/dist/{assets-DLPXM2Y4.js → assets-CU3fydSV.js} +1 -1
  40. package/dist/{grafana-BXLOtIvx.js → grafana-BBPv2vBQ.js} +1 -1
  41. package/dist/{index-Baec1AT2.js → index-BFqUsoWz.js} +4227 -4176
  42. package/dist/{index-a8lvAiCb.js → index-Be6BYI6Y.js} +52 -29
  43. package/dist/{index-owIgdVJd.js → index-CY-XsXFD.js} +1 -1
  44. package/dist/index-CazeCsOR.js +13 -0
  45. package/dist/{index-CJPHA9xo.js → index-CfdnF9Hu.js} +1 -1
  46. package/dist/{index-CtbE-KF0.js → index-CnXoDo29.js} +1 -1
  47. package/dist/{index-CR-HSdwu.js → index-DDRoa9oc.js} +2 -2
  48. package/dist/{index-Dlng-M3Z.js → index-DFb6LwIH.js} +2 -2
  49. package/dist/{index-CK7aA2pd.js → index-DGBA5vc9.js} +1 -1
  50. package/dist/index-DYFngO0V.js +75 -0
  51. package/dist/{index-BQadSOBj.js → index-Da1J8lF1.js} +1 -1
  52. package/dist/{index-CAT0OmJZ.js → index-DhTmRVyJ.js} +1 -1
  53. package/dist/{index-DRy36FqO.js → index-T3wrZJyq.js} +1 -1
  54. package/dist/index-j-zqgMuS.js +52 -0
  55. package/dist/{index.vue_vue_type_script_setup_true_lang-DrxOa3Bv.js → index.vue_vue_type_script_setup_true_lang-DiniY5At.js} +1 -1
  56. package/dist/{PayoutAccount-CpJaVhKj.js → mascot-side-DNc7naiM.js} +206 -598
  57. package/dist/model/payout-account.d.ts +3 -2
  58. package/dist/{onboard-submission-Dzw9Nu3k.js → onboard-submission-CYp6UpDI.js} +2 -2
  59. package/dist/package.json +3 -3
  60. package/dist/{payout-account-BXeQXNBN.js → payout-account-B8ZjV2cD.js} +179 -169
  61. package/dist/router/food-court.d.ts +3 -0
  62. package/dist/router/index.d.ts +3 -1
  63. package/dist/stores/payoutAccount.d.ts +40 -38
  64. package/dist/style.css +1 -1
  65. package/dist/tsconfig.app.tsbuildinfo +1 -1
  66. package/dist/{useQuery-COlCU4ZR.js → useQuery-BKgSfFAn.js} +1 -1
  67. package/dist/utils/food-court.d.ts +2 -0
  68. package/dist/views/admin/external-terminal/ExternalTerminalPairDialog.vue.d.ts +8 -8
  69. package/dist/views/admin/external-terminal/ExternalTerminalSideSheet.vue.d.ts +14 -14
  70. package/dist/views/admin/external-terminal/pair/BRITerminal.vue.d.ts +8 -8
  71. package/dist/views/admin/external-terminal/pair/BeamTerminal.vue.d.ts +8 -8
  72. package/dist/views/admin/onboard-submission/forms/NTTSubmission.vue.d.ts +20 -20
  73. package/dist/views/admin/onboard-submission/forms/SoftspaceSubmission.vue.d.ts +20 -20
  74. package/dist/views/admin/onboard-submission/forms/TeyaSubmission.vue.d.ts +20 -20
  75. package/dist/views/admin/onboard-submission/forms/TyroSubmission.vue.d.ts +20 -20
  76. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +40 -38
  77. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +62 -60
  78. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +62 -60
  79. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +40 -38
  80. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +40 -38
  81. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +62 -60
  82. package/dist/views/admin/payout-account/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  83. package/dist/views/admin/payout-account/tabs/gateway/BeamGateway.vue.d.ts +2 -2
  84. package/dist/views/admin/payout-account/tabs/gateway/DigioGateway.vue.d.ts +2 -2
  85. package/dist/views/admin/payout-account/tabs/gateway/FiuuGateway.vue.d.ts +2 -2
  86. package/dist/views/admin/payout-account/tabs/gateway/KsherGateway.vue.d.ts +2 -2
  87. package/dist/views/admin/payout-account/tabs/gateway/MacauPassGateway.vue.d.ts +2 -2
  88. package/dist/views/admin/payout-account/tabs/gateway/TyroGateway.vue.d.ts +2 -2
  89. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  90. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  91. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +6 -4
  92. package/dist/views/admin/restaurant/tabs/gateway/BeamGateway.vue.d.ts +6 -4
  93. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +6 -4
  94. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -4
  95. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -4
  96. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +6 -4
  97. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +6 -4
  98. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -4
  99. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -4
  100. package/dist/views/admin/restaurant/tabs/gateway/MonetapayGateway.vue.d.ts +6 -4
  101. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +6 -4
  102. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +6 -4
  103. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -4
  104. package/dist/views/admin/terminal/TerminalSideSheet.vue.d.ts +22 -20
  105. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +22 -20
  106. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +22 -20
  107. package/dist/views/admin/terminal/tabs/PaymentCheckout.vue.d.ts +22 -20
  108. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +22 -20
  109. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +22 -20
  110. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +22 -20
  111. package/dist/views/admin/terminal/tabs/ecr/BeamGateway.vue.d.ts +22 -20
  112. package/dist/views/admin/terminal/tabs/ecr/BriGateway.vue.d.ts +22 -20
  113. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +22 -20
  114. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +22 -20
  115. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +22 -20
  116. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +22 -20
  117. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +22 -20
  118. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +22 -20
  119. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +22 -20
  120. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +22 -20
  121. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +22 -20
  122. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +22 -20
  123. package/dist/views/admin/terminal/tabs/ecr/OmaGateway.vue.d.ts +22 -20
  124. package/dist/views/admin/terminal/tabs/ecr/PbbGateway.vue.d.ts +22 -20
  125. package/dist/views/admin/terminal/tabs/ecr/RevenueGateway.vue.d.ts +22 -20
  126. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +22 -20
  127. package/dist/views/admin/terminal/tabs/ecr/TeyaGateway.vue.d.ts +22 -20
  128. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +22 -20
  129. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +22 -20
  130. package/dist/views/admin/terminal-template/TerminalTemplateSideSheet.vue.d.ts +26 -26
  131. package/dist/views/admin/terminal-template/tabs/EcrGateways.vue.d.ts +16 -16
  132. package/dist/views/admin/terminal-template/tabs/Information.vue.d.ts +16 -16
  133. package/dist/views/food-court/FoodCourtPayoutAccount.vue.d.ts +2 -0
  134. package/dist/views/food-court/FoodCourtSettlement.vue.d.ts +2 -0
  135. package/dist/views/food-court/FoodCourtTransaction.vue.d.ts +2 -0
  136. package/dist/views/onboard-submission/useTeyaConnect.d.ts +1 -1
  137. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +80 -76
  138. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +28 -28
  139. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +14 -14
  140. package/dist/views/settlement/SettlementTable.vue.d.ts +15 -5
  141. package/dist/views/settlement/SettlementTransactions.vue.d.ts +11 -1
  142. package/package.json +3 -3
  143. package/dist/Actions.vue_vue_type_script_setup_true_lang-C7wa3o3y.js +0 -118
  144. package/dist/Settlement-DlNwIY-o.js +0 -625
  145. package/dist/index-n58-Qewm.js +0 -62
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as x, resolveComponent as u, openBlock as f, createElementBlock as R, createVNode as n, normalizeClass as B, withCtx as y, createElementVNode as A, toDisplayString as E, createCommentVNode as K, createBlock as h, ref as C, computed as V, watch as D, unref as r, isRef as w, h as N } from "vue";
2
2
  import { h as z } from "./moment-h96o7c8I.js";
3
- import { u as L } from "./index-CAT0OmJZ.js";
4
- import { p as P } from "./index-Baec1AT2.js";
3
+ import { u as L } from "./index-DhTmRVyJ.js";
4
+ import { p as P } from "./index-BFqUsoWz.js";
5
5
  import { _ as M } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
6
- import { P as O } from "./payout-account-BXeQXNBN.js";
7
- import { p as T } from "./index-owIgdVJd.js";
6
+ import { P as O } from "./payout-account-B8ZjV2cD.js";
7
+ import { p as T } from "./index-CY-XsXFD.js";
8
8
  import { useSnackbar as W } from "@feedmepos/ui-library";
9
- import { _ as j } from "./index.vue_vue_type_script_setup_true_lang-DrxOa3Bv.js";
9
+ import { _ as j } from "./index.vue_vue_type_script_setup_true_lang-DiniY5At.js";
10
10
  import { useRouter as H } from "vue-router";
11
11
  import { _ as J } from "./SelectAll.vue_vue_type_script_setup_true_lang-BNZTqdoF.js";
12
- import { _ as Q } from "./AdminBusinessSelector.vue_vue_type_script_setup_true_lang-BvhrP3i-.js";
13
- import { _ as X } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BjGEcK8R.js";
12
+ import { _ as Q } from "./AdminBusinessSelector.vue_vue_type_script_setup_true_lang-DpSmJgWn.js";
13
+ import { _ as X } from "./AdminRestaurantSelector.vue_vue_type_script_setup_true_lang-BVqrbU1b.js";
14
14
  import { z as U, a as $ } from "./validator-CTlVogBQ.js";
15
15
  import { u as Z } from "./error-K1CakhA9.js";
16
16
  import { useCoreStore as ee } from "@feedmepos/mf-common";
@@ -0,0 +1,405 @@
1
+ import { defineComponent as v, resolveComponent as g, openBlock as c, createElementBlock as A, createVNode as E, normalizeClass as $, withCtx as C, createElementVNode as d, toDisplayString as I, createCommentVNode as D, createBlock as b, ref as L, computed as P, h as N, onMounted as H, watch as Q, unref as f, Fragment as X } from "vue";
2
+ import { defineStore as Z, storeToRefs as ee } from "pinia";
3
+ import { p as S } from "./index-CY-XsXFD.js";
4
+ import { u as te, p as U } from "./index-BFqUsoWz.js";
5
+ import { useI18n as j, useCoreStore as ae } from "@feedmepos/mf-common";
6
+ import { m as ne, _ as se } from "./mascot-side-DNc7naiM.js";
7
+ import { useDialog as oe } from "@feedmepos/ui-library";
8
+ import { _ as re } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
9
+ import { A as ie, q as le, v as ue, e as ce } from "./app-LpRZG5SK.js";
10
+ import { a as G, P as V } from "./payout-account-B8ZjV2cD.js";
11
+ function me() {
12
+ return {
13
+ businessPayoutAccounts: []
14
+ };
15
+ }
16
+ const pe = Z("mf-payment-payoutAccount", {
17
+ state: () => me(),
18
+ getters: {
19
+ getBusinessPayoutAccounts: (t) => t.businessPayoutAccounts
20
+ },
21
+ actions: {
22
+ async readBusinessPayoutAccounts(t) {
23
+ this.businessPayoutAccounts = await S.readBusinessPayoutAccounts(t);
24
+ },
25
+ async updateBusinessPayoutAccounts(t, n) {
26
+ await S.updateBusinessPayoutAccounts(t, n);
27
+ },
28
+ async createBusinessPayoutAccounts(t) {
29
+ const n = await S.createBusinessPayoutAccounts(t);
30
+ this.businessPayoutAccounts.push(n);
31
+ }
32
+ }
33
+ }), de = { class: "flex flex-col gap-1" }, ye = {
34
+ key: 0,
35
+ class: "text-xs text-red-500"
36
+ }, _e = /* @__PURE__ */ v({
37
+ __name: "Status",
38
+ props: {
39
+ row: {},
40
+ data: {}
41
+ },
42
+ setup(t) {
43
+ const n = t;
44
+ function s() {
45
+ return n.data === "NEW" ? "!w-[16px] !h-[16px] bg-yellow-400" : n.data === "PENDING" ? "!w-[16px] !h-[16px] bg-orange-400" : n.data === "REJECTED" ? "!w-[16px] !h-[16px] bg-red-500" : "!w-[16px] !h-[16px] bg-green-400";
46
+ }
47
+ return (m, p) => {
48
+ const l = g("FmBadge");
49
+ return c(), A("div", de, [
50
+ E(l, {
51
+ inline: "",
52
+ class: $(s())
53
+ }, {
54
+ default: C(() => [
55
+ d("div", null, I(t.data), 1)
56
+ ]),
57
+ _: 1
58
+ }, 8, ["class"]),
59
+ n.data === "REJECTED" && n.row.original.statusReason ? (c(), A("div", ye, I(n.row.original.statusReason), 1)) : D("", !0)
60
+ ]);
61
+ };
62
+ }
63
+ }), ge = /* @__PURE__ */ v({
64
+ __name: "IsActive",
65
+ props: {
66
+ row: {},
67
+ data: {}
68
+ },
69
+ setup(t) {
70
+ const n = t;
71
+ function s() {
72
+ return n.data ? "#66BB6A" : "#EF5350";
73
+ }
74
+ function m() {
75
+ return n.data ? "check" : "close";
76
+ }
77
+ return (p, l) => {
78
+ const y = g("FmIcon");
79
+ return c(), b(y, {
80
+ name: m(),
81
+ color: s(),
82
+ size: "lg"
83
+ }, null, 8, ["name", "color"]);
84
+ };
85
+ }
86
+ }), fe = /* @__PURE__ */ v({
87
+ __name: "Bank",
88
+ props: {
89
+ row: {},
90
+ data: {}
91
+ },
92
+ setup(t) {
93
+ function n(s) {
94
+ return s ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
95
+ }
96
+ return (s, m) => {
97
+ const p = g("FmBadge"), l = g("FmListItem");
98
+ return c(), b(l, {
99
+ label: t.row.original.holderName,
100
+ sublabel: t.row.original.bankName + " - " + t.row.original.bankNumber,
101
+ clickable: !1,
102
+ tag: "label"
103
+ }, {
104
+ append: C(() => [
105
+ E(p, {
106
+ inline: "",
107
+ class: $(n(t.row.original.bankReady))
108
+ }, null, 8, ["class"])
109
+ ]),
110
+ _: 1
111
+ }, 8, ["label", "sublabel"]);
112
+ };
113
+ }
114
+ }), be = /* @__PURE__ */ v({
115
+ __name: "PersonInCharge",
116
+ props: {
117
+ row: {},
118
+ data: {}
119
+ },
120
+ setup(t) {
121
+ function n(s) {
122
+ return s ? "!w-[16px] !h-[16px] bg-green-400" : "!w-[16px] !h-[16px] bg-red-400";
123
+ }
124
+ return (s, m) => {
125
+ const p = g("FmBadge"), l = g("FmListItem");
126
+ return c(), b(l, {
127
+ label: t.row.original.picName,
128
+ sublabel: t.row.original.picEmail + " - " + t.row.original.picPhone,
129
+ clickable: !1,
130
+ tag: "label"
131
+ }, {
132
+ append: C(() => [
133
+ E(p, {
134
+ inline: "",
135
+ class: $(n(t.row.original.picReady))
136
+ }, null, 8, ["class"])
137
+ ]),
138
+ _: 1
139
+ }, 8, ["label", "sublabel"]);
140
+ };
141
+ }
142
+ }), ve = /* @__PURE__ */ v({
143
+ __name: "DisplayName",
144
+ props: {
145
+ row: {}
146
+ },
147
+ setup(t) {
148
+ return (n, s) => (c(), A("p", null, I(t.row.original.name) + " (" + I(t.row.original.regNo ?? "-") + ")", 1));
149
+ }
150
+ }), we = /* @__PURE__ */ v({
151
+ __name: "PayoutAccountTable",
152
+ props: {
153
+ data: {
154
+ type: Array,
155
+ required: !0
156
+ },
157
+ loading: {
158
+ type: Boolean,
159
+ required: !0
160
+ }
161
+ },
162
+ emits: ["row-click"],
163
+ setup(t, { emit: n }) {
164
+ const { t: s } = j(), m = t, p = n, l = L(""), y = [
165
+ {
166
+ header: () => s("payment.payout_account.table.type"),
167
+ accessorKey: "event",
168
+ meta: {
169
+ maxWidth: "92px"
170
+ }
171
+ },
172
+ {
173
+ header: () => s("payment.payout_account.table.name"),
174
+ accessorKey: "name",
175
+ cell: ({ cell: e, row: o }) => N(ve, { row: o })
176
+ },
177
+ {
178
+ header: () => s("payment.payout_account.table.status"),
179
+ accessorKey: "status",
180
+ cell: ({ cell: e, row: o }) => N(_e, { row: o, data: e.getValue() }),
181
+ meta: {
182
+ maxWidth: "108px"
183
+ }
184
+ },
185
+ {
186
+ header: () => s("payment.payout_account.table.active"),
187
+ accessorKey: "isActive",
188
+ meta: {
189
+ maxWidth: "64px"
190
+ },
191
+ cell: ({ cell: e, row: o }) => N(ge, { row: o, data: e.getValue() })
192
+ },
193
+ {
194
+ header: () => s("payment.payout_account.table.bank"),
195
+ accessorKey: "bank",
196
+ cell: ({ cell: e, row: o }) => N(fe, { row: o, data: e.getValue() })
197
+ },
198
+ {
199
+ header: () => s("payment.payout_account.table.pic"),
200
+ accessorKey: "pic",
201
+ cell: ({ cell: e, row: o }) => N(be, { row: o, data: e.getValue() })
202
+ }
203
+ ], B = P(() => m.data.map((e) => {
204
+ const o = {
205
+ bankReady: !1,
206
+ bankNumber: "",
207
+ bankName: "",
208
+ holderName: ""
209
+ };
210
+ e.store.bank && e.store.bank.accountNumber && Object.assign(o, {
211
+ bankReady: !0,
212
+ bankNumber: e.store.bank.accountNumber,
213
+ bankName: e.store.bank.name,
214
+ holderName: e.store.bank.holderName
215
+ });
216
+ const _ = {
217
+ picReady: !1,
218
+ picName: "",
219
+ picPhone: "",
220
+ picEmail: ""
221
+ };
222
+ e.store.keyPerson && Object.assign(_, {
223
+ picReady: !0,
224
+ picName: e.store.keyPerson.name,
225
+ picPhone: e.store.keyPerson.phone,
226
+ picEmail: e.store.keyPerson.email
227
+ });
228
+ let u = e.store.companyName ?? e.ref.name;
229
+ return e.store.event === "ORDERING" && (u = e.ref.profile.name), {
230
+ _id: e._id,
231
+ event: e.store.event,
232
+ name: u,
233
+ regNo: e.store.regNo,
234
+ status: e.status,
235
+ statusReason: e.statusReason,
236
+ isActive: e.enable,
237
+ ...o,
238
+ ..._
239
+ };
240
+ }));
241
+ return (e, o) => {
242
+ const _ = g("FmTable");
243
+ return c(), b(_, {
244
+ modelValue: l.value,
245
+ "onUpdate:modelValue": o[0] || (o[0] = (u) => l.value = u),
246
+ "row-data": B.value,
247
+ "shrink-at": !1,
248
+ "column-defs": y,
249
+ loading: m.loading,
250
+ onRowClick: o[1] || (o[1] = (u) => p("row-click", m.data.at(u.index)))
251
+ }, null, 8, ["modelValue", "row-data", "loading"]);
252
+ };
253
+ }
254
+ }), he = {
255
+ key: 0,
256
+ class: "flex items-center justify-center min-h-[80vh]"
257
+ }, xe = { class: "mr-6 lg:block lg:w-1/6" }, ke = ["src"], Ne = { class: "w-full max-w-lg text-left" }, Pe = { class: "py-4" }, Ae = { class: "flex justify-end items-center mb-6" }, Ee = { class: "flex space-x-4 items-center flex-1" }, Be = { class: "flex space-x-4 items-center" }, Ke = /* @__PURE__ */ v({
258
+ __name: "PayoutAccount",
259
+ setup(t) {
260
+ const { currentBusiness: n, restaurants: s, sessionUser: m } = ae(), { isLoading: p, startAsyncCall: l } = te(!0), { t: y } = j(), B = L("");
261
+ let e;
262
+ const o = oe(), _ = pe(), { getBusinessPayoutAccounts: u } = ee(_), M = P(() => {
263
+ var a;
264
+ return ie(
265
+ [
266
+ {
267
+ subject: ue.payment_payoutAccount,
268
+ action: le.manage
269
+ }
270
+ ],
271
+ ((a = m.value) == null ? void 0 : a.permissions) ?? []
272
+ );
273
+ }), F = P(() => s.value.filter(
274
+ (a) => u.value.findIndex((r) => r.store.id === a._id) === -1
275
+ ).map((a) => ({ label: a.profile.name, value: a._id }))), W = P(() => {
276
+ var a, r;
277
+ return [
278
+ { label: (a = n.value) == null ? void 0 : a.name, value: (r = n.value) == null ? void 0 : r._id }
279
+ ];
280
+ }), q = P(() => F.value.length > 0 || !u.value.find((a) => a.store.event === "MARKETING"));
281
+ async function O(a) {
282
+ var K;
283
+ const r = (a == null ? void 0 : a.businessId) ?? ((K = n.value) == null ? void 0 : K._id);
284
+ if (!r) throw "Business id required";
285
+ const h = G.initPayoutAccount(r, a), w = !a;
286
+ let x = !1;
287
+ a && (x = a.status === "NEW" || a.status === "REJECTED");
288
+ const k = {
289
+ initialValue: { payoutSetting: h },
290
+ isNewAccount: w,
291
+ isUpdateAccount: x,
292
+ bankNameOptions: V.bankNameOptions(),
293
+ bankTypeOptions: V.bankTypeOptions(),
294
+ storeEventOptions: V.storeEventOptions(),
295
+ restaurantOptions: w ? F.value : s.value.map((i) => ({ label: i.profile.name, value: i._id })),
296
+ businessOptions: W.value
297
+ };
298
+ w && (F.value.length === 0 && (k.storeEventOptions = k.storeEventOptions.filter(
299
+ (i) => i.value !== "ORDERING"
300
+ )), u.value.find((i) => i.store.event === "MARKETING") && (k.storeEventOptions = k.storeEventOptions.filter(
301
+ (i) => i.value !== "MARKETING"
302
+ )));
303
+ const Y = o.open({
304
+ title: y(w || x ? "payment.payout_account.dialog.title" : "payment.payout_account.dialog.view_title"),
305
+ closeButton: !0,
306
+ overlay: !0,
307
+ contentComponent: se,
308
+ contentComponentProps: k
309
+ }), z = async function(i) {
310
+ o.close(), l(async () => {
311
+ const T = await G.mergeData(
312
+ {
313
+ businessId: i.payoutSetting.store.event === U.F_PAYOUT_FOR.Enum.MARKETING ? i.payoutSetting.store.id : void 0,
314
+ restaurantId: i.payoutSetting.store.event === U.F_PAYOUT_FOR.Enum.ORDERING ? i.payoutSetting.store.id : void 0
315
+ },
316
+ h,
317
+ i
318
+ );
319
+ a ? await _.updateBusinessPayoutAccounts(
320
+ T._id,
321
+ T
322
+ ) : await _.createBusinessPayoutAccounts({
323
+ ...T,
324
+ methods: void 0,
325
+ status: ce.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING
326
+ }), await R();
327
+ });
328
+ };
329
+ Y.onPrimary(z);
330
+ }
331
+ async function R(a) {
332
+ await l(async () => {
333
+ await _.readBusinessPayoutAccounts(a);
334
+ });
335
+ }
336
+ function J(a) {
337
+ clearTimeout(e), e = setTimeout(() => R(a || void 0), 500);
338
+ }
339
+ return H(() => R()), Q(n, () => R()), (a, r) => {
340
+ const h = g("FmButton"), w = g("FmSearch");
341
+ return c(), b(re, {
342
+ title: f(y)("payment.payout_account.title"),
343
+ description: f(y)("payment.payout_account.description"),
344
+ loading: f(p)
345
+ }, {
346
+ default: C(() => [
347
+ f(u).length ? (c(), A(X, { key: 1 }, [
348
+ d("div", Ae, [
349
+ d("div", Ee, [
350
+ E(w, {
351
+ modelValue: B.value,
352
+ "onUpdate:modelValue": [
353
+ r[1] || (r[1] = (x) => B.value = x),
354
+ J
355
+ ],
356
+ class: "w-[280px]",
357
+ placeholder: "Search by restaurant name..."
358
+ }, null, 8, ["modelValue"])
359
+ ]),
360
+ d("div", Be, [
361
+ q.value ? (c(), b(h, {
362
+ key: 0,
363
+ "prepend-icon": "manage_accounts",
364
+ variant: "primary",
365
+ label: f(y)("payment.payout_account.button.apply"),
366
+ onClick: r[2] || (r[2] = () => O())
367
+ }, null, 8, ["label"])) : D("", !0)
368
+ ])
369
+ ]),
370
+ E(we, {
371
+ loading: f(p),
372
+ data: f(u),
373
+ onRowClick: O
374
+ }, null, 8, ["loading", "data"])
375
+ ], 64)) : (c(), A("div", he, [
376
+ d("div", xe, [
377
+ d("img", {
378
+ src: f(ne),
379
+ alt: "mascot",
380
+ class: "w-full h-auto"
381
+ }, null, 8, ke)
382
+ ]),
383
+ d("div", Ne, [
384
+ r[3] || (r[3] = d("h1", { class: "text-2xl font-bold mb-2" }, " Welcome! It looks like you haven't set up a payout account yet. ", -1)),
385
+ r[4] || (r[4] = d("p", { class: "mb-2 mt-1" }, " Let's get you started—apply now and enjoy seamless payouts! ", -1)),
386
+ d("div", Pe, [
387
+ M.value ? (c(), b(h, {
388
+ key: 0,
389
+ "prepend-icon": "manage_accounts",
390
+ variant: "primary",
391
+ label: "Apply Now",
392
+ onClick: r[0] || (r[0] = () => O())
393
+ })) : D("", !0)
394
+ ])
395
+ ])
396
+ ]))
397
+ ]),
398
+ _: 1
399
+ }, 8, ["title", "description", "loading"]);
400
+ };
401
+ }
402
+ });
403
+ export {
404
+ Ke as default
405
+ };
@@ -1,18 +1,18 @@
1
1
  import { defineComponent as M, ref as U, resolveComponent as p, openBlock as x, createElementBlock as K, Fragment as H, createElementVNode as u, createVNode as o, withCtx as S, createTextVNode as _, toDisplayString as G, unref as s, createBlock as V, createCommentVNode as B, reactive as ye, watch as ne, onUnmounted as be, computed as L, h as J, onMounted as de, isRef as le, resolveDynamicComponent as ue, normalizeProps as se, mergeProps as re } from "vue";
2
- import { p as z } from "./index-owIgdVJd.js";
3
- import { u as ae } from "./index-Baec1AT2.js";
2
+ import { p as z } from "./index-CY-XsXFD.js";
3
+ import { u as ae } from "./index-BFqUsoWz.js";
4
4
  import { _ as ve } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
5
5
  import { useRouter as fe } from "vue-router";
6
- import { u as oe } from "./index-CAT0OmJZ.js";
7
- import { _ as W, P as ee } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-Cgetk-s9.js";
6
+ import { u as oe } from "./index-DhTmRVyJ.js";
7
+ import { _ as W, P as ee } from "./DocumentViewer.vue_vue_type_script_setup_true_lang-DERNbQ3k.js";
8
8
  import { h as ge } from "./moment-h96o7c8I.js";
9
- import { d as te } from "./index-a8lvAiCb.js";
9
+ import { d as te } from "./index-Be6BYI6Y.js";
10
10
  import { useSnackbar as Q, useDialogChild as Fe, useDialog as pe, components as xe } from "@feedmepos/ui-library";
11
11
  import { u as Z } from "./error-K1CakhA9.js";
12
- import { P as ke } from "./payout-account-BXeQXNBN.js";
12
+ import { P as ke } from "./payout-account-B8ZjV2cD.js";
13
13
  import { s as X, o as we, z as I, a as R } from "./validator-CTlVogBQ.js";
14
14
  import { _ as Ve } from "./TextInputDialog.vue_vue_type_script_setup_true_lang-C3AeZqwO.js";
15
- import { e as O } from "./app-obftSkFb.js";
15
+ import { e as O } from "./app-LpRZG5SK.js";
16
16
  import { useCoreStore as ie } from "@feedmepos/mf-common";
17
17
  const Ae = { class: "flex gap-16 mb-6" }, Se = { class: "flex gap-16 mb-6" }, Ne = { class: "flex justify-between items-center mb-6" }, Ce = { class: "flex gap-4" }, Ie = { class: "flex gap-4 mt-4" }, Ue = /* @__PURE__ */ M({
18
18
  __name: "Information",
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as F, ref as y, resolveComponent as _, openBlock as x, createBlock as A, withCtx as $, createElementVNode as p, normalizeStyle as T, createElementBlock as R, Fragment as z, renderList as q, createVNode as v, computed as C, watch as I, onMounted as N, unref as h, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
2
- import { u as O } from "./index-CAT0OmJZ.js";
2
+ import { u as O } from "./index-DhTmRVyJ.js";
3
3
  import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-0Mf1MhAL.js";
4
4
  import "@feedmepos/ui-library";
5
- import "./app-obftSkFb.js";
5
+ import "./app-LpRZG5SK.js";
6
6
  import { _ as G } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
7
- import { r as Q } from "./index-CR-HSdwu.js";
8
- import { u as H } from "./index-Baec1AT2.js";
7
+ import { r as Q } from "./index-DDRoa9oc.js";
8
+ import { u as H } from "./index-BFqUsoWz.js";
9
9
  import { useRouter as J } from "vue-router";
10
- import { g as X } from "./grafana-BXLOtIvx.js";
10
+ import { g as X } from "./grafana-BBPv2vBQ.js";
11
11
  const Y = ["id"], L = /* @__PURE__ */ F({
12
12
  __name: "FmTableSelection",
13
13
  props: {
@@ -1,14 +1,14 @@
1
1
  import { defineComponent as D, ref as w, resolveComponent as r, openBlock as g, createBlock as b, withCtx as S, createVNode as o, unref as n, createElementVNode as T, createCommentVNode as U, computed as K, onMounted as N, createElementBlock as G, Fragment as H, isRef as R, resolveDynamicComponent as $, mergeProps as Y, normalizeProps as L } from "vue";
2
- import { g as q, b as M, u as B } from "./index-Baec1AT2.js";
2
+ import { g as q, b as M, u as B } from "./index-BFqUsoWz.js";
3
3
  import { _ as z } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
4
4
  import { useRouter as Q } from "vue-router";
5
- import { u as P } from "./index-CAT0OmJZ.js";
5
+ import { u as P } from "./index-DhTmRVyJ.js";
6
6
  import { z as y, a as f } from "./validator-CTlVogBQ.js";
7
- import { e as I } from "./app-obftSkFb.js";
7
+ import { e as I } from "./app-LpRZG5SK.js";
8
8
  import { useCoreStore as E } from "@feedmepos/mf-common";
9
9
  import { u as Z } from "./error-K1CakhA9.js";
10
10
  import { useSnackbar as J } from "@feedmepos/ui-library";
11
- import { r as W } from "./index-CR-HSdwu.js";
11
+ import { r as W } from "./index-DDRoa9oc.js";
12
12
  const C = {
13
13
  async get(a) {
14
14
  return q(