diff --git a/alfa-client/libs/admin-settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-form/organisationseinheit-form.component.ts b/alfa-client/libs/admin-settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-form/organisationseinheit-form.component.ts index 20e324636ca313d61ba55987f343268643d84cbf..2d831680baf34f61aaf30833fb8263e84d4c0995 100644 --- a/alfa-client/libs/admin-settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-form/organisationseinheit-form.component.ts +++ b/alfa-client/libs/admin-settings/src/lib/organisationseinheit/organisationseinheit-container/organisationseinheit-form/organisationseinheit-form.component.ts @@ -1,4 +1,4 @@ -import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core'; import { OrganisationseinheitFormservice } from './organisationseinheit.formservice'; import { Observable, of, tap } from 'rxjs'; import { Organisationseinheit } from '../../../user/user.model'; @@ -8,7 +8,7 @@ import { Organisationseinheit } from '../../../user/user.model'; templateUrl: './organisationseinheit-form.component.html', providers: [OrganisationseinheitFormservice], }) -export class OrganisationseinheitFormComponent implements OnInit, AfterViewInit { +export class OrganisationseinheitFormComponent implements AfterViewInit { static CREATE_LABEL: string = 'Neue Organisationseinheit anlegen'; static EDIT_LABEL: string = 'Organisationseinheit bearbeiten'; @@ -17,7 +17,7 @@ export class OrganisationseinheitFormComponent implements OnInit, AfterViewInit @ViewChild('OrganisationseinheitDialog') private dialogRef: ElementRef<HTMLDialogElement>; dialog: HTMLDialogElement; - submitInProgress$: Observable<boolean>; + submitInProgress$: Observable<boolean> = of(false); label: string; @@ -27,10 +27,6 @@ export class OrganisationseinheitFormComponent implements OnInit, AfterViewInit this.dialog = this.dialogRef.nativeElement; } - ngOnInit(): void { - this.submitInProgress$ = of(false); - } - public submit() { this.submitInProgress$ = this.formService .submit() diff --git a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts index c700cc756ec7415cc0ef43e1363418b95c1e40b1..5eb448110dd98a871331809bb3f09a635ef58b27 100644 --- a/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts +++ b/alfa-client/libs/admin-settings/src/lib/postfach/postfach-container/postfach-form/postfach-form.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { PostfachFormService } from './postfach.formservice'; import { isNotNil, ProblemDetail, StateResource } from '@alfa-client/tech-shared'; import { PostfachResource } from '../../postfach.model'; @@ -9,8 +9,8 @@ import { map, Observable, of } from 'rxjs'; templateUrl: './postfach-form.component.html', providers: [PostfachFormService], }) -export class PostfachFormComponent implements OnInit { - submitInProgress$: Observable<boolean>; +export class PostfachFormComponent { + submitInProgress$: Observable<boolean> = of(false); @Input() set postfachStateResource(stateResource: StateResource<PostfachResource>) { this.updatePostfachResource(stateResource.resource); @@ -26,10 +26,6 @@ export class PostfachFormComponent implements OnInit { constructor(public formService: PostfachFormService) {} - ngOnInit(): void { - this.submitInProgress$ = of(false); - } - public submit(): void { this.submitInProgress$ = this.formService .submit()