Skip to content

Commit

Permalink
Merge pull request #177 from gobitfly/BIDS-3041/RemoveGroupIdAndPrefix
Browse files Browse the repository at this point in the history
Bids 3041/remove group id and prefix
  • Loading branch information
D13ce authored Apr 5, 2024
2 parents 8cc7a93 + fb074b9 commit 1c81cde
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
2 changes: 1 addition & 1 deletion frontend/components/dashboard/group/GroupLabel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ const name = computed(() => {
</script>

<template>
<span><span>{{ name }}</span> <span v-if="group.id >= 0" class="discreet">(ID: {{ group.id }})</span></span>
<span>{{ name }}</span>
</template>
4 changes: 1 addition & 3 deletions frontend/components/dashboard/group/GroupSelection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ const selectedGroup = computed(() => {
@update:model-value="(value: number)=>emit('setGroup', value)"
>
<template v-if="selectedGroup" #value>
<span>{{ $t('dashboard.group.selection.group') }}:
<DashboardGroupLabel :group="selectedGroup" />
</span>
<DashboardGroupLabel :group="selectedGroup" />
</template>

<template #option="slotProps">
Expand Down
16 changes: 2 additions & 14 deletions frontend/components/dashboard/table/DashboardTableSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const { value: query, bounce: setQuery } = useDebounceValue<TableQueryParams | u
const { overview } = useValidatorDashboardOverviewStore()
const { width, isMobile } = useWindowSize()
const { width } = useWindowSize()
const colsVisible = computed(() => {
return {
validator: width.value >= 1400,
Expand Down Expand Up @@ -63,17 +63,6 @@ const groupNameLabel = (groupId?: number) => {
return `${group.name}`
}
const groupIdLabel = (groupId?: number) => {
if (groupId === undefined || groupId < 0) {
return
}
const group = overview.value?.groups?.find(g => g.id === groupId)
if (group && isMobile.value) {
return
}
return ` (ID: ${groupId})`
}
const onSort = (sort: DataTableSortEvent) => {
loadData(setQuerySort(sort, queryMap.value[props.dashboardKey]))
}
Expand Down Expand Up @@ -128,8 +117,7 @@ const getRowClass = (row: VDBSummaryTableRow) => {
:header="$t('dashboard.validator.col.group')"
>
<template #body="slotProps">
{{ groupNameLabel(slotProps.data.group_id) }}<span class="discreet">{{
groupIdLabel(slotProps.data.group_id) }}</span>
{{ groupNameLabel(slotProps.data.group_id) }}
</template>
</Column>
<Column
Expand Down
1 change: 0 additions & 1 deletion frontend/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
"notifications": "Notifications",
"group": {
"selection": {
"group": "Group",
"all": "All groups",
"default": "Default",
"placeholder": "Select group",
Expand Down

0 comments on commit 1c81cde

Please sign in to comment.