From 939f1819a6f53d2a55570cbbe156706dccec6065 Mon Sep 17 00:00:00 2001 From: ashanmugavel Date: Mon, 5 Aug 2024 15:20:28 +0200 Subject: [PATCH] chore[1300]: added back Button --- CHANGELOG.md | 1 + .../presentation/part-relation.component.html | 13 +++++++++++++ .../presentation/part-relation.component.ts | 9 +++++++-- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1debde7819..1f5386b059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.html b/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.html index 6f7ccb25b6..e9965f519f 100644 --- a/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.html +++ b/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.html @@ -19,6 +19,19 @@ SPDX-License-Identifier: Apache-2.0 --> +
+ +
+ arrow_back + {{ 'actions.goBack' | i18n }} +
+
+
+ diff --git a/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.ts b/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.ts index 45992c60de..4788d39a42 100644 --- a/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.ts +++ b/frontend/src/app/modules/shared/modules/relations/presentation/part-relation.component.ts @@ -19,6 +19,7 @@ * SPDX-License-Identifier: Apache-2.0 ********************************************************************************/ +import { Location } from '@angular/common'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -28,7 +29,7 @@ import { OnInit, ViewEncapsulation, } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, Router } from '@angular/router'; import { Part } from '@page/parts/model/parts.model'; import { State } from '@shared/model/state'; import { View } from '@shared/model/view.model'; @@ -57,7 +58,6 @@ export class PartRelationComponent implements OnInit, OnDestroy { public readonly rootPart$: Observable>; public readonly resizeTrigger$: Observable; public readonly htmlId: string; - private _rootPart$ = new State>({ loader: true }); public readonly _resizeTrigger$ = new BehaviorSubject(0); @@ -65,6 +65,7 @@ export class PartRelationComponent implements OnInit, OnDestroy { 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)); @@ -99,4 +100,8 @@ export class PartRelationComponent implements OnInit, OnDestroy { public decreaseSize(): void { this._resizeTrigger$.next(-0.1); } + + navigateBack() { + this.location.back(); + } }