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>> {
|
static async getByRunningMembership(): Promise<Array<member>> {
|
||||||
return await dataSource
|
return await dataSource
|
||||||
.getRepository(member)
|
.getRepository(member)
|
||||||
.createQueryBuilder("member")
|
.createQueryBuilder("member")
|
||||||
.leftJoinAndSelect("member.memberships", "membership")
|
.leftJoinAndSelect("member.memberships", "membership")
|
||||||
.where("membership.end IS NULL")
|
.where("membership.end IS NULL")
|
||||||
.getMany()
|
.orderBy("member.lastname")
|
||||||
.then((res) => {
|
.addOrderBy("member.firstname")
|
||||||
return res;
|
.addOrderBy("member.nameaffix")
|
||||||
})
|
.getMany()
|
||||||
.catch((err) => {
|
.then((res) => {
|
||||||
throw new InternalException("member not found by id", err);
|
return res;
|
||||||
});
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
throw new InternalException("member not found by id", err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue