[SI-2781, SI-2790] - load address fields depending on the branch
Signed-off-by: dtheinert <dietmar.theinert@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 09180f0..ab364a7 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
@@ -198,8 +198,8 @@
this.appState$.dispatch(gridFailureActions.loadAllAddressCommunities({ branch: null }));
}
- public loadGridFailureDistricts(community: string): void {
- this.appState$.dispatch(gridFailureActions.loadAddressDistrictsOfCommunity({ branch: null, community: community }));
+ public loadGridFailureDistricts(community: string, branch: string): void {
+ this.appState$.dispatch(gridFailureActions.loadAddressDistrictsOfCommunity({ branch: branch, community: community }));
}
public dateValueConverter = NgrxValueConverters.objectToJSON;
@@ -891,7 +891,9 @@
break;
case formState.controls.city.id:
- this.loadGridFailureDistricts(formState.value.city);
+ this.loadGridFailureDistricts(
+ formState.value.city,
+ formState.value.branch);
break;
case formState.controls.district.id: