get position test

pull/403/head
Rebecca-Chou 10 months ago
parent 9a1ecf82bd
commit 6dc69fbe14
  1. 3
      lib/members.ts
  2. 5
      lib/team.ts

@ -33,7 +33,8 @@ export async function getMembers(year: string, term: Term): Promise<Member[]> {
return {
name: item.cn as string,
id: item.uid as string,
program: item.program === undefined ? "" : (item.program as string),
program:
item.position === undefined ? "none" : (item.position as string),
};
})
.sort((item1: Member, item2: Member) =>

@ -60,14 +60,15 @@ export async function getExecNames() {
filter: `(&(objectClass=member)(term=${(term as string).slice(
0,
1
)}${year})(position=*))`,
)}${year}))`,
});
execMembers = searchEntries
.map((item) => {
return {
name: item.cn as string,
position: item.position as string,
position:
item.position === undefined ? "none" : (item.position as string),
};
})
.filter((item: execMembers) => item.position in execPositions)

Loading…
Cancel
Save