Skip to content

Commit 0b9d184

Browse files
committed
[DSC-1504] Update audit-item-menu, audit-table
ref: DSC-1504,DURACOM-317
1 parent f7e5dc5 commit 0b9d184

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/app/audit-page/audit-table/audit-table.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { TranslateModule } from '@ngx-translate/core';
1515
import { Observable } from 'rxjs';
1616
import { map } from 'rxjs/operators';
1717

18-
import { getDSORoute } from '../../app-routing-paths'
18+
import { getDSORoute } from '../../app-routing-paths';
1919
import { Audit } from '../../core/audit/model/audit.model';
2020
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
2121
import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@if ((isAuthorized$ | async)) {
22
<button class="dropdown-item"
33
[innerHTML]="'context-menu.actions.audit-item.btn' | translate"
4-
[routerLink]="['/auditlogs/object/', contextMenuObject.id]">
4+
[routerLink]="link">
55
</button>
66
}

src/app/shared/context-menu/audit-item/audit-item-menu.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ import {
1212
} from 'rxjs';
1313
import { take } from 'rxjs/operators';
1414

15+
import { getDSORoute } from '../../../app-routing-paths';
1516
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
1617
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
1718
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
1819
import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model';
20+
import { URLCombiner } from '../../../core/url-combiner/url-combiner';
1921
import { ContextMenuEntryComponent } from '../context-menu-entry.component';
2022
import { ContextMenuEntryType } from '../context-menu-entry-type';
2123

@@ -56,4 +58,8 @@ export class AuditItemMenuComponent extends ContextMenuEntryComponent implements
5658
this.isAuthorized$.next(isAdmin || isCommunityAdmin || isCollectionAdmin);
5759
});
5860
}
61+
62+
get link() {
63+
return new URLCombiner(getDSORoute(this.contextMenuObject), 'auditlogs').toString();
64+
}
5965
}

0 commit comments

Comments
 (0)