From 4d5f38982e116870099b510f6c538158ca99d6ed Mon Sep 17 00:00:00 2001 From: martincai8 Date: Sun, 10 Nov 2024 09:28:40 -0800 Subject: [PATCH 1/3] hopefully we don't need this --- src/pages/Judging/index.jsx | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/pages/Judging/index.jsx b/src/pages/Judging/index.jsx index d531d52e..2d5c77ff 100644 --- a/src/pages/Judging/index.jsx +++ b/src/pages/Judging/index.jsx @@ -16,21 +16,19 @@ const StyledJudgingCard = styled(JudgingCard)` const getProjects = async (userId, projectId, dbHackathonName) => { const getAndAssignProjects = async () => { try { - return db.runTransaction(async transaction => { - const projectDocs = await transaction.get( - projectsRef(dbHackathonName) - .where('draftStatus', '==', 'public') - .orderBy('countAssigned') - .limit(PROJECTS_TO_JUDGE_COUNT + 1) // get an extra in case we got our own project - ) + const projectSnapshot = await projectsRef(dbHackathonName) + .where('draftStatus', '==', 'public') + .orderBy('countAssigned') + .limit(PROJECTS_TO_JUDGE_COUNT + 1) + .get() - let projectIds = projectDocs.docs.map(project => project.id) - projectIds = projectIds.filter(id => id !== projectId) - if (projectIds.length > PROJECTS_TO_JUDGE_COUNT) { - projectIds.pop() - } + let projectIds = projectSnapshot.docs.map(project => project.id) + projectIds = projectIds.filter(id => id !== projectId) + if (projectIds.length > PROJECTS_TO_JUDGE_COUNT) { + projectIds.pop() + } - // increment assigned counters + await db.runTransaction(async transaction => { projectIds.forEach(projectId => { const projectRef = projectsRef(dbHackathonName).doc(projectId) transaction.update(projectRef, { @@ -43,8 +41,9 @@ const getProjects = async (userId, projectId, dbHackathonName) => { transaction.update(applicantRef, { projectsAssigned: projectIds, }) - return projectIds }) + + return projectIds } catch (error) { console.error('Error assigning projects:', error) } From e6670ed563beab328a9a38403534efde304877c4 Mon Sep 17 00:00:00 2001 From: DonaldKLee Date: Sun, 10 Nov 2024 10:51:14 -0800 Subject: [PATCH 2/3] ui fix --- src/components/Judging/ViewProject.jsx | 5 ++++- src/utility/Constants.js | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/Judging/ViewProject.jsx b/src/components/Judging/ViewProject.jsx index a07dc491..f164f4ac 100644 --- a/src/components/Judging/ViewProject.jsx +++ b/src/components/Judging/ViewProject.jsx @@ -36,6 +36,7 @@ const StyledYoutube = styled(Youtube)` const StyledP = styled(P)` margin: 1em 0; + color: ${p => p.theme.colors.text}; ` const StyledA = styled(A)` @@ -47,7 +48,8 @@ const StyledA = styled(A)` ` const ExternalLink = styled(A)` - color: ${p => 'white'}; + color: ${p => p.theme.colors.tertiaryHover}; + font-weight: bold; &:hover { color: ${p => p.theme.colors.tertiaryHover}; @@ -55,6 +57,7 @@ const ExternalLink = styled(A)` ` const StyledLabel = styled(Label)` + color: ${p => p.theme.colors.textSecondary}; display: block; margin: 1em 0 0.25em 0; ` diff --git a/src/utility/Constants.js b/src/utility/Constants.js index c96cd911..95876cc7 100644 --- a/src/utility/Constants.js +++ b/src/utility/Constants.js @@ -106,9 +106,9 @@ export const JUDGING_RUBRIC = [ // ------------------ HC { id: 'presentation', - label: 'Presentation', + label: 'Presentation/Pitch', description: - 'Is the presentation well-prepared and smooth? Does it make a good business case for the project? Are statistics used when relevant?', + 'Is the presentation or pitch is well-prepared and smooth? Does it make a good business case for the project? Are statistics used when relevant?', value: 5, // weight: 3 / 18, weight: 1 / 4, From 516c006a5e6f889324ba8b6868e0fcc1673ce8a0 Mon Sep 17 00:00:00 2001 From: DonaldKLee Date: Sun, 10 Nov 2024 11:37:51 -0800 Subject: [PATCH 3/3] updated notion link --- src/components/Judging/ViewProject.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Judging/ViewProject.jsx b/src/components/Judging/ViewProject.jsx index f164f4ac..435f0893 100644 --- a/src/components/Judging/ViewProject.jsx +++ b/src/components/Judging/ViewProject.jsx @@ -137,7 +137,7 @@ const ViewProject = ({ project, score, error, success, isSubmitting, onChange, o Hacker Package