Skip to content
Snippets Groups Projects
Merged Leandro Almada requested to merge REDMINE-ISSUES/12614v2 into develop
1 file
+ 19
13
Compare changes
  • Side-by-side
  • Inline
@@ -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 () {
return this.features.filter(
(el) => el.feature_type.slug === this.$route.params.feature_type_slug
);
if(this.features.length)
return this.features.filter(
(el) => el.feature_type.slug === this.$route.params.feature_type_slug
);
return {}
},
lastFeatures: function () {
return this.feature_type_features.slice(0, 5);
if (this.feature_type_features.length)
return this.feature_type_features.slice(0, 5);
return []
},
orderedCustomFields() {
return [...this.structure.customfield_set].sort(
(a, b) => a.position - b.position
);
if (Object.keys(this.structure).length)
return [...this.structure.customfield_set].sort(
(a, b) => a.position - b.position
);
return {}
},
},
@@ -387,8 +395,7 @@ export default {
ordering: '-created_on',
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
});
Loading