feat: Referenztypen zwischen Backend und Frontend standardisieren
- `GetReferenceTypes`-Endpunkt im `HistoryController` hinzugefügt, um Key-Value-Paare des `ReferenceType`-Enums im camelCase-Format bereitzustellen. - `ConfigurationService` in Angular erweitert, um die `ReferenceType`-Werte vom neuen API-Endpunkt abzurufen und zu speichern.
This commit is contained in:
@@ -14,6 +14,8 @@ export class ConfigurationService implements OnInit {
|
||||
|
||||
private _envelopeTypeTitles! : any[];
|
||||
|
||||
private referenceType!: any;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
const api_url = inject(API_URL);
|
||||
this.url = `${api_url}`;
|
||||
@@ -25,6 +27,10 @@ export class ConfigurationService implements OnInit {
|
||||
this._envelopeTypes = res;
|
||||
this._envelopeTypeTitles = res.map(e => e.title);
|
||||
}});
|
||||
|
||||
this.http.get<any>(`${this.url}/History/reference-type`).subscribe({
|
||||
next: res => this.referenceType = res
|
||||
})
|
||||
}
|
||||
|
||||
public get envelopeTypes() {
|
||||
@@ -34,4 +40,4 @@ export class ConfigurationService implements OnInit {
|
||||
public get envelopeTypeTitles() {
|
||||
return this._envelopeTypeTitles;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user