Merge pull request #4897 from FinnStutzenstein/fixLOSUsers
Fix user loading in ViewSpeaker
This commit is contained in:
commit
32bec58333
@ -94,13 +94,13 @@ export abstract class BaseHasContentObjectRepository<
|
||||
return true;
|
||||
} else {
|
||||
console.warn(`The object is not an ${relation.VForeignVerbose}:` + foreignModel);
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: set reverse
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
super.updateSingleDependency(ownViewModel, relation, collection, changedId);
|
||||
return super.updateSingleDependency(ownViewModel, relation, collection, changedId);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,7 +359,7 @@ export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit
|
||||
* @returns whether or not the current operator is in the list
|
||||
*/
|
||||
public isOpInList(): boolean {
|
||||
return this.speakers.some(speaker => speaker.userId === this.operator.user.id);
|
||||
return this.speakers.some(speaker => speaker.user_id === this.operator.user.id);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -444,7 +444,7 @@ export class ListOfSpeakersComponent extends BaseViewComponent implements OnInit
|
||||
if (!this.speakers || !this.speakers.length) {
|
||||
this.filteredUsers.next(users);
|
||||
} else {
|
||||
this.filteredUsers.next(users.filter(u => !this.speakers.some(speaker => speaker.userId === u.id)));
|
||||
this.filteredUsers.next(users.filter(u => !this.speakers.some(speaker => speaker.user_id === u.id)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ export class ViewSpeaker extends BaseViewModel<Speaker> {
|
||||
return this.speaker.id;
|
||||
}
|
||||
|
||||
public get userId(): number {
|
||||
public get user_id(): number {
|
||||
return this.speaker.user_id;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user