meemup-library 1.3.68 → 1.3.71
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.d.ts +3 -1
- package/dist/controllers/PhoneController.js +22 -11
- package/dist/interfaces/pos/IPointOfSaleOrder.d.ts +2 -2
- package/dist/interfaces/pos/{IPointOfSaleOrderPayment.d.ts → IPointOfSaleOrderTransaction.d.ts} +2 -1
- package/dist/interfaces/pos/IPointOfSaleRefundForm.d.ts +2 -2
- package/dist/interfaces/pos/IPointOfSaleSaveOrder.d.ts +2 -2
- package/dist/interfaces/print/IOrderDetails.d.ts +2 -2
- package/package.json +2 -2
- /package/dist/interfaces/pos/{IPointOfSaleOrderPayment.js → IPointOfSaleOrderTransaction.js} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
unFormatPhoneNumber(phone?: string | null): string;
|
|
3
3
|
formatPhoneNumber(phone?: string): string;
|
|
4
|
-
toDisplay(phone?: string): string;
|
|
5
4
|
formatAccordingToLength(phone?: string): string;
|
|
5
|
+
toDisplay(phone?: string, init?: string): string;
|
|
6
|
+
toSave(phone?: string | null): string;
|
|
7
|
+
toForm(phone?: string | null): string;
|
|
6
8
|
};
|
|
7
9
|
export default _default;
|
|
@@ -20,17 +20,6 @@ export default new class {
|
|
|
20
20
|
let p3 = unformat.slice(len - 4, len);
|
|
21
21
|
return `+${p0} (${p1}) ${p2}-${p3}`;
|
|
22
22
|
}
|
|
23
|
-
toDisplay(phone = "0000000000") {
|
|
24
|
-
let unformat = this.unFormatPhoneNumber(phone);
|
|
25
|
-
if (unformat.length === 10)
|
|
26
|
-
unformat = "1" + unformat;
|
|
27
|
-
const len = unformat.length;
|
|
28
|
-
// let p0 = unformat.slice(0, len - len - 10);
|
|
29
|
-
let p1 = unformat.slice(len - 10, len - 7);
|
|
30
|
-
let p2 = unformat.slice(len - 7, len - 4);
|
|
31
|
-
let p3 = unformat.slice(len - 4, len);
|
|
32
|
-
return `(${p1}) ${p2}-${p3}`;
|
|
33
|
-
}
|
|
34
23
|
formatAccordingToLength(phone = "0000000000") {
|
|
35
24
|
let unFormat = this.unFormatPhoneNumber(phone);
|
|
36
25
|
if (unFormat.length < 4)
|
|
@@ -44,4 +33,26 @@ export default new class {
|
|
|
44
33
|
// let p3 = unFormat.slice(len - 4, len);
|
|
45
34
|
// return `(${p1}) ${p2}-${p3}`;
|
|
46
35
|
}
|
|
36
|
+
toDisplay(phone = "0000000000", init = "") {
|
|
37
|
+
let unformat = this.unFormatPhoneNumber(phone);
|
|
38
|
+
if (isNaN(+unformat))
|
|
39
|
+
return init;
|
|
40
|
+
if (unformat.length === 10)
|
|
41
|
+
unformat = "1" + unformat;
|
|
42
|
+
const len = unformat.length;
|
|
43
|
+
// let p0 = unformat.slice(0, len - len - 10);
|
|
44
|
+
let p1 = unformat.slice(len - 10, len - 7);
|
|
45
|
+
let p2 = unformat.slice(len - 7, len - 4);
|
|
46
|
+
let p3 = unformat.slice(len - 4, len);
|
|
47
|
+
return `(${p1}) ${p2}-${p3}`;
|
|
48
|
+
}
|
|
49
|
+
toSave(phone = "(000) 000-0000") {
|
|
50
|
+
let str = this.unFormatPhoneNumber(phone ? phone : "");
|
|
51
|
+
if (str === "")
|
|
52
|
+
return str;
|
|
53
|
+
return str;
|
|
54
|
+
}
|
|
55
|
+
toForm(phone = "(000) 000-0000") {
|
|
56
|
+
return this.unFormatPhoneNumber(phone ? phone : "");
|
|
57
|
+
}
|
|
47
58
|
}();
|
|
@@ -9,7 +9,7 @@ import EnumPaymentState from "../../enums/EnumPaymentState";
|
|
|
9
9
|
import ICalculateFeeResult from "../ICalculateFeeResult";
|
|
10
10
|
import IOrderDetails from "../print/IOrderDetails";
|
|
11
11
|
import EnumPickupInstruction from "../../enums/EnumPickupInstruction";
|
|
12
|
-
import
|
|
12
|
+
import IPointOfSaleOrderTransaction from "./IPointOfSaleOrderTransaction";
|
|
13
13
|
import IPointOfSaleElavonTerminalDevice from "./IPointOfSaleElavonTerminalDevice";
|
|
14
14
|
interface IPointOfSaleOrder {
|
|
15
15
|
id: number;
|
|
@@ -83,7 +83,7 @@ interface IPointOfSaleOrder {
|
|
|
83
83
|
openOrder: boolean;
|
|
84
84
|
draftOrder: boolean;
|
|
85
85
|
points: number;
|
|
86
|
-
paymentTransactions:
|
|
86
|
+
paymentTransactions: IPointOfSaleOrderTransaction[];
|
|
87
87
|
elavonDevice: IPointOfSaleElavonTerminalDevice;
|
|
88
88
|
elavonTransaction: object | null;
|
|
89
89
|
}
|
package/dist/interfaces/pos/{IPointOfSaleOrderPayment.d.ts → IPointOfSaleOrderTransaction.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import EnumPaymentType from "../../enums/EnumPaymentType";
|
|
2
|
-
export default interface
|
|
2
|
+
export default interface IPointOfSaleOrderTransaction {
|
|
3
3
|
id: number;
|
|
4
4
|
dateTime: string;
|
|
5
5
|
paymentType: EnumPaymentType;
|
|
@@ -13,4 +13,5 @@ export default interface IPointOfSaleOrderPayment {
|
|
|
13
13
|
data: object | null;
|
|
14
14
|
oldId?: number;
|
|
15
15
|
refundAmount?: number;
|
|
16
|
+
lastFourDigits: string;
|
|
16
17
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import IPointOfSaleOrderTransaction from "./IPointOfSaleOrderTransaction";
|
|
2
2
|
import IPointOfSaleRefundFormItem from "./IPointOfSaleRefundFormItem";
|
|
3
3
|
export default interface IPointOfSaleRefundForm {
|
|
4
4
|
tip: number;
|
|
5
5
|
items: IPointOfSaleRefundFormItem[];
|
|
6
6
|
moneyToBeReturned: number;
|
|
7
|
-
paymentTransactions:
|
|
7
|
+
paymentTransactions: IPointOfSaleOrderTransaction[];
|
|
8
8
|
}
|
|
9
9
|
export declare const initPointOfSaleRefundForm: IPointOfSaleRefundForm;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ICalculateFeeResult from "../ICalculateFeeResult";
|
|
2
2
|
import ITextValue from "../ITextValue";
|
|
3
|
-
import
|
|
3
|
+
import IPointOfSaleOrderTransaction from "./IPointOfSaleOrderTransaction";
|
|
4
4
|
import IPointOfSaleSaveOrderCustomer from "./IPointOfSaleSaveOrderCustomer";
|
|
5
5
|
import IPointOfSaleSaveOrderDiscount from "./IPointOfSaleSaveOrderDiscount";
|
|
6
6
|
import IPointOfSaleSaveOrderProduct from "./IPointOfSaleSaveOrderProduct";
|
|
@@ -45,6 +45,6 @@ export default interface IPointOfSaleSaveOrder {
|
|
|
45
45
|
openOrder: boolean;
|
|
46
46
|
draftOrder: boolean;
|
|
47
47
|
points: number;
|
|
48
|
-
paymentTransactions:
|
|
48
|
+
paymentTransactions: IPointOfSaleOrderTransaction[] | null;
|
|
49
49
|
paymentMetaData: ITextValue[];
|
|
50
50
|
}
|
|
@@ -8,7 +8,7 @@ import IOrderDetailPaymentInfo from "./IOrderDetailPaymentInfo";
|
|
|
8
8
|
import IModifiedDetails from "./IModifiedDetails";
|
|
9
9
|
import IOrderDetailTimeLine from "./IOrderDetailTimeLine";
|
|
10
10
|
import IOrderDetailThirdPartyDriver from "./IOrderDetailThirdPartyDriver";
|
|
11
|
-
import
|
|
11
|
+
import IPointOfSaleOrderTransaction from "../pos/IPointOfSaleOrderTransaction";
|
|
12
12
|
interface IOrderDetails {
|
|
13
13
|
order: IOrderDetailOrder;
|
|
14
14
|
customer: IOrderDetailCustomer;
|
|
@@ -24,7 +24,7 @@ interface IOrderDetails {
|
|
|
24
24
|
timeline: IOrderDetailTimeLine[];
|
|
25
25
|
deliveryTrackingUrl: string;
|
|
26
26
|
thirdPartyDriver: IOrderDetailThirdPartyDriver | null;
|
|
27
|
-
paymentTransactions:
|
|
27
|
+
paymentTransactions: IPointOfSaleOrderTransaction[];
|
|
28
28
|
}
|
|
29
29
|
export default IOrderDetails;
|
|
30
30
|
export declare const initOrderDetails: IOrderDetails;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.71",
|
|
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.3.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.3.71 \" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|
/package/dist/interfaces/pos/{IPointOfSaleOrderPayment.js → IPointOfSaleOrderTransaction.js}
RENAMED
|
File without changes
|