@feedmepos/mf-payment 1.0.2-beta.1 → 1.0.2-beta.2
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-B1s3QYgu.js → PayoutAccount-WMo1Wi6d.js} +1 -1
- package/dist/{PayoutAccount-C9SN1Nvv.js → PayoutAccount-jO4yRGDD.js} +1 -1
- package/dist/Restaurant-BN04ZHox.js +302 -0
- package/dist/{SettlementTransactions-Dmhz9p1V.js → SettlementTransactions-DHoHXPTr.js} +1 -1
- package/dist/{SettlementTransactions-Xdb_g6jX.js → SettlementTransactions-Ye65VrAA.js} +1 -1
- package/dist/{Terminal-D-U0BVTe.js → Terminal-nWQ95k-W.js} +149 -131
- package/dist/{TerminalTransaction-Bh9FhkvQ.js → TerminalTransaction-D7Vy3Hn8.js} +181 -152
- package/dist/{Transaction-DA_TB9zD.js → Transaction-CeJhi9Hg.js} +1 -1
- package/dist/{Transaction-BedQtv8p.js → Transaction-DGoMEHjT.js} +123 -96
- package/dist/{app-O6Nt7xIq.js → app-CQiyh6x1.js} +202 -202
- package/dist/app.js +1 -1
- package/dist/grafana-CqkYm_ru.js +46 -0
- package/dist/helpers/grafana.d.ts +7 -0
- package/dist/model/transaction.d.ts +1 -0
- package/dist/package.json +1 -1
- package/dist/{payout-account-B7WTxG7n.js → payout-account-BHUNAuhN.js} +1 -1
- package/dist/{transaction-W49zE8RL.js → transaction-DGZWXzQ3.js} +8 -7
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/views/admin/restaurant/cell/LogButton.vue.d.ts +5 -0
- package/dist/views/admin/terminal-transaction/cell/Actions.vue.d.ts +3 -1
- package/dist/views/admin/transaction/TransactionTable.vue.d.ts +2 -0
- package/dist/views/admin/transaction/cell/Actions.vue.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Restaurant-ewsvVw3P.js +0 -262
@@ -3,7 +3,7 @@ import { p as z } from "./index-Cb1zVhcH.js";
|
|
3
3
|
import { _ as y, u as S, e as K } from "./index-1fXAFo2E.js";
|
4
4
|
import { defineStore as _ } from "pinia";
|
5
5
|
import { useCoreStore as $ } from "@feedmepos/mf-common";
|
6
|
-
import { c as AA, P as v } from "./payout-account-
|
6
|
+
import { c as AA, P as v } from "./payout-account-BHUNAuhN.js";
|
7
7
|
import { useDialogChild as sA, useDialog as eA } from "@feedmepos/ui-library";
|
8
8
|
import { z as X, a as x } from "./validator-D5jtpt9A.js";
|
9
9
|
import { P as J } from "./PDFViewer-xrBtzrlR.js";
|
@@ -2,7 +2,7 @@ import { defineComponent as g, resolveComponent as i, openBlock as h, createBloc
|
|
2
2
|
import { u as S } from "./index-DdJrUqkm.js";
|
3
3
|
import { _ as O } from "./index-1fXAFo2E.js";
|
4
4
|
import { _ as K } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
5
|
-
import { P as V } from "./payout-account-
|
5
|
+
import { P as V } from "./payout-account-BHUNAuhN.js";
|
6
6
|
import { p as $ } from "./index-Cb1zVhcH.js";
|
7
7
|
import "@feedmepos/ui-library";
|
8
8
|
import { _ as D } from "./index.vue_vue_type_script_setup_true_lang-GT2x04Bn.js";
|
@@ -0,0 +1,302 @@
|
|
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 D, renderList as q, computed as C, watch as I, onMounted as N, unref as b, toDisplayString as B, normalizeClass as W, isRef as E, h as P } from "vue";
|
2
|
+
import { u as O } from "./index-DdJrUqkm.js";
|
3
|
+
import { _ as j } from "./AdminLayout.vue_vue_type_script_setup_true_lang-BTmMOzwx.js";
|
4
|
+
import "@feedmepos/ui-library";
|
5
|
+
import { u as G } from "./index-1fXAFo2E.js";
|
6
|
+
import { _ as Q } from "./AutoCopyCell.vue_vue_type_script_setup_true_lang-CdmfrBoW.js";
|
7
|
+
import { r as H } from "./index-BIXuzGa9.js";
|
8
|
+
import { useRouter as J } from "vue-router";
|
9
|
+
import { g as X } from "./grafana-CqkYm_ru.js";
|
10
|
+
const Y = ["id"], L = /* @__PURE__ */ F({
|
11
|
+
__name: "FmTableSelection",
|
12
|
+
props: {
|
13
|
+
value: {},
|
14
|
+
items: {}
|
15
|
+
},
|
16
|
+
emits: ["update:modelValue"],
|
17
|
+
setup(p, { emit: l }) {
|
18
|
+
const m = l, u = p, s = y(!1);
|
19
|
+
return (v, c) => {
|
20
|
+
const o = g("FmButton"), n = g("FmMenuItem"), h = g("FmMenu");
|
21
|
+
return x(), A(h, {
|
22
|
+
"max-height": 264,
|
23
|
+
shift: "",
|
24
|
+
onMenuChanged: c[0] || (c[0] = (e) => s.value = e)
|
25
|
+
}, {
|
26
|
+
"menu-button": $(() => {
|
27
|
+
var e;
|
28
|
+
return [
|
29
|
+
f(o, {
|
30
|
+
icon: s.value ? "expand_less" : "expand_more",
|
31
|
+
label: (e = v.items.find((t) => t.value === u.value)) == null ? void 0 : e.label,
|
32
|
+
"icon-position": "append",
|
33
|
+
size: "md",
|
34
|
+
variant: "tertiary"
|
35
|
+
}, null, 8, ["icon", "label"])
|
36
|
+
];
|
37
|
+
}),
|
38
|
+
"menu-wrapper": $(({ maxHeight: e }) => [
|
39
|
+
d("div", {
|
40
|
+
id: `menu-wrapper-${e}`,
|
41
|
+
style: T({ maxHeight: `${e}px` }),
|
42
|
+
class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
|
43
|
+
}, [
|
44
|
+
(x(!0), R(D, null, q(v.items, (t) => (x(), A(n, {
|
45
|
+
key: t.value,
|
46
|
+
label: t.label,
|
47
|
+
value: t.value,
|
48
|
+
"model-value": t.value === u.value,
|
49
|
+
"onUpdate:modelValue": (w) => m("update:modelValue", t.value)
|
50
|
+
}, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
|
51
|
+
], 12, Y)
|
52
|
+
]),
|
53
|
+
_: 1
|
54
|
+
});
|
55
|
+
};
|
56
|
+
}
|
57
|
+
}), Z = { class: "basis-72 bg-white flex items-center justify-between px-24 pt-6" }, ee = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, te = { class: "flex gap-8 items-center" }, oe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible" }, ae = {
|
58
|
+
class: /* @__PURE__ */ W(["flex gap-8 items-center"])
|
59
|
+
}, ne = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, le = { class: "flex gap-8" }, se = /* @__PURE__ */ F({
|
60
|
+
__name: "index",
|
61
|
+
props: {
|
62
|
+
columnDefs: {
|
63
|
+
type: Array,
|
64
|
+
required: !0
|
65
|
+
},
|
66
|
+
rowsDefs: {
|
67
|
+
type: Function,
|
68
|
+
required: !0
|
69
|
+
},
|
70
|
+
paginate: {
|
71
|
+
type: Function,
|
72
|
+
required: !0
|
73
|
+
}
|
74
|
+
},
|
75
|
+
emits: ["row-click"],
|
76
|
+
setup(p, { expose: l, emit: m }) {
|
77
|
+
const u = [10, 20, 30, 50, 100].map((_) => ({
|
78
|
+
label: _.toString(),
|
79
|
+
value: _
|
80
|
+
})), s = p, v = m, { isLoading: c, startLoading: o, stopLoading: n } = G(!0), h = y(), e = y(), t = y(10), w = y(0), r = y(1), k = async function(_ = !1) {
|
81
|
+
o(), _ && (e.value = [], r.value = 1);
|
82
|
+
const a = await s.paginate(t.value, r.value);
|
83
|
+
e.value = a.resources, w.value = a.meta.totalPages ?? 1, n();
|
84
|
+
}, K = C(() => r.value > 1), U = C(() => r.value < w.value), z = C(() => {
|
85
|
+
var _;
|
86
|
+
return (_ = e.value) == null ? void 0 : _.map(s.rowsDefs);
|
87
|
+
});
|
88
|
+
return I(t, () => k(!0)), I(r, () => k()), N(() => k()), l({
|
89
|
+
reset: () => k(!0)
|
90
|
+
}), (_, a) => {
|
91
|
+
const M = g("FmTable"), S = g("FmButton");
|
92
|
+
return x(), R(D, null, [
|
93
|
+
f(M, {
|
94
|
+
modelValue: h.value,
|
95
|
+
"onUpdate:modelValue": a[0] || (a[0] = (i) => h.value = i),
|
96
|
+
loading: b(c),
|
97
|
+
"page-size": t.value,
|
98
|
+
"row-data": z.value,
|
99
|
+
"column-defs": p.columnDefs,
|
100
|
+
"hide-footer": !0,
|
101
|
+
onRowClick: a[1] || (a[1] = (i) => {
|
102
|
+
var V;
|
103
|
+
return v("row-click", (V = e.value) == null ? void 0 : V.at(i.index));
|
104
|
+
})
|
105
|
+
}, null, 8, ["modelValue", "loading", "page-size", "row-data", "column-defs"]),
|
106
|
+
d("div", Z, [
|
107
|
+
d("div", ee, [
|
108
|
+
d("div", te, [
|
109
|
+
a[6] || (a[6] = d("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
110
|
+
f(L, {
|
111
|
+
items: b(u),
|
112
|
+
value: t.value,
|
113
|
+
"onUpdate:modelValue": a[2] || (a[2] = (i) => t.value = i)
|
114
|
+
}, null, 8, ["items", "value"])
|
115
|
+
]),
|
116
|
+
d("span", oe, B((r.value - 1) * t.value) + " - " + B((r.value - 1) * t.value + t.value), 1)
|
117
|
+
]),
|
118
|
+
d("div", ae, [
|
119
|
+
f(L, {
|
120
|
+
items: Array.from(Array(w.value), (i, V) => V + 1).map(
|
121
|
+
(i) => ({
|
122
|
+
label: i.toString(),
|
123
|
+
value: i
|
124
|
+
})
|
125
|
+
),
|
126
|
+
value: r.value,
|
127
|
+
"onUpdate:modelValue": a[3] || (a[3] = (i) => r.value = i)
|
128
|
+
}, null, 8, ["items", "value"]),
|
129
|
+
d("span", ne, " Page " + B(r.value) + " of " + B(w.value), 1),
|
130
|
+
d("div", le, [
|
131
|
+
f(S, {
|
132
|
+
disabled: !K.value,
|
133
|
+
icon: "chevron_left",
|
134
|
+
"icon-color": "neutral-black",
|
135
|
+
variant: "tertiary",
|
136
|
+
onClick: a[4] || (a[4] = () => r.value -= 1)
|
137
|
+
}, null, 8, ["disabled"]),
|
138
|
+
f(S, {
|
139
|
+
disabled: !U.value,
|
140
|
+
icon: "chevron_right",
|
141
|
+
"icon-color": "neutral-black",
|
142
|
+
variant: "tertiary",
|
143
|
+
onClick: a[5] || (a[5] = () => r.value += 1)
|
144
|
+
}, null, 8, ["disabled"])
|
145
|
+
])
|
146
|
+
])
|
147
|
+
])
|
148
|
+
], 64);
|
149
|
+
};
|
150
|
+
}
|
151
|
+
}), re = /* @__PURE__ */ F({
|
152
|
+
__name: "IsActive",
|
153
|
+
props: {
|
154
|
+
row: {},
|
155
|
+
data: {}
|
156
|
+
},
|
157
|
+
setup(p) {
|
158
|
+
const l = p;
|
159
|
+
function m() {
|
160
|
+
return l.data ? "#66BB6A" : "#EF5350";
|
161
|
+
}
|
162
|
+
function u() {
|
163
|
+
return l.data ? "check" : "close";
|
164
|
+
}
|
165
|
+
return (s, v) => {
|
166
|
+
const c = g("FmIcon");
|
167
|
+
return x(), A(c, {
|
168
|
+
name: u(),
|
169
|
+
color: m(),
|
170
|
+
size: "lg"
|
171
|
+
}, null, 8, ["name", "color"]);
|
172
|
+
};
|
173
|
+
}
|
174
|
+
}), ue = /* @__PURE__ */ F({
|
175
|
+
__name: "LogButton",
|
176
|
+
props: {
|
177
|
+
id: {}
|
178
|
+
},
|
179
|
+
setup(p) {
|
180
|
+
const l = p;
|
181
|
+
function m() {
|
182
|
+
const u = X([
|
183
|
+
{
|
184
|
+
type: "span",
|
185
|
+
queryKey: "restaurant.id",
|
186
|
+
queryValue: l.id
|
187
|
+
}
|
188
|
+
]);
|
189
|
+
window.open(u, "_blank");
|
190
|
+
}
|
191
|
+
return (u, s) => {
|
192
|
+
const v = g("FmButton");
|
193
|
+
return x(), R("div", {
|
194
|
+
onClick: s[0] || (s[0] = (c) => {
|
195
|
+
c.stopPropagation(), m();
|
196
|
+
})
|
197
|
+
}, [
|
198
|
+
f(v, {
|
199
|
+
variant: "plain",
|
200
|
+
"prepend-icon": "history"
|
201
|
+
})
|
202
|
+
]);
|
203
|
+
};
|
204
|
+
}
|
205
|
+
}), ie = { class: "flex items-start mb-6" }, xe = /* @__PURE__ */ F({
|
206
|
+
__name: "Restaurant",
|
207
|
+
setup(p) {
|
208
|
+
const { searchKey: l } = O({
|
209
|
+
searchKey: ""
|
210
|
+
}), m = y(), u = J();
|
211
|
+
let s;
|
212
|
+
I(l, async () => {
|
213
|
+
s && clearTimeout(s), s = setTimeout(
|
214
|
+
() => {
|
215
|
+
var o;
|
216
|
+
return (o = m.value) == null ? void 0 : o.reset();
|
217
|
+
},
|
218
|
+
700
|
219
|
+
);
|
220
|
+
});
|
221
|
+
const v = function(o) {
|
222
|
+
const n = o.payoutAccount;
|
223
|
+
return {
|
224
|
+
id: o._id,
|
225
|
+
name: o.profile.name,
|
226
|
+
hasPayoutAccount: (n == null ? void 0 : n.enable) && n.status != "NEW"
|
227
|
+
};
|
228
|
+
}, c = [
|
229
|
+
{
|
230
|
+
header: () => "ID",
|
231
|
+
accessorKey: "id",
|
232
|
+
cell: ({ cell: o }) => P(Q, { data: o.getValue() }),
|
233
|
+
meta: {
|
234
|
+
maxWidth: "72px",
|
235
|
+
textAlign: "right"
|
236
|
+
}
|
237
|
+
},
|
238
|
+
{
|
239
|
+
header: () => "Name",
|
240
|
+
accessorKey: "name"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
header: () => "Account?",
|
244
|
+
accessorKey: "hasPayoutAccount",
|
245
|
+
meta: {
|
246
|
+
maxWidth: "64px"
|
247
|
+
},
|
248
|
+
cell: ({ cell: o, row: n }) => P(re, { row: n, data: o.getValue() })
|
249
|
+
},
|
250
|
+
{
|
251
|
+
header: () => "Actions",
|
252
|
+
accessorKey: "logs",
|
253
|
+
meta: {
|
254
|
+
maxWidth: "64px"
|
255
|
+
},
|
256
|
+
cell: ({ row: o }) => P(ue, { id: o.original.id })
|
257
|
+
}
|
258
|
+
];
|
259
|
+
return (o, n) => {
|
260
|
+
const h = g("FmSearch");
|
261
|
+
return x(), A(j, {
|
262
|
+
title: "Restaurants",
|
263
|
+
loading: !1
|
264
|
+
}, {
|
265
|
+
default: $(() => [
|
266
|
+
d("div", ie, [
|
267
|
+
f(h, {
|
268
|
+
"model-value": b(l),
|
269
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => E(l) ? l.value = e : null),
|
270
|
+
class: "mr-8",
|
271
|
+
label: "Search",
|
272
|
+
placeholder: "Search Restaurants ..."
|
273
|
+
}, null, 8, ["model-value"])
|
274
|
+
]),
|
275
|
+
f(se, {
|
276
|
+
ref_key: "controller",
|
277
|
+
ref: m,
|
278
|
+
"column-defs": c,
|
279
|
+
"rows-defs": v,
|
280
|
+
paginate: (e, t) => b(H).readRestaurantWithPagination({
|
281
|
+
limit: e,
|
282
|
+
skip: t - 1,
|
283
|
+
sortBy: "name",
|
284
|
+
search: b(l),
|
285
|
+
descending: !1
|
286
|
+
}),
|
287
|
+
onRowClick: n[1] || (n[1] = (e) => b(u).push({
|
288
|
+
name: "mf-payment-admin.restaurant-settings",
|
289
|
+
params: {
|
290
|
+
restaurantId: e._id
|
291
|
+
}
|
292
|
+
}))
|
293
|
+
}, null, 8, ["paginate"])
|
294
|
+
]),
|
295
|
+
_: 1
|
296
|
+
});
|
297
|
+
};
|
298
|
+
}
|
299
|
+
});
|
300
|
+
export {
|
301
|
+
xe as default
|
302
|
+
};
|
@@ -3,7 +3,7 @@ import { e as E, u as G } from "./index-1fXAFo2E.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
4
4
|
import { d as h } from "./dinero-CIVmXLL-.js";
|
5
5
|
import { g as Y, a as H } from "./assets-8c19wXSV.js";
|
6
|
-
import { t as q, a as J } from "./transaction-
|
6
|
+
import { t as q, a as J } from "./transaction-DGZWXzQ3.js";
|
7
7
|
import { _ as Q } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
8
|
import { useRouter as W } from "vue-router";
|
9
9
|
import { s as X } from "./index-Cx7X9kBf.js";
|
@@ -3,7 +3,7 @@ import { e as E, u as q } from "./index-1fXAFo2E.js";
|
|
3
3
|
import { useDialog as J, useSnackbar as Q } from "@feedmepos/ui-library";
|
4
4
|
import { d as B } from "./dinero-CIVmXLL-.js";
|
5
5
|
import { g as W, a as X } from "./assets-8c19wXSV.js";
|
6
|
-
import { t as P, a as Z } from "./transaction-
|
6
|
+
import { t as P, a as Z } from "./transaction-DGZWXzQ3.js";
|
7
7
|
import { _ as ee } from "./Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js";
|
8
8
|
import { useRouter as te } from "vue-router";
|
9
9
|
import { s as ae } from "./index-Cx7X9kBf.js";
|