Skip to content

Commit

Permalink
added sorting to soceity
Browse files Browse the repository at this point in the history
  • Loading branch information
casperUoS committed Sep 3, 2024
1 parent 53c6e6b commit 32d0171
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/_components/CollectionArchive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export const CollectionArchive: React.FC<Props> = props => {
depth: 1,
limit,
page,
sort: 'level',
sort: relationTo === 'committee' ? 'position' : 'level',
where: {
...(categories
? {
Expand Down
1 change: 0 additions & 1 deletion src/payload/collections/Committee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ const Committee: CollectionConfig = {
'Webmaster',
'Web Officer',
'Welfare Officer',
"Women's Representative",
],
},
{
Expand Down
28 changes: 27 additions & 1 deletion src/payload/payload-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,33 @@ export interface Committee {
id: string;
firstName: string | null;
lastName: string | null;
position?: string | null;
position?: (
'President'|
'Vice President Engagement'|
'Vice President Operations'|
'Secretary'|
'Treasurer'|
'Events Officer'|
'Welfare Officer'|
'Social Secretary'|
'Web Officer'|
'Sports Officer'|
'Marketing Officer'|
'Hackathon Officer'|
'Industry Officer'|
'International Representative'|
'Gamesmaster'|
'Games Officer'|
'Masters Rep'|
'Postgraduate Representative'|
'Publicity Officer'|
'Sports Representative'|
'Staff Representative'|
'Academic Secretary'|
'Vice President'|
'Webmaster'|
'Unknown Role'
) | null;
bio?:
| {
[k: string]: unknown;
Expand Down

0 comments on commit 32d0171

Please sign in to comment.