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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #226

Merged
merged 14 commits into from
Oct 23, 2024
6 changes: 4 additions & 2 deletions app/(pre-dashboard)/(landing)/sections/Sponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@ export default async function Sponsors() {
'/sponsors/RHNIC_RED_WHITE_RBG.png',
'/sponsors/CAIT2.png',
'/sponsors/iCIMSWhite.png',
'/sponsors/GoogleCloud.png'
'/sponsors/GoogleCloud.png',
'/sponsors/RGC_Logo_Default.png'
];

const sponsorsLinks = [
'https://www.njtransit.com/innovation',
'https://www.canva.com/design/DAGSRyhN4jE/q65xcClKrYfxJka-VgXBwA/watch?utm_content=DAGSRyhN4jE&utm_campaign=share_your_design&utm_medium=link&utm_source=shareyourdesignpanel',
'https://cait.rutgers.edu/about/',
'https://www.icims.com',
'https://cloud.google.com'
'https://cloud.google.com',
'https://rutgers.campuslabs.com/engage/organization/rgc'
];

return (
Expand Down
21 changes: 21 additions & 0 deletions app/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,27 @@ export default function Dashboard() {
</CardContent>
</Card>
)}
{true && (
<Card className="w-full max-w-2xl">
<CardHeader>
<CardTitle>Links</CardTitle>
<CardDescription>
Links to various things
</CardDescription>
</CardHeader>
<CardContent>

<div className="m-4">
<Button >
<a href="/games">Go to Tetris</a>
</Button>
<Button className='mx-2'>
<a href="https://rsvp.withgoogle.com/events/coe-general-form_577b9e/sessions/rutgers-ru-hack">Google Interest Form </a>
</Button>
</div>
</CardContent>
</Card>
)}
<Card className="w-full max-w-2xl">
<CardHeader>
<div className="flex flex-col ">
Expand Down
36 changes: 31 additions & 5 deletions app/dashboard/views/organizerView.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
'use client';

import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import './organizerView.css';
import QrReaderWrapper from '../components/QRreader';
import CheckInScan from './checkInScan';
import EventScan from './eventScan';
import { AttendEventScan, GetUser, SetUser } from '@/app/lib/actions';
import { handleSignOut } from '@/app/lib/actions';
import { getSelf } from '@/app/lib/data';
import PopupDialog from '../components/dialog';
import { set } from 'zod';
import Page from '@/app/(pre-dashboard)/(landing)/page';
Expand Down Expand Up @@ -116,6 +117,8 @@ function OrganizerView() {
const [pointOperation, setPointOperation] = useState<'add' | 'subtract'>(
'add',
);
const [isSponsor, setIsSponsor] = useState<boolean>(false);

const resetScanLog = () => {
setScannedName('');
setLatestScannedEmail('');
Expand Down Expand Up @@ -281,6 +284,26 @@ function OrganizerView() {
setManualEmail('');
};

useEffect(() => {
async function fetchUser() {
try {
const data = await getSelf();

const domain = data.response.email.slice(-11)
setIsSponsor(domain == "sponsor.com")
if (domain == "sponsor.com"){
setScannerTab("SPONSOR")
resetScanLog();
}

} catch (error) {
console.log(error);
}
}

fetchUser();
}, []);

return (
<main>
<div className="flex w-full items-center justify-center text-white">
Expand All @@ -289,11 +312,12 @@ function OrganizerView() {
<h1 className="text-center text-3xl">Organizer View</h1>

{/* Two buttons, semi-radio where one button is for the "tab". If active, darken the button */}
<div className="flex justify-center space-x-4">
<div className="grid md:grid-cols-5 justify-center space-x-4">
<button
disabled={isSponsor}
className={`rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700 ${
scannerTab === 'CHECK IN' ? 'bg-blue-700' : ''
}`}
} ${isSponsor ? "bg-blue-500 hover:bg-blue-500": ""}`}
onClick={() => {
setScannerTab('CHECK IN');
resetScanLog();
Expand All @@ -302,9 +326,10 @@ function OrganizerView() {
Check In
</button>
<button
disabled={isSponsor}
className={`rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700 ${
scannerTab === 'EVENT' ? 'bg-blue-700' : ''
}`}
}${isSponsor ? "bg-blue-500 hover:bg-blue-500": ""}`}
onClick={() => {
setScannerTab('EVENT');
resetScanLog();
Expand All @@ -313,9 +338,10 @@ function OrganizerView() {
Event
</button>
<button
disabled={isSponsor}
className={`rounded bg-blue-500 px-4 py-2 font-bold text-white hover:bg-blue-700 ${
scannerTab === 'MANUAL' ? 'bg-blue-700' : ''
}`}
}${isSponsor ? "bg-blue-500 hover:bg-blue-500": ""}`}
onClick={() => {
setScannerTab('MANUAL');
resetScanLog();
Expand Down
12 changes: 12 additions & 0 deletions app/games/Center/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from 'styled-components';

const Center = styled.div`
width: 100vw;
height: 100vh;
border: 1px solid red;
display: flex;
align-items: center;
justify-content: center;
`;

export default Center;
Loading
Loading