Skip to content
Snippets Groups Projects
Verified Commit fca1ddce authored by Damien's avatar Damien
Browse files

FEAT #12091 TIME 0:10 Fix default department

parent d2c25828
No related branches found
No related tags found
No related merge requests found
...@@ -363,7 +363,9 @@ export class ContactsPageAdministrationComponent implements OnInit { ...@@ -363,7 +363,9 @@ export class ContactsPageAdministrationComponent implements OnInit {
initBanSearch() { initBanSearch() {
this.http.get("../../rest/ban/availableDepartments").pipe( this.http.get("../../rest/ban/availableDepartments").pipe(
tap((data: any) => { tap((data: any) => {
this.addressBANCurrentDepartment = data.default !== null ? data.default : this.addressBANCurrentDepartment; if (data.default !== null && data.departments.indexOf(data.default) !== - 1) {
this.addressBANCurrentDepartment = data.default;
}
this.departmentList = data.departments; this.departmentList = data.departments;
}), }),
catchError((err: any) => { catchError((err: any) => {
...@@ -642,4 +644,4 @@ export class ContactsPageAdministrationComponent implements OnInit { ...@@ -642,4 +644,4 @@ export class ContactsPageAdministrationComponent implements OnInit {
this.addressBANMode = !this.addressBANMode; this.addressBANMode = !this.addressBANMode;
} }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment