homeflowjs 0.9.17 → 0.9.20
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
|
@@ -18,6 +18,7 @@ const NormalSelect = ({
|
|
|
18
18
|
minBeds,
|
|
19
19
|
maxBeds,
|
|
20
20
|
placeholder,
|
|
21
|
+
bedOptionText,
|
|
21
22
|
...otherProps
|
|
22
23
|
}) => (
|
|
23
24
|
<select
|
|
@@ -42,7 +43,9 @@ const NormalSelect = ({
|
|
|
42
43
|
title={`${i + 1} Bed`}
|
|
43
44
|
className={optionClass}
|
|
44
45
|
>
|
|
45
|
-
{i + 1}
|
|
46
|
+
{i + 1}
|
|
47
|
+
{' '}
|
|
48
|
+
{bedOptionText}
|
|
46
49
|
</option>
|
|
47
50
|
))}
|
|
48
51
|
</select>
|
|
@@ -57,10 +60,11 @@ const ReactSelect = (props) => {
|
|
|
57
60
|
styles,
|
|
58
61
|
value,
|
|
59
62
|
placeholder,
|
|
63
|
+
bedOptionText,
|
|
60
64
|
} = props;
|
|
61
65
|
|
|
62
66
|
const bedOptions = bedValues.map(bedValue => (
|
|
63
|
-
{ value: bedValue, label: `${bedValue}
|
|
67
|
+
{ value: bedValue, label: `${bedValue} ${bedOptionText}` }
|
|
64
68
|
));
|
|
65
69
|
|
|
66
70
|
if (value) bedOptions.unshift({ value: '', label: `No ${type} beds` });
|
|
@@ -123,6 +127,7 @@ BedroomsSelect.propTypes = {
|
|
|
123
127
|
optionClass: PropTypes.string,
|
|
124
128
|
placeholder: PropTypes.string,
|
|
125
129
|
allowUnderOver: PropTypes.bool,
|
|
130
|
+
bedOptionText: PropTypes.string,
|
|
126
131
|
};
|
|
127
132
|
|
|
128
133
|
BedroomsSelect.defaultProps = {
|
|
@@ -130,6 +135,7 @@ BedroomsSelect.defaultProps = {
|
|
|
130
135
|
optionClass: '',
|
|
131
136
|
placeholder: null,
|
|
132
137
|
allowUnderOver: false,
|
|
138
|
+
bedOptionText: 'Bed',
|
|
133
139
|
};
|
|
134
140
|
|
|
135
141
|
const mapStateToProps = ({ search: { currentSearch } }) => ({
|
|
@@ -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
|