Skip to content

Commit

Permalink
Merge pull request #1350 from ds-ashanmugavel/chore/1300-FE-Bug
Browse files Browse the repository at this point in the history
chore[1300]: added back Button
  • Loading branch information
ds-mwesener authored Aug 6, 2024
2 parents ea63855 + c871593 commit 9342426
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha

### Added
- #908 Add owner field to affected parts view in notification details
- #1300 Added back button

### Changed
- #1252 adapt IRS example response for integration tests to reflect current state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@
SPDX-License-Identifier: Apache-2.0
-->
<div class="part-relation--header--navigation--container" *ngIf="showMiniMap">
<app-button
[color]="'primary'"
onkeydown="this.navigateBack()"
(click)="this.navigateBack()"
>
<div class="flex justify-between items-center">
<mat-icon class="mr-2">arrow_back</mat-icon>
{{ 'actions.goBack' | i18n }}
</div>
</app-button>
</div>

<ng-container *ngIf="this.rootPart$">
<ng-container *viewContainer="this.rootPart$ | async; main: partRelationMainTmp; error: errorTmp; loading: loaderTmp">
</ng-container>
</ng-container>

<ng-template #partRelationMainTmp let-partDetails="view">
<div class="part-relation--button-container">
<app-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
right: 0;
}

.part-relation--header--navigation--container {
position: absolute;
top: 10px;
left: 10px;
z-index: 1000;
}

.part-relation--button-container {
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

import { Location } from '@angular/common';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Expand Down Expand Up @@ -57,14 +58,14 @@ export class PartRelationComponent implements OnInit, OnDestroy {
public readonly rootPart$: Observable<View<Part>>;
public readonly resizeTrigger$: Observable<number>;
public readonly htmlId: string;

private _rootPart$ = new State<View<Part>>({ loader: true });
public readonly _resizeTrigger$ = new BehaviorSubject<number>(0);

constructor(
private readonly partDetailsFacade: PartDetailsFacade,
private readonly route: ActivatedRoute,
private readonly cdr: ChangeDetectorRef,
private readonly location: Location,
staticIdService: StaticIdService,
) {
this.resizeTrigger$ = this._resizeTrigger$.pipe(delay(0));
Expand Down Expand Up @@ -99,4 +100,8 @@ export class PartRelationComponent implements OnInit, OnDestroy {
public decreaseSize(): void {
this._resizeTrigger$.next(-0.1);
}

navigateBack() {
this.location.back();
}
}

0 comments on commit 9342426

Please sign in to comment.