feat: GroupService zur Filterung von importierten Gruppen in DirGroupTableComponent hinzugefügt
This commit is contained in:
parent
21ab7b5f32
commit
5a7eb504a9
@ -7,6 +7,8 @@ import { ColorModeService } from '../../../services/color-mode.service';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { env } from '../../../../environments/environment';
|
||||
import { GroupService } from '../../../services/group.service';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
@ -16,7 +18,18 @@ import { env } from '../../../../environments/environment';
|
||||
styleUrl: './dir-group-table.component.css'
|
||||
})
|
||||
export class DirGroupTableComponent extends BaseTableComponent<DirGroup, DirGroupService> {
|
||||
constructor(service: DirGroupService, cModeService: ColorModeService) {
|
||||
constructor(service: DirGroupService, cModeService: ColorModeService, private gService: GroupService) {
|
||||
super(service, env.columnNames.dirGroup, cModeService)
|
||||
}
|
||||
|
||||
override fetchData(): void {
|
||||
this.service.getAll().subscribe({
|
||||
next: async (response) => {
|
||||
const group_names = (await firstValueFrom(this.gService.getAll())).map(g => g.name);
|
||||
this.source = response.filter(dGroup => dGroup.samaccountname.length && group_names.includes(dGroup.samaccountname[0]));
|
||||
this.loading = false;
|
||||
},
|
||||
error: (error) => { }
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user