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.
@@ -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
- product.extras.forEach(ext => {
9
- extPro.push({
10
- q: ext.quantity,
11
- s: ext.pizzaSide,
12
- t: ext.text,
13
- p: MoneyController.round(ext.totalAmount)
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
- let pro = {
17
- q: product.quantity,
18
- t: product.title,
19
- p: MoneyController.round(product.totalAmount),
20
- e: extPro
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;
@@ -14,6 +14,7 @@ declare enum EnumStaffPermitSection {
14
14
  storeEndDay = 13,
15
15
  terminalEndDay = 14,
16
16
  logs = 15,
17
- thirdPartyDailySaleStatistic = 16
17
+ thirdPartyDailySaleStatistic = 16,
18
+ emergencyBrake = 17
18
19
  }
19
20
  export default EnumStaffPermitSection;
@@ -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;
@@ -0,0 +1,11 @@
1
+ export const initPointOfSaleCustomOrderItem = {
2
+ id: null,
3
+ productId: null,
4
+ text: "",
5
+ note: "",
6
+ quantity: 1,
7
+ price: 0,
8
+ discount: 0,
9
+ taxable: true,
10
+ tags: []
11
+ };
@@ -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.4",
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.4\" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.5.6\" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"