diff --git a/flatisfy/web/js_src/components/flatstable.vue b/flatisfy/web/js_src/components/flatstable.vue index 61e69ba..402dc1a 100644 --- a/flatisfy/web/js_src/components/flatstable.vue +++ b/flatisfy/web/js_src/components/flatstable.vue @@ -2,6 +2,13 @@
+ {{ $t("flatsDetails.Notation") }} + + + {{ $t("common.sort" + capitalize(sortOrder)) }} + + | {{ $t("flatsDetails.Title") }} @@ -35,10 +42,15 @@ | |||
---|---|---|---|---|
+ | + | +
+
+
+
[{{ flat.id.split("@")[1] }}] {{ flat.title }}
@@ -46,6 +58,11 @@
+ + + + {{ flat.notes }}+ |
{{ flat.area }} m² |
@@ -87,12 +104,39 @@ import { capitalize, range } from '../tools'
export default {
data () {
return {
- sortBy: 'cost',
- sortOrder: 'up'
+ sortBy: this.initialSortBy,
+ sortOrder: this.initialSortOrder
}
},
- props: ['flats'],
+ props: {
+ flats: Array,
+ showNotationColumn: {
+ type: Boolean,
+ default: false
+ },
+ showNotes: {
+ type: Boolean,
+ default: false
+ },
+ initialSortBy: {
+ type: String,
+ default: 'cost'
+ },
+ initialSortOrder: {
+ type: String,
+ default: 'up'
+ }
+ },
+
+ watch: {
+ initialSortBy () {
+ this.sortBy = this.initialSortBy
+ },
+ initialSortOrder () {
+ this.sortOrder = this.initialSortOrder
+ }
+ },
computed: {
sortedFlats () {
@@ -163,4 +207,9 @@ button {
height:1px;
overflow:hidden;
}
+
+pre {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
diff --git a/flatisfy/web/js_src/i18n/en/index.js b/flatisfy/web/js_src/i18n/en/index.js
index 9856253..dd66dd5 100644
--- a/flatisfy/web/js_src/i18n/en/index.js
+++ b/flatisfy/web/js_src/i18n/en/index.js
@@ -29,6 +29,7 @@ export default {
'search': 'Search'
},
flatsDetails: {
+ 'Notation': 'Note',
'Title': 'Title',
'Area': 'Area',
'Rooms': 'Rooms',
diff --git a/flatisfy/web/js_src/views/details.vue b/flatisfy/web/js_src/views/details.vue
index c4bd603..23d2844 100644
--- a/flatisfy/web/js_src/views/details.vue
+++ b/flatisfy/web/js_src/views/details.vue
@@ -202,7 +202,7 @@ export default {
// Fetch data again when the component is updated
'$route': 'fetchData',
title () {
- document.title = this.title;
+ document.title = this.title
}
},
@@ -214,7 +214,7 @@ export default {
computed: {
title () {
- return "Flatisfy - " + this.$route.params.id
+ return 'Flatisfy - ' + this.$route.params.id
},
flatMarkers () {
return this.$store.getters.flatsMarkers(this.$router, flat => flat.id === this.$route.params.id)
diff --git a/flatisfy/web/js_src/views/home.vue b/flatisfy/web/js_src/views/home.vue
index 1221317..6f41ce8 100644
--- a/flatisfy/web/js_src/views/home.vue
+++ b/flatisfy/web/js_src/views/home.vue
@@ -31,7 +31,7 @@ export default {
},
created () {
- document.title = "Flatisfy" // Set title
+ document.title = 'Flatisfy' // Set title
// Fetch flats when the component is created
this.$store.dispatch('getAllFlats')
diff --git a/flatisfy/web/js_src/views/search.vue b/flatisfy/web/js_src/views/search.vue
index e0bcfc4..62a8491 100644
--- a/flatisfy/web/js_src/views/search.vue
+++ b/flatisfy/web/js_src/views/search.vue
@@ -33,7 +33,7 @@ export default {
},
created () {
- document.title = "Flatisfy - " + this.$t('menu.search') // Set title
+ document.title = 'Flatisfy - ' + this.$t('menu.search') // Set title
this.doSearch()
},
diff --git a/flatisfy/web/js_src/views/status.vue b/flatisfy/web/js_src/views/status.vue
index c7a165a..7799bf4 100644
--- a/flatisfy/web/js_src/views/status.vue
+++ b/flatisfy/web/js_src/views/status.vue
@@ -16,7 +16,13 @@
{{ postal_code_data.name }} ({{ postal_code }}) - {{ postal_code_data.flats.length }} {{ $tc("common.flats", postal_code_data.flats.length) }}- |