homeflowjs 0.9.3 → 0.9.6
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/actions/user.actions.js
CHANGED
|
@@ -126,6 +126,11 @@ class InstantValuation extends Component {
|
|
|
126
126
|
lead.opt_in_marketing_statement = 'Get emails with the latest news and information on the local property market, our products and services.You can unsubscribe at any time.';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
+
const referrerURL = window.location.href;
|
|
130
|
+
lead.metadata = {
|
|
131
|
+
lead_url_referrer: referrerURL,
|
|
132
|
+
};
|
|
133
|
+
|
|
129
134
|
const params = flatten({ search: restOfSearch, lead });
|
|
130
135
|
|
|
131
136
|
const query = new URLSearchParams(params);
|
|
@@ -239,6 +244,8 @@ class InstantValuation extends Component {
|
|
|
239
244
|
|
|
240
245
|
const largeModalStyles = { width: 1000, height: 800 };
|
|
241
246
|
|
|
247
|
+
Homeflow.kickEvent('valuation_opened');
|
|
248
|
+
|
|
242
249
|
return (
|
|
243
250
|
<div
|
|
244
251
|
className="instant-valuation hf-modal"
|
|
@@ -22,6 +22,10 @@ const ResultStep = ({
|
|
|
22
22
|
getValuation();
|
|
23
23
|
}, []);
|
|
24
24
|
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (valuation) Homeflow.kickEvent('valuation_successful');
|
|
27
|
+
}, [valuation])
|
|
28
|
+
|
|
25
29
|
const formatPrice = (price) => (
|
|
26
30
|
`£${Math.round(price)}${selectedChannel === 'lettings' ? '/month' : ''}`
|
|
27
31
|
.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, '$1,')
|
|
@@ -170,72 +174,3 @@ const ResultStep = ({
|
|
|
170
174
|
};
|
|
171
175
|
|
|
172
176
|
export default ResultStep;
|
|
173
|
-
|
|
174
|
-
// doesn't work
|
|
175
|
-
// /valuations.json?search%5Bpaon%5D=&search%5Bpostcode%5D=bn2+9sq&search%5Bproperty_type%5D=t&search%5Bbedrooms%5D=2&lead%5Bfirst_name%5D=fwkjenk&lead%5Blast_name%5D=kjnfkwejf&lead%5Btel_home%5D=07589347534&lead%5Bemail%5D=kjnfkjew%40fkjwenkfj.com&lead%5Bmoving_plans%5D=3+months&lead%5Breason%5D=selling&lead%5Bplans%5D=3+months&lead%5Bfull_address%5D=1+Coleman+Street%2C++Brighton%2C++East+Sussex&lead%5Bis_branch_lead%5D=&lead%5Bis_valuation_request%5D=1&lead%5Bbranch_id%5D=&lead%5Baccount_confirmation_status%5D=false&lead%5Bopt_in_marketing%5D=false&lead%5Bopt_in_terms%5D=true&lead%5Bopt_in_marketing_statement%5D=&lead%5Bopt_in_marketing_url%5D=http%3A%2F%2Flocalhost%3A3000%2F%23%2Fvaluation&lead%5Bcontact_by_phone%5D=false&lead%5Bcontact_by_email%5D=false&lead%5Bcontact_by_sms%5D=false&lead%5Bcontact_by_post%5D=false&search%5Bproperties%5D%5B%5D=13713068
|
|
176
|
-
|
|
177
|
-
// works
|
|
178
|
-
// /valuations.json?search%5Bpaon%5D=1&search%5Bpostcode%5D=BN2+9SQ&search%5Bproperties%5D%5B%5D=13713078&search%5Bproperty_type%5D=t&search%5Bbedrooms%5D=1&lead%5Bfirst_name%5D=jfkwenk&lead%5Blast_name%5D=jkfnwekf&lead%5Btel_home%5D=07589437534&lead%5Bemail%5D=kjnfwke%40fkmewklf.com&lead%5Bmoving_plans%5D=asap&lead%5Breason%5D=selling&lead%5Bplans%5D=asap&lead%5Bfull_address%5D=1+Coleman+Street%2C++Brighton%2C++East+Sussex&lead%5Baccount_confirmation_status%5D=false&lead%5Bopt_in_marketing%5D=false&lead%5Bopt_in_terms%5D=true&lead%5Bopt_in_marketing_statement%5D=+Get+emails+with+the+latest+news+and+information+on+the+local+property+market%2C+our+products+and+services.+You+can+unsubscribe+at+any+time.+&lead%5Bopt_in_marketing_url%5D=https%3A%2F%2Fsawyerandco.agent.staging.homeflow.co.uk%2F%23%2Fvaluation&lead%5Bcontact_by_phone%5D=false&lead%5Bcontact_by_email%5D=false&lead%5Bcontact_by_sms%5D=false&lead%5Bcontact_by_post%5D=false
|
|
179
|
-
|
|
180
|
-
// doesn't work
|
|
181
|
-
// search[paon]:
|
|
182
|
-
// search[postcode]: bn2 9sq
|
|
183
|
-
// search[property_type]: t
|
|
184
|
-
// search[bedrooms]: 2
|
|
185
|
-
// lead[first_name]: fwkjenk
|
|
186
|
-
// lead[last_name]: kjnfkwejf
|
|
187
|
-
// lead[tel_home]: 07589347534
|
|
188
|
-
// lead[email]: kjnfkjew@fkjwenkfj.com
|
|
189
|
-
// lead[moving_plans]: 3 months
|
|
190
|
-
// lead[reason]: selling
|
|
191
|
-
// lead[plans]: 3 months
|
|
192
|
-
// lead[full_address]: 1 Coleman Street, Brighton, East Sussex
|
|
193
|
-
// lead[is_branch_lead]:
|
|
194
|
-
// lead[is_valuation_request]: 1
|
|
195
|
-
// lead[branch_id]:
|
|
196
|
-
// lead[account_confirmation_status]: false
|
|
197
|
-
// lead[opt_in_marketing]: false
|
|
198
|
-
// lead[opt_in_terms]: true
|
|
199
|
-
// lead[opt_in_marketing_statement]:
|
|
200
|
-
// lead[opt_in_marketing_url]: http://localhost:3000/#/valuation
|
|
201
|
-
// lead[contact_by_phone]: false
|
|
202
|
-
// lead[contact_by_email]: false
|
|
203
|
-
// lead[contact_by_sms]: false
|
|
204
|
-
// lead[contact_by_post]: false
|
|
205
|
-
// search[properties][]: 13713068
|
|
206
|
-
|
|
207
|
-
// works
|
|
208
|
-
// search[paon]: 1
|
|
209
|
-
// search[postcode]: BN2 9SQ
|
|
210
|
-
// search[properties][]: 13713078
|
|
211
|
-
// search[property_type]: t
|
|
212
|
-
// search[bedrooms]: 1
|
|
213
|
-
// lead[first_name]: jfkwenk
|
|
214
|
-
// lead[last_name]: jkfnwekf
|
|
215
|
-
// lead[tel_home]: 07589437534
|
|
216
|
-
// lead[email]: kjnfwke@fkmewklf.com
|
|
217
|
-
// lead[moving_plans]: asap
|
|
218
|
-
// lead[reason]: selling
|
|
219
|
-
// lead[plans]: asap
|
|
220
|
-
// lead[full_address]: 1 Coleman Street, Brighton, East Sussex
|
|
221
|
-
// lead[account_confirmation_status]: false
|
|
222
|
-
// lead[opt_in_marketing]: false
|
|
223
|
-
// lead[opt_in_terms]: true
|
|
224
|
-
// lead[opt_in_marketing_statement]: Get emails with the latest news and information on the local property market, our products and services.You can unsubscribe at any time.
|
|
225
|
-
// lead[opt_in_marketing_url]: https://sawyerandco.agent.staging.homeflow.co.uk/#/valuation
|
|
226
|
-
// lead[contact_by_phone]: false
|
|
227
|
-
// lead[contact_by_email]: false
|
|
228
|
-
// lead[contact_by_sms]: false
|
|
229
|
-
// lead[contact_by_post]: false
|
|
230
|
-
|
|
231
|
-
// doesn't work
|
|
232
|
-
// search[properties][]: 13713068
|
|
233
|
-
|
|
234
|
-
// does work
|
|
235
|
-
// search[properties][]: 13713078
|
|
236
|
-
|
|
237
|
-
// works (without similar props)
|
|
238
|
-
// http://localhost:3000/valuations.json?search%5Bpaon%5D=&search%5Bpostcode%5D=bn2+9sq&search%5Bproperty_type%5D=t&search%5Bbedrooms%5D=2&lead%5Bfirst_name%5D=efjwek&lead%5Blast_name%5D=fwenkfn&lead%5Btel_home%5D=07589347594&lead%5Bemail%5D=fewjkf%40fwenfkl.com&lead%5Bmoving_plans%5D=3+months&lead%5Breason%5D=selling&lead%5Bplans%5D=3+months&lead%5Bfull_address%5D=1+Coleman+Street%2C++Brighton%2C++East+Sussex&lead%5Bis_branch_lead%5D=&lead%5Bis_valuation_request%5D=1&lead%5Bbranch_id%5D=&lead%5Baccount_confirmation_status%5D=false&lead%5Bopt_in_marketing%5D=false&lead%5Bopt_in_terms%5D=true&lead%5Bopt_in_marketing_statement%5D=&lead%5Bopt_in_marketing_url%5D=http%3A%2F%2Flocalhost%3A3000%2F%23%2Fvaluation&lead%5Bcontact_by_phone%5D=false&lead%5Bcontact_by_email%5D=false&lead%5Bcontact_by_sms%5D=false&lead%5Bcontact_by_post%5D=false
|
|
239
|
-
|
|
240
|
-
// doesn't work (with similar props)
|
|
241
|
-
// http://localhost:3000/valuations.json?search%5Bpaon%5D=&search%5Bpostcode%5D=bn2+9sq&search%5Bproperty_type%5D=t&search%5Bbedrooms%5D=2&lead%5Bfirst_name%5D=fjwenjkf&lead%5Blast_name%5D=fjknwekjf&lead%5Btel_home%5D=078593473434&lead%5Bemail%5D=kfnkwejf%40ewkjnfk.com&lead%5Bmoving_plans%5D=3+months&lead%5Breason%5D=selling&lead%5Bplans%5D=3+months&lead%5Bfull_address%5D=1+Coleman+Street%2C++Brighton%2C++East+Sussex&lead%5Bis_branch_lead%5D=&lead%5Bis_valuation_request%5D=1&lead%5Bbranch_id%5D=&lead%5Baccount_confirmation_status%5D=false&lead%5Bopt_in_marketing%5D=false&lead%5Bopt_in_terms%5D=true&lead%5Bopt_in_marketing_statement%5D=&lead%5Bopt_in_marketing_url%5D=http%3A%2F%2Flocalhost%3A3000%2F%23%2Fvaluation&lead%5Bcontact_by_phone%5D=false&lead%5Bcontact_by_email%5D=false&lead%5Bcontact_by_sms%5D=false&lead%5Bcontact_by_post%5D=false&search%5Bproperties%5D%5B%5D=13713068&search%5Bproperties%5D%5B%5D=13713067&search%5Bproperties%5D%5B%5D=13669747
|
package/package.json
CHANGED
|
@@ -17,6 +17,9 @@ const SavedSearch = (props) => {
|
|
|
17
17
|
deleteButtonClass,
|
|
18
18
|
buttonSpanClass,
|
|
19
19
|
userLoggedIn,
|
|
20
|
+
frequencyLabel,
|
|
21
|
+
visitSearchLabel,
|
|
22
|
+
removeSearchLabel,
|
|
20
23
|
} = props;
|
|
21
24
|
|
|
22
25
|
const visitSearch = (e) => {
|
|
@@ -41,7 +44,7 @@ const SavedSearch = (props) => {
|
|
|
41
44
|
<div className="saved-search__body">
|
|
42
45
|
{userLoggedIn && (
|
|
43
46
|
<>
|
|
44
|
-
|
|
47
|
+
{frequencyLabel}
|
|
45
48
|
<select
|
|
46
49
|
className={`saved-search__frequency ${selectClass}`}
|
|
47
50
|
onChange={handleFrequencyChange}
|
|
@@ -60,7 +63,7 @@ const SavedSearch = (props) => {
|
|
|
60
63
|
onClick={visitSearch}
|
|
61
64
|
className={visitButtonClass}
|
|
62
65
|
>
|
|
63
|
-
<span className={buttonSpanClass}>
|
|
66
|
+
<span className={buttonSpanClass}>{visitSearchLabel}</span>
|
|
64
67
|
</button>
|
|
65
68
|
|
|
66
69
|
<button
|
|
@@ -68,7 +71,7 @@ const SavedSearch = (props) => {
|
|
|
68
71
|
onClick={removeSearch}
|
|
69
72
|
className={deleteButtonClass}
|
|
70
73
|
>
|
|
71
|
-
<span className={buttonSpanClass}>
|
|
74
|
+
<span className={buttonSpanClass}>{removeSearchLabel}</span>
|
|
72
75
|
</button>
|
|
73
76
|
</div>
|
|
74
77
|
</div>
|
|
@@ -84,6 +87,9 @@ SavedSearch.propTypes = {
|
|
|
84
87
|
deleteButtonClass: PropTypes.string,
|
|
85
88
|
buttonSpanClass: PropTypes.string,
|
|
86
89
|
userLoggedIn: PropTypes.bool.isRequired,
|
|
90
|
+
frequencyLabel: PropTypes.string,
|
|
91
|
+
visitSearchLabel: PropTypes.string,
|
|
92
|
+
removeSearchLabel: PropTypes.string,
|
|
87
93
|
};
|
|
88
94
|
|
|
89
95
|
SavedSearch.defaultProps = {
|
|
@@ -91,7 +97,10 @@ SavedSearch.defaultProps = {
|
|
|
91
97
|
visitButtonClass: '',
|
|
92
98
|
deleteButtonClass: '',
|
|
93
99
|
buttonSpanClass: '',
|
|
94
|
-
|
|
100
|
+
frequencyLabel: 'Email me matching properties:',
|
|
101
|
+
visitSearchLabel: 'Visit',
|
|
102
|
+
removeSearchLabel: 'Remove',
|
|
103
|
+
};
|
|
95
104
|
|
|
96
105
|
const mapStateToProps = (state) => ({
|
|
97
106
|
userLoggedIn: !!state.user.currentUser.user_id,
|