Skip to content

Commit 9342426

Browse files
authored
Merge pull request #1350 from ds-ashanmugavel/chore/1300-FE-Bug
chore[1300]: added back Button
2 parents ea63855 + c871593 commit 9342426

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha
1010

1111
### Added
1212
- #908 Add owner field to affected parts view in notification details
13+
- #1300 Added back button
1314

1415
### Changed
1516
- #1252 adapt IRS example response for integration tests to reflect current state

frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@
1818
1919
SPDX-License-Identifier: Apache-2.0
2020
-->
21+
<div class="part-relation--header--navigation--container" *ngIf="showMiniMap">
22+
<app-button
23+
[color]="'primary'"
24+
onkeydown="this.navigateBack()"
25+
(click)="this.navigateBack()"
26+
>
27+
<div class="flex justify-between items-center">
28+
<mat-icon class="mr-2">arrow_back</mat-icon>
29+
{{ 'actions.goBack' | i18n }}
30+
</div>
31+
</app-button>
32+
</div>
2133

2234
<ng-container *ngIf="this.rootPart$">
2335
<ng-container *viewContainer="this.rootPart$ | async; main: partRelationMainTmp; error: errorTmp; loading: loaderTmp">
2436
</ng-container>
2537
</ng-container>
26-
2738
<ng-template #partRelationMainTmp let-partDetails="view">
2839
<div class="part-relation--button-container">
2940
<app-button

frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
right: 0;
3030
}
3131

32+
.part-relation--header--navigation--container {
33+
position: absolute;
34+
top: 10px;
35+
left: 10px;
36+
z-index: 1000;
37+
}
38+
3239
.part-relation--button-container {
3340
display: flex;
3441
flex-direction: column;

frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* SPDX-License-Identifier: Apache-2.0
2020
********************************************************************************/
2121

22+
import { Location } from '@angular/common';
2223
import {
2324
ChangeDetectionStrategy,
2425
ChangeDetectorRef,
@@ -57,14 +58,14 @@ export class PartRelationComponent implements OnInit, OnDestroy {
5758
public readonly rootPart$: Observable<View<Part>>;
5859
public readonly resizeTrigger$: Observable<number>;
5960
public readonly htmlId: string;
60-
6161
private _rootPart$ = new State<View<Part>>({ loader: true });
6262
public readonly _resizeTrigger$ = new BehaviorSubject<number>(0);
6363

6464
constructor(
6565
private readonly partDetailsFacade: PartDetailsFacade,
6666
private readonly route: ActivatedRoute,
6767
private readonly cdr: ChangeDetectorRef,
68+
private readonly location: Location,
6869
staticIdService: StaticIdService,
6970
) {
7071
this.resizeTrigger$ = this._resizeTrigger$.pipe(delay(0));
@@ -99,4 +100,8 @@ export class PartRelationComponent implements OnInit, OnDestroy {
99100
public decreaseSize(): void {
100101
this._resizeTrigger$.next(-0.1);
101102
}
103+
104+
navigateBack() {
105+
this.location.back();
106+
}
102107
}

0 commit comments

Comments
 (0)