Umbenennung der Eigenschaft guid in id
This commit is contained in:
parent
5a6c2b5256
commit
542b2429e7
@ -47,24 +47,24 @@ export class UserTableComponent extends BaseTableComponent<User, UserService> {
|
|||||||
|
|
||||||
async createModuleOfUsers(moduleId: number, users: User[]): Promise<any[]> {
|
async createModuleOfUsers(moduleId: number, users: User[]): Promise<any[]> {
|
||||||
const creationPromises = users
|
const creationPromises = users
|
||||||
.filter(user => user.guid && user.guid != null)
|
.filter(user => user.id && user.id != null)
|
||||||
.map(user => this.mosService.create({ moduleId: moduleId, userId: user.guid ?? -1, addedWho: "DEFAULT" }).toPromise());
|
.map(user => this.mosService.create({ moduleId: moduleId, userId: user.id ?? -1, addedWho: "DEFAULT" }).toPromise());
|
||||||
|
|
||||||
return Promise.all(creationPromises);
|
return Promise.all(creationPromises);
|
||||||
}
|
}
|
||||||
|
|
||||||
async createGroupOfUsers(groupId: number, users: User[]): Promise<any[]> {
|
async createGroupOfUsers(groupId: number, users: User[]): Promise<any[]> {
|
||||||
const creationPromises = users
|
const creationPromises = users
|
||||||
.filter(user => user.guid && user.guid != null)
|
.filter(user => user.id && user.id != null)
|
||||||
.map(user => this.gosService.create({ groupId: groupId, userId: user.guid ?? -1, addedWho: "DEFAULT" }).toPromise());
|
.map(user => this.gosService.create({ groupId: groupId, userId: user.id ?? -1, addedWho: "DEFAULT" }).toPromise());
|
||||||
|
|
||||||
return Promise.all(creationPromises);
|
return Promise.all(creationPromises);
|
||||||
}
|
}
|
||||||
|
|
||||||
async deleteModuleOfUsers(moduleId: number, users: User[]): Promise<void> {
|
async deleteModuleOfUsers(moduleId: number, users: User[]): Promise<void> {
|
||||||
const deletionPromises = users
|
const deletionPromises = users
|
||||||
.filter(user => user.guid)
|
.filter(user => user.id)
|
||||||
.map(user => this.mosService.deleteByModuleGroupId(moduleId, user.guid ?? -1).toPromise());
|
.map(user => this.mosService.deleteByModuleGroupId(moduleId, user.id ?? -1).toPromise());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const responses = await Promise.all(deletionPromises);
|
const responses = await Promise.all(deletionPromises);
|
||||||
@ -74,8 +74,8 @@ export class UserTableComponent extends BaseTableComponent<User, UserService> {
|
|||||||
|
|
||||||
async deleteGroupOfUsers(groupId: number, users: User[]): Promise<void> {
|
async deleteGroupOfUsers(groupId: number, users: User[]): Promise<void> {
|
||||||
const deletionPromises = users
|
const deletionPromises = users
|
||||||
.filter(user => user.guid)
|
.filter(user => user.id)
|
||||||
.map(user => this.gosService.deleteByGroupUserId(groupId, user.guid ?? -1).toPromise());
|
.map(user => this.gosService.deleteByGroupUserId(groupId, user.id ?? -1).toPromise());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const responses = await Promise.all(deletionPromises);
|
const responses = await Promise.all(deletionPromises);
|
||||||
|
|||||||
@ -146,7 +146,7 @@ export class UserAssignmentComponent implements OnInit, AfterViewInit {
|
|||||||
this.modules.safelyUnselectAll();
|
this.modules.safelyUnselectAll();
|
||||||
this.userInLabel = `Benutzer in Module ${rows[0].source?.name}`
|
this.userInLabel = `Benutzer in Module ${rows[0].source?.name}`
|
||||||
this.target = Target.Module;
|
this.target = Target.Module;
|
||||||
this.targetId = rows[0].source.guid;
|
this.targetId = rows[0].source.id;
|
||||||
this.updateUserTables();
|
this.updateUserTables();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ export class UserAssignmentComponent implements OnInit, AfterViewInit {
|
|||||||
this.groups.safelyUnselectAll();
|
this.groups.safelyUnselectAll();
|
||||||
this.userInLabel = `Benutzer in Gruppe ${rows[0].source?.name}`
|
this.userInLabel = `Benutzer in Gruppe ${rows[0].source?.name}`
|
||||||
this.target = Target.Group;
|
this.target = Target.Group;
|
||||||
this.targetId = rows[0].source.guid;
|
this.targetId = rows[0].source.id;
|
||||||
this.updateUserTables();
|
this.updateUserTables();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,14 +41,14 @@ export class UserRepresentationComponent {
|
|||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
this.users.safelyUnselectAll();
|
this.users.safelyUnselectAll();
|
||||||
this.useRepLabel = `Repräsentationen von ${rows[0].source?.username}`
|
this.useRepLabel = `Repräsentationen von ${rows[0].source?.username}`
|
||||||
this.userReps.fetchData(rows[0].source?.guid)
|
this.userReps.fetchData(rows[0].source?.id)
|
||||||
this.slUserId = rows[0].source?.guid
|
this.slUserId = rows[0].source?.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rightGroupOnSelectedRows = (rows: GuiSelectedRow[]) => {
|
rightGroupOnSelectedRows = (rows: GuiSelectedRow[]) => {
|
||||||
if (rows.length > 0) {
|
if (rows.length > 0) {
|
||||||
this.slRightGroupId = rows[0].source?.guid
|
this.slRightGroupId = rows[0].source?.id
|
||||||
} else {
|
} else {
|
||||||
this.slRightGroupId = null;
|
this.slRightGroupId = null;
|
||||||
}
|
}
|
||||||
@ -105,7 +105,7 @@ export class UserRepresentationComponent {
|
|||||||
this.slRepUserId = null;
|
this.slRepUserId = null;
|
||||||
}
|
}
|
||||||
else if(rows.length > 0) {
|
else if(rows.length > 0) {
|
||||||
this.slRepUserId = rows[0].source?.guid;
|
this.slRepUserId = rows[0].source?.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ export class UserRepresentationComponent {
|
|||||||
this.slRepGroupId = null;
|
this.slRepGroupId = null;
|
||||||
}
|
}
|
||||||
else if(rows.length > 0) {
|
else if(rows.length > 0) {
|
||||||
this.slRepGroupId = rows[0].source?.guid;
|
this.slRepGroupId = rows[0].source?.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ export class UserRepresentationComponent {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else if(rows.length > 0) {
|
else if(rows.length > 0) {
|
||||||
this.slUserRepId = rows[0].source?.guid;
|
this.slUserRepId = rows[0].source?.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
export interface User {
|
export interface User {
|
||||||
guid?: number;
|
id?: number;
|
||||||
prename: string;
|
prename: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
username: string;
|
username: string;
|
||||||
@ -16,7 +16,7 @@ export interface User {
|
|||||||
|
|
||||||
|
|
||||||
export interface Group {
|
export interface Group {
|
||||||
guid?: number;
|
id?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
adSync?: boolean;
|
adSync?: boolean;
|
||||||
internal?: boolean;
|
internal?: boolean;
|
||||||
@ -27,13 +27,13 @@ export interface Group {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface Module {
|
export interface Module {
|
||||||
guid: number;
|
id: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
shortName?: string;
|
shortName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModuleOfUser {
|
export interface ModuleOfUser {
|
||||||
guid?: number;
|
id?: number;
|
||||||
userId: number;
|
userId: number;
|
||||||
moduleId: number;
|
moduleId: number;
|
||||||
isAdmin?: boolean;
|
isAdmin?: boolean;
|
||||||
@ -43,7 +43,7 @@ export interface ModuleOfUser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface GroupOfUser {
|
export interface GroupOfUser {
|
||||||
guid?: number;
|
id?: number;
|
||||||
userId: number;
|
userId: number;
|
||||||
groupId: number;
|
groupId: number;
|
||||||
comment?: string;
|
comment?: string;
|
||||||
@ -54,7 +54,7 @@ export interface GroupOfUser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface UserRep {
|
export interface UserRep {
|
||||||
guid?: number,
|
id?: number,
|
||||||
userId: number,
|
userId: number,
|
||||||
repGroupId?: number,
|
repGroupId?: number,
|
||||||
rightGroupId: number,
|
rightGroupId: number,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user