@feedmepos/mf-transaction 0.0.49 → 0.0.50-alpha.1
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/{Receipt-CbB43FcI.js → App-C2eFOWps.js} +105694 -55900
- package/dist/{app-BOGbEdwR.js → app-Lz_6_4Y_.js} +32 -43
- package/dist/app.js +3 -4
- package/dist/apps/mf-transaction/src/app.d.ts +0 -1
- package/dist/apps/mf-transaction/src/types/item.interface.d.ts +187 -0
- package/dist/apps/mf-transaction/src/views/receipt/detail/activity/ReceiptActivities.vue.d.ts +1 -1
- package/dist/apps/mf-transaction/src/views/receipt/detail/info/ReceiptInfo.vue.d.ts +1 -1
- package/dist/apps/mf-transaction/src/views/receipt/detail/info/ReceiptItem.vue.d.ts +1 -1
- package/dist/apps/mf-transaction/src/views/receipt/detail/info/ReceiptSubItem.vue.d.ts +1 -1
- package/dist/apps/mf-transaction/src/views/receipt/detail/item/ReceiptGroupItem.vue.d.ts +1 -1
- package/dist/apps/mf-transaction/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{index.es-C6q0jT4J.js → index.es-qiDiJNmA.js} +299 -300
- package/dist/packages/shared/src/components/form/SelectFilter.vue.d.ts +121 -0
- package/dist/packages/shared/src/components/info/CustomAttributeChip.vue.d.ts +29 -0
- package/dist/packages/shared/src/composable/filterSelector.d.ts +1 -1
- package/dist/packages/shared/src/stores/app.d.ts +2 -2
- package/package.json +3 -4
- package/dist/App-Bd2Vg00Y.js +0 -23
- package/dist/apps/mf-transaction/src/api/employee/index.d.ts +0 -13
- package/dist/apps/mf-transaction/src/api/inventory/index.d.ts +0 -5
- package/dist/apps/mf-transaction/src/api/payment/index.d.ts +0 -3
- package/dist/apps/mf-transaction/src/api/role/index.d.ts +0 -9
- package/dist/apps/mf-transaction/src/api/team/index.d.ts +0 -9
- package/dist/apps/mf-transaction/src/api/timesheet/index.d.ts +0 -6
- package/dist/apps/mf-transaction/src/api/user/index.d.ts +0 -6
- package/dist/apps/mf-transaction/src/components/Navigator.vue.d.ts +0 -2
- package/dist/apps/mf-transaction/src/router/index.d.ts +0 -2
- package/dist/apps/mf-transaction/src/router/shared.d.ts +0 -3
- package/dist/config-h_h_CICV.js +0 -49780
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useBreakpoints as
|
|
3
|
-
function
|
|
4
|
-
const o =
|
|
1
|
+
import { ref as p, watch as c, nextTick as l, onMounted as u, onBeforeUnmount as m, defineComponent as d, computed as v, createElementBlock as h, openBlock as f, normalizeStyle as P, renderSlot as x, resolveComponent as y, createBlock as b, withCtx as g, createElementVNode as w, createVNode as I, defineAsyncComponent as F } from "vue";
|
|
2
|
+
import { useBreakpoints as D } from "@feedmepos/ui-library";
|
|
3
|
+
function _(e, i) {
|
|
4
|
+
const o = p({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
5
5
|
function t() {
|
|
6
6
|
if (e.value) {
|
|
7
7
|
const r = e.value.getBoundingClientRect();
|
|
@@ -17,49 +17,49 @@ function R(e, i) {
|
|
|
17
17
|
await l(), t();
|
|
18
18
|
}), c(e, async (r) => {
|
|
19
19
|
r && (await l(), t());
|
|
20
|
-
}),
|
|
20
|
+
}), u(() => {
|
|
21
21
|
window.addEventListener("resize", t);
|
|
22
|
-
}),
|
|
22
|
+
}), m(() => {
|
|
23
23
|
window.removeEventListener("resize", t);
|
|
24
24
|
}), o;
|
|
25
25
|
}
|
|
26
|
-
const S = /* @__PURE__ */
|
|
26
|
+
const S = /* @__PURE__ */ d({
|
|
27
27
|
__name: "FullWrapper",
|
|
28
28
|
setup(e) {
|
|
29
|
-
const i =
|
|
29
|
+
const i = D(), o = p(null), t = _(o), r = v(() => {
|
|
30
30
|
var a;
|
|
31
31
|
const n = i.isAtMost("sm") ? 56 : 0;
|
|
32
32
|
return {
|
|
33
33
|
height: `calc(100dvh - ${((a = t.value) == null ? void 0 : a.top) + 24 + n}px)`
|
|
34
34
|
};
|
|
35
35
|
});
|
|
36
|
-
return (s, n) => (
|
|
36
|
+
return (s, n) => (f(), h("div", {
|
|
37
37
|
ref_key: "wrapper",
|
|
38
38
|
ref: o,
|
|
39
|
-
style:
|
|
39
|
+
style: P(r.value)
|
|
40
40
|
}, [
|
|
41
|
-
|
|
41
|
+
x(s.$slots, "default")
|
|
42
42
|
], 4));
|
|
43
43
|
}
|
|
44
|
-
}),
|
|
44
|
+
}), E = { class: "flex justify-center items-center h-full w-full" }, R = /* @__PURE__ */ d({
|
|
45
45
|
__name: "PageLoading",
|
|
46
46
|
setup(e) {
|
|
47
47
|
return (i, o) => {
|
|
48
|
-
const t =
|
|
49
|
-
return
|
|
50
|
-
default:
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
const t = y("FmCircularProgress");
|
|
49
|
+
return f(), b(S, null, {
|
|
50
|
+
default: g(() => [
|
|
51
|
+
w("div", E, [
|
|
52
|
+
I(t, { size: "xl" })
|
|
53
53
|
])
|
|
54
54
|
]),
|
|
55
55
|
_: 1
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
}),
|
|
59
|
+
}), C = (e) => F({
|
|
60
60
|
loader: e,
|
|
61
|
-
loadingComponent:
|
|
62
|
-
}),
|
|
61
|
+
loadingComponent: R
|
|
62
|
+
}), N = {
|
|
63
63
|
title: "Transaction",
|
|
64
64
|
receipt: {
|
|
65
65
|
title: "Receipt",
|
|
@@ -123,9 +123,9 @@ const S = /* @__PURE__ */ f({
|
|
|
123
123
|
fullSizePreview: "Full size preview"
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
+
}, z = {
|
|
127
|
+
transaction: N
|
|
126
128
|
}, k = {
|
|
127
|
-
transaction: z
|
|
128
|
-
}, T = {
|
|
129
129
|
title: "ธุรกรรม",
|
|
130
130
|
receipt: {
|
|
131
131
|
title: "ใบเสร็จ",
|
|
@@ -189,8 +189,8 @@ const S = /* @__PURE__ */ f({
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
}, A = {
|
|
192
|
-
transaction:
|
|
193
|
-
},
|
|
192
|
+
transaction: k
|
|
193
|
+
}, T = {
|
|
194
194
|
title: "交易",
|
|
195
195
|
receipt: {
|
|
196
196
|
title: "收据",
|
|
@@ -254,8 +254,8 @@ const S = /* @__PURE__ */ f({
|
|
|
254
254
|
fullSizePreview: "全屏预览"
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
},
|
|
258
|
-
transaction:
|
|
257
|
+
}, M = {
|
|
258
|
+
transaction: T
|
|
259
259
|
}, B = {
|
|
260
260
|
title: "交易",
|
|
261
261
|
receipt: {
|
|
@@ -322,25 +322,14 @@ const S = /* @__PURE__ */ f({
|
|
|
322
322
|
}
|
|
323
323
|
}, O = {
|
|
324
324
|
transaction: B
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
redirect: { name: p }
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
path: "/receipt",
|
|
332
|
-
name: p,
|
|
333
|
-
component: u(() => import("./Receipt-CbB43FcI.js").then((e) => e.R))
|
|
334
|
-
}
|
|
335
|
-
], U = {
|
|
336
|
-
"en-US": k,
|
|
337
|
-
"zh-CN": $,
|
|
325
|
+
}, H = {
|
|
326
|
+
"en-US": z,
|
|
327
|
+
"zh-CN": M,
|
|
338
328
|
"th-TH": A,
|
|
339
329
|
"zh-Hant": O
|
|
340
|
-
},
|
|
330
|
+
}, L = C(() => import("./App-C2eFOWps.js").then((e) => e.A));
|
|
341
331
|
export {
|
|
342
|
-
|
|
332
|
+
L as F,
|
|
343
333
|
S as _,
|
|
344
|
-
|
|
345
|
-
L as r
|
|
334
|
+
H as i
|
|
346
335
|
};
|
package/dist/app.js
CHANGED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { FdoBillCustomerRef, FdoBillItemTax, FdoDinero, FdoPosUserRef, FdoStockChange } from "@feedmepos/core-dart";
|
|
2
|
+
/** what kind of product status */
|
|
3
|
+
export declare enum F_BILL_ITEM_STATUS {
|
|
4
|
+
draft = "DRAFT",
|
|
5
|
+
sent = "SENT",
|
|
6
|
+
refunded = "REFUNDED",
|
|
7
|
+
voided = "VOIDED"
|
|
8
|
+
}
|
|
9
|
+
/** who created bill item */
|
|
10
|
+
export declare enum BillItemCreatedByType {
|
|
11
|
+
employee = "EMPLOYEE",
|
|
12
|
+
customer = "CUSTOMER"
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
/** Item price adjustment */
|
|
16
|
+
interface IFdoItemAdjustment {
|
|
17
|
+
/** will update base price instead of final price */
|
|
18
|
+
excludeAddonPrice?: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface IFdoKitchenStation {
|
|
21
|
+
startAt?: string;
|
|
22
|
+
finishAt?: string;
|
|
23
|
+
completedAt?: string;
|
|
24
|
+
}
|
|
25
|
+
interface IFdoBillSubItemRef {
|
|
26
|
+
/**
|
|
27
|
+
* if the sub item linked to product, copy the id here.
|
|
28
|
+
* <br> used for printing, saperate the sub item from main item.
|
|
29
|
+
* <br> if null, the sub item will be attach to bill item
|
|
30
|
+
*/
|
|
31
|
+
productId?: string;
|
|
32
|
+
product?: IFdoBillItemRef;
|
|
33
|
+
/** If the selection is dynamic addon */
|
|
34
|
+
/** @mockType {commerce.color} */
|
|
35
|
+
dynamic?: Record<string, any>;
|
|
36
|
+
/** if the linked product have variant */
|
|
37
|
+
variantSelected?: IFdoBillItemVariantSelected;
|
|
38
|
+
price?: FdoDinero;
|
|
39
|
+
name: string;
|
|
40
|
+
name2?: string;
|
|
41
|
+
/**
|
|
42
|
+
* how to refer back on addon selection dialog
|
|
43
|
+
* <br> syntax: '{addonGroupId}/{addonId}'
|
|
44
|
+
* <br> in case of custom addon, the selection will be null or custom-group
|
|
45
|
+
*/
|
|
46
|
+
selection: string;
|
|
47
|
+
quantity: number;
|
|
48
|
+
kitchenStation?: {
|
|
49
|
+
[stationName: string]: IFdoKitchenStation;
|
|
50
|
+
};
|
|
51
|
+
servedAt?: string;
|
|
52
|
+
/** v4, addon addon */
|
|
53
|
+
/** @mockType {commerce.color} */
|
|
54
|
+
subItems: IFdoBillSubItemRef[];
|
|
55
|
+
}
|
|
56
|
+
interface IFdoBillItemVariantSelected {
|
|
57
|
+
/** Name of the selected, position is sensitive, for reprint and report recombine */
|
|
58
|
+
name: string[];
|
|
59
|
+
/** For backtrack and report */
|
|
60
|
+
combinationKey: string;
|
|
61
|
+
}
|
|
62
|
+
interface IFdoBillItemTaxRef {
|
|
63
|
+
systemCode: string;
|
|
64
|
+
taxCode: string;
|
|
65
|
+
inclusive?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface IFdoBillItemRef {
|
|
68
|
+
code: string;
|
|
69
|
+
unit?: string;
|
|
70
|
+
perXUnit?: number | string;
|
|
71
|
+
/** origin price */
|
|
72
|
+
price: FdoDinero;
|
|
73
|
+
/** Added 13/07/2022: for future original price reference use */
|
|
74
|
+
originalPrice?: FdoDinero;
|
|
75
|
+
/** The name for display */
|
|
76
|
+
name: string;
|
|
77
|
+
/** The internal name for printing */
|
|
78
|
+
name2?: string;
|
|
79
|
+
/** Added 13/04/2020: can compute takeaway price */
|
|
80
|
+
takeawayPrice?: FdoDinero;
|
|
81
|
+
/** Added 30/11/2020: used by advance selector */
|
|
82
|
+
takeawayId?: string;
|
|
83
|
+
/** Added 30/11/2020: used by printer */
|
|
84
|
+
takeawayName?: string;
|
|
85
|
+
/** Added 03/12/2020: for report use */
|
|
86
|
+
categoryName?: string;
|
|
87
|
+
taxes?: IFdoBillItemTaxRef[];
|
|
88
|
+
/** Added 13/07/2022: for open price validation use */
|
|
89
|
+
openPrice?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
@deprecated 23/11/2020 (4.0): replace by taxes
|
|
92
|
+
*/
|
|
93
|
+
noSst?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
@deprecated 7/04/2020: no needed
|
|
96
|
+
*/
|
|
97
|
+
cost?: FdoDinero;
|
|
98
|
+
/**
|
|
99
|
+
@deprecated 05/11/2020: replaced by catalog
|
|
100
|
+
*/
|
|
101
|
+
deliveryPrice?: FdoDinero;
|
|
102
|
+
}
|
|
103
|
+
interface IFdoBillItemIs {
|
|
104
|
+
takeaway: boolean;
|
|
105
|
+
/**
|
|
106
|
+
@deprecated 26/04/2020: causing ambigious
|
|
107
|
+
*/
|
|
108
|
+
delivery?: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface IFdoBillItem {
|
|
111
|
+
parent?: IFdoBillItem;
|
|
112
|
+
/** which product being ordered, null if custom product */
|
|
113
|
+
productId?: string;
|
|
114
|
+
/** a copy of product for bill calculation and display */
|
|
115
|
+
product: IFdoBillItemRef;
|
|
116
|
+
subItems: IFdoBillSubItemRef[];
|
|
117
|
+
status: F_BILL_ITEM_STATUS;
|
|
118
|
+
/** from seat identification */
|
|
119
|
+
is: IFdoBillItemIs;
|
|
120
|
+
/** if the product have variant */
|
|
121
|
+
variantSelected?: IFdoBillItemVariantSelected;
|
|
122
|
+
/** only exist if product is unit */
|
|
123
|
+
unitQuantity?: number;
|
|
124
|
+
/** normal product quantity */
|
|
125
|
+
quantity: number;
|
|
126
|
+
/** remark to attach */
|
|
127
|
+
remark?: string;
|
|
128
|
+
/** link to billItem in bill refundedFrom */
|
|
129
|
+
refundedFrom?: string;
|
|
130
|
+
/** link to user */
|
|
131
|
+
refundBy?: FdoPosUserRef;
|
|
132
|
+
/** link to user */
|
|
133
|
+
refundApprovedBy?: FdoPosUserRef;
|
|
134
|
+
voidAt?: string;
|
|
135
|
+
/** link to user */
|
|
136
|
+
voidBy?: FdoPosUserRef;
|
|
137
|
+
voidReason?: string;
|
|
138
|
+
/** link to user */
|
|
139
|
+
voidApprovedBy?: FdoPosUserRef;
|
|
140
|
+
/** link to user */
|
|
141
|
+
createdBy?: FdoPosUserRef;
|
|
142
|
+
sentAt?: string;
|
|
143
|
+
/** link to user */
|
|
144
|
+
sentBy?: FdoPosUserRef;
|
|
145
|
+
servedAt?: string;
|
|
146
|
+
printReceiptAt?: string;
|
|
147
|
+
printBy?: IFdoPrintBy[];
|
|
148
|
+
kitchenStation?: {
|
|
149
|
+
[stationName: string]: IFdoKitchenStation;
|
|
150
|
+
};
|
|
151
|
+
customer?: FdoBillCustomerRef;
|
|
152
|
+
/** @mockType {commerce.color} */
|
|
153
|
+
adjustments: {
|
|
154
|
+
[created: string]: IFdoItemAdjustment;
|
|
155
|
+
};
|
|
156
|
+
/** timestamp when product deleted */
|
|
157
|
+
deletedAt?: string;
|
|
158
|
+
/** computed field, the taxes needed to calculate this item */
|
|
159
|
+
/** @mockType {commerce.color} */
|
|
160
|
+
taxes: {
|
|
161
|
+
[created: string]: FdoBillItemTax;
|
|
162
|
+
};
|
|
163
|
+
/** gross price + adjustment */
|
|
164
|
+
nettTotal: FdoDinero;
|
|
165
|
+
stockChange?: FdoStockChange;
|
|
166
|
+
/**
|
|
167
|
+
@deprecated 30/12/2020: cause confusion when discount before/after addon, shouldn't presist on database, change to pure function
|
|
168
|
+
*/
|
|
169
|
+
baseTotal?: FdoDinero;
|
|
170
|
+
/**
|
|
171
|
+
@deprecated 05/12/2019: internal used only
|
|
172
|
+
*/
|
|
173
|
+
addonTotal?: FdoDinero;
|
|
174
|
+
/**
|
|
175
|
+
@deprecated 05/12/2019: internal used only
|
|
176
|
+
*/
|
|
177
|
+
grossTotal?: FdoDinero;
|
|
178
|
+
/**
|
|
179
|
+
@deprecated 05/12/2019: internal used only
|
|
180
|
+
*/
|
|
181
|
+
adjustmentTotal?: FdoDinero;
|
|
182
|
+
}
|
|
183
|
+
interface IFdoPrintBy {
|
|
184
|
+
user: FdoPosUserRef;
|
|
185
|
+
printAt: string;
|
|
186
|
+
}
|
|
187
|
+
}
|