From 449e58b8ec54efce53edcf450e0bc077d6c28448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Ha=C3=9Fel?= Date: Wed, 5 Jul 2023 23:31:07 +0200 Subject: [PATCH] UI sorting --- src/main/angular/src/app/api/bulk/BulkEntry.ts | 10 ++++++++++ .../app/pages/bulk/editor/bulk-editor.component.html | 11 ++++++----- .../app/pages/bulk/editor/bulk-editor.component.ts | 2 ++ .../src/app/pages/bulk/list/bulk-list.component.html | 8 ++++---- .../schedule/editor/schedule-editor.component.html | 8 ++++---- .../pages/schedule/list/schedule-list.component.html | 8 ++++---- 6 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/main/angular/src/app/api/bulk/BulkEntry.ts b/src/main/angular/src/app/api/bulk/BulkEntry.ts index 0ae472a..fdf1610 100644 --- a/src/main/angular/src/app/api/bulk/BulkEntry.ts +++ b/src/main/angular/src/app/api/bulk/BulkEntry.ts @@ -25,4 +25,14 @@ export class BulkEntry { ); } + static compareName(a: BulkEntry, b: BulkEntry) { + if (!a.property) { + return +1; + } + if (!b.property) { + return -1; + } + return a.property.title.localeCompare(b.property.title); + } + } diff --git a/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.html b/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.html index 139a67d..518b221 100644 --- a/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.html +++ b/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.html @@ -2,15 +2,19 @@

+ +

+ +

+ - - + @@ -52,7 +56,4 @@
Eigenschaft Wert   
-

- -

diff --git a/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.ts b/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.ts index 54a5356..8e1698a 100644 --- a/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.ts +++ b/src/main/angular/src/app/pages/bulk/editor/bulk-editor.component.ts @@ -13,6 +13,8 @@ import {faTimesCircle} from "@fortawesome/free-regular-svg-icons"; }) export class BulkEditorComponent implements OnInit { + protected readonly BulkEntry = BulkEntry; + readonly faTimes = faTimesCircle; bulk!: Bulk; diff --git a/src/main/angular/src/app/pages/bulk/list/bulk-list.component.html b/src/main/angular/src/app/pages/bulk/list/bulk-list.component.html index 68d9cbe..d622ead 100644 --- a/src/main/angular/src/app/pages/bulk/list/bulk-list.component.html +++ b/src/main/angular/src/app/pages/bulk/list/bulk-list.component.html @@ -1,3 +1,7 @@ +

+ +

+ @@ -26,7 +30,3 @@
 
- -

- -

diff --git a/src/main/angular/src/app/pages/schedule/editor/schedule-editor.component.html b/src/main/angular/src/app/pages/schedule/editor/schedule-editor.component.html index 595e729..4d08705 100644 --- a/src/main/angular/src/app/pages/schedule/editor/schedule-editor.component.html +++ b/src/main/angular/src/app/pages/schedule/editor/schedule-editor.component.html @@ -7,6 +7,10 @@ +

+ +

+ @@ -144,8 +148,4 @@
-

- -

- diff --git a/src/main/angular/src/app/pages/schedule/list/schedule-list.component.html b/src/main/angular/src/app/pages/schedule/list/schedule-list.component.html index 2cc3109..fafb7df 100644 --- a/src/main/angular/src/app/pages/schedule/list/schedule-list.component.html +++ b/src/main/angular/src/app/pages/schedule/list/schedule-list.component.html @@ -1,3 +1,7 @@ +

+ +

+ @@ -43,7 +47,3 @@
 
- -

- -