Skip to content

Commit

Permalink
Sponsors portals (attendees) (#536)
Browse files Browse the repository at this point in the history
* Attendees

* Resume

* Fix resume links, layout

---------

Co-authored-by: Jiong Yan Yap <[email protected]>
  • Loading branch information
roryvision and VictiniX888 authored Nov 9, 2024
1 parent 40ba1ec commit 45fb111
Show file tree
Hide file tree
Showing 9 changed files with 255 additions and 726 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
5 changes: 2 additions & 3 deletions apps/dashboard/components/nav/side-nav2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const SideNav = ({ options }: Props) => {
return (
<div
style={{
height: '100vh',
backgroundColor: 'white',
width: '250px',
display: 'flex',
Expand Down Expand Up @@ -55,9 +54,9 @@ const SideNav = ({ options }: Props) => {
))}
</div>

<div style={{width: '100%'}}>
<div style={{ width: '100%' }}>
<div style={{ fontSize: 11, margin: 25 }}>
<div style={{marginBottom: 5}}>Contact HackSC Support</div>
<div style={{ marginBottom: 5 }}>Contact HackSC Support</div>
<div>(213)-513-1234</div>
<div>[email protected]</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions apps/dashboard/layouts/themeless-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down Expand Up @@ -116,9 +116,7 @@ function ThemelessLayout({ children }: ThemelessLayoutProps) {
<RightUtilityContainer>
<UserText>{user.tag}</UserText>
<RoleText>
<GlowSpan color={color} shadowColor={shadowColor}>
{user.role}
</GlowSpan>
<GlowSpan color={color}>{user.role}</GlowSpan>
</RoleText>
<LogoutButton onClick={logout}>
<Image
Expand Down
10 changes: 10 additions & 0 deletions apps/dashboard/pages/api/hacker-profile/resume/upload/[userId].ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,22 @@ const handler: NextApiHandler = async (req, res) => {
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,
Expand Down
Loading

0 comments on commit 45fb111

Please sign in to comment.