diff --git a/frontend/app/services/hierarchy.service.ts b/frontend/app/services/hierarchy.service.ts index 53054cc3..c69827d9 100644 --- a/frontend/app/services/hierarchy.service.ts +++ b/frontend/app/services/hierarchy.service.ts @@ -37,6 +37,10 @@ export class HierarchyService { this.isLoading = false; } + clear(): void { + this.warning = ''; + } + getHierarchyFromZh(zh) { if (zh.properties.main_id_rb) { this.getHierarchy(zh.properties.id_zh); diff --git a/frontend/app/zh-forms/tabs/tab0/zh-form-tab0.component.ts b/frontend/app/zh-forms/tabs/tab0/zh-form-tab0.component.ts index 8ffd8dfe..b0a45bb4 100755 --- a/frontend/app/zh-forms/tabs/tab0/zh-form-tab0.component.ts +++ b/frontend/app/zh-forms/tabs/tab0/zh-form-tab0.component.ts @@ -284,7 +284,7 @@ export class ZhFormTab0Component implements OnInit { ngOnDestroy() { if (this.$_geojsonSub) this.$_geojsonSub.unsubscribe(); if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } featureCollectionToMultipolygon(featureCollection) { diff --git a/frontend/app/zh-forms/tabs/tab1/zh-form-tab1.component.ts b/frontend/app/zh-forms/tabs/tab1/zh-form-tab1.component.ts index e45fb962..1d3dd3c4 100755 --- a/frontend/app/zh-forms/tabs/tab1/zh-form-tab1.component.ts +++ b/frontend/app/zh-forms/tabs/tab1/zh-form-tab1.component.ts @@ -199,6 +199,6 @@ export class ZhFormTab1Component implements OnInit { ngOnDestroy() { if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); this.ngbModal.dismissAll(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab2/zh-form-tab2.component.ts b/frontend/app/zh-forms/tabs/tab2/zh-form-tab2.component.ts index 67a9e197..c22e54d5 100755 --- a/frontend/app/zh-forms/tabs/tab2/zh-form-tab2.component.ts +++ b/frontend/app/zh-forms/tabs/tab2/zh-form-tab2.component.ts @@ -141,6 +141,6 @@ export class ZhFormTab2Component implements OnInit, AfterViewInit { ngOnDestroy() { if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); if (this.$_fromChangeSub) this.$_fromChangeSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab3/zh-form-tab3.component.ts b/frontend/app/zh-forms/tabs/tab3/zh-form-tab3.component.ts index 059ea6ac..bb1e8dbe 100755 --- a/frontend/app/zh-forms/tabs/tab3/zh-form-tab3.component.ts +++ b/frontend/app/zh-forms/tabs/tab3/zh-form-tab3.component.ts @@ -471,6 +471,6 @@ export class ZhFormTab3Component implements OnInit { ngOnDestroy() { if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); if (this.$_fromChangeSub) this.$_fromChangeSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab4/zh-form-tab4.component.ts b/frontend/app/zh-forms/tabs/tab4/zh-form-tab4.component.ts index 6e48f470..ceb55322 100755 --- a/frontend/app/zh-forms/tabs/tab4/zh-form-tab4.component.ts +++ b/frontend/app/zh-forms/tabs/tab4/zh-form-tab4.component.ts @@ -475,6 +475,6 @@ export class ZhFormTab4Component implements OnInit { } ngOnDestroy() { - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab5/zh-form-tab5.component.ts b/frontend/app/zh-forms/tabs/tab5/zh-form-tab5.component.ts index 212d1e57..4aaf22df 100755 --- a/frontend/app/zh-forms/tabs/tab5/zh-form-tab5.component.ts +++ b/frontend/app/zh-forms/tabs/tab5/zh-form-tab5.component.ts @@ -1180,6 +1180,6 @@ export class ZhFormTab5Component implements OnInit { ngOnDestroy() { if (this.$_getTabChangeSub) this.$_getTabChangeSub.unsubscribe(); if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab6/zh-form-tab6.component.ts b/frontend/app/zh-forms/tabs/tab6/zh-form-tab6.component.ts index 98e48b67..6c5a2523 100755 --- a/frontend/app/zh-forms/tabs/tab6/zh-form-tab6.component.ts +++ b/frontend/app/zh-forms/tabs/tab6/zh-form-tab6.component.ts @@ -1021,6 +1021,6 @@ export class ZhFormTab6Component implements OnInit { ngOnDestroy() { if (this.$_getTabChangeSub) this.$_getTabChangeSub.unsubscribe(); if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab7/zh-form-tab7.component.ts b/frontend/app/zh-forms/tabs/tab7/zh-form-tab7.component.ts index 4e4dab40..a5c87603 100755 --- a/frontend/app/zh-forms/tabs/tab7/zh-form-tab7.component.ts +++ b/frontend/app/zh-forms/tabs/tab7/zh-form-tab7.component.ts @@ -492,6 +492,6 @@ export class ZhFormTab7Component implements OnInit { ngOnDestroy() { if (this.$_getTabChangeSub) this.$_getTabChangeSub.unsubscribe(); if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } } diff --git a/frontend/app/zh-forms/tabs/tab9/zh-form-tab9.component.ts b/frontend/app/zh-forms/tabs/tab9/zh-form-tab9.component.ts index 7fe8878b..f914dc51 100755 --- a/frontend/app/zh-forms/tabs/tab9/zh-form-tab9.component.ts +++ b/frontend/app/zh-forms/tabs/tab9/zh-form-tab9.component.ts @@ -51,6 +51,6 @@ export class ZhFormTab9Component implements OnInit { ngOnDestroy() { if (this.$_getTabChangeSub) this.$_getTabChangeSub.unsubscribe(); if (this.$_currentZhSub) this.$_currentZhSub.unsubscribe(); - this.hierarchy.warning = ''; + this.hierarchy.clear(); } }