meemup-library 1.5.4 → 1.5.6
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/enums/EnumStaffPermitSection.d.ts +2 -1
- package/dist/enums/EnumStaffPermitSection.js +1 -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 -1
- package/package.json +2 -2
|
@@ -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;
|
|
@@ -16,5 +16,6 @@ var EnumStaffPermitSection;
|
|
|
16
16
|
EnumStaffPermitSection[EnumStaffPermitSection["terminalEndDay"] = 14] = "terminalEndDay";
|
|
17
17
|
EnumStaffPermitSection[EnumStaffPermitSection["logs"] = 15] = "logs";
|
|
18
18
|
EnumStaffPermitSection[EnumStaffPermitSection["thirdPartyDailySaleStatistic"] = 16] = "thirdPartyDailySaleStatistic";
|
|
19
|
+
EnumStaffPermitSection[EnumStaffPermitSection["emergencyBrake"] = 17] = "emergencyBrake";
|
|
19
20
|
})(EnumStaffPermitSection || (EnumStaffPermitSection = {}));
|
|
20
21
|
export default EnumStaffPermitSection;
|
|
@@ -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;
|
|
@@ -12,6 +12,7 @@ import EnumPickupInstruction from "../../enums/EnumPickupInstruction";
|
|
|
12
12
|
import IPointOfSaleOrderTransaction from "./IPointOfSaleOrderTransaction";
|
|
13
13
|
import IPointOfSaleElavonTerminalDevice from "./IPointOfSaleElavonTerminalDevice";
|
|
14
14
|
import EnumChannels from "../../enums/EnumChannels";
|
|
15
|
+
import IPointOfSaleCustomOrderItem from "./IPointOfSaleCustomOrderItem";
|
|
15
16
|
interface IPointOfSaleOrder {
|
|
16
17
|
id: number;
|
|
17
18
|
number: number;
|
|
@@ -43,7 +44,7 @@ interface IPointOfSaleOrder {
|
|
|
43
44
|
tableNo: string;
|
|
44
45
|
tableId: number | null;
|
|
45
46
|
seat: number;
|
|
46
|
-
products: IPointOfSaleOrderItem[];
|
|
47
|
+
products: IPointOfSaleOrderItem[] | IPointOfSaleCustomOrderItem[];
|
|
47
48
|
tipType: EnumTipType;
|
|
48
49
|
tip: number;
|
|
49
50
|
onlineStoreTip: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.6",
|
|
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.6\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|