Skip to content

Commit

Permalink
#3126: Show version for application group
Browse files Browse the repository at this point in the history
  • Loading branch information
ulischulte committed Mar 1, 2024
1 parent 02ee554 commit 43fbe72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
<slot v-if="'title' in $slots" name="title" />
</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 43fbe72

Please sign in to comment.