@feedmepos/mf-payment 1.1.0-beta.1 → 1.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PayoutAccount-BHJpjUqD.js → PayoutAccount-Dm__V5FS.js} +5 -5
- package/dist/{PayoutAccount-DCkf_1yL.js → PayoutAccount-aXUZqVC4.js} +360 -360
- package/dist/{PayoutAccountSetting-Bk-g7ucZ.js → PayoutAccountSetting-EbYjEXDF.js} +3 -3
- package/dist/{Restaurant-D2qq84VL.js → Restaurant-DLM9C8nc.js} +4 -4
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-hJAJYKmE.js +33 -0
- package/dist/{RestaurantSetting-DAtrtX6S.js → RestaurantSetting-GoDOJmXC.js} +3 -3
- package/dist/{Settlement-Cx1tc5wt.js → Settlement-BCGCz02p.js} +3 -3
- package/dist/Settlement-CsLlypA1.js +445 -0
- package/dist/{SettlementTransactions-C82DyYlO.js → SettlementTransactions-BXDX1-4U.js} +3 -3
- package/dist/SettlementTransactions-DtbZ2BMA.js +291 -0
- package/dist/{Terminal-Az2k8E6F.js → Terminal-BhZitu-W.js} +5 -5
- package/dist/{TerminalSetting-C-xlLYXa.js → TerminalSetting-lTAsTN8h.js} +3 -3
- package/dist/{Transaction-Y_mc0yQv.js → Transaction-AwhwSbRY.js} +5 -5
- package/dist/Transaction-CCTdVAZg.js +250 -0
- package/dist/TransactionOld-DLjym0JG.js +99 -0
- package/dist/{TransactionTable.vue_vue_type_script_setup_true_lang-dwwesT4_.js → TransactionTable.vue_vue_type_script_setup_true_lang-xSb40MKu.js} +83 -78
- package/dist/{app-OBp4HaEY.js → app-348rfspt.js} +936 -649
- package/dist/app.d.ts +292 -0
- package/dist/app.js +4 -3
- package/dist/{assets-pLBp82yE.js → assets-CizBCu1u.js} +57 -43
- package/dist/{grafana-hv7inD36.js → grafana-NU2yqPXT.js} +1 -1
- package/dist/{index-DD5mEX0D.js → index-BDCzfWFu.js} +1 -1
- package/dist/{index-oM4Z9ffu.js → index-D9Cv_ZfD.js} +1 -1
- package/dist/{index-DGKxdJVj.js → index-DEvTHjDK.js} +2812 -2814
- package/dist/{index-CFYD8Dv4.js → index-Dvg8rPAD.js} +1 -1
- package/dist/{index-Cqq3p9PP.js → index-GlBLcdqs.js} +1 -1
- package/dist/{index-1xF00w89.js → index-OD8n4-_f.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-C9tnqgzY.js → index.vue_vue_type_script_setup_true_lang-D-xbKBxe.js} +1 -1
- package/dist/model/transaction.d.ts +2 -0
- package/dist/package.json +8 -7
- package/dist/{payout-account-DPaS3dIs.js → payout-account-5sqoL9UC.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/package.json +8 -7
- package/dist/RestaurantSelector.vue_vue_type_script_setup_true_lang-p4qddIbp.js +0 -33
- package/dist/Settlement-BVIsszEJ.js +0 -447
- package/dist/SettlementTransactions-CeN4SRWa.js +0 -291
- package/dist/Transaction-CC8hc8_r.js +0 -250
- package/dist/TransactionOld-BxhI-wwm.js +0 -99
@@ -1,9 +1,9 @@
|
|
1
1
|
import { defineComponent as k, resolveComponent as y, openBlock as b, createElementBlock as A, Fragment as $, createElementVNode as l, createVNode as s, withCtx as F, createTextVNode as _, toDisplayString as h, createCommentVNode as S, createBlock as C, ref as V, watch as z, computed as M, unref as v, isRef as G, h as B, onMounted as L, resolveDynamicComponent as H, normalizeProps as Y, mergeProps as Q } from "vue";
|
2
|
-
import { p as P } from "./index-
|
3
|
-
import { u as K, e as N } from "./index-
|
2
|
+
import { p as P } from "./index-GlBLcdqs.js";
|
3
|
+
import { u as K, e as N } from "./index-DEvTHjDK.js";
|
4
4
|
import { _ as W } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
5
5
|
import { useRouter as Z } from "vue-router";
|
6
|
-
import { u as D } from "./index-
|
6
|
+
import { u as D } from "./index-OD8n4-_f.js";
|
7
7
|
import { P as q, _ as J } from "./PDFViewer-BQfgFexr.js";
|
8
8
|
import { useSnackbar as j, components as X } from "@feedmepos/ui-library";
|
9
9
|
import { u as I } from "./error-K1CakhA9.js";
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { defineComponent as F, ref as y, resolveComponent as g, openBlock as x, createBlock as A, withCtx as $, createVNode as f, createElementVNode as d, normalizeStyle as T, createElementBlock as R, Fragment as z, renderList as q, 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-
|
2
|
+
import { u as O } from "./index-OD8n4-_f.js";
|
3
3
|
import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
4
4
|
import "@feedmepos/ui-library";
|
5
|
-
import { u as G } from "./index-
|
5
|
+
import { u as G } from "./index-DEvTHjDK.js";
|
6
6
|
import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
7
|
-
import { r as H } from "./index-
|
7
|
+
import { r as H } from "./index-Dvg8rPAD.js";
|
8
8
|
import { useRouter as J } from "vue-router";
|
9
|
-
import { g as X } from "./grafana-
|
9
|
+
import { g as X } from "./grafana-NU2yqPXT.js";
|
10
10
|
const Y = ["id"], L = /* @__PURE__ */ F({
|
11
11
|
__name: "FmTableSelection",
|
12
12
|
props: {
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { defineComponent as i, computed as l, resolveComponent as d, openBlock as _, createBlock as v, unref as a } from "vue";
|
2
|
+
import { useCoreStore as f, useI18n as S } from "@feedmepos/mf-common";
|
3
|
+
const V = /* @__PURE__ */ i({
|
4
|
+
__name: "RestaurantSelector",
|
5
|
+
setup(b) {
|
6
|
+
const t = f(), { t: s } = S(), r = l(() => {
|
7
|
+
var e;
|
8
|
+
return (e = t.currentRestaurant.value) == null ? void 0 : e._id;
|
9
|
+
}), u = l(() => t.restaurants.value.filter((e) => e.managable).map((e) => ({
|
10
|
+
label: e.profile.name,
|
11
|
+
value: e._id
|
12
|
+
})));
|
13
|
+
return (e, n) => {
|
14
|
+
const m = d("FmSelect");
|
15
|
+
return _(), v(m, {
|
16
|
+
label: a(s)("components.restaurant"),
|
17
|
+
modelValue: r.value,
|
18
|
+
"onUpdate:modelValue": [
|
19
|
+
n[0] || (n[0] = (o) => r.value = o),
|
20
|
+
n[1] || (n[1] = (o) => {
|
21
|
+
const p = a(t).restaurants.value.find((c) => c._id == o);
|
22
|
+
a(t).changeRestaurant(p);
|
23
|
+
})
|
24
|
+
],
|
25
|
+
class: "w-[220px]",
|
26
|
+
items: u.value
|
27
|
+
}, null, 8, ["label", "modelValue", "items"]);
|
28
|
+
};
|
29
|
+
}
|
30
|
+
});
|
31
|
+
export {
|
32
|
+
V as _
|
33
|
+
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as C, ref as I, resolveComponent as d, openBlock as f, createBlock as F, withCtx as k, createVNode as u, unref as a, createElementVNode as D, createCommentVNode as S, onMounted as P, computed as q, createElementBlock as K, Fragment as M, resolveDynamicComponent as O, normalizeProps as $, mergeProps as B, isRef as N } from "vue";
|
2
|
-
import { g as T, b as R, u as E, e as U } from "./index-
|
2
|
+
import { g as T, b as R, u as E, e as U } from "./index-DEvTHjDK.js";
|
3
3
|
import { _ as Y } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
4
4
|
import { useRouter as A } from "vue-router";
|
5
|
-
import { u as L } from "./index-
|
5
|
+
import { u as L } from "./index-OD8n4-_f.js";
|
6
6
|
import { z as p, a as v } from "./validator-D5jtpt9A.js";
|
7
7
|
import { useCoreStore as j } from "@feedmepos/mf-common";
|
8
|
-
import { r as z } from "./index-
|
8
|
+
import { r as z } from "./index-Dvg8rPAD.js";
|
9
9
|
const _ = {
|
10
10
|
async get(n) {
|
11
11
|
return T(
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { defineComponent as h, ref as C, computed as x, resolveComponent as d, openBlock as k, createBlock as A, h as B, watch as V, onMounted as I, unref as a, withCtx as b, createElementVNode as y, createVNode as s, isRef as $, createElementBlock as L, Fragment as K, renderList as E } from "vue";
|
2
|
-
import { u as D } from "./index-
|
2
|
+
import { u as D } from "./index-DEvTHjDK.js";
|
3
3
|
import { h as g } from "./moment-h96o7c8I.js";
|
4
|
-
import { s as c } from "./index-
|
4
|
+
import { s as c } from "./index-BDCzfWFu.js";
|
5
5
|
import { useSnackbar as T } from "@feedmepos/ui-library";
|
6
6
|
import { d as v } from "./dinero-CIVmXLL-.js";
|
7
7
|
import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
8
8
|
import { useRouter as q } from "vue-router";
|
9
9
|
import { _ as N } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
10
|
-
import { u as O } from "./index-
|
10
|
+
import { u as O } from "./index-OD8n4-_f.js";
|
11
11
|
import { u as U } from "./error-K1CakhA9.js";
|
12
12
|
import { _ as j } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.js";
|
13
13
|
const z = /* @__PURE__ */ h({
|
@@ -0,0 +1,445 @@
|
|
1
|
+
import { defineComponent as C, ref as F, computed as A, resolveComponent as k, openBlock as V, createBlock as S, h as M, watch as B, createElementBlock as j, Fragment as q, createElementVNode as l, createVNode as u, withCtx as b, unref as e, toDisplayString as m, createTextVNode as _, onMounted as z, isRef as T, createCommentVNode as Y } from "vue";
|
2
|
+
import { u as E } from "./index-DEvTHjDK.js";
|
3
|
+
import { h as K } from "./moment-h96o7c8I.js";
|
4
|
+
import { useI18n as D, useCoreStore as O } from "@feedmepos/mf-common";
|
5
|
+
import { _ as I } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
6
|
+
import { s as N } from "./index-BDCzfWFu.js";
|
7
|
+
import { useDialog as L } from "@feedmepos/ui-library";
|
8
|
+
import { d as c } from "./dinero-CIVmXLL-.js";
|
9
|
+
import { _ as P } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
10
|
+
import { useRouter as H } from "vue-router";
|
11
|
+
import { u as J } from "./index-OD8n4-_f.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-hJAJYKmE.js";
|
14
|
+
import { _ as G } from "./DateRangePicker.vue_vue_type_script_setup_true_lang-dP_5WjEJ.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(d, { emit: a }) {
|
29
|
+
const { t: o } = D(), s = d, g = a, f = F(""), x = [
|
30
|
+
{
|
31
|
+
header: () => o("settlements.table.id"),
|
32
|
+
accessorKey: "id",
|
33
|
+
cell: ({ cell: t }) => M(P, { data: t.getValue() })
|
34
|
+
},
|
35
|
+
{
|
36
|
+
header: () => o("settlements.table.bank"),
|
37
|
+
accessorKey: "bank"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
header: () => o("settlements.table.account"),
|
41
|
+
accessorKey: "accountNo"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
header: () => o("settlements.table.created_at"),
|
45
|
+
accessorKey: "transactionAt",
|
46
|
+
meta: {
|
47
|
+
width: "180px"
|
48
|
+
}
|
49
|
+
},
|
50
|
+
{
|
51
|
+
header: () => o("settlements.table.sales_amount"),
|
52
|
+
accessorKey: "amount"
|
53
|
+
},
|
54
|
+
{
|
55
|
+
header: () => o("settlements.table.fee"),
|
56
|
+
accessorKey: "fee"
|
57
|
+
},
|
58
|
+
{
|
59
|
+
header: () => o("settlements.table.settlement_amount"),
|
60
|
+
accessorKey: "payout"
|
61
|
+
}
|
62
|
+
], p = A(() => s.data.map((t) => ({
|
63
|
+
id: t._id,
|
64
|
+
bank: t.beneficiaryBank.name,
|
65
|
+
accountNo: t.beneficiaryBank.accountNumber,
|
66
|
+
transactionAt: K(t.createdAt).format("YYYY-MM-DD"),
|
67
|
+
amount: c(t.totalAmount).toFormat("$0.00"),
|
68
|
+
fee: c(t.totalFee).toFormat("$0.00"),
|
69
|
+
payout: c(t.totalPayout).toFormat("$0.00")
|
70
|
+
})));
|
71
|
+
return (t, r) => {
|
72
|
+
const n = k("FmTable");
|
73
|
+
return V(), S(n, {
|
74
|
+
modelValue: f.value,
|
75
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
76
|
+
"row-data": p.value,
|
77
|
+
"shrink-at": !1,
|
78
|
+
"column-defs": x,
|
79
|
+
loading: s.loading,
|
80
|
+
onRowClick: r[1] || (r[1] = (i) => g("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(d, { emit: a }) {
|
98
|
+
const { t: o } = D(), s = d, g = a, f = F(""), x = [
|
99
|
+
{
|
100
|
+
header: () => o("settlements.table.id"),
|
101
|
+
accessorKey: "id",
|
102
|
+
cell: ({ cell: t }) => M(P, { data: t.getValue() })
|
103
|
+
},
|
104
|
+
{
|
105
|
+
header: () => o("settlements.table.bank"),
|
106
|
+
accessorKey: "bank"
|
107
|
+
},
|
108
|
+
{
|
109
|
+
header: () => o("settlements.table.account"),
|
110
|
+
accessorKey: "accountNo"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
header: () => o("settlements.table.created_at"),
|
114
|
+
accessorKey: "transactionAt",
|
115
|
+
meta: {
|
116
|
+
width: "180px"
|
117
|
+
}
|
118
|
+
},
|
119
|
+
{
|
120
|
+
header: () => o("settlements.table.sales_amount"),
|
121
|
+
accessorKey: "amount"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
header: () => o("settlements.table.fee"),
|
125
|
+
accessorKey: "fee"
|
126
|
+
},
|
127
|
+
{
|
128
|
+
header: () => o("settlements.table.settlement_amount"),
|
129
|
+
accessorKey: "payout"
|
130
|
+
}
|
131
|
+
], p = A(() => s.data.map((t) => ({
|
132
|
+
id: t.summary.referenceNo,
|
133
|
+
bank: t.summary.bank.name,
|
134
|
+
accountNo: t.summary.bank.accountNo,
|
135
|
+
transactionAt: K(t.summary.completedAt).format("YYYY-MM-DD"),
|
136
|
+
amount: c(t.summary.amount).toFormat("$0.00"),
|
137
|
+
fee: c(t.summary.commission).toFormat("$0.00"),
|
138
|
+
payout: c(t.summary.payout).toFormat("$0.00")
|
139
|
+
})));
|
140
|
+
return (t, r) => {
|
141
|
+
const n = k("FmTable");
|
142
|
+
return V(), S(n, {
|
143
|
+
modelValue: f.value,
|
144
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => f.value = i),
|
145
|
+
"row-data": p.value,
|
146
|
+
"shrink-at": !1,
|
147
|
+
"column-defs": x,
|
148
|
+
loading: s.loading,
|
149
|
+
onRowClick: r[1] || (r[1] = (i) => g("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(d) {
|
165
|
+
const { t: a } = D(), o = d, s = F(o.settlement.record), g = F(o.settlement.record), f = F(""), x = [
|
166
|
+
{
|
167
|
+
header: () => a("settlements.dialog.fiuu.id"),
|
168
|
+
accessorKey: "referenceNo"
|
169
|
+
},
|
170
|
+
{
|
171
|
+
header: () => a("settlements.dialog.fiuu.type"),
|
172
|
+
accessorKey: "group"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
header: () => a("settlements.dialog.fiuu.transaction_at"),
|
176
|
+
accessorKey: "completedAt",
|
177
|
+
meta: {
|
178
|
+
width: "180px"
|
179
|
+
}
|
180
|
+
},
|
181
|
+
{
|
182
|
+
header: () => a("settlements.dialog.fiuu.sales_amount"),
|
183
|
+
accessorKey: "amount",
|
184
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
185
|
+
},
|
186
|
+
{
|
187
|
+
header: () => a("settlements.dialog.fiuu.fee"),
|
188
|
+
accessorKey: "commission",
|
189
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
190
|
+
},
|
191
|
+
{
|
192
|
+
header: () => a("settlements.dialog.fiuu.settlement_amount"),
|
193
|
+
accessorKey: "netAmount",
|
194
|
+
cell: ({ cell: r }) => c(r.getValue()).toFormat("$0.00")
|
195
|
+
}
|
196
|
+
], p = F("");
|
197
|
+
let t;
|
198
|
+
return B(p, async () => {
|
199
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
200
|
+
var r = new RegExp(p.value, "i");
|
201
|
+
g.value = s.value.filter((n) => {
|
202
|
+
const i = JSON.stringify(n);
|
203
|
+
return r.test(i);
|
204
|
+
});
|
205
|
+
}, 700);
|
206
|
+
}), (r, n) => {
|
207
|
+
const i = k("FmCardHeader"), w = k("FmCardSection"), h = k("FmCard"), R = k("FmSearch"), v = k("FmTable");
|
208
|
+
return V(), j(q, null, [
|
209
|
+
l("div", ee, [
|
210
|
+
u(h, {
|
211
|
+
horizontal: "",
|
212
|
+
class: "flex-1 p-6",
|
213
|
+
variant: "elevated"
|
214
|
+
}, {
|
215
|
+
default: b(() => [
|
216
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
217
|
+
default: b(() => [
|
218
|
+
u(i, {
|
219
|
+
class: "p-0",
|
220
|
+
title: e(a)("settlements.dialog.info.transaction.title"),
|
221
|
+
subtitle: ""
|
222
|
+
}, null, 8, ["title"]),
|
223
|
+
u(w, { class: "p-0" }, {
|
224
|
+
default: b(() => [
|
225
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.for")), 1),
|
226
|
+
_(": " + m(d.settlement.summary.group) + " ", 1),
|
227
|
+
n[2] || (n[2] = l("br", null, null, -1)),
|
228
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.reference")), 1),
|
229
|
+
_(": " + m(d.settlement.summary.referenceNo), 1),
|
230
|
+
n[3] || (n[3] = l("br", null, null, -1)),
|
231
|
+
l("b", null, m(e(a)("settlements.dialog.info.transaction.count")), 1),
|
232
|
+
_(": " + m(s.value.length), 1)
|
233
|
+
]),
|
234
|
+
_: 1
|
235
|
+
})
|
236
|
+
]),
|
237
|
+
_: 1
|
238
|
+
})
|
239
|
+
]),
|
240
|
+
_: 1
|
241
|
+
}),
|
242
|
+
u(h, {
|
243
|
+
horizontal: "",
|
244
|
+
class: "flex-1 p-6 mx-6",
|
245
|
+
variant: "elevated"
|
246
|
+
}, {
|
247
|
+
default: b(() => [
|
248
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
249
|
+
default: b(() => [
|
250
|
+
u(i, {
|
251
|
+
class: "p-0",
|
252
|
+
title: e(a)("settlements.dialog.info.bank.title"),
|
253
|
+
subtitle: ""
|
254
|
+
}, null, 8, ["title"]),
|
255
|
+
u(w, { class: "p-0" }, {
|
256
|
+
default: b(() => [
|
257
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.for")), 1),
|
258
|
+
_(": " + m(d.settlement.summary.bank.name), 1),
|
259
|
+
n[4] || (n[4] = l("br", null, null, -1)),
|
260
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.name")), 1),
|
261
|
+
_(": " + m(d.settlement.summary.bank.holderName), 1),
|
262
|
+
n[5] || (n[5] = l("br", null, null, -1)),
|
263
|
+
l("b", null, m(e(a)("settlements.dialog.info.bank.number")), 1),
|
264
|
+
_(": " + m(d.settlement.summary.bank.accountNo), 1)
|
265
|
+
]),
|
266
|
+
_: 1
|
267
|
+
})
|
268
|
+
]),
|
269
|
+
_: 1
|
270
|
+
})
|
271
|
+
]),
|
272
|
+
_: 1
|
273
|
+
}),
|
274
|
+
u(h, {
|
275
|
+
horizontal: "",
|
276
|
+
class: "flex-1 p-6",
|
277
|
+
variant: "elevated"
|
278
|
+
}, {
|
279
|
+
default: b(() => [
|
280
|
+
u(w, { class: "flex flex-col gap-16 justify-between" }, {
|
281
|
+
default: b(() => [
|
282
|
+
u(i, {
|
283
|
+
class: "p-0",
|
284
|
+
title: e(a)("settlements.dialog.info.payout.title"),
|
285
|
+
subtitle: ""
|
286
|
+
}, null, 8, ["title"]),
|
287
|
+
u(w, { class: "p-0" }, {
|
288
|
+
default: b(() => [
|
289
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.amount")), 1),
|
290
|
+
_(": " + m(e(c)(d.settlement.summary.amount).toFormat("$0.00")), 1),
|
291
|
+
n[6] || (n[6] = l("br", null, null, -1)),
|
292
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.fee")), 1),
|
293
|
+
_(": " + m(e(c)(d.settlement.summary.commission).toFormat("$0.00")), 1),
|
294
|
+
n[7] || (n[7] = l("br", null, null, -1)),
|
295
|
+
l("b", null, m(e(a)("settlements.dialog.info.payout.payout")), 1),
|
296
|
+
_(": " + m(e(c)(d.settlement.summary.payout).toFormat("$0.00")), 1)
|
297
|
+
]),
|
298
|
+
_: 1
|
299
|
+
})
|
300
|
+
]),
|
301
|
+
_: 1
|
302
|
+
})
|
303
|
+
]),
|
304
|
+
_: 1
|
305
|
+
})
|
306
|
+
]),
|
307
|
+
l("div", te, [
|
308
|
+
u(R, {
|
309
|
+
modelValue: p.value,
|
310
|
+
"onUpdate:modelValue": n[0] || (n[0] = (y) => p.value = y),
|
311
|
+
placeholder: e(a)("settlements.dialog.search")
|
312
|
+
}, null, 8, ["modelValue", "placeholder"])
|
313
|
+
]),
|
314
|
+
u(v, {
|
315
|
+
modelValue: f.value,
|
316
|
+
"onUpdate:modelValue": n[1] || (n[1] = (y) => f.value = y),
|
317
|
+
"shrink-at": !1,
|
318
|
+
"search-value": p.value,
|
319
|
+
"row-data": g.value,
|
320
|
+
"column-defs": x
|
321
|
+
}, null, 8, ["modelValue", "search-value", "row-data"])
|
322
|
+
], 64);
|
323
|
+
};
|
324
|
+
}
|
325
|
+
}), 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" }, re = { class: "mb-6" }, Fe = /* @__PURE__ */ C({
|
326
|
+
__name: "Settlement",
|
327
|
+
setup(d) {
|
328
|
+
const a = H(), { tab: o, dateRange: s } = J({
|
329
|
+
tab: "feedme",
|
330
|
+
dateRange: {
|
331
|
+
startDate: K().startOf("day").format("YYYY-MM-DD"),
|
332
|
+
endDate: K().endOf("day").format("YYYY-MM-DD")
|
333
|
+
}
|
334
|
+
}), { t: g } = D(), { isLoading: f, startAsyncCall: x } = E(!0), { currentRestaurant: p } = O(), t = L(), r = F([]), n = F([]);
|
335
|
+
async function i() {
|
336
|
+
const v = await N.readRestaurantSettlements(
|
337
|
+
{
|
338
|
+
start: s.value.startDate,
|
339
|
+
end: s.value.endDate
|
340
|
+
}
|
341
|
+
);
|
342
|
+
r.value = v;
|
343
|
+
}
|
344
|
+
async function w() {
|
345
|
+
const v = await N.readRestaurantRMSSettlements(
|
346
|
+
{
|
347
|
+
start: s.value.startDate,
|
348
|
+
end: s.value.endDate
|
349
|
+
}
|
350
|
+
);
|
351
|
+
n.value = v;
|
352
|
+
}
|
353
|
+
async function h() {
|
354
|
+
await x(async () => Promise.all([
|
355
|
+
i(),
|
356
|
+
w()
|
357
|
+
]));
|
358
|
+
}
|
359
|
+
async function R(v) {
|
360
|
+
t.open({
|
361
|
+
title: `Settlement Transactions (${v.summary.referenceNo})`,
|
362
|
+
minWidth: "90%",
|
363
|
+
primaryActions: { text: "Close", close: !0 },
|
364
|
+
contentComponent: ae,
|
365
|
+
contentComponentProps: { settlement: v }
|
366
|
+
});
|
367
|
+
}
|
368
|
+
return z(h), B([p, s], h), (v, y) => {
|
369
|
+
const U = k("FmTabs");
|
370
|
+
return V(), S(I, {
|
371
|
+
title: e(g)("settlements.title"),
|
372
|
+
description: e(g)("settlements.description"),
|
373
|
+
loading: !1
|
374
|
+
}, {
|
375
|
+
default: b(() => [
|
376
|
+
l("div", ne, [
|
377
|
+
l("div", oe, [
|
378
|
+
u(W)
|
379
|
+
]),
|
380
|
+
l("div", le, [
|
381
|
+
u(Q, {
|
382
|
+
button: {
|
383
|
+
appendIcon: "file_download",
|
384
|
+
variant: "primary",
|
385
|
+
label: "Export"
|
386
|
+
},
|
387
|
+
handler: async () => {
|
388
|
+
await e(N).downloadRestaurantSettlementReport({
|
389
|
+
start: e(s).startDate,
|
390
|
+
end: e(s).endDate
|
391
|
+
});
|
392
|
+
}
|
393
|
+
}, null, 8, ["handler"])
|
394
|
+
])
|
395
|
+
]),
|
396
|
+
l("div", se, [
|
397
|
+
u(G, {
|
398
|
+
modelValue: e(s),
|
399
|
+
"onUpdate:modelValue": y[0] || (y[0] = ($) => T(s) ? s.value = $ : null)
|
400
|
+
}, null, 8, ["modelValue"])
|
401
|
+
]),
|
402
|
+
l("div", re, [
|
403
|
+
u(U, {
|
404
|
+
modelValue: e(o),
|
405
|
+
"onUpdate:modelValue": y[1] || (y[1] = ($) => T(o) ? o.value = $ : null),
|
406
|
+
items: [
|
407
|
+
{
|
408
|
+
label: "FeedMe",
|
409
|
+
value: "feedme",
|
410
|
+
icon: "summarize"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
label: "Fiuu (RMS)",
|
414
|
+
value: "fiuu",
|
415
|
+
icon: "overview"
|
416
|
+
}
|
417
|
+
]
|
418
|
+
}, null, 8, ["modelValue"])
|
419
|
+
]),
|
420
|
+
e(o) === "fiuu" ? (V(), S(Z, {
|
421
|
+
key: 0,
|
422
|
+
loading: e(f),
|
423
|
+
data: n.value,
|
424
|
+
onRowClick: R
|
425
|
+
}, null, 8, ["loading", "data"])) : Y("", !0),
|
426
|
+
e(o) === "feedme" ? (V(), S(X, {
|
427
|
+
key: 1,
|
428
|
+
loading: e(f),
|
429
|
+
data: r.value,
|
430
|
+
onRowClick: y[2] || (y[2] = ($) => e(a).push({
|
431
|
+
name: "mf-payment-settlement-transaction",
|
432
|
+
params: {
|
433
|
+
settlementId: $._id
|
434
|
+
}
|
435
|
+
}))
|
436
|
+
}, null, 8, ["loading", "data"])) : Y("", !0)
|
437
|
+
]),
|
438
|
+
_: 1
|
439
|
+
}, 8, ["title", "description"]);
|
440
|
+
};
|
441
|
+
}
|
442
|
+
});
|
443
|
+
export {
|
444
|
+
Fe as default
|
445
|
+
};
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as w, resolveComponent as g, openBlock as F, createBlock as B, normalizeClass as G, withCtx as l, createElementVNode as t, toDisplayString as u, createElementBlock as L, unref as p, ref as x, onMounted as Y, watch as H, createVNode as n, createTextVNode as i, h as N } from "vue";
|
2
|
-
import { e as E, u as q } from "./index-
|
2
|
+
import { e as E, u as q } from "./index-DEvTHjDK.js";
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
4
4
|
import { d as k } from "./dinero-CIVmXLL-.js";
|
5
|
-
import { g as W, a as X, t as P, b as Z } from "./assets-
|
5
|
+
import { g as W, a as X, t as P, b as Z } from "./assets-CizBCu1u.js";
|
6
6
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
7
7
|
import { useRouter as te } from "vue-router";
|
8
|
-
import { s as ae } from "./index-
|
8
|
+
import { s as ae } from "./index-BDCzfWFu.js";
|
9
9
|
import { u as ne } from "./error-K1CakhA9.js";
|
10
10
|
import { w as oe } from "./Modal-DB8M9o1T.js";
|
11
11
|
const re = /* @__PURE__ */ w({
|