turf-common 1.4.2-beta.6 → 1.4.2-beta.8

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/README.md CHANGED
@@ -1,20 +1,20 @@
1
- ## 1 npm init -y
2
-
3
- ## 2 npm login
4
-
5
- ## 3 npm version patch
6
-
7
- # //it increase version
8
-
9
- ## 3 npm publish --access public
10
-
11
- # //npm publish by default --access public
12
-
13
- ## 4 npm run version:deploy
14
-
15
- ### deploy version
16
-
17
- ## Client side
18
-
19
- update package command <br />
20
- npm update turf-comman
1
+ ## 1 npm init -y
2
+
3
+ ## 2 npm login
4
+
5
+ ## 3 npm version patch
6
+
7
+ # //it increase version
8
+
9
+ ## 3 npm publish --access public
10
+
11
+ # //npm publish by default --access public
12
+
13
+ ## 4 npm run version:deploy
14
+
15
+ ### deploy version
16
+
17
+ ## Client side
18
+
19
+ update package command <br />
20
+ npm update turf-comman
@@ -4,3 +4,6 @@ export declare enum ValidCouponType {
4
4
  PER_HOUR_UNIT = "per hour unit",
5
5
  PER_HOUR_PERCENTAGE = "per hour percentage"
6
6
  }
7
+ export declare namespace ValidCouponType {
8
+ function UILabel(value: ValidCouponType): string;
9
+ }
@@ -8,3 +8,21 @@ var ValidCouponType;
8
8
  ValidCouponType["PER_HOUR_UNIT"] = "per hour unit";
9
9
  ValidCouponType["PER_HOUR_PERCENTAGE"] = "per hour percentage";
10
10
  })(ValidCouponType || (exports.ValidCouponType = ValidCouponType = {}));
11
+ // Create namespace for the enum and add method UILabel to get the label of the enum value.
12
+ (function (ValidCouponType) {
13
+ function UILabel(value) {
14
+ switch (value) {
15
+ case ValidCouponType.PERCENTAGE:
16
+ return "Percentage";
17
+ case ValidCouponType.UNIT:
18
+ return "Price";
19
+ case ValidCouponType.PER_HOUR_UNIT:
20
+ return "Price Hour Unit";
21
+ case ValidCouponType.PER_HOUR_PERCENTAGE:
22
+ return "Per Hour Percentage";
23
+ default:
24
+ return "";
25
+ }
26
+ }
27
+ ValidCouponType.UILabel = UILabel;
28
+ })(ValidCouponType || (exports.ValidCouponType = ValidCouponType = {}));
@@ -157,7 +157,7 @@ var BookingCode = /** @class */ (function () {
157
157
  discount = parseFloat(couponCode) * totalBookingHours;
158
158
  }
159
159
  }
160
- discountedCost = totalCost - discount;
160
+ discountedCost = totalCost - Math.round(discount);
161
161
  return Math.round(discountedCost);
162
162
  };
163
163
  BookingCode.getDiscountAmount = function (couponCode, totalCost) {
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
- {
2
- "name": "turf-common",
3
- "version": "1.4.2-beta.6",
4
- "description": "",
5
- "main": "./build/index.js",
6
- "types": "./build/index.d.ts",
7
- "files": [
8
- "build/**/*"
9
- ],
10
- "scripts": {
11
- "clean": "rm -rf build",
12
- "build": "npm run clean && tsc",
13
- "version:deploy:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
14
- "version:deploy:patch": "npm version patch && git push && npm run build && npm publish",
15
- "version:deploy:minor": "npm version minor && git push && npm run build && npm publish",
16
- "test": "jest",
17
- "test:pattern": "jest -i TURF-533",
18
- "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
19
- "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "github__bellex-dev__turf-common:bellex-dev/turf-common.git"
24
- },
25
- "keywords": [],
26
- "author": "",
27
- "license": "ISC",
28
- "devDependencies": {
29
- "@types/jest": "^29.5.11",
30
- "@types/node": "^20.8.9",
31
- "@typescript-eslint/eslint-plugin": "^6.7.2",
32
- "@typescript-eslint/parser": "^6.7.2",
33
- "del-cli": "^5.1.0",
34
- "eslint": "^8.50.0",
35
- "jest": "^29.7.0",
36
- "ts-jest": "^29.1.1",
37
- "ts-node": "^10.9.2",
38
- "typescript": "^5.2.2"
39
- },
40
- "dependencies": {
41
- "date-fns": "^2.30.0"
42
- }
43
- }
1
+ {
2
+ "name": "turf-common",
3
+ "version": "1.4.2-beta.8",
4
+ "description": "",
5
+ "main": "./build/index.js",
6
+ "types": "./build/index.d.ts",
7
+ "files": [
8
+ "build/**/*"
9
+ ],
10
+ "scripts": {
11
+ "clean": "rm -rf build",
12
+ "build": "npm run clean && tsc",
13
+ "version:deploy:beta": "npm version prerelease --preid beta && git push && npm run build && npm publish --tag beta",
14
+ "version:deploy:patch": "npm version patch && git push && npm run build && npm publish",
15
+ "version:deploy:minor": "npm version minor && git push && npm run build && npm publish",
16
+ "test": "jest",
17
+ "test:pattern": "jest -i TURF-533",
18
+ "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" 2>&1| tee eslint.log",
19
+ "lint:fix": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "github__bellex-dev__turf-common:bellex-dev/turf-common.git"
24
+ },
25
+ "keywords": [],
26
+ "author": "",
27
+ "license": "ISC",
28
+ "devDependencies": {
29
+ "@types/jest": "^29.5.11",
30
+ "@types/node": "^20.8.9",
31
+ "@typescript-eslint/eslint-plugin": "^6.7.2",
32
+ "@typescript-eslint/parser": "^6.7.2",
33
+ "del-cli": "^5.1.0",
34
+ "eslint": "^8.50.0",
35
+ "jest": "^29.7.0",
36
+ "ts-jest": "^29.1.1",
37
+ "ts-node": "^10.9.2",
38
+ "typescript": "^5.2.2"
39
+ },
40
+ "dependencies": {
41
+ "date-fns": "^2.30.0"
42
+ }
43
+ }