Skip to content
Snippets Groups Projects
Commit 14b641f5 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4949 Use explicit `FormControl`

parent 07403a6a
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ describe('PostfachFormService', () => {
expect(postfachService.save).toHaveBeenCalledWith(postfach);
});
describe('without absender values', () => {
describe('with empty or null absender values', () => {
const formValueWithAbsender = {
[PostfachFormService.ASBSENDER_GROUP]: {
[PostfachFormService.NAME_FIELD]: '',
......
import { AbstractFormService, HttpError, StateResource } from '@alfa-client/tech-shared';
import { Injectable } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { FormControl, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { Observable } from 'rxjs';
import { PostfachService } from '../../postfach.service';
import { Postfach, PostfachResource } from '../../postfach.model';
......@@ -27,13 +27,13 @@ export class PostfachFormService extends AbstractFormService {
protected initForm(): UntypedFormGroup {
return this.formBuilder.group({
[PostfachFormService.ASBSENDER_GROUP]: this.formBuilder.group({
[PostfachFormService.NAME_FIELD]: [''],
[PostfachFormService.ANSCHRIFT_FIELD]: [''],
[PostfachFormService.DIENST_FIELD]: [''],
[PostfachFormService.MANDANT_FIELD]: [''],
[PostfachFormService.GEMEINDESCHLUESSEL_FIELD]: [''],
[PostfachFormService.NAME_FIELD]: new FormControl(''),
[PostfachFormService.ANSCHRIFT_FIELD]: new FormControl(''),
[PostfachFormService.DIENST_FIELD]: new FormControl(''),
[PostfachFormService.MANDANT_FIELD]: new FormControl(''),
[PostfachFormService.GEMEINDESCHLUESSEL_FIELD]: new FormControl(''),
}),
[PostfachFormService.SIGNATUR_FIELD]: [''],
[PostfachFormService.SIGNATUR_FIELD]: new FormControl(''),
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment