@feedmepos/mf-payment 1.5.26-dev → 1.5.29-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 (91) hide show
  1. package/dist/{Actions.vue_vue_type_script_setup_true_lang-Cy1BbWNh.js → Actions.vue_vue_type_script_setup_true_lang-DGrZmVUQ.js} +2 -2
  2. package/dist/{Chargeback-Dl4rSQ5U.js → Chargeback-CocH4bON.js} +5 -5
  3. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-tGPnCbHL.js +94 -0
  4. package/dist/{OnboardForm-Z433FFST.js → OnboardForm-BLk46c4b.js} +5 -5
  5. package/dist/{OnboardForm-CXCnqEIi.js → OnboardForm-CqohYc7w.js} +5 -5
  6. package/dist/{OnboardSubmission-V8jeo8Za.js → OnboardSubmission-CIZuFLWF.js} +2 -2
  7. package/dist/{OnboardSubmission-BB6qLr3p.js → OnboardSubmission-CNJ-CYki.js} +5 -5
  8. package/dist/{PayoutAccount-DB72Minq.js → PayoutAccount-2vZvDUNZ.js} +5 -5
  9. package/dist/{PayoutAccount-Bf8TpJtM.js → PayoutAccount-Qzl0EU8D.js} +4 -4
  10. package/dist/{PayoutAccountSetting-DtFbOHVm.js → PayoutAccountSetting-DfrRhtcP.js} +244 -241
  11. package/dist/{Restaurant-DlQV3dot.js → Restaurant-Ckh7iZ9v.js} +4 -4
  12. package/dist/{RestaurantSetting-Yb9S8Wfg.js → RestaurantSetting-CeHORT_l.js} +3 -3
  13. package/dist/Settlement-DWj3kJpX.js +490 -0
  14. package/dist/{Settlement-jznt2FLc.js → Settlement-Dkf0_6WU.js} +3 -3
  15. package/dist/{SettlementTransactions-DLVFBcdV.js → SettlementTransactions-B_-EF9FQ.js} +4 -4
  16. package/dist/{SettlementTransactions-Bm7D3JZu.js → SettlementTransactions-BfDzz9CE.js} +4 -4
  17. package/dist/{Status.vue_vue_type_script_setup_true_lang-DnWFKNCZ.js → Status.vue_vue_type_script_setup_true_lang-BRylU6yC.js} +1 -1
  18. package/dist/{Terminal-B6wzbr0C.js → Terminal-CO1Qqx4X.js} +5 -5
  19. package/dist/{TerminalSetting-BV1Uh1OM.js → TerminalSetting-14CDkcsr.js} +3 -3
  20. package/dist/Transaction-CkZKTFNI.js +473 -0
  21. package/dist/{Transaction-DL0_I7Ez.js → Transaction-LS_h6ecG.js} +6 -6
  22. package/dist/{TransactionOld-CDKLMs5_.js → TransactionOld-Bivy85L4.js} +6 -6
  23. package/dist/api/document/index.d.ts +1 -0
  24. package/dist/{app-BkfY9b4E.js → app-DUlTcsCJ.js} +56 -33
  25. package/dist/app.js +1 -1
  26. package/dist/{assets-DvPzXLhl.js → assets-zMyaBFbU.js} +29 -28
  27. package/dist/components/DocumentViewer.vue.d.ts +1 -0
  28. package/dist/components/SourceSelector.vue.d.ts +4 -1
  29. package/dist/{grafana-DwrmpEec.js → grafana-D_fIUdUm.js} +1 -1
  30. package/dist/{index-2-UOiJfz.js → index-BganQIV3.js} +1 -1
  31. package/dist/{index-zMl6AuFw.js → index-C87vsLzf.js} +1 -1
  32. package/dist/{index-DRKoa7dT.js → index-CcCcgcKj.js} +106 -101
  33. package/dist/{index-OA39241x.js → index-CsxAKwXK.js} +1 -1
  34. package/dist/index-D7IY2VY_.js +36 -0
  35. package/dist/{index-DcB4capd.js → index-DEC3wCyK.js} +1 -1
  36. package/dist/{index-zvJkckUa.js → index-DGCnviAy.js} +1 -1
  37. package/dist/{index-Ci4uxsSz.js → index-WuRUC8sI.js} +2 -2
  38. package/dist/{index-BPKJne1Q.js → index-cOl7pH9_.js} +1 -1
  39. package/dist/{index.vue_vue_type_script_setup_true_lang-BYTNfOkc.js → index.vue_vue_type_script_setup_true_lang-H0-KLC0F.js} +1 -1
  40. package/dist/package.json +3 -3
  41. package/dist/{payout-account-V9peDwuP.js → payout-account-DyUwLBkF.js} +3 -3
  42. package/dist/stores/payoutAccount.d.ts +34 -34
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/views/admin/payout-account/tabs/Information.vue.d.ts +34 -34
  45. package/dist/views/admin/payout-account/tabs/PaymentChannel.vue.d.ts +56 -56
  46. package/dist/views/admin/payout-account/tabs/PaymentGateway.vue.d.ts +56 -56
  47. package/dist/views/admin/payout-account/tabs/PaymentStatus.vue.d.ts +34 -34
  48. package/dist/views/admin/payout-account/tabs/Settlement.vue.d.ts +34 -34
  49. package/dist/views/admin/payout-account/tabs/TokenGateway.vue.d.ts +56 -56
  50. package/dist/views/admin/payout-account/tabs/token/ApplePayToken.vue.d.ts +2 -2
  51. package/dist/views/admin/payout-account/tabs/token/GooglePayToken.vue.d.ts +2 -2
  52. package/dist/views/admin/restaurant/tabs/gateway/AdyenGateway.vue.d.ts +4 -4
  53. package/dist/views/admin/restaurant/tabs/gateway/DigioGateway.vue.d.ts +4 -4
  54. package/dist/views/admin/restaurant/tabs/gateway/FiuuGateway.vue.d.ts +6 -6
  55. package/dist/views/admin/restaurant/tabs/gateway/GhlGateway.vue.d.ts +6 -6
  56. package/dist/views/admin/restaurant/tabs/gateway/GrabGateway.vue.d.ts +4 -4
  57. package/dist/views/admin/restaurant/tabs/gateway/KsherGateway.vue.d.ts +4 -4
  58. package/dist/views/admin/restaurant/tabs/gateway/MacauPassGateway.vue.d.ts +6 -6
  59. package/dist/views/admin/restaurant/tabs/gateway/MaybankGateway.vue.d.ts +6 -6
  60. package/dist/views/admin/restaurant/tabs/gateway/RevenueMonsterGateway.vue.d.ts +4 -4
  61. package/dist/views/admin/restaurant/tabs/gateway/SoftSpaceGateway.vue.d.ts +4 -4
  62. package/dist/views/admin/settlement/SettlementTable.vue.d.ts +4 -0
  63. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +14 -14
  64. package/dist/views/admin/terminal/tabs/EcrGateway.vue.d.ts +14 -14
  65. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +14 -14
  66. package/dist/views/admin/terminal/tabs/QrGateway.vue.d.ts +14 -14
  67. package/dist/views/admin/terminal/tabs/SettingRequest.vue.d.ts +14 -14
  68. package/dist/views/admin/terminal/tabs/SoftposGateway.vue.d.ts +14 -14
  69. package/dist/views/admin/terminal/tabs/ecr/Ghl2Gateway.vue.d.ts +14 -14
  70. package/dist/views/admin/terminal/tabs/ecr/Ghl3Gateway.vue.d.ts +14 -14
  71. package/dist/views/admin/terminal/tabs/ecr/GhlGateway.vue.d.ts +14 -14
  72. package/dist/views/admin/terminal/tabs/ecr/GlobalPaymentsGateway.vue.d.ts +14 -14
  73. package/dist/views/admin/terminal/tabs/ecr/HlbbGateway.vue.d.ts +14 -14
  74. package/dist/views/admin/terminal/tabs/ecr/KBankGateway.vue.d.ts +14 -14
  75. package/dist/views/admin/terminal/tabs/ecr/Maybank2Gateway.vue.d.ts +14 -14
  76. package/dist/views/admin/terminal/tabs/ecr/Maybank3Gateway.vue.d.ts +14 -14
  77. package/dist/views/admin/terminal/tabs/ecr/MaybankGateway.vue.d.ts +14 -14
  78. package/dist/views/admin/terminal/tabs/ecr/NetsGateway.vue.d.ts +14 -14
  79. package/dist/views/admin/terminal/tabs/ecr/TerminalGateway.vue.d.ts +14 -14
  80. package/dist/views/admin/terminal/tabs/qr/PromptPayGateway.vue.d.ts +14 -14
  81. package/dist/views/admin/terminal/tabs/settings/KioskMode.vue.d.ts +14 -14
  82. package/dist/views/payout-account/PayoutAccountTable.vue.d.ts +68 -68
  83. package/dist/views/settlement/FiuuSettlementTable.vue.d.ts +44 -44
  84. package/dist/views/settlement/FiuuSettlementTransactions.vue.d.ts +22 -22
  85. package/dist/views/settlement/SettlementTable.vue.d.ts +5 -1
  86. package/dist/views/settlement/cell/InvoiceStatus.vue.d.ts +5 -0
  87. package/package.json +2 -2
  88. package/dist/DocumentViewer.vue_vue_type_script_setup_true_lang-KCfloaC1.js +0 -89
  89. package/dist/Settlement-CpmdJ84I.js +0 -444
  90. package/dist/Transaction-BAKFOtrH.js +0 -456
  91. package/dist/index-ey7xefKL.js +0 -27
@@ -1,4 +1,4 @@
1
- import { type PropType } from 'vue';
1
+ import { type PropType } from "vue";
2
2
  declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
3
  data: {
4
4
  type: PropType<{
@@ -7,6 +7,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
7
7
  id: string;
8
8
  event: "ORDERING" | "MARKETING";
9
9
  } | null | undefined;
10
+ invoiceId?: string | null | undefined;
10
11
  remark?: string | null | undefined;
11
12
  _id: string;
12
13
  beneficiaryBank: {
@@ -44,6 +45,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
44
45
  id: string;
45
46
  event: "ORDERING" | "MARKETING";
46
47
  } | null | undefined;
48
+ invoiceId?: string | null | undefined;
47
49
  remark?: string | null | undefined;
48
50
  _id: string;
49
51
  beneficiaryBank: {
@@ -76,6 +78,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
76
78
  id: string;
77
79
  event: "ORDERING" | "MARKETING";
78
80
  } | null | undefined;
81
+ invoiceId?: string | null | undefined;
79
82
  remark?: string | null | undefined;
80
83
  _id: string;
81
84
  beneficiaryBank: {
@@ -113,6 +116,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
113
116
  id: string;
114
117
  event: "ORDERING" | "MARKETING";
115
118
  } | null | undefined;
119
+ invoiceId?: string | null | undefined;
116
120
  remark?: string | null | undefined;
117
121
  _id: string;
118
122
  beneficiaryBank: {
@@ -0,0 +1,5 @@
1
+ type __VLS_Props = {
2
+ data: string;
3
+ };
4
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "1.5.26-dev",
3
+ "version": "1.5.29-dev",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -22,7 +22,7 @@
22
22
  "@feedmepos/core": "^2.6.0",
23
23
  "@feedmepos/mf-common": "^1.26.8",
24
24
  "@feedmepos/mf-financing": "0.0.24-dev",
25
- "@feedmepos/payment-entity": "0.1.64",
25
+ "@feedmepos/payment-entity": "0.1.65",
26
26
  "@feedmepos/ui-library": "^1.7.1",
27
27
  "axios": "^0.27.2",
28
28
  "buffer": "^6.0.3",
@@ -1,89 +0,0 @@
1
- import { defineComponent as x, computed as m, ref as r, resolveComponent as u, openBlock as t, createElementBlock as o, renderSlot as p, createElementVNode as n, createVNode as w, createCommentVNode as k, createBlock as b } from "vue";
2
- import { m as C } from "./no-data-BRmo6XOO.js";
3
- import { d as D } from "./index-ey7xefKL.js";
4
- const B = { key: 0 }, N = ["src"], V = { key: 1 }, F = ["src"], $ = {
5
- key: 2,
6
- class: "max-w-[340px] bg-white border border-gray-200 rounded-md overflow-hidden shadow-sm flex flex-col font-sans"
7
- }, E = { class: "relative aspect-video w-full bg-gray-50 flex items-center justify-center overflow-hidden" }, L = { key: 0 }, P = {
8
- key: 0,
9
- class: "flex flex-col items-center gap-3 p-4"
10
- }, j = {
11
- key: 0,
12
- class: "text-xs text-red-500"
13
- }, z = {
14
- key: 1,
15
- class: "flex flex-col items-center gap-2 py-8"
16
- }, O = /* @__PURE__ */ x({
17
- __name: "DocumentViewer",
18
- props: {
19
- document: {},
20
- restaurantId: {}
21
- },
22
- setup(v) {
23
- const s = v, f = m(() => {
24
- var e;
25
- return (e = s.document) == null ? void 0 : e.startsWith("data:");
26
- }), l = r(!1), a = r(!1), i = r(!1), c = r(""), _ = m(() => !!s.document), y = async () => {
27
- if (s.document) {
28
- a.value = !0;
29
- try {
30
- const e = await D.view(s.document, s.restaurantId);
31
- c.value = e, l.value = !0;
32
- } catch {
33
- i.value = !0;
34
- } finally {
35
- a.value = !1;
36
- }
37
- }
38
- };
39
- return (e, d) => {
40
- const h = u("FmButton"), g = u("FmCircularProgress");
41
- return f.value ? (t(), o("div", B, [
42
- p(e.$slots, "default", {
43
- src: e.$props.document ?? ""
44
- }, () => [
45
- n("img", {
46
- src: e.$props.document ?? "",
47
- alt: "Document"
48
- }, null, 8, N)
49
- ])
50
- ])) : l.value ? (t(), o("div", V, [
51
- p(e.$slots, "default", { src: c.value }, () => [
52
- n("img", {
53
- src: c.value,
54
- alt: "Document"
55
- }, null, 8, F)
56
- ])
57
- ])) : (t(), o("div", $, [
58
- n("div", E, [
59
- _.value ? (t(), o("div", L, [
60
- a.value ? (t(), b(g, {
61
- key: 1,
62
- size: "xl",
63
- color: "primary"
64
- })) : (t(), o("div", P, [
65
- w(h, {
66
- onClick: y,
67
- label: "View Document",
68
- "prepend-icon": "manage_accounts",
69
- size: "md",
70
- variant: "primary"
71
- }),
72
- i.value ? (t(), o("span", j, " Oops, something went wrong. Please try again. ")) : k("", !0)
73
- ]))
74
- ])) : (t(), o("div", z, [...d[0] || (d[0] = [
75
- n("img", {
76
- src: C,
77
- alt: "No document",
78
- class: "w-128 h-80 object-contain opacity-80"
79
- }, null, -1),
80
- n("span", { class: "text-xs text-gray-400 mt-2" }, "No document available.", -1)
81
- ])]))
82
- ])
83
- ]));
84
- };
85
- }
86
- });
87
- export {
88
- O as _
89
- };
@@ -1,444 +0,0 @@
1
- import { defineComponent as C, ref as k, computed as R, resolveComponent as w, openBlock as V, createBlock as D, h as T, watch as P, createElementBlock as U, Fragment as q, createElementVNode as m, createVNode as u, withCtx as _, unref as t, toDisplayString as r, createTextVNode as v, onMounted as O, isRef as M, createCommentVNode as N } from "vue";
2
- import { u as z } from "./index-DRKoa7dT.js";
3
- import { h as $ } from "./moment-h96o7c8I.js";
4
- import { useI18n as K, useCoreStore as E } from "@feedmepos/mf-common";
5
- import { _ as H } from "./Layout.vue_vue_type_script_setup_true_lang-BKIvkgA_.js";
6
- import { s as A } from "./index-zvJkckUa.js";
7
- import { useDialog as I } from "@feedmepos/ui-library";
8
- import { d } from "./dinero-CIVmXLL-.js";
9
- import { _ as B } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-DrBLdVka.js";
10
- import { useRouter as L } from "vue-router";
11
- import { u as J } from "./index-zMl6AuFw.js";
12
- import { _ as Q } from "./AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js";
13
- import { _ as W } from "./RestaurantSelector.vue_vue_type_script_setup_true_lang-DG3iyjkK.js";
14
- import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-kymnzYpd.js";
15
- const X = /* @__PURE__ */ C({
16
- __name: "SettlementTable",
17
- props: {
18
- data: {
19
- type: Array,
20
- required: !0
21
- },
22
- loading: {
23
- type: Boolean,
24
- required: !0
25
- }
26
- },
27
- emits: ["row-click"],
28
- setup(c, { emit: n }) {
29
- const { t: l } = K(), s = c, f = n, y = k(""), h = [
30
- {
31
- header: () => l("payment.settlements.table.id"),
32
- accessorKey: "id",
33
- cell: ({ cell: a }) => T(B, { data: a.getValue() })
34
- },
35
- {
36
- header: () => l("payment.settlements.table.bank"),
37
- accessorKey: "bank"
38
- },
39
- {
40
- header: () => l("payment.settlements.table.account"),
41
- accessorKey: "accountNo"
42
- },
43
- {
44
- header: () => l("payment.settlements.table.created_at"),
45
- accessorKey: "transactionAt",
46
- meta: {
47
- width: "180px"
48
- }
49
- },
50
- {
51
- header: () => l("payment.settlements.table.sales_amount"),
52
- accessorKey: "amount"
53
- },
54
- {
55
- header: () => l("payment.settlements.table.fee"),
56
- accessorKey: "fee"
57
- },
58
- {
59
- header: () => l("payment.settlements.table.settlement_amount"),
60
- accessorKey: "payout"
61
- }
62
- ], b = R(() => s.data.map((a) => ({
63
- id: a._id,
64
- bank: a.beneficiaryBank.name,
65
- accountNo: a.beneficiaryBank.accountNumber,
66
- transactionAt: $(a.createdAt).format("YYYY-MM-DD"),
67
- amount: d(a.totalAmount).toFormat("$0.00"),
68
- fee: d(a.totalFee).toFormat("$0.00"),
69
- payout: d(a.totalPayout).toFormat("$0.00")
70
- })));
71
- return (a, e) => {
72
- const o = w("FmTable");
73
- return V(), D(o, {
74
- modelValue: y.value,
75
- "onUpdate:modelValue": e[0] || (e[0] = (i) => y.value = i),
76
- "row-data": b.value,
77
- "shrink-at": !1,
78
- "column-defs": h,
79
- loading: s.loading,
80
- onRowClick: e[1] || (e[1] = (i) => f("row-click", s.data.at(i.index)))
81
- }, null, 8, ["modelValue", "row-data", "loading"]);
82
- };
83
- }
84
- }), Z = /* @__PURE__ */ C({
85
- __name: "FiuuSettlementTable",
86
- props: {
87
- data: {
88
- type: Array,
89
- required: !0
90
- },
91
- loading: {
92
- type: Boolean,
93
- required: !0
94
- }
95
- },
96
- emits: ["row-click"],
97
- setup(c, { emit: n }) {
98
- const { t: l } = K(), s = c, f = n, y = k(""), h = [
99
- {
100
- header: () => l("payment.settlements.table.id"),
101
- accessorKey: "id",
102
- cell: ({ cell: a }) => T(B, { data: a.getValue() })
103
- },
104
- {
105
- header: () => l("payment.settlements.table.bank"),
106
- accessorKey: "bank"
107
- },
108
- {
109
- header: () => l("payment.settlements.table.account"),
110
- accessorKey: "accountNo"
111
- },
112
- {
113
- header: () => l("payment.settlements.table.created_at"),
114
- accessorKey: "transactionAt",
115
- meta: {
116
- width: "180px"
117
- }
118
- },
119
- {
120
- header: () => l("payment.settlements.table.sales_amount"),
121
- accessorKey: "amount"
122
- },
123
- {
124
- header: () => l("payment.settlements.table.fee"),
125
- accessorKey: "fee"
126
- },
127
- {
128
- header: () => l("payment.settlements.table.settlement_amount"),
129
- accessorKey: "payout"
130
- }
131
- ], b = R(() => s.data.map((a) => ({
132
- id: a.summary.referenceNo,
133
- bank: a.summary.bank.name,
134
- accountNo: a.summary.bank.accountNo,
135
- transactionAt: $(a.summary.completedAt).format("YYYY-MM-DD"),
136
- amount: d(a.summary.amount).toFormat("$0.00"),
137
- fee: d(a.summary.commission).toFormat("$0.00"),
138
- payout: d(a.summary.payout).toFormat("$0.00")
139
- })));
140
- return (a, e) => {
141
- const o = w("FmTable");
142
- return V(), D(o, {
143
- modelValue: y.value,
144
- "onUpdate:modelValue": e[0] || (e[0] = (i) => y.value = i),
145
- "row-data": b.value,
146
- "shrink-at": !1,
147
- "column-defs": h,
148
- loading: s.loading,
149
- onRowClick: e[1] || (e[1] = (i) => f("row-click", s.data.at(i.index)))
150
- }, null, 8, ["modelValue", "row-data", "loading"]);
151
- };
152
- }
153
- }), ee = {
154
- id: "fiuu-settlement-dialog",
155
- class: "flex mb-6"
156
- }, te = { class: "my-6 w-[240px]" }, ae = /* @__PURE__ */ C({
157
- __name: "FiuuSettlementTransactions",
158
- props: {
159
- settlement: {
160
- type: Object,
161
- required: !0
162
- }
163
- },
164
- setup(c) {
165
- const { t: n } = K(), s = k(
166
- c.settlement.record.map((e) => (Object.assign(e, {
167
- __localAmount: d(e.amount).toFormat("0.00"),
168
- __localComission: d(e.commission).toFormat("0.00"),
169
- __localNetAMount: d(e.netAmount).toFormat("0.00")
170
- }), e))
171
- ), f = k(s.value), y = k(""), h = [
172
- {
173
- header: () => n("payment.settlements.dialog.fiuu.id"),
174
- accessorKey: "referenceNo"
175
- },
176
- {
177
- header: () => n("payment.settlements.dialog.fiuu.type"),
178
- accessorKey: "group"
179
- },
180
- {
181
- header: () => n("payment.settlements.dialog.fiuu.transaction_at"),
182
- accessorKey: "completedAt",
183
- meta: {
184
- width: "180px"
185
- },
186
- cell: ({ cell: e }) => $(e.getValue()).format("YYYY-MM-DD HH:mm:ss")
187
- },
188
- {
189
- header: () => n("payment.settlements.dialog.fiuu.sales_amount"),
190
- accessorKey: "amount",
191
- cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
192
- },
193
- {
194
- header: () => n("payment.settlements.dialog.fiuu.fee"),
195
- accessorKey: "commission",
196
- cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
197
- },
198
- {
199
- header: () => n("payment.settlements.dialog.fiuu.settlement_amount"),
200
- accessorKey: "netAmount",
201
- cell: ({ cell: e }) => d(e.getValue()).toFormat("$0.00")
202
- }
203
- ], b = k("");
204
- let a;
205
- return P(b, async () => {
206
- a && clearTimeout(a), a = setTimeout(() => {
207
- var e = new RegExp(b.value, "i");
208
- f.value = s.value.filter((o) => {
209
- const i = JSON.stringify(o);
210
- return e.test(i);
211
- });
212
- }, 700);
213
- }), (e, o) => {
214
- const i = w("FmCardHeader"), F = w("FmCardSection"), x = w("FmCard"), S = w("FmSearch"), g = w("FmTable");
215
- return V(), U(q, null, [
216
- m("div", ee, [
217
- u(x, {
218
- horizontal: "",
219
- class: "flex-1 p-6",
220
- variant: "elevated"
221
- }, {
222
- default: _(() => [
223
- u(F, { class: "flex flex-col gap-16 justify-between" }, {
224
- default: _(() => [
225
- u(i, {
226
- class: "p-0",
227
- title: t(n)("payment.settlements.dialog.info.transaction.title"),
228
- subtitle: ""
229
- }, null, 8, ["title"]),
230
- u(F, { class: "p-0" }, {
231
- default: _(() => [
232
- m("b", null, r(t(n)("payment.settlements.dialog.info.transaction.for")), 1),
233
- v(": " + r(c.settlement.summary.group) + " ", 1),
234
- o[2] || (o[2] = m("br", null, null, -1)),
235
- m("b", null, r(t(n)("payment.settlements.dialog.info.transaction.reference")), 1),
236
- v(": " + r(c.settlement.summary.referenceNo), 1),
237
- o[3] || (o[3] = m("br", null, null, -1)),
238
- m("b", null, r(t(n)("payment.settlements.dialog.info.transaction.count")), 1),
239
- v(": " + r(s.value.length), 1)
240
- ]),
241
- _: 1
242
- })
243
- ]),
244
- _: 1
245
- })
246
- ]),
247
- _: 1
248
- }),
249
- u(x, {
250
- horizontal: "",
251
- class: "flex-1 p-6 mx-6",
252
- variant: "elevated"
253
- }, {
254
- default: _(() => [
255
- u(F, { class: "flex flex-col gap-16 justify-between" }, {
256
- default: _(() => [
257
- u(i, {
258
- class: "p-0",
259
- title: t(n)("payment.settlements.dialog.info.bank.title"),
260
- subtitle: ""
261
- }, null, 8, ["title"]),
262
- u(F, { class: "p-0" }, {
263
- default: _(() => [
264
- m("b", null, r(t(n)("payment.settlements.dialog.info.bank.for")), 1),
265
- v(": " + r(c.settlement.summary.bank.name), 1),
266
- o[4] || (o[4] = m("br", null, null, -1)),
267
- m("b", null, r(t(n)("payment.settlements.dialog.info.bank.name")), 1),
268
- v(": " + r(c.settlement.summary.bank.holderName), 1),
269
- o[5] || (o[5] = m("br", null, null, -1)),
270
- m("b", null, r(t(n)("payment.settlements.dialog.info.bank.number")), 1),
271
- v(": " + r(c.settlement.summary.bank.accountNo), 1)
272
- ]),
273
- _: 1
274
- })
275
- ]),
276
- _: 1
277
- })
278
- ]),
279
- _: 1
280
- }),
281
- u(x, {
282
- horizontal: "",
283
- class: "flex-1 p-6",
284
- variant: "elevated"
285
- }, {
286
- default: _(() => [
287
- u(F, { class: "flex flex-col gap-16 justify-between" }, {
288
- default: _(() => [
289
- u(i, {
290
- class: "p-0",
291
- title: t(n)("payment.settlements.dialog.info.payout.title"),
292
- subtitle: ""
293
- }, null, 8, ["title"]),
294
- u(F, { class: "p-0" }, {
295
- default: _(() => [
296
- m("b", null, r(t(n)("payment.settlements.dialog.info.payout.amount")), 1),
297
- v(": " + r(t(d)(c.settlement.summary.amount).toFormat("$0.00")), 1),
298
- o[6] || (o[6] = m("br", null, null, -1)),
299
- m("b", null, r(t(n)("payment.settlements.dialog.info.payout.fee")), 1),
300
- v(": " + r(t(d)(c.settlement.summary.commission).toFormat("$0.00")), 1),
301
- o[7] || (o[7] = m("br", null, null, -1)),
302
- m("b", null, r(t(n)("payment.settlements.dialog.info.payout.payout")), 1),
303
- v(": " + r(t(d)(c.settlement.summary.payout).toFormat("$0.00")), 1)
304
- ]),
305
- _: 1
306
- })
307
- ]),
308
- _: 1
309
- })
310
- ]),
311
- _: 1
312
- })
313
- ]),
314
- m("div", te, [
315
- u(S, {
316
- modelValue: b.value,
317
- "onUpdate:modelValue": o[0] || (o[0] = (p) => b.value = p),
318
- placeholder: t(n)("payment.settlements.dialog.search")
319
- }, null, 8, ["modelValue", "placeholder"])
320
- ]),
321
- u(g, {
322
- modelValue: y.value,
323
- "onUpdate:modelValue": o[1] || (o[1] = (p) => y.value = p),
324
- "shrink-at": !1,
325
- "row-data": f.value,
326
- "column-defs": h
327
- }, null, 8, ["modelValue", "row-data"])
328
- ], 64);
329
- };
330
- }
331
- }), ne = { class: "flex justify-between items-center mb-6" }, oe = { class: "flex space-x-8 items-center" }, le = { class: "flex space-x-4 self-center" }, se = { class: "mb-6" }, we = /* @__PURE__ */ C({
332
- __name: "Settlement",
333
- setup(c) {
334
- const n = L(), { tab: l, dateRange: s } = J({
335
- tab: "feedme",
336
- dateRange: {
337
- startDate: $().startOf("day").format("YYYY-MM-DD"),
338
- endDate: $().endOf("day").format("YYYY-MM-DD")
339
- }
340
- }), { t: f } = K(), { isLoading: y, startAsyncCall: h } = z(!0), { currentRestaurant: b } = E(), a = I(), e = k([]), o = k([]);
341
- async function i() {
342
- const g = await A.readRestaurantSettlements({
343
- start: s.value.startDate,
344
- end: s.value.endDate
345
- });
346
- e.value = g;
347
- }
348
- async function F() {
349
- const g = await A.readRestaurantRMSSettlements({
350
- start: s.value.startDate,
351
- end: s.value.endDate
352
- });
353
- o.value = g;
354
- }
355
- async function x() {
356
- await h(async () => Promise.all([i(), F()]));
357
- }
358
- async function S(g) {
359
- const p = $(g.summary.completedAt).format("YYYY/MM/DD");
360
- a.open({
361
- title: `${f("payment.settlements.dialog.title")} (${g.summary.referenceNo})`,
362
- subTitle: `${f("payment.settlements.dialog.date")}: ${p}`,
363
- minWidth: "90%",
364
- primaryActions: { text: "Close", close: !0 },
365
- contentComponent: ae,
366
- contentComponentProps: { settlement: g }
367
- });
368
- }
369
- return O(x), P([b, s], x), (g, p) => {
370
- const j = w("FmTabs");
371
- return V(), D(H, {
372
- title: t(f)("payment.settlements.title"),
373
- description: t(f)("payment.settlements.description"),
374
- loading: !1
375
- }, {
376
- default: _(() => [
377
- m("div", ne, [
378
- m("div", oe, [
379
- u(W),
380
- u(G, {
381
- modelValue: t(s),
382
- "onUpdate:modelValue": p[0] || (p[0] = (Y) => M(s) ? s.value = Y : null)
383
- }, null, 8, ["modelValue"])
384
- ]),
385
- m("div", le, [
386
- u(Q, {
387
- button: {
388
- appendIcon: "file_download",
389
- variant: "primary",
390
- label: "Export"
391
- },
392
- handler: async () => {
393
- await t(A).downloadRestaurantSettlementReport({
394
- start: t(s).startDate,
395
- end: t(s).endDate
396
- });
397
- }
398
- }, null, 8, ["handler"])
399
- ])
400
- ]),
401
- m("div", se, [
402
- u(j, {
403
- modelValue: t(l),
404
- "onUpdate:modelValue": p[1] || (p[1] = (Y) => M(l) ? l.value = Y : null),
405
- items: [
406
- {
407
- label: "FeedMe",
408
- value: "feedme",
409
- icon: "summarize"
410
- },
411
- {
412
- label: "Fiuu (RMS)",
413
- value: "fiuu",
414
- icon: "overview"
415
- }
416
- ]
417
- }, null, 8, ["modelValue"])
418
- ]),
419
- t(l) === "fiuu" ? (V(), D(Z, {
420
- key: 0,
421
- loading: t(y),
422
- data: o.value,
423
- onRowClick: S
424
- }, null, 8, ["loading", "data"])) : N("", !0),
425
- t(l) === "feedme" ? (V(), D(X, {
426
- key: 1,
427
- loading: t(y),
428
- data: e.value,
429
- onRowClick: p[2] || (p[2] = (Y) => t(n).push({
430
- name: "mf-payment-settlement-transaction",
431
- params: {
432
- settlementId: Y._id
433
- }
434
- }))
435
- }, null, 8, ["loading", "data"])) : N("", !0)
436
- ]),
437
- _: 1
438
- }, 8, ["title", "description"]);
439
- };
440
- }
441
- });
442
- export {
443
- we as default
444
- };