From 5b57cf4fb2d837f31b0e421f528111f5c08595fa Mon Sep 17 00:00:00 2001 From: apuente Date: Wed, 9 Oct 2024 16:58:18 +0200 Subject: [PATCH] refs #909 Add null validations --- .../edit-organizational-unit.component.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts index c7b5607..1bc65e3 100644 --- a/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts +++ b/ogWebconsole/src/app/components/groups/shared/organizational-units/edit-organizational-unit/edit-organizational-unit.component.ts @@ -46,38 +46,38 @@ export class EditOrganizationalUnitComponent implements OnInit { this.isEditMode = !!data?.uuid; this.generalFormGroup = this._formBuilder.group({ - name: ['', Validators.required], - parent: [''], - description: [''], - type: ['', Validators.required] + name: [null], + parent: [null], + description: [null], + type: [null] }); this.additionalInfoFormGroup = this._formBuilder.group({ - comments: [''], + comments: [null], }); this.networkSettingsFormGroup = this._formBuilder.group({ - proxy: [''], - dns: [''], - netmask: [''], - router: [''], - ntp: [''], - p2pMode: [''], - p2pTime: [0, Validators.min(0)], - mcastIp: [''], - mcastSpeed: [0, Validators.min(0)], - mcastPort: [0, Validators.min(0)], - mcastMode: [''], + proxy: [null], + dns: [null], + netmask: [null], + router: [null], + ntp: [null], + p2pMode: [null], + p2pTime: [null], + mcastIp: [null], + mcastSpeed: [null], + mcastPort: [null], + mcastMode: [null], menu: [null], hardwareProfile: [null], validation: [false] }); this.classroomInfoFormGroup = this._formBuilder.group({ - location: [''], + location: [null], projector: [false], board: [false], - capacity: [0, Validators.min(0)], + capacity: [null], remoteCalendar: [null] });