meemup-library 1.0.86 → 1.0.89
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/PhoneController.js +9 -8
- package/dist/interfaces/IBaseCustomer.d.ts +8 -0
- package/dist/interfaces/IBaseCustomer.js +1 -0
- package/dist/interfaces/ICustomer.d.ts +2 -7
- package/dist/types/TActionStatus.d.ts +2 -0
- package/dist/types/TActionStatus.js +1 -0
- package/package.json +1 -1
|
@@ -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);
|
|
@@ -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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|