feat: fetchByUser und fetchByGroup Methoden in UserRepTableComponent zur gezielten Datenabfrage hinzugefügt

This commit is contained in:
Developer 02 2024-11-06 11:15:21 +01:00
parent 296f29cf82
commit 616862391e
2 changed files with 10 additions and 2 deletions

View File

@ -31,4 +31,12 @@ export class UserRepTableComponent extends BaseTableComponent<UserRep, UserRepSe
error: (error: any) => { }
});
}
public fetchByUser(id: number): void {
this.fetchData(id, undefined);
}
public fetchByGroup(id: number): void {
this.fetchData(undefined, id);
}
}

View File

@ -63,7 +63,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
if (rows.length > 0) {
this.useRepLabel = `Vertretungen von ${rows[0].source?.username}`
this.users.safelyUnselectAll();
this.userReps.fetchData(rows[0].source?.id)
this.userReps.fetchByUser(rows[0].source?.id);
this.slGroupId = undefined;
this.slUserId = rows[0].source?.id
}
@ -73,7 +73,7 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
if (rows.length > 0) {
this.useRepLabel = `Vertretungen von ${rows[0].source?.name}`
this.groups.safelyUnselectAll();
this.userReps.fetchData(undefined, rows[0].source?.id)
this.userReps.fetchByGroup(rows[0].source?.id);
this.slUserId = undefined;
this.slGroupId = rows[0].source?.id
}