meemup-library 1.4.9 → 1.4.11

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.
@@ -1,9 +1,7 @@
1
- import IPointOfSaleLocalSetting from "../interfaces/pos/IPointOfSaleLocalSetting";
2
- import IPointOfSaleSetting from "../interfaces/pos/IPointOfSaleSetting";
3
1
  import ICustomerFacingDisplayPacket from "../interfaces/cfds/ICustomerFacingDisplayPacket";
4
2
  import IPointOfSaleOrder from "../interfaces/pos/IPointOfSaleOrder";
5
3
  declare const _default: {
6
- code(order: IPointOfSaleOrder, setting: IPointOfSaleSetting, localSetting: IPointOfSaleLocalSetting): ICustomerFacingDisplayPacket;
4
+ code(order: IPointOfSaleOrder, udpClientName: string, currencySymbol: string, taxTitle: string): ICustomerFacingDisplayPacket;
7
5
  decode(data: string): ICustomerFacingDisplayPacket;
8
6
  };
9
7
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { initCustomerFacingDisplayPacket } from "../interfaces/cfds/ICustomerFacingDisplayPacket";
2
2
  export default new class CustomerFacingDisplayPacketController {
3
- code(order, setting, localSetting) {
4
- let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: localSetting.udpClientName, c: setting.currencySymbol, d: [] });
3
+ code(order, udpClientName, currencySymbol, taxTitle) {
4
+ let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: udpClientName, c: currencySymbol, d: [] });
5
5
  order.products.forEach(product => {
6
6
  let extPro = [];
7
7
  product.extras.forEach(ext => {
@@ -25,7 +25,7 @@ export default new class CustomerFacingDisplayPacketController {
25
25
  packet.ot = order.orderType;
26
26
  packet.dc = order.deliveryCost;
27
27
  packet.ds = order.displaySubTotal;
28
- packet.tt = setting.taxTitle;
28
+ packet.tt = taxTitle;
29
29
  packet.dt = order.displayTax;
30
30
  packet.pt = order.paymentType;
31
31
  packet.ps = order.paymentState;
@@ -90,6 +90,7 @@ interface IPointOfSaleOrder {
90
90
  elavonTransaction: object | null;
91
91
  via: "Pos" | "Online store" | string;
92
92
  channel: EnumChannels;
93
+ forceRefresh: number;
93
94
  }
94
95
  export default IPointOfSaleOrder;
95
96
  export declare const initOrder: IPointOfSaleOrder;
@@ -95,4 +95,5 @@ export const initOrder = {
95
95
  elavonTransaction: null,
96
96
  via: "Pos",
97
97
  channel: EnumChannels.POS,
98
+ forceRefresh: -1,
98
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
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.4.9 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.11 \" && 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
+ }