diff --git a/apps/dashboard/common/utils.ts b/apps/dashboard/common/utils.ts index ce5d6520..47c8db7b 100644 --- a/apps/dashboard/common/utils.ts +++ b/apps/dashboard/common/utils.ts @@ -122,7 +122,7 @@ export async function createSignedResumeUrl(resumeFilePath: string) { repo.setOptions({ useServiceKey: true }); const { data, error } = await repo .getClient() - .storage.from('rsvp-resume-hacker-2023') + .storage.from('resume') .createSignedUrl(resumeFilePath, 300); if (error) console.log(`Resume storage error: ${error.message}`); diff --git a/apps/dashboard/components/nav/side-nav2.tsx b/apps/dashboard/components/nav/side-nav2.tsx index 2639e9d8..cacb4ebb 100644 --- a/apps/dashboard/components/nav/side-nav2.tsx +++ b/apps/dashboard/components/nav/side-nav2.tsx @@ -17,7 +17,6 @@ const SideNav = ({ options }: Props) => { return (
{ ))}
-
+
-
Contact HackSC Support
+
Contact HackSC Support
(213)-513-1234
team@hacksc.com
diff --git a/apps/dashboard/layouts/themeless-layout.tsx b/apps/dashboard/layouts/themeless-layout.tsx index 4c57aed9..5c664eb1 100644 --- a/apps/dashboard/layouts/themeless-layout.tsx +++ b/apps/dashboard/layouts/themeless-layout.tsx @@ -31,7 +31,7 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) { if (user == null) return Colors.Yellow.ArthurSweater; if (user.role === HibiscusRole.HACKER) return Colors.Red.Redward; if (user.role === HibiscusRole.VOLUNTEER) return Colors.Red.Redward; - if (user.role === HibiscusRole.SPONSOR) return Colors.Red.DonatedBlood; + if (user.role === HibiscusRole.SPONSOR) return Colors.Red.Redward; return Colors.Yellow.ArthurSweater; }, [user]); const shadowColor = useMemo(() => { @@ -116,9 +116,7 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) { {user.tag} - - {user.role} - + {user.role} { const checkExists = await uploadClient.resumeExists(userIdString); if (!checkExists) { const meta = await uploadClient.uploadResume(data, userIdString); + await hbc + .getClient() + .from('participants') + .update({ resume: meta.path }) + .eq('id', userIdString); return res.status(200).json({ success: true, path: meta.path, }); } else { const meta = await uploadClient.updateResume(data, userIdString); + await hbc + .getClient() + .from('participants') + .update({ resume: meta.path }) + .eq('id', userIdString); return res.status(200).json({ success: true, path: meta.path, diff --git a/apps/dashboard/pages/participant-database/index.tsx b/apps/dashboard/pages/participant-database/index.tsx index 010d20d1..b4985a3b 100644 --- a/apps/dashboard/pages/participant-database/index.tsx +++ b/apps/dashboard/pages/participant-database/index.tsx @@ -1,737 +1,257 @@ -import React, { useEffect, useState } from 'react'; -import styled from 'styled-components'; +import { useEffect, useMemo, useState } from 'react'; import useHibiscusUser from '../../hooks/use-hibiscus-user/use-hibiscus-user'; -import { BoldText, Text, H1 } from '@hibiscus/ui'; -import { Colors2023 } from '@hibiscus/styles'; -import { Option } from '@hibiscus/types'; -import Image from 'next/image'; -import DropDown from '../../components/sponsor-portal/dropdown'; -import APIService from '../../common/api'; -import { HibiscusRole } from '@hibiscus/types'; +import { Attendee } from 'apps/dashboard/common/mock-sponsor'; import { useRouter } from 'next/router'; -import { HackerTab } from '../../components/sponsor-portal/hacker-tab'; -import { Attendee } from '../../common/mock-sponsor'; -import { Button, ParagraphText } from '@hibiscus/ui-kit-2023'; -import { getWordCount } from '../../common/utils'; -import HackerProfile from '../../components/sponsor-portal/hacker-profile'; -import { SponsorServiceAPI } from '../../common/api'; -import { - Button as SctwButton, - BodyText, - Colors as SctwColors, - GlobalStyle, - Heading, -} from '@hacksc/sctw-ui-kit'; - -const Index = () => { +import { useHibiscusSupabase } from '@hibiscus/hibiscus-supabase-context'; +import { SponsorServiceAPI } from 'apps/dashboard/common/api'; +import { FaBookmark, FaChevronUp, FaRegBookmark } from 'react-icons/fa6'; +import { FiSearch } from 'react-icons/fi'; +import { FaChevronDown } from 'react-icons/fa'; +import Link from 'next/link'; +import { HiOutlineDocumentText } from 'react-icons/hi2'; + +type SortKey = keyof Pick< + Attendee, + 'full_name' | 'graduation_year' | 'major' | 'school' +>; + +export default function Index() { const router = useRouter(); - const getViewSaved = () => { - if (router.query?.viewSaved) - return { value: 'saved', displayName: 'Saved' } as Option; - return null; - }; + const supabase = useHibiscusSupabase().supabase.getClient(); - const COMPANY_ID = router.query.companyId as string; - const EVENT_ID = router.query.eventId as string; - const [textInput, setInput] = useState(''); - const [chosenYearOption, setYearOption] = useState