fix: member sorting at active members
This commit is contained in:
parent
a968c6af25
commit
03cc0f02b7
1 changed files with 14 additions and 11 deletions
|
@ -120,17 +120,20 @@ export default abstract class MemberService {
|
|||
*/
|
||||
static async getByRunningMembership(): Promise<Array<member>> {
|
||||
return await dataSource
|
||||
.getRepository(member)
|
||||
.createQueryBuilder("member")
|
||||
.leftJoinAndSelect("member.memberships", "membership")
|
||||
.where("membership.end IS NULL")
|
||||
.getMany()
|
||||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("member not found by id", err);
|
||||
});
|
||||
.getRepository(member)
|
||||
.createQueryBuilder("member")
|
||||
.leftJoinAndSelect("member.memberships", "membership")
|
||||
.where("membership.end IS NULL")
|
||||
.orderBy("member.lastname")
|
||||
.addOrderBy("member.firstname")
|
||||
.addOrderBy("member.nameaffix")
|
||||
.getMany()
|
||||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("member not found by id", err);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue