Skip to content

Commit 68ac514

Browse files
HejdaJakubxflord
authored andcommitted
fix(admin): display groups on recently viewed dashboard
* There was just a technical problem of matching type RichGroup/Group after some recent changes of loading groups. * This matching was fixed on the dashboard and also in the related service.
1 parent 1d1a359 commit 68ac514

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/admin-gui/src/app/users/pages/user-detail-page/user-dashboard/dashboard-recently-viewed-button-field/dashboard-recently-viewed-button-field.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export class DashboardRecentlyViewedButtonFieldComponent implements OnInit {
5252
this.vosIds.push(item.id);
5353
break;
5454
}
55+
case 'RichGroup':
5556
case 'Group': {
5657
this.groupsIds.push(item.id);
5758
break;
@@ -127,6 +128,7 @@ export class DashboardRecentlyViewedButtonFieldComponent implements OnInit {
127128
}
128129
break;
129130
}
131+
case 'RichGroup':
130132
case 'Group': {
131133
const filteredGroup = this.groups.filter((group) => group.id === item.id)[0];
132134
if (filteredGroup) {

libs/perun/utils/src/lib/perun-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ export function addRecentlyVisitedObject(item: Vo & Facility & Group, voName?: s
311311
if (localStorage.getItem('recent') === null) {
312312
// if user not have any in local storage
313313
let recent;
314-
if (item.beanName === 'Group') {
314+
if (item.beanName.includes('Group')) {
315315
recent = [
316316
{
317317
id: item.id,
@@ -329,7 +329,7 @@ export function addRecentlyVisitedObject(item: Vo & Facility & Group, voName?: s
329329
} else {
330330
const recent: RecentEntity[] = JSON.parse(localStorage.getItem('recent')) as RecentEntity[];
331331
let object: RecentEntity;
332-
if (item.beanName === 'Group') {
332+
if (item.beanName.includes('Group')) {
333333
object = {
334334
id: item.id,
335335
name: item.shortName,

0 commit comments

Comments
 (0)