From 1e4ee57b61fe0da47c8000b95d26717e3a61c080 Mon Sep 17 00:00:00 2001 From: ewandor Date: Tue, 7 Feb 2023 18:27:17 +0100 Subject: [PATCH] adding a create button in lists --- .../src/common/crud/list/list.component.html | 35 +++++++++++-------- .../src/common/crud/list/list.component.ts | 4 +++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/front/app/src/common/crud/list/list.component.html b/front/app/src/common/crud/list/list.component.html index 51a9ad8a..865ccace 100644 --- a/front/app/src/common/crud/list/list.component.html +++ b/front/app/src/common/crud/list/list.component.html @@ -1,4 +1,8 @@
+ +
@@ -12,21 +16,22 @@
Loading...
- - - - - - - - - - - - -
{{ col }}
- -
+
+ + + + + + + + + + + +
{{ col }}
+ +
+
diff --git a/front/app/src/common/crud/list/list.component.ts b/front/app/src/common/crud/list/list.component.ts index 7783b8d2..40410042 100644 --- a/front/app/src/common/crud/list/list.component.ts +++ b/front/app/src/common/crud/list/list.component.ts @@ -103,6 +103,10 @@ export class ListComponent implements OnInit { this.router.navigate([`../${id}`], {relativeTo: this.route}); } + onCreate() { + this.router.navigate([`../new`], {relativeTo: this.route}); + } + get listData$() { return this._listData$.asObservable(); }