Skip to content
Snippets Groups Projects
Commit 6ba80a1d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6908 errormessage anpassen

parent 9f970b5b
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ describe('CollaborationRequestFormService', () => { ...@@ -115,7 +115,7 @@ describe('CollaborationRequestFormService', () => {
formService.submit().subscribe(); formService.submit().subscribe();
expect(snackBarService.showError).toHaveBeenCalledWith(commandResourceWithError.errorMessage); expect(snackBarService.showError).toHaveBeenCalledWith(CollaborationRequestFormService.GENERIC_ERROR_MESSAGE);
}); });
}); });
......
...@@ -15,7 +15,7 @@ export class CollaborationRequestFormService extends AbstractFormService<Command ...@@ -15,7 +15,7 @@ export class CollaborationRequestFormService extends AbstractFormService<Command
public static readonly FIELD_TITEL: string = 'titel'; public static readonly FIELD_TITEL: string = 'titel';
public static readonly FIELD_BESCHREIBUNG: string = 'beschreibung'; public static readonly FIELD_BESCHREIBUNG: string = 'beschreibung';
public static readonly GENERIC_ERROR_MESSAGE: string = 'Fehler beim Anfragen der Zuarbeit'; public static readonly GENERIC_ERROR_MESSAGE: string = 'Zuarbeit konnte nicht angefragt werden';
private static readonly PATH_PREFIX: string = 'command.body'; private static readonly PATH_PREFIX: string = 'command.body';
...@@ -49,12 +49,12 @@ export class CollaborationRequestFormService extends AbstractFormService<Command ...@@ -49,12 +49,12 @@ export class CollaborationRequestFormService extends AbstractFormService<Command
if (isNil(commandResource)) return; if (isNil(commandResource)) return;
if (hasCommandError(commandResource)) { if (hasCommandError(commandResource)) {
this.showError(commandResource); this.showError();
} }
} }
protected showError(commandResource: CommandResource): void { protected showError(): void {
this.snackBarService.showError(commandResource.errorMessage ?? CollaborationRequestFormService.GENERIC_ERROR_MESSAGE); this.snackBarService.showError(CollaborationRequestFormService.GENERIC_ERROR_MESSAGE);
} }
protected getPathPrefix(): string { protected getPathPrefix(): string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment