Display cost per square meter;
This commit is contained in:
parent
210192d09c
commit
26e2cdefbe
@ -20,6 +20,10 @@ const postProcessAPIResults = function (flat) {
|
|||||||
})
|
})
|
||||||
flat.flatisfy_time_to = momentifiedTimeTo
|
flat.flatisfy_time_to = momentifiedTimeTo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fill cost per square meter.
|
||||||
|
flat.sqCost = Math.round(flat.cost * 100 / flat.area) / 100 | 0
|
||||||
|
|
||||||
/* eslint-enable camelcase */
|
/* eslint-enable camelcase */
|
||||||
return flat
|
return flat
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,13 @@
|
|||||||
<span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
|
<span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="pointer" v-on:click="updateSortBy('sqCost')">
|
||||||
|
{{ $t("flatsDetails.SquareMeterCost") }}
|
||||||
|
<span v-if="sortBy === 'sqCost'">
|
||||||
|
<i class="fa" :class="'fa-angle-' + sortOrder" aria-hidden="true"></i>
|
||||||
|
<span class="sr-only">{{ $t("common.sort" + capitalize(sortOrder)) }}</span>
|
||||||
|
</span>
|
||||||
|
</th>
|
||||||
<th>{{ $t("common.Actions") }}</th>
|
<th>{{ $t("common.Actions") }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -79,6 +86,9 @@
|
|||||||
{{ $t("flatsDetails.utilities_excluded") }}
|
{{ $t("flatsDetails.utilities_excluded") }}
|
||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ flat.sqCost }} {{ flat.currency }}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<router-link :to="{name: 'details', params: {id: flat.id}}" :aria-label="$t('common.More_about') + ' ' + flat.id" :title="$t('common.More_about') + ' ' + flat.id">
|
<router-link :to="{name: 'details', params: {id: flat.id}}" :aria-label="$t('common.More_about') + ' ' + flat.id" :title="$t('common.More_about') + ' ' + flat.id">
|
||||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||||
|
@ -34,6 +34,7 @@ export default {
|
|||||||
'Area': 'Area',
|
'Area': 'Area',
|
||||||
'Rooms': 'Rooms',
|
'Rooms': 'Rooms',
|
||||||
'Cost': 'Cost',
|
'Cost': 'Cost',
|
||||||
|
'SquareMeterCost': 'Cost / m²',
|
||||||
'utilities_included': '(utilities included)',
|
'utilities_included': '(utilities included)',
|
||||||
'utilities_excluded': '(utilities excluded)',
|
'utilities_excluded': '(utilities excluded)',
|
||||||
'Description': 'Description',
|
'Description': 'Description',
|
||||||
|
@ -97,6 +97,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
{{ $t("flatsDetails.SquareMeterCost") }}
|
||||||
|
</th>
|
||||||
|
<td>
|
||||||
|
{{ flat.sqCost }} {{ flat.currency }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user