meemup-library 1.5.5 → 1.5.7
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/controllers/CustomerFacingDisplayPacketController.js +26 -13
- package/dist/enums/EnumPointOfSaleSettingFeature.d.ts +4 -1
- package/dist/enums/EnumPointOfSaleSettingFeature.js +3 -0
- package/dist/interfaces/pos/IPointOfSaleCustomOrderItem.d.ts +13 -0
- package/dist/interfaces/pos/IPointOfSaleCustomOrderItem.js +11 -0
- package/dist/interfaces/pos/IPointOfSaleOrder.d.ts +2 -2
- package/dist/types/TPointOfSaleOrderProduct.d.ts +4 -0
- package/dist/types/TPointOfSaleOrderProduct.js +1 -0
- package/package.json +3 -3
|
@@ -5,20 +5,33 @@ export default new class CustomerFacingDisplayPacketController {
|
|
|
5
5
|
let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: udpClientName, c: currencySymbol, d: [] });
|
|
6
6
|
order.products.forEach(product => {
|
|
7
7
|
let extPro = [];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
let pro;
|
|
9
|
+
if (product.hasOwnProperty('extras')) {
|
|
10
|
+
const _product = product;
|
|
11
|
+
_product.extras.forEach(ext => {
|
|
12
|
+
extPro.push({
|
|
13
|
+
q: ext.quantity,
|
|
14
|
+
s: ext.pizzaSide,
|
|
15
|
+
t: ext.text,
|
|
16
|
+
p: MoneyController.round(ext.totalAmount)
|
|
17
|
+
});
|
|
14
18
|
});
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
pro = {
|
|
20
|
+
q: _product.quantity,
|
|
21
|
+
t: _product.title,
|
|
22
|
+
p: MoneyController.round(_product.totalAmount),
|
|
23
|
+
e: extPro
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
const _product = product;
|
|
28
|
+
pro = {
|
|
29
|
+
q: _product.quantity,
|
|
30
|
+
t: _product.text,
|
|
31
|
+
p: MoneyController.round(_product.quantity * (_product.price - _product.discount)),
|
|
32
|
+
e: extPro
|
|
33
|
+
};
|
|
34
|
+
}
|
|
22
35
|
packet.d.push(pro);
|
|
23
36
|
});
|
|
24
37
|
packet.dd = MoneyController.round(order.displayDiscount);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
declare enum EnumPointOfSaleSettingFeature {
|
|
2
2
|
SplitPayment = 1,
|
|
3
3
|
SplitOrder = 2,
|
|
4
|
-
DebetAtPayMethodOptions = 3
|
|
4
|
+
DebetAtPayMethodOptions = 3,
|
|
5
|
+
OpenOrderItem = 4,
|
|
6
|
+
ModifyOrderPaymentMetadata = 5,
|
|
7
|
+
ModifyOrderTipAmount = 6
|
|
5
8
|
}
|
|
6
9
|
export default EnumPointOfSaleSettingFeature;
|
|
@@ -3,5 +3,8 @@ var EnumPointOfSaleSettingFeature;
|
|
|
3
3
|
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["SplitPayment"] = 1] = "SplitPayment";
|
|
4
4
|
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["SplitOrder"] = 2] = "SplitOrder";
|
|
5
5
|
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["DebetAtPayMethodOptions"] = 3] = "DebetAtPayMethodOptions";
|
|
6
|
+
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["OpenOrderItem"] = 4] = "OpenOrderItem";
|
|
7
|
+
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["ModifyOrderPaymentMetadata"] = 5] = "ModifyOrderPaymentMetadata";
|
|
8
|
+
EnumPointOfSaleSettingFeature[EnumPointOfSaleSettingFeature["ModifyOrderTipAmount"] = 6] = "ModifyOrderTipAmount";
|
|
6
9
|
})(EnumPointOfSaleSettingFeature || (EnumPointOfSaleSettingFeature = {}));
|
|
7
10
|
export default EnumPointOfSaleSettingFeature;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface IPointOfSaleCustomOrderItem {
|
|
2
|
+
id: number | null;
|
|
3
|
+
productId: number | null;
|
|
4
|
+
text: string;
|
|
5
|
+
quantity: number;
|
|
6
|
+
price: number;
|
|
7
|
+
note: string;
|
|
8
|
+
taxable: boolean | null;
|
|
9
|
+
discount: number;
|
|
10
|
+
tags: string[] | null;
|
|
11
|
+
}
|
|
12
|
+
export declare const initPointOfSaleCustomOrderItem: IPointOfSaleCustomOrderItem;
|
|
13
|
+
export default IPointOfSaleCustomOrderItem;
|
|
@@ -2,7 +2,6 @@ import EnumDiscountType from "../../enums/EnumDiscountType";
|
|
|
2
2
|
import EnumGender from "../../enums/EnumGender";
|
|
3
3
|
import EnumOrderType from "../../enums/EnumOrderType";
|
|
4
4
|
import EnumTipType from "../../enums/EnumTipType";
|
|
5
|
-
import IPointOfSaleOrderItem from "./IPointOfSaleOrderItem";
|
|
6
5
|
import EnumPaymentType from "../../enums/EnumPaymentType";
|
|
7
6
|
import TOrderPayStatus from "../../types/TOrderPayStatus";
|
|
8
7
|
import EnumPaymentState from "../../enums/EnumPaymentState";
|
|
@@ -12,6 +11,7 @@ import EnumPickupInstruction from "../../enums/EnumPickupInstruction";
|
|
|
12
11
|
import IPointOfSaleOrderTransaction from "./IPointOfSaleOrderTransaction";
|
|
13
12
|
import IPointOfSaleElavonTerminalDevice from "./IPointOfSaleElavonTerminalDevice";
|
|
14
13
|
import EnumChannels from "../../enums/EnumChannels";
|
|
14
|
+
import TPointOfSaleOrderProduct from "../../types/TPointOfSaleOrderProduct";
|
|
15
15
|
interface IPointOfSaleOrder {
|
|
16
16
|
id: number;
|
|
17
17
|
number: number;
|
|
@@ -43,7 +43,7 @@ interface IPointOfSaleOrder {
|
|
|
43
43
|
tableNo: string;
|
|
44
44
|
tableId: number | null;
|
|
45
45
|
seat: number;
|
|
46
|
-
products:
|
|
46
|
+
products: TPointOfSaleOrderProduct[];
|
|
47
47
|
tipType: EnumTipType;
|
|
48
48
|
tip: number;
|
|
49
49
|
onlineStoreTip: number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import IPointOfSaleOrderItem from "../interfaces/pos/IPointOfSaleOrderItem";
|
|
2
|
+
import IPointOfSaleCustomOrderItem from "../interfaces/pos/IPointOfSaleCustomOrderItem";
|
|
3
|
+
type TPointOfSaleOrderProduct = IPointOfSaleOrderItem | IPointOfSaleCustomOrderItem;
|
|
4
|
+
export default TPointOfSaleOrderProduct;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"remove:one": "rimraf dist",
|
|
12
12
|
"remove:two": "rimraf ./src/dist",
|
|
13
13
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
14
|
-
"commit": "git add . && git commit -m \"version.1.5.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.5.7\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"moment": "^2.30.1"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
}
|