refactor: Ersetze fetchData-Aufrufe durch fetchByUser- und fetchByGroup-Methoden in UserRepresentationComponent, um Fehler zu vermeiden.

This commit is contained in:
Developer 02
2024-11-06 15:46:27 +01:00
parent 8cf2183cd6
commit fb3dedadc5

View File

@@ -108,10 +108,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
this.repUsers.safelyUnselectAll() this.repUsers.safelyUnselectAll()
this.repGroups.safelyUnselectAll() this.repGroups.safelyUnselectAll()
if (this.slUserId != undefined) if (this.slUserId)
this.userReps.fetchData(this.slUserId) this.userReps.fetchByUser(this.slUserId)
if (this.slGroupId != undefined) if (this.slGroupId)
this.userReps.fetchData(this.slGroupId) this.userReps.fetchByGroup(this.slGroupId)
}, },
error: (error) => { error: (error) => {
Swal.fire({ Swal.fire({
@@ -158,10 +158,10 @@ export class UserRepresentationComponent extends BasePageComponent implements Af
this.slRepGroupId = undefined; this.slRepGroupId = undefined;
this.repUsers.safelyUnselectAll() this.repUsers.safelyUnselectAll()
this.groups.safelyUnselectAll() this.groups.safelyUnselectAll()
if (this.slUserId != undefined) if (this.slUserId)
this.userReps.fetchData(this.slUserId) this.userReps.fetchByUser(this.slUserId)
if (this.slGroupId != undefined) if (this.slGroupId)
this.userReps.fetchData(undefined, this.slGroupId) this.userReps.fetchByGroup(this.slGroupId)
}, },
error: (error) => { error: (error) => {
Swal.fire({ Swal.fire({