diff --git a/src/components/Feature/Detail/FeatureTable.vue b/src/components/Feature/Detail/FeatureTable.vue index ac7456f89cd4f9dcbe3a92bf68d8df177ccae6a3..7051d25ff1fc92ade59ac37d96428860a24805e3 100644 --- a/src/components/Feature/Detail/FeatureTable.vue +++ b/src/components/Feature/Detail/FeatureTable.vue @@ -72,7 +72,7 @@ class="inline" /> <span v-else> - {{ currentFeature.properties.status.label }} + {{ statusLabel }} </span> </td> </tr> @@ -140,7 +140,7 @@ import { mapState } from 'vuex'; import FeatureTypeLink from '@/components/FeatureType/FeatureTypeLink'; import FeatureEditStatusField from '@/components/Feature/FeatureEditStatusField'; import FeatureExtraForm from '@/components/Feature/Edit/FeatureExtraForm'; -import { formatStringDate } from '@/utils'; +import { statusChoices, formatStringDate } from '@/utils'; export default { @@ -196,6 +196,16 @@ export default { } }, + statusLabel() { + if (this.currentFeature.properties.status.label) { + return this.currentFeature.properties.status.label; + } + const status = statusChoices.find( + (el) => el.value === this.currentFeature.properties.status + ); + return status ? status.name : ''; + }, + featureData() { if (this.currentFeature.properties && this.featureType) { return this.featureType.customfield_set.map((xtraForm) => {