bugfix fetching transactions to make use of db cache
This commit is contained in:
parent
9b2653ce91
commit
296a4e7603
5 changed files with 71 additions and 586656 deletions
|
|
@ -149,6 +149,7 @@ var map = new mapboxgl.Map({
|
|||
});
|
||||
|
||||
|
||||
console.log('ekekek');
|
||||
map.on("load", function () {
|
||||
var crossData = data.features.map(function (d, i) {
|
||||
//clone properties
|
||||
|
|
@ -215,28 +216,31 @@ function getListingDialogHTML(properties) {
|
|||
return styledResult;
|
||||
}
|
||||
function getPropertyHTML(property) {
|
||||
const priceHistoryHTMLs = property.properties.info.price_history.map((d) => {
|
||||
const priceHistoryHTMLs = property.properties.price_history.map((d) => {
|
||||
return `<li>${d.last_seen.split('T')[0]}: £${d.price}</li>`;
|
||||
});
|
||||
|
||||
let priceHistoryHTML = '';
|
||||
if (priceHistoryHTMLs.length > 1) {
|
||||
priceHistoryHTML = `
|
||||
<strong>Price history:</strong>
|
||||
<ul>
|
||||
${priceHistoryHTMLs.join('')}
|
||||
</ul>
|
||||
<br />
|
||||
`
|
||||
}
|
||||
const lastSeenStr = property.properties.last_seen.split('T')[0];
|
||||
const lastSeenDays = Math.round((new Date() - new Date(lastSeenStr)) / (1000 * 60 * 60 * 24));
|
||||
|
||||
return `
|
||||
<div>
|
||||
<img src="${property.properties.info.photo_thumbnail}" style="width:100%; height:auto;">
|
||||
<img src="${property.properties.photo_thumbnail}" style="width:100%; height:auto;">
|
||||
<p>
|
||||
<strong>Available from:</strong> ${property.properties.info.let_date_available}
|
||||
<strong>Available from:</strong> ${property.properties.info.property.let_date_available}
|
||||
<br />
|
||||
<strong>Price:</strong> £${property.properties.total_price}
|
||||
<br />
|
||||
<strong>Price history:</strong>
|
||||
${priceHistoryHTML}
|
||||
<strong>Rooms:</strong> ${property.properties.rooms}
|
||||
<br />
|
||||
|
|
@ -244,9 +248,9 @@ function getPropertyHTML(property) {
|
|||
<br />
|
||||
<strong>Price per area:</strong> £${property.properties.qmprice}/m²
|
||||
<br />
|
||||
<strong>Last seen:</strong> ${property.properties.info.last_seen} days ago
|
||||
<strong>Last seen:</strong> ${lastSeenDays} days ago
|
||||
<br />
|
||||
<strong>Agency:</strong> ${property.properties.info.agency}
|
||||
<strong>Agency:</strong> ${property.properties.agency}
|
||||
<br />
|
||||
<a href="${property.properties.url}" target="_blank">View Listing</a>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue