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