@feedmepos/mf-payment 0.0.0-beta.12 → 0.0.0-beta.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/dist/{AdminLayout.vue_vue_type_script_setup_true_lang-oPYFBeEo.js → AdminLayout.vue_vue_type_script_setup_true_lang-1DSAdvX7.js} +1 -1
  2. package/dist/AsyncButton.vue_vue_type_script_setup_true_lang-DcjzvYwT.js +42 -0
  3. package/dist/{Layout.vue_vue_type_script_setup_true_lang-DJm5br5a.js → Layout.vue_vue_type_script_setup_true_lang-C38PTqO5.js} +9 -9
  4. package/dist/Modal-DB8M9o1T.js +13 -0
  5. package/dist/{PayoutAccount-CeLwLffx.js → PayoutAccount-BHwKD9si.js} +288 -3160
  6. package/dist/{PayoutAccount-DQm62Wf2.js → PayoutAccount-DuqITwjB.js} +38 -35
  7. package/dist/{PayoutAccountSetting-CIeos0md.js → PayoutAccountSetting-cOThY31e.js} +4 -4
  8. package/dist/Settlement-Dr6Rmkid.js +142 -0
  9. package/dist/Settlement-JkH7-Wd_.js +146 -0
  10. package/dist/{SettlementTransactions-CYES5YMF.js → SettlementTransactions-BGfDReId.js} +5 -5
  11. package/dist/{SettlementTransactions-B1v0f-0o.js → SettlementTransactions-CSz0G9iE.js} +101 -108
  12. package/dist/Terminal-DQqtUzV2.js +318 -0
  13. package/dist/TerminalSetting-T0Sxq_z0.js +176 -0
  14. package/dist/{TerminalTransaction-LofDTVwC.js → TerminalTransaction-C0g2mMBJ.js} +19 -19
  15. package/dist/Transaction-BKBh8jOT.js +249 -0
  16. package/dist/{Transaction-CaOxsIQH.js → Transaction-DVS8SkBi.js} +80 -74
  17. package/dist/api/index.d.ts +7 -0
  18. package/dist/api/settlement/index.d.ts +7 -13
  19. package/dist/api/terminal/index.d.ts +8 -1
  20. package/dist/api/transaction/index.d.ts +6 -2
  21. package/dist/app.js +46 -40
  22. package/dist/{assets-DnuLfRTO.js → assets-nIQ0r4oP.js} +1 -1
  23. package/dist/components/AsyncButton.vue.d.ts +21 -0
  24. package/dist/components/CursorTable/index.vue.d.ts +16 -5
  25. package/dist/{index-Bmka-1lQ.js → index-CIIojtd5.js} +1 -1
  26. package/dist/index-CxYMbN69.js +37 -0
  27. package/dist/index-DflgpHga.js +55560 -0
  28. package/dist/{index-Coz5aeIO.js → index-DhPhiNvt.js} +13 -23
  29. package/dist/{index-CF56zGyu.js → index-DqQBDo_Y.js} +1 -1
  30. package/dist/index.vue_vue_type_script_setup_true_lang-CcY9Uu6G.js +155 -0
  31. package/dist/package.json +3 -3
  32. package/dist/{payout-account-OR4juI9N.js → payout-account-FNZygqj-.js} +130 -130
  33. package/dist/{transaction-vRrBf3FN.js → transaction-B4rEbejx.js} +28 -15
  34. package/dist/tsconfig.app.tsbuildinfo +1 -1
  35. package/dist/validator-D5jtpt9A.js +2877 -0
  36. package/dist/views/admin/terminal/TerminalDialog.vue.d.ts +61 -0
  37. package/dist/views/admin/terminal/TerminalSetting.vue.d.ts +12 -0
  38. package/dist/views/admin/terminal/cell/Actions.vue.d.ts +58 -9
  39. package/dist/views/admin/terminal/tabs/Fiuu.vue.d.ts +72 -0
  40. package/dist/views/admin/terminal/tabs/Information.vue.d.ts +63 -0
  41. package/package.json +3 -3
  42. package/dist/Settlement-BVGACeme.js +0 -136
  43. package/dist/Settlement-Ce48KHrc.js +0 -132
  44. package/dist/Terminal-ByKV2Rof.js +0 -204
  45. package/dist/Transaction-C-X11abA.js +0 -242
  46. package/dist/index-DCPNrUDq.js +0 -40075
  47. package/dist/index.vue_vue_type_script_setup_true_lang-CAR-bNaR.js +0 -150
@@ -1,5 +1,5 @@
1
- import { a as e, b as a, r as s } from "./index-DCPNrUDq.js";
2
- const n = {
1
+ import { a as e, b as a, i as n, r as s } from "./index-DflgpHga.js";
2
+ const m = {
3
3
  async updateRemark(t) {
4
4
  return e(
5
5
  await a().put("/settlements/remark", t)
@@ -12,16 +12,20 @@ const n = {
12
12
  })
13
13
  );
14
14
  },
15
- async readSettlementReport(t) {
16
- return e(
15
+ async downloadSettlementReport(t) {
16
+ return n(
17
17
  await a().get("/settlements/audit/v2", {
18
18
  params: t
19
- })
19
+ }),
20
+ `settlement-report-${t.start}-${t.end}.xlsx`
20
21
  );
21
22
  },
22
- async removeTransaction(t) {
23
- return e(
24
- await a().delete(`/settlements/${t}`)
23
+ async downloadRestaurantSettlementReport(t) {
24
+ return n(
25
+ await s().get("/settlements/report", {
26
+ params: t
27
+ }),
28
+ `settlement-report-${t.start}-${t.end}.xlsx`
25
29
  );
26
30
  },
27
31
  async readById(t) {
@@ -40,22 +44,8 @@ const n = {
40
44
  params: t
41
45
  })
42
46
  );
43
- },
44
- async readRestaurantRMSSettlements(t) {
45
- return e(
46
- await s().get("/settlements/rms", {
47
- params: t
48
- })
49
- );
50
- },
51
- async readRestaurantSettlementReport(t) {
52
- return e(
53
- await s().get("/settlements/report", {
54
- params: t
55
- })
56
- );
57
47
  }
58
48
  };
59
49
  export {
60
- n as s
50
+ m as s
61
51
  };
@@ -1,4 +1,4 @@
1
- import { g as c, b as u, a as t, h as n } from "./index-DCPNrUDq.js";
1
+ import { g as c, b as u, a as t, h as n } from "./index-DflgpHga.js";
2
2
  const o = {
3
3
  async read(a) {
4
4
  return c(
@@ -0,0 +1,155 @@
1
+ import { defineComponent as S, ref as r, resolveComponent as v, openBlock as _, createBlock as D, withCtx as M, createVNode as i, createElementVNode as u, normalizeStyle as T, createElementBlock as U, Fragment as $, renderList as j, computed as h, watch as z, onMounted as E, unref as L, toDisplayString as C, normalizeClass as O } from "vue";
2
+ import { u as R } from "./index-DflgpHga.js";
3
+ import "@feedmepos/ui-library";
4
+ const G = ["id"], P = /* @__PURE__ */ S({
5
+ __name: "FmTableSelection",
6
+ props: {
7
+ value: {},
8
+ items: {}
9
+ },
10
+ emits: ["update:modelValue"],
11
+ setup(c, { emit: w }) {
12
+ const F = w, p = c, m = r(!1);
13
+ return (f, g) => {
14
+ const k = v("FmButton"), V = v("FmMenuItem"), y = v("FmMenu");
15
+ return _(), D(y, {
16
+ "max-height": 264,
17
+ shift: "",
18
+ onMenuChanged: g[0] || (g[0] = (t) => m.value = t)
19
+ }, {
20
+ "menu-button": M(() => {
21
+ var t;
22
+ return [
23
+ i(k, {
24
+ icon: m.value ? "expand_less" : "expand_more",
25
+ label: (t = f.items.find((n) => n.value === p.value)) == null ? void 0 : t.label,
26
+ "icon-position": "append",
27
+ size: "md",
28
+ variant: "tertiary"
29
+ }, null, 8, ["icon", "label"])
30
+ ];
31
+ }),
32
+ "menu-wrapper": M(({ maxHeight: t }) => [
33
+ u("div", {
34
+ id: `menu-wrapper-${t}`,
35
+ style: T({ maxHeight: `${t}px` }),
36
+ class: "bg-fm-color-neutral-white flex flex-col overflow-y-auto px-4 py-12 rounded-md shadow-light-300 w-[75px]"
37
+ }, [
38
+ (_(!0), U($, null, j(f.items, (n) => (_(), D(V, {
39
+ key: n.value,
40
+ label: n.label,
41
+ value: n.value,
42
+ "model-value": n.value === p.value,
43
+ "onUpdate:modelValue": (l) => F("update:modelValue", n.value)
44
+ }, null, 8, ["label", "value", "model-value", "onUpdate:modelValue"]))), 128))
45
+ ], 12, G)
46
+ ]),
47
+ _: 1
48
+ });
49
+ };
50
+ }
51
+ }), H = { class: "basis-72 bg-white flex items-center justify-between px-24 pt-6" }, J = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, K = { class: "flex gap-8 items-center" }, Q = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary xs:hidden xs:invisible" }, W = {
52
+ class: /* @__PURE__ */ O(["flex gap-8 items-center"])
53
+ }, X = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, Y = { class: "flex gap-8" }, le = /* @__PURE__ */ S({
54
+ __name: "index",
55
+ props: {
56
+ columnDefs: {
57
+ type: Array,
58
+ required: !0
59
+ },
60
+ rowsDefs: {
61
+ type: Function,
62
+ required: !0
63
+ },
64
+ paginate: {
65
+ type: Function,
66
+ required: !0
67
+ }
68
+ },
69
+ emits: ["row-click"],
70
+ setup(c, { expose: w, emit: F }) {
71
+ const p = [10, 20, 30, 50, 100].map((o) => ({
72
+ label: o.toString(),
73
+ value: o
74
+ })), m = c, f = F, { isLoading: g, startLoading: k, stopLoading: V } = R(!0), y = r(), t = r(), n = r(""), l = r(10), a = r(1), d = r(0), b = async function(o = !1) {
75
+ k(), o && (t.value = [], n.value = "", a.value = 1, d.value = 0);
76
+ const e = await m.paginate(l.value, n.value);
77
+ t.value = [...t.value ?? [], ...e.data], n.value = e.meta.cursor ?? "", d.value += 1, V();
78
+ }, q = h(() => a.value > 1), A = h(() => a.value < d.value ? !0 : n.value > ""), I = h(() => {
79
+ const o = l.value * (a.value - 1), e = o + l.value;
80
+ return (t.value ?? []).slice(o, e).map(m.rowsDefs);
81
+ });
82
+ return z(l, () => b(!0)), z(a, (o) => {
83
+ o > d.value && b();
84
+ }), E(() => b()), w({
85
+ reset: () => b(!0),
86
+ data: () => t.value ?? [],
87
+ pageData: () => {
88
+ const o = l.value * (a.value - 1), e = o + l.value;
89
+ return (t.value ?? []).slice(o, e);
90
+ }
91
+ }), (o, e) => {
92
+ const N = v("FmTable"), B = v("FmButton");
93
+ return _(), U($, null, [
94
+ i(N, {
95
+ modelValue: y.value,
96
+ "onUpdate:modelValue": e[0] || (e[0] = (s) => y.value = s),
97
+ loading: L(g),
98
+ "page-size": l.value,
99
+ "row-data": I.value,
100
+ "column-defs": c.columnDefs,
101
+ "hide-footer": !0,
102
+ onRowClick: e[1] || (e[1] = (s) => {
103
+ var x;
104
+ return f("row-click", (x = t.value) == null ? void 0 : x.at(s.index));
105
+ })
106
+ }, null, 8, ["modelValue", "loading", "page-size", "row-data", "column-defs"]),
107
+ u("div", H, [
108
+ u("div", J, [
109
+ u("div", K, [
110
+ e[6] || (e[6] = u("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
111
+ i(P, {
112
+ items: L(p),
113
+ value: l.value,
114
+ "onUpdate:modelValue": e[2] || (e[2] = (s) => l.value = s)
115
+ }, null, 8, ["items", "value"])
116
+ ]),
117
+ u("span", Q, C((a.value - 1) * l.value) + " - " + C((a.value - 1) * l.value + l.value), 1)
118
+ ]),
119
+ u("div", W, [
120
+ i(P, {
121
+ items: Array.from(Array(d.value), (s, x) => x + 1).map(
122
+ (s) => ({
123
+ label: s.toString(),
124
+ value: s
125
+ })
126
+ ),
127
+ value: a.value,
128
+ "onUpdate:modelValue": e[3] || (e[3] = (s) => a.value = s)
129
+ }, null, 8, ["items", "value"]),
130
+ u("span", X, " Page " + C(a.value), 1),
131
+ u("div", Y, [
132
+ i(B, {
133
+ disabled: !q.value,
134
+ icon: "chevron_left",
135
+ "icon-color": "neutral-black",
136
+ variant: "tertiary",
137
+ onClick: e[4] || (e[4] = () => a.value -= 1)
138
+ }, null, 8, ["disabled"]),
139
+ i(B, {
140
+ disabled: !A.value,
141
+ icon: "chevron_right",
142
+ "icon-color": "neutral-black",
143
+ variant: "tertiary",
144
+ onClick: e[5] || (e[5] = () => a.value += 1)
145
+ }, null, 8, ["disabled"])
146
+ ])
147
+ ])
148
+ ])
149
+ ], 64);
150
+ };
151
+ }
152
+ });
153
+ export {
154
+ le as _
155
+ };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-payment",
3
- "version": "0.0.0-beta.12",
3
+ "version": "0.0.0-beta.14",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -16,7 +16,7 @@
16
16
  "scripts": {
17
17
  "postinstall": "yarn --cwd .. && yarn --cwd ../package/common && yarn --cwd ../package/entity",
18
18
  "lint": "eslint --ext .ts,vue --ignore-path .gitignore . --fix",
19
- "dev": "vite --mode dev",
19
+ "dev": "vite --mode dev",
20
20
  "prod": "vite --mode prod",
21
21
  "preview": "vite preview",
22
22
  "test": "jest",
@@ -69,8 +69,8 @@
69
69
  "devDependencies": {
70
70
  "@babel/preset-env": "^7.22.10",
71
71
  "@pinia/testing": "^0.1.3",
72
- "@tsconfig/node20": "^20.1.4",
73
72
  "@rushstack/eslint-patch": "^1.1.3",
73
+ "@tsconfig/node20": "^20.1.4",
74
74
  "@types/dinero.js": "^1.9.0",
75
75
  "@types/file-saver": "^2.0.5",
76
76
  "@types/jest": "^29.5.4",