Skip to content

Commit

Permalink
Merge pull request #64 from naturalsolutions/fix/wrong_rb_name_tab9
Browse files Browse the repository at this point in the history
fix: propagate rb name in tab9
  • Loading branch information
edelclaux authored May 21, 2024
2 parents 0cddada + 6ea0e1c commit 2d6ad5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions frontend/app/services/hierarchy.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ export class HierarchyService {
}

// get current zone humides
getHierarchy(zhId) {
getHierarchy(zhId, rb_name) {
this.isLoading = true;
this.rb_name = rb_name;
this._dataService.getHierZh(zhId).subscribe(
(data: HierarchyModel) => {
this.items = this.setItems(data);
Expand All @@ -65,8 +66,7 @@ export class HierarchyService {
this.items = [];
return;
}
this.rb_name = data.river_basin_name;


this.items = [{ name: '', active: true, qualification: '', knowledge: '', note: '' }];

// cat 1
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/zh-forms/tabs/tab9/zh-form-tab9.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class ZhFormTab9Component implements OnInit {
this.$_currentZhSub = this._dataService.currentZh.subscribe((zh: any) => {
if (zh) {
this.currentZh = zh;
this.hierarchy.getHierarchy(zh.id);
this.hierarchy.getHierarchy(zh.id, zh.properties.bassin_versant);
}
});
}
Expand Down

0 comments on commit 2d6ad5c

Please sign in to comment.