Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/person-roles #224

Merged
merged 2 commits into from May 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/LocalizedStrings.tsx
Expand Up @@ -95,6 +95,7 @@ export interface MasterStringsList extends LocalizedStringsMethods {
member: string;
council_president: string;
vice_chair: string;
supervisor: string;
active: string;
inactive: string;
latest_vote: string;
Expand Down
1 change: 1 addition & 0 deletions src/assets/strings/de.ts
Expand Up @@ -84,6 +84,7 @@ const de = {
member: "Mitglied",
council_president: "Pr盲sident des Rates",
vice_chair: "Stellvertretender Vorsitzender",
supervisor: "Supervisor/in",
active: "aktiv",
inactive: "inaktiv",
latest_vote: "Letzte Abstimmung",
Expand Down
1 change: 1 addition & 0 deletions src/assets/strings/en.ts
Expand Up @@ -83,6 +83,7 @@ const en = {
member: "Member",
council_president: "Council President",
vice_chair: "Vice Chair",
supervisor: "Supervisor",
active: "active",
inactive: "inactive",
latest_vote: "Latest Vote",
Expand Down
1 change: 1 addition & 0 deletions src/assets/strings/es.ts
Expand Up @@ -83,6 +83,7 @@ const es = {
member: "Miembro",
council_president: "Presidente/a del Consejo",
vice_chair: "Vicepresidente/a",
supervisor: "Supervisor/a",
active: "activo/a",
inactive: "inactivo/a",
latest_vote: "脷ltimo Voto",
Expand Down
6 changes: 3 additions & 3 deletions src/models/util/RoleUtilities.ts
Expand Up @@ -104,14 +104,14 @@ function partitionNonTermRoles(
roles: Role[],
termRoles: Role[]
): [Record<string, Role[][]>, Role[]] {
const nonTermRoles = roles.filter(
(role) => ![ROLE_TITLE.COUNCILMEMBER, ROLE_TITLE.COUNCILPRESIDENT].includes(role.title)
);
const nonTermRoles = roles.filter((role) => role.title !== ROLE_TITLE.COUNCILMEMBER);

// sort by `nonTermRoleTitles`
const nonTermRoleTitles = [
ROLE_TITLE.COUNCILPRESIDENT,
ROLE_TITLE.CHAIR,
ROLE_TITLE.VICE_CHAIR,
ROLE_TITLE.SUPERVISOR,
ROLE_TITLE.MEMBER,
ROLE_TITLE.ALTERNATE,
];
Expand Down
2 changes: 1 addition & 1 deletion src/networking/RoleService.ts
Expand Up @@ -53,7 +53,7 @@ export default class RoleService extends ModelService {
WHERE_OPERATOR.eq,
doc(NetworkService.getDb(), COLLECTION_NAME.Person, personId)
),
where("title", WHERE_OPERATOR.in, [ROLE_TITLE.COUNCILMEMBER, ROLE_TITLE.COUNCILPRESIDENT]),
where("title", WHERE_OPERATOR.eq, ROLE_TITLE.COUNCILMEMBER),
orderBy("start_datetime", ORDER_DIRECTION.desc),
],
new PopulationOptions([populateSeatRef])
Expand Down