Skip to content

Commit

Permalink
Merge pull request #329 from Progress1/title_to_typ
Browse files Browse the repository at this point in the history
Display "Report item type" instead of string "Title" in Analyze row details
  • Loading branch information
Progress1 authored Jul 29, 2024
2 parents 9061fa4 + be0cdb1 commit e2cef1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/src/components/analyze/CardAnalyze.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<v-icon center>{{ card.tag }}</v-icon>
</v-col>
<v-col>
<div class="grey--text">{{$t('card_item.title')}}</div>
<div class="grey--text">{{card.report_type_name}}</div>
<span>{{card.title}}</span>
</v-col>
<v-col>
Expand Down
9 changes: 9 additions & 0 deletions src/gui/src/components/analyze/ContentDataAnalyze.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,16 @@
this.$store.dispatch("getAllReportItems", {group: group, filter: this.filter, offset: offset, limit: limit})
.then(() => {
const report_types = Object.values(this.$store.getters.getReportItemTypes.items);
this.collections = this.collections.concat(this.$store.getters.getReportItems.items);
for (let i = 0; i < this.collections.length; i++) {
let report_type = report_types.filter(x => x.id == this.collections[i].report_item_type_id);
if (report_type.length) {
this.collections[i].report_type_name = report_type[0].title;
} else {
this.collections[i].report_type_name = this.$t('card_item.title');
}
}
this.$emit('new-data-loaded', this.collections.length);
setTimeout(() => {
this.data_loaded = true
Expand Down

0 comments on commit e2cef1d

Please sign in to comment.