Skip to content

Commit

Permalink
fixed all organization at admin
Browse files Browse the repository at this point in the history
  • Loading branch information
Aish1990 committed Aug 8, 2024
1 parent f2cd901 commit f2b08da
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
10 changes: 10 additions & 0 deletions src/app/auth/services/admin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ export class AdminService {
) {
searchUrl += `&organizationName=${searchData.organizationName}`;
}

if (
!(
searchData.organizationType === undefined ||
searchData.organizationType === '' ||
searchData.organizationType === null
)
) {
searchUrl += `&organizationType=${searchData.organizationType}`;
}
}
return this.httpClient.get<any>(searchUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export class AdminOrganizationComponent {

this.FilterForm = this.formBuilder.group({
organizationName: [],
organizationType: '',
});
}
ngOnInit() {
Expand Down Expand Up @@ -165,19 +166,15 @@ export class AdminOrganizationComponent {
}
getAllOrganization(page: number) {
const limit = 20;
this.FilterForm.value['organizationType'] = 'ApiUser';
this.adminService
.GetAllOrganization(page, limit, this.FilterForm.value)
.subscribe(
(data) => {
this.showlist = true;
this.loading = false;
this.data = data;
this.dataSource = new MatTableDataSource(
this.data.organizations.filter(
(org: OrganizationInformation) =>
org.organizationType != 'ApiUser',
),
);
this.dataSource = new MatTableDataSource(this.data.organizations);
this.totalRows = this.data.totalCount;
this.totalPages = this.data.totalPages;
this.dataSource.sort = this.sort;
Expand Down

0 comments on commit f2b08da

Please sign in to comment.