diff --git a/src/main/angular/src/app/api/ISearchService.ts b/src/main/angular/src/app/api/ISearchService.ts
new file mode 100644
index 0000000..ef04432
--- /dev/null
+++ b/src/main/angular/src/app/api/ISearchService.ts
@@ -0,0 +1,9 @@
+import {KeyValuePair} from "./KeyValuePair";
+
+export interface ISearchService {
+
+ get(id: string, next: (results: KeyValuePair) => void, error: (error: any) => void): void;
+
+ search(term: string, next: (results: KeyValuePair[]) => void, error: (error: any) => void): void;
+
+}
diff --git a/src/main/angular/src/app/api/KeyValuePair.ts b/src/main/angular/src/app/api/KeyValuePair.ts
new file mode 100644
index 0000000..7783f3f
--- /dev/null
+++ b/src/main/angular/src/app/api/KeyValuePair.ts
@@ -0,0 +1,26 @@
+import {validateStringNotEmptyNotNull} from "./validators";
+
+export class KeyValuePair {
+
+ constructor(
+ readonly key: string,
+ readonly value: string,
+ ) {
+ }
+
+ static fromJson(json: any): KeyValuePair {
+ return new KeyValuePair(
+ validateStringNotEmptyNotNull(json['key']),
+ validateStringNotEmptyNotNull(json['value']),
+ );
+ }
+
+ public static trackBy(index: number, item: KeyValuePair): string {
+ return item.value;
+ }
+
+ public static compareKey(a: KeyValuePair, b: KeyValuePair): number {
+ return a.value.localeCompare(b.value);
+ }
+
+}
diff --git a/src/main/angular/src/app/api/property/property.service.spec.ts b/src/main/angular/src/app/api/property/property.service.spec.ts
new file mode 100644
index 0000000..d3f54bc
--- /dev/null
+++ b/src/main/angular/src/app/api/property/property.service.spec.ts
@@ -0,0 +1,16 @@
+import {TestBed} from '@angular/core/testing';
+
+import {PropertyService} from './property.service';
+
+describe('PropertyService', () => {
+ let service: PropertyService;
+
+ beforeEach(() => {
+ TestBed.configureTestingModule({});
+ service = TestBed.inject(PropertyService);
+ });
+
+ it('should be created', () => {
+ expect(service).toBeTruthy();
+ });
+});
diff --git a/src/main/angular/src/app/api/property/property.service.ts b/src/main/angular/src/app/api/property/property.service.ts
new file mode 100644
index 0000000..e810cb7
--- /dev/null
+++ b/src/main/angular/src/app/api/property/property.service.ts
@@ -0,0 +1,54 @@
+import {Injectable} from '@angular/core';
+import {ApiService, NO_OP} from "../api.service";
+import {validateNumberNotNull, validateStringNotEmptyNotNull} from "../validators";
+import {ISearchService} from "../ISearchService";
+import {KeyValuePair} from "../KeyValuePair";
+
+export class Property {
+
+ constructor(
+ public name: string,
+ public type: string,
+ public value: number,
+ ) {
+ // nothing
+ }
+
+ static fromJson(json: any): Property {
+ return new Property(
+ validateStringNotEmptyNotNull(json['name']),
+ validateStringNotEmptyNotNull(json['type']),
+ validateNumberNotNull(json['value']),
+ );
+ }
+
+ public static trackBy(index: number, item: Property): string {
+ return item.name;
+ }
+
+ public static compareName(a: Property, b: Property): number {
+ return a.name.localeCompare(b.name);
+ }
+
+}
+
+@Injectable({
+ providedIn: 'root'
+})
+export class PropertyService implements ISearchService {
+
+ constructor(
+ readonly api: ApiService,
+ ) {
+ // nothing
+ }
+
+ get(id: string, next: (results: KeyValuePair) => void, error: (error: any) => void): void {
+ this.api.postReturnItem("property/getById", id, KeyValuePair.fromJson, next, error);
+ }
+
+ search(term: string, next: (results: KeyValuePair[]) => void = NO_OP, error: (error: any) => void = NO_OP): void {
+ this.api.postReturnList("property/searchLike", term, KeyValuePair.fromJson, next, error);
+ }
+
+}
diff --git a/src/main/angular/src/app/app.component.html b/src/main/angular/src/app/app.component.html
index d089a1c..0ae728b 100644
--- a/src/main/angular/src/app/app.component.html
+++ b/src/main/angular/src/app/app.component.html
@@ -4,9 +4,9 @@
Zeitpläne
-
- {{dataService.schedule.name}}
-
+
+
+
diff --git a/src/main/angular/src/app/app.module.ts b/src/main/angular/src/app/app.module.ts
index b9a730f..4b869ff 100644
--- a/src/main/angular/src/app/app.module.ts
+++ b/src/main/angular/src/app/app.module.ts
@@ -10,6 +10,7 @@ import {ScheduleListComponent} from './pages/schedule-list/schedule-list.compone
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
import {NumberComponent} from './shared/number/number.component';
import {ScheduleComponent} from "./pages/schedule/schedule.component";
+import {SearchComponent} from './shared/search/search.component';
@NgModule({
declarations: [
@@ -18,6 +19,7 @@ import {ScheduleComponent} from "./pages/schedule/schedule.component";
ScheduleComponent,
ScheduleListComponent,
NumberComponent,
+ SearchComponent,
],
imports: [
BrowserModule,
diff --git a/src/main/angular/src/app/pages/schedule/schedule.component.html b/src/main/angular/src/app/pages/schedule/schedule.component.html
index 5cd6c5c..bc43bd3 100644
--- a/src/main/angular/src/app/pages/schedule/schedule.component.html
+++ b/src/main/angular/src/app/pages/schedule/schedule.component.html
@@ -14,7 +14,7 @@
-
+
|
|