homeflowjs 0.9.18 → 0.9.19

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
@@ -19,6 +19,16 @@ Make sure you have cache disabled in Webpack or your changes to HomeflowJS may n
19
19
  "cache": false
20
20
  ```
21
21
 
22
+ ## Quality Assurance
23
+
24
+ To get changes made in a branch of HomeflowJS deployed to a theme feature branch, change the package.json line for HomeflowJS to:
25
+
26
+ ```
27
+ "homeflowjs": "git+ssh://git@bitbucket.org:homeflow_developers/homeflowjs.git#<<<branch-name-here>>>",
28
+ ```
29
+
30
+ After the change has been made push the feature branch and wait for the branch code to be compiled.
31
+
22
32
  ## Tests
23
33
 
24
34
  Run tests:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.9.18",
3
+ "version": "0.9.19",
4
4
  "description": "JavaScript toolkit for Homeflow themes",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -9,6 +9,7 @@ const englishRates = (price, firstTimeBuyer, additionalProperty) => {
9
9
 
10
10
  // First time buyer
11
11
  if (firstTimeBuyer) {
12
+ // Rate 2
12
13
  if (price - 300000 > 0) {
13
14
  if ((price - 300000) > (500000 - 300000)) {
14
15
  rate2 = (500000 - 300000) * 0.05;
@@ -16,6 +17,32 @@ const englishRates = (price, firstTimeBuyer, additionalProperty) => {
16
17
  rate2 = (price - 300000) * 0.05;
17
18
  }
18
19
  }
20
+
21
+ // Rate 3 ( + supplemental rate 1)
22
+ if (price - 500000 > 0) {
23
+ rate1 = 5000; // 2% on 125k-250lk + 5% on 250-300k
24
+ if ((price - 500000) > (925000 - 500000)) {
25
+ rate3 = (925000 - 500000) * 0.05;
26
+ } else {
27
+ rate3 = (price - 500000) * 0.05;
28
+ }
29
+ }
30
+
31
+ // Rate 4
32
+ if (price - 925000 > 0) {
33
+ if ((price - 925000) > (1500000 - 925000)) {
34
+ rate4 = (1500000 - 925000) * 0.10;
35
+ } else {
36
+ rate4 = (price - 925000) * 0.10;
37
+ }
38
+ }
39
+
40
+ // Rate 5
41
+ if (price - 1500000 > 0) {
42
+ rate5 = (price - 1500000);
43
+ rate5 *= 0.12;
44
+ }
45
+
19
46
  }
20
47
 
21
48
  // Additional property