diff --git a/flatisfy/web/js_src/api/index.js b/flatisfy/web/js_src/api/index.js
index a9c6ea5..3818df8 100644
--- a/flatisfy/web/js_src/api/index.js
+++ b/flatisfy/web/js_src/api/index.js
@@ -20,6 +20,10 @@ const postProcessAPIResults = function (flat) {
})
flat.flatisfy_time_to = momentifiedTimeTo
}
+
+ // Fill cost per square meter.
+ flat.sqCost = Math.round(flat.cost * 100 / flat.area) / 100 | 0
+
/* eslint-enable camelcase */
return flat
}
diff --git a/flatisfy/web/js_src/components/flatstable.vue b/flatisfy/web/js_src/components/flatstable.vue
index 94ffd77..7464afa 100644
--- a/flatisfy/web/js_src/components/flatstable.vue
+++ b/flatisfy/web/js_src/components/flatstable.vue
@@ -37,6 +37,13 @@
{{ $t("common.sort" + capitalize(sortOrder)) }}
+
+ {{ $t("flatsDetails.SquareMeterCost") }}
+
+
+ {{ $t("common.sort" + capitalize(sortOrder)) }}
+
+ |
{{ $t("common.Actions") }} |
@@ -79,6 +86,9 @@
{{ $t("flatsDetails.utilities_excluded") }}
+
+ {{ flat.sqCost }} {{ flat.currency }}
+ |
diff --git a/flatisfy/web/js_src/i18n/en/index.js b/flatisfy/web/js_src/i18n/en/index.js
index dd66dd5..fcc082f 100644
--- a/flatisfy/web/js_src/i18n/en/index.js
+++ b/flatisfy/web/js_src/i18n/en/index.js
@@ -34,6 +34,7 @@ export default {
'Area': 'Area',
'Rooms': 'Rooms',
'Cost': 'Cost',
+ 'SquareMeterCost': 'Cost / m²',
'utilities_included': '(utilities included)',
'utilities_excluded': '(utilities excluded)',
'Description': 'Description',
diff --git a/flatisfy/web/js_src/views/details.vue b/flatisfy/web/js_src/views/details.vue
index 80dafc5..ce9763f 100644
--- a/flatisfy/web/js_src/views/details.vue
+++ b/flatisfy/web/js_src/views/details.vue
@@ -97,6 +97,14 @@
|
+
+
+ {{ $t("flatsDetails.SquareMeterCost") }}
+ |
+
+ {{ flat.sqCost }} {{ flat.currency }}
+ |
+