meemup-library 1.4.31 → 1.4.33

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,4 +1,5 @@
1
1
  import { initCustomerFacingDisplayPacket } from "../interfaces/cfds/ICustomerFacingDisplayPacket";
2
+ import MoneyController from "./MoneyController";
2
3
  export default new class CustomerFacingDisplayPacketController {
3
4
  code(order, udpClientName, currencySymbol, taxTitle) {
4
5
  let packet = Object.assign(Object.assign({}, initCustomerFacingDisplayPacket), { r: udpClientName, c: currencySymbol, d: [] });
@@ -9,30 +10,30 @@ export default new class CustomerFacingDisplayPacketController {
9
10
  q: ext.quantity,
10
11
  s: ext.pizzaSide,
11
12
  t: ext.text,
12
- p: ext.totalAmount
13
+ p: MoneyController.round(ext.totalAmount)
13
14
  });
14
15
  });
15
16
  let pro = {
16
17
  q: product.quantity,
17
18
  t: product.title,
18
- p: product.totalAmount,
19
+ p: MoneyController.round(product.totalAmount),
19
20
  e: extPro
20
21
  };
21
22
  packet.d.push(pro);
22
23
  });
23
- packet.dd = order.displayDiscount;
24
+ packet.dd = MoneyController.round(order.displayDiscount);
24
25
  packet.re = order.remark;
25
26
  packet.ot = order.orderType;
26
- packet.dc = order.deliveryCost;
27
+ packet.dc = MoneyController.round(order.deliveryCost);
27
28
  packet.ds = order.displaySubTotal;
28
29
  packet.tt = taxTitle;
29
30
  packet.dt = order.displayTax;
30
31
  packet.pt = order.paymentType;
31
32
  packet.ps = order.paymentState;
32
33
  packet.rcp = order.roundCashPayments;
33
- packet.rca = order.displayRoundCashAmount;
34
+ packet.rca = MoneyController.round(order.displayRoundCashAmount);
34
35
  packet.fees = order.displayFees;
35
- packet.ta = order.displayTotalAmount;
36
+ packet.ta = MoneyController.round(order.displayTotalAmount);
36
37
  return packet;
37
38
  }
38
39
  decode(data) {
@@ -0,0 +1,8 @@
1
+ interface ICsutomerLoginAnswer {
2
+ token: string;
3
+ fullName: string;
4
+ userName: string;
5
+ customerToken: string;
6
+ }
7
+ export default ICsutomerLoginAnswer;
8
+ export declare const initCustomerLoginAnswer: ICsutomerLoginAnswer;
@@ -0,0 +1,6 @@
1
+ export const initCustomerLoginAnswer = {
2
+ token: '',
3
+ fullName: '',
4
+ userName: '',
5
+ customerToken: ''
6
+ };
@@ -0,0 +1,15 @@
1
+ import EnumGender from "../../enums/EnumGender";
2
+ interface ICsutomerProfile {
3
+ emailConfirmed: boolean;
4
+ fullName: string;
5
+ genderType: EnumGender.male;
6
+ firstName: string;
7
+ lastName: string;
8
+ email: string;
9
+ phoneNumber: string;
10
+ points: number;
11
+ walletBalance: number;
12
+ customerToken: string;
13
+ }
14
+ export default ICsutomerProfile;
15
+ export declare const initCustomerProfile: ICsutomerProfile;
@@ -0,0 +1,13 @@
1
+ import EnumGender from "../../enums/EnumGender";
2
+ export const initCustomerProfile = {
3
+ emailConfirmed: false,
4
+ fullName: "",
5
+ genderType: EnumGender.male,
6
+ firstName: "",
7
+ lastName: "",
8
+ customerToken: "",
9
+ email: "",
10
+ phoneNumber: "",
11
+ points: 0,
12
+ walletBalance: 0,
13
+ };
@@ -0,0 +1,8 @@
1
+ import ICsutomerProfile from "./ICsutomerProfile";
2
+ interface ICustomerAccount extends ICsutomerProfile {
3
+ token: string;
4
+ fullName: string;
5
+ userName: string;
6
+ }
7
+ export default ICustomerAccount;
8
+ export declare const initCustomerAccount: ICustomerAccount;
@@ -0,0 +1,2 @@
1
+ import { initCustomerProfile } from "./ICsutomerProfile";
2
+ export const initCustomerAccount = Object.assign(Object.assign({}, initCustomerProfile), { token: "", fullName: "", userName: "" });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meemup-library",
3
- "version": "1.4.31",
3
+ "version": "1.4.33",
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.31 \" && git push origin "
14
+ "commit": "git add . && git commit -m \"version.1.4.33 \" && git push origin "
15
15
  },
16
16
  "files": [
17
17
  "/dist"