Show siblings on member page
This commit is contained in:
@ -195,6 +195,16 @@ export class MembersList {
|
||||
children(id: number): Member[] {
|
||||
return this.list.filter((m) => m.mother === id || m.father === id);
|
||||
}
|
||||
|
||||
siblings(id: number): Member[] {
|
||||
const p = this.get(id);
|
||||
return this.list.filter(
|
||||
(m) =>
|
||||
m.id !== p?.id &&
|
||||
((m.mother && m.mother === p?.mother) ||
|
||||
(m.father && m.father === p?.father))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export class MemberApi {
|
||||
|
Reference in New Issue
Block a user