Skip to content
Snippets Groups Projects
Commit 1a85f3e4 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA :bicyclist:
Browse files

Merge branch 'REDMINE-ISSUES/12614v2' into 'develop'

REDMINE_ISSUES-12614

See merge request !189
parents 28a4f03e ad2b5d23
No related branches found
No related tags found
1 merge request!189REDMINE_ISSUES-12614
......@@ -253,28 +253,36 @@ export default {
...mapState("feature", ["features", "features_count"]),
...mapState("feature_type", ["feature_types", "importFeatureTypeData"]),
structure: function () {
if (this.feature_types) {
return this.feature_types.find(
if (Object.keys(this.feature_types).length) {
let st = this.feature_types.find(
(el) => el.slug === this.$route.params.feature_type_slug
);
if (st)
return st
}
return {};
},
feature_type_features: function () {
if(this.features.length)
return this.features.filter(
(el) => el.feature_type.slug === this.$route.params.feature_type_slug
);
return {}
},
lastFeatures: function () {
if (this.feature_type_features.length)
return this.feature_type_features.slice(0, 5);
return []
},
orderedCustomFields() {
if (Object.keys(this.structure).length)
return [...this.structure.customfield_set].sort(
(a, b) => a.position - b.position
);
return {}
},
},
......@@ -388,7 +396,6 @@ export default {
limit: '5'
})
console.log(response)
if (response){
this.featuresLoading = false;
}
......@@ -396,8 +403,7 @@ export default {
},
watch:{
'structure'(newValue){
console.log(newValue)
if (newValue){
if (newValue.slug){
this.$store.dispatch("feature_type/GET_IMPORTS", {
feature_type: this.structure.slug
});
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment