From 846fcb1d78ae88ad9e39ca1af0adc2cef989d38e Mon Sep 17 00:00:00 2001
From: Jonas Leder <jonas.leder@jobrouter.com>
Date: Wed, 16 Mar 2022 14:29:11 +0100
Subject: [PATCH] navigate to "buchung" when clicking on element

---
 src/app/bestand/bestand.component.html | 2 +-
 src/app/bestand/bestand.component.ts   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/app/bestand/bestand.component.html b/src/app/bestand/bestand.component.html
index 947107c..cfad9dd 100644
--- a/src/app/bestand/bestand.component.html
+++ b/src/app/bestand/bestand.component.html
@@ -26,5 +26,5 @@
     </ng-container>
 
     <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
-    <tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
+    <tr mat-row *matRowDef="let row; columns: displayedColumns;" (click)="rowClicked(row)"></tr>
 </table>
\ No newline at end of file
diff --git a/src/app/bestand/bestand.component.ts b/src/app/bestand/bestand.component.ts
index 08b2210..2308c74 100644
--- a/src/app/bestand/bestand.component.ts
+++ b/src/app/bestand/bestand.component.ts
@@ -42,6 +42,10 @@ export class BestandComponent implements OnInit {
       });
   }
 
+  rowClicked(row: Product) {
+    window.location.href = "/#/buchung?item=" + row.id
+  }
+
   ngOnDestroy() {
     this.querySubscription.unsubscribe();
   }
-- 
GitLab