[SI-2560 + SI-2563] bugfixes
Signed-off-by: Peter Buschmann <peter.buschmann@pta.de>
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
index 2f4e6f1..4df16e3 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.sandbox.ts
@@ -352,7 +352,7 @@
})
);
} else {
- // Checks if only coordinates are invalid
+ // Checks if only coordinates or station or address invalid
const latControl = this.currentFormState.controls.latitude;
const longControl = this.currentFormState.controls.longitude;
const cityControl = this.currentFormState.controls.city;
@@ -360,6 +360,7 @@
const postcodeControl = this.currentFormState.controls.postcode;
const streetControl = this.currentFormState.controls.street;
const housenumberControl = this.currentFormState.controls.housenumber;
+ const radiusControl = this.currentFormState.controls.radiusId;
const allButGridFailureLocationAreValid = Object.keys(this.currentFormState.controls || {}).every((controlKey: string) => {
return (
controlKey === 'id' ||
@@ -370,6 +371,7 @@
this.currentFormState.controls[controlKey].id === postcodeControl.id ||
this.currentFormState.controls[controlKey].id === streetControl.id ||
this.currentFormState.controls[controlKey].id === housenumberControl.id ||
+ this.currentFormState.controls[controlKey].id === radiusControl.id ||
this.currentFormState.controls[controlKey].isValid
);
});
@@ -380,7 +382,8 @@
!districtControl.isValid ||
!postcodeControl.isValid ||
!streetControl.isValid ||
- !housenumberControl.isValid)
+ !housenumberControl.isValid ||
+ !radiusControl.isValid)
) {
this._utilService.displayNotification('MandatoryMapFieldError', 'alert');
} else {