Skip to content

Commit

Permalink
#3126: Show version for application group (#3197)
Browse files Browse the repository at this point in the history
* #3126: Show version for application group

---------

Co-authored-by: Stephan Köninger <stephan.koeninger@codecentric.de>
  • Loading branch information
ulischulte and SteKoe committed Mar 4, 2024
1 parent d2b36b3 commit e6ea0ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
</button>
</h3>

<div>
<slot v-if="'version' in $slots" name="version" />
</div>

<div>
<slot v-if="'actions' in $slots" name="actions" />
<sba-icon-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
/>
</template>
<template v-if="singleVersionInGroup(group)" #version>
<span v-text="group.instances[0].buildVersion" />
</template>
<template v-if="isGroupedByApplication" #actions>
<ApplicationListItemAction
:has-notification-filters-support="
Expand Down Expand Up @@ -339,6 +343,15 @@ const isGroupedByApplication = computed(() => {
return groupingFunction.value === groupingFunctions.application;
});
const singleVersionInGroup = (group) => {
return (
group.length === 1 ||
group.instances.filter(
(instance) => group.instances[0].buildVersion !== instance.buildVersion,
).length === 0
);
};
if (props.selected) {
scrollIntoView(props.selected);
}
Expand Down

0 comments on commit e6ea0ed

Please sign in to comment.