meemup-library 1.0.87 → 1.0.90
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.
|
@@ -10,14 +10,15 @@ export default new class {
|
|
|
10
10
|
return phone;
|
|
11
11
|
}
|
|
12
12
|
formatPhoneNumber(phone = "0000000000") {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
let
|
|
19
|
-
let
|
|
20
|
-
|
|
13
|
+
let unformat = this.unFormatPhoneNumber(phone);
|
|
14
|
+
if (unformat.length === 10)
|
|
15
|
+
unformat = "1" + unformat;
|
|
16
|
+
const len = unformat.length;
|
|
17
|
+
let p0 = unformat.slice(0, len - len - 10);
|
|
18
|
+
let p1 = unformat.slice(len - 10, len - 7);
|
|
19
|
+
let p2 = unformat.slice(len - 7, len - 4);
|
|
20
|
+
let p3 = unformat.slice(len - 4, len);
|
|
21
|
+
return `+${p0} (${p1}) ${p2}-${p3}`;
|
|
21
22
|
}
|
|
22
23
|
formatAccordingToLength(phone = "0000000000") {
|
|
23
24
|
let unFormat = this.unFormatPhoneNumber(phone);
|
|
@@ -3,13 +3,13 @@ import ICategory from "./ICategory";
|
|
|
3
3
|
import IExtra from "./IExtra";
|
|
4
4
|
import ISetting from "./ISetting";
|
|
5
5
|
import IGeneralInformation from "./IGeneralInformation";
|
|
6
|
-
import ICustomer from "./ICustomer";
|
|
7
6
|
import ITextValue from "./ITextValue";
|
|
8
7
|
import ICheckoutOption from "./ICheckoutOption";
|
|
9
8
|
import IGeneralItems from "./IGeneralItems";
|
|
10
9
|
import IPrintTemplate from "./IPrintTemplate";
|
|
11
10
|
import IOrderState from "./IOrderState";
|
|
12
11
|
import IStarMicronicPrinter from "./IStarMicronicPrinter";
|
|
12
|
+
import IBaseCustomer from "./IBaseCustomer";
|
|
13
13
|
interface IApiShop {
|
|
14
14
|
ok: boolean;
|
|
15
15
|
products: IProduct[];
|
|
@@ -17,7 +17,7 @@ interface IApiShop {
|
|
|
17
17
|
extras: IExtra[];
|
|
18
18
|
setting: ISetting;
|
|
19
19
|
generalInformation: IGeneralInformation;
|
|
20
|
-
customers:
|
|
20
|
+
customers: IBaseCustomer[];
|
|
21
21
|
printTemplates: IPrintTemplate[];
|
|
22
22
|
terminals: ITextValue[];
|
|
23
23
|
checkoutOption: ICheckoutOption;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import IBaseCustomer from "./IBaseCustomer";
|
|
2
|
+
interface ICustomer extends IBaseCustomer {
|
|
2
3
|
points: number;
|
|
3
|
-
fullName: string;
|
|
4
|
-
id: number;
|
|
5
4
|
genderType: number;
|
|
6
|
-
firstName: string;
|
|
7
|
-
lastName: string;
|
|
8
|
-
email: string;
|
|
9
|
-
phoneNumber: string;
|
|
10
5
|
walletBalance: number;
|
|
11
6
|
}
|
|
12
7
|
export default ICustomer;
|