Skip to content
Snippets Groups Projects
Commit 2ffec9a0 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

fix feature status label to work with both api endpoint

parent ed7bb38c
No related branches found
No related tags found
1 merge request!562REDMINE_ISSUE-16828|REDMINE_ISSUE-17022|REDMINE_ISSUE-17031|REDMINE_ISSUE-17033| Page utilisateur - lien non valide vers signalement
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
class="inline" class="inline"
/> />
<span v-else> <span v-else>
{{ currentFeature.properties.status.label }} {{ statusLabel }}
</span> </span>
</td> </td>
</tr> </tr>
...@@ -140,7 +140,7 @@ import { mapState } from 'vuex'; ...@@ -140,7 +140,7 @@ import { mapState } from 'vuex';
import FeatureTypeLink from '@/components/FeatureType/FeatureTypeLink'; import FeatureTypeLink from '@/components/FeatureType/FeatureTypeLink';
import FeatureEditStatusField from '@/components/Feature/FeatureEditStatusField'; import FeatureEditStatusField from '@/components/Feature/FeatureEditStatusField';
import FeatureExtraForm from '@/components/Feature/Edit/FeatureExtraForm'; import FeatureExtraForm from '@/components/Feature/Edit/FeatureExtraForm';
import { formatStringDate } from '@/utils'; import { statusChoices, formatStringDate } from '@/utils';
export default { export default {
...@@ -196,6 +196,16 @@ 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() { featureData() {
if (this.currentFeature.properties && this.featureType) { if (this.currentFeature.properties && this.featureType) {
return this.featureType.customfield_set.map((xtraForm) => { return this.featureType.customfield_set.map((xtraForm) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment