meemup-library 1.7.0 → 1.7.2
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.
|
@@ -38,5 +38,6 @@ declare class TagToolController {
|
|
|
38
38
|
allTagsWithoutSeatsAndSharingType(tags: string[] | null | undefined): string[];
|
|
39
39
|
allTagsWithoutBundles(tags: string[] | null | undefined): string[];
|
|
40
40
|
createSeatLabel(num: number): string;
|
|
41
|
+
createDiscountTag(discount: number, currency: string): string;
|
|
41
42
|
}
|
|
42
43
|
export default TagToolController;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EnumPointOfSaleOrderItemSharingType from "../enums/EnumPointOfSaleOrderItemSharingType";
|
|
2
|
+
import MoneyController from "./MoneyController";
|
|
2
3
|
class TagToolController {
|
|
3
4
|
constructor() {
|
|
4
5
|
}
|
|
@@ -158,11 +159,16 @@ class TagToolController {
|
|
|
158
159
|
return this.allTagsWithoutSeats(tags).filter(i => !i.startsWith(TagToolController.SharingTypeTagPreName));
|
|
159
160
|
}
|
|
160
161
|
allTagsWithoutBundles(tags) {
|
|
161
|
-
|
|
162
|
+
if (!Array.isArray(tags))
|
|
163
|
+
return [];
|
|
164
|
+
return tags.filter(i => !i.startsWith(TagToolController.BundleGroupPreName) && !i.startsWith(TagToolController.BundleIdPreName) && !i.startsWith(TagToolController.BundleProductQuantityPreName) && !i.startsWith(TagToolController.BundleFeeKey));
|
|
162
165
|
}
|
|
163
166
|
createSeatLabel(num) {
|
|
164
167
|
return `${TagToolController.SeatTagPreName}${num}`;
|
|
165
168
|
}
|
|
169
|
+
createDiscountTag(discount, currency) {
|
|
170
|
+
return `Discount ${MoneyController.format(discount, currency)}`;
|
|
171
|
+
}
|
|
166
172
|
}
|
|
167
173
|
TagToolController.SeatTagPreName = 'Seat #';
|
|
168
174
|
TagToolController.SharingTypeTagPreName = 'SharingType #';
|
|
@@ -12,6 +12,7 @@ var EnumPaymentType;
|
|
|
12
12
|
EnumPaymentType[EnumPaymentType["TapToPay"] = 9] = "TapToPay";
|
|
13
13
|
EnumPaymentType[EnumPaymentType["DebitMachine"] = 10] = "DebitMachine";
|
|
14
14
|
EnumPaymentType[EnumPaymentType["MultipleMethods"] = 11] = "MultipleMethods";
|
|
15
|
+
EnumPaymentType[EnumPaymentType["PoyntTerminal"] = 12] = "PoyntTerminal";
|
|
15
16
|
})(EnumPaymentType || (EnumPaymentType = {}));
|
|
16
17
|
export default EnumPaymentType;
|
|
17
18
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "meemup-library",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
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.7.
|
|
14
|
+
"commit": "git add . && git commit -m \"version.1.7.2\" && git push origin "
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"/dist"
|