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

push to Production #53

Merged
merged 33 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8f496cd
git pulled
JohnZ9865 Dec 21, 2023
133a3bc
simplified Checkbox
khandrew1 Dec 22, 2023
89699dc
fixed tests
khandrew1 Dec 22, 2023
5ed1e24
fixed ALL tests
khandrew1 Dec 22, 2023
020e2e5
Merge pull request #965 from acm-ucr/khandrew1/simplifyComponents
shahdivyank Dec 22, 2023
e3bd214
Merge pull request #945 from acm-ucr/JohnZ/dashboard
shahdivyank Dec 22, 2023
8cd61a3
fix 1d-0h-1m bug
NovaSagittarii Dec 23, 2023
1fbf8f7
title background responsiveness (no black bar on top)
NovaSagittarii Dec 23, 2023
93109c0
change date display to MM DD-DD, YY format
NovaSagittarii Dec 23, 2023
204757e
show DD HH MM SS for countdown
NovaSagittarii Dec 23, 2023
41e55fa
replace the rgba hex with something less hard-coded
NovaSagittarii Dec 23, 2023
2b5e582
remove unnecessary comment
NovaSagittarii Dec 23, 2023
53fcc86
attempt to fix react error #425
NovaSagittarii Dec 23, 2023
9c658d1
changed team api to save discord instead of email
khandrew1 Dec 23, 2023
fdcbbf0
update Config.js email
NovaSagittarii Dec 23, 2023
eae4a99
Title.jsx, Countdown.jsx cleanup
NovaSagittarii Dec 23, 2023
2cd979a
initialize countdown to 0 to avoid hydration error (react error 425)
NovaSagittarii Dec 23, 2023
b85c094
take simpler countdown from https://github.com/citrushack/cutiehack20…
NovaSagittarii Dec 23, 2023
9b58e3b
update styles from previous version
NovaSagittarii Dec 23, 2023
7886cd1
cleanup time unit conversion implementation
NovaSagittarii Dec 23, 2023
cb2de82
consolidated forms routes
khandrew1 Dec 24, 2023
6ec1ee6
fixed error handling
khandrew1 Dec 24, 2023
56e0ffe
removed code comments mb
khandrew1 Dec 24, 2023
28983b5
Merge pull request #970 from acm-ucr/khandrew1/consolidateForms
shahdivyank Dec 24, 2023
13f2f01
Merge pull request #969 from acm-ucr/khandrew1/teamAPIDiscord
shahdivyank Dec 24, 2023
706d0bf
Merge branch 'dev' into sync-template-
shahdivyank Dec 26, 2023
8f83191
Merge pull request #47 from bearhack-ucr/NovaSagittarii/responsiveness
NovaSagittarii Dec 28, 2023
5ca6e06
Merge pull request #48 from bearhack-ucr/sync-template-
NovaSagittarii Jan 4, 2024
4455116
limit scope of styling changes to forms only (checkbox and bg for now)
NovaSagittarii Jan 4, 2024
038b10a
Merge branch 'dev' into NovaSagittarii/admin-dashboard
NovaSagittarii Jan 4, 2024
39599e1
restore admin dashboard backgnd to light theme
NovaSagittarii Jan 4, 2024
eb7195b
add gap for spacing the toolbar
NovaSagittarii Jan 4, 2024
4349eb2
Merge pull request #52 from bearhack-ucr/NovaSagittarii/admin-dashboard
rfairooz Jan 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/e2e/admin/admins/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Admin Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
admins.forEach((admin) => {
cy.get(`[data-cy="${admin.uid}"]`).should("have.class", "bg-green-100");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/committees/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("committee Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
committees.forEach((committee) => {
cy.get(`[data-cy="${committee.uid}"]`).should(
"have.class",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/judges/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Mentor Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
judges.forEach((judge) => {
cy.get(`[data-cy="${judge.uid}"]`).should("have.class", "bg-green-100");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/mentors/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Mentor Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
mentors.forEach((mentor) => {
cy.get(`[data-cy="${mentor.uid}"]`).should("have.class", "bg-green-100");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/participants/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Participant Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
participants.forEach((participant) => {
cy.get(`[data-cy="${participant.uid}"]`).should(
"have.class",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/sponsors/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Sponsors Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
sponsors.forEach((sponsor) => {
cy.get(`[data-cy="${sponsor.uid}"]`).should("have.class", "bg-green-100");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/teams/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Teams Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
teams.forEach((team) => {
cy.get(`[data-cy="${team.uid}"]`).should("have.class", "bg-green-100");
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/admin/volunteers/Select.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe("Volunteers Select", () => {
});

it("Select All", () => {
cy.get('[data-cy="select-all"]').click();
cy.get('[data-cy="toolbar"]').find('[data-cy="checkbox"]').click();
volunteers.forEach((volunteer) => {
cy.get(`[data-cy="${volunteer.uid}"]`).should(
"have.class",
Expand Down
26 changes: 8 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app/api/team/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function POST() {
devpost: "",
figma: "",
},
members: [{ email: user.email, name: user.name, uid: user.id }],
members: [{ discord: user.discord, name: user.name, uid: user.id }],
status: 0,
};
const docRef = await addDoc(collection(db, "teams"), team);
Expand Down
4 changes: 2 additions & 2 deletions src/app/api/teams/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export async function GET() {
const { links, status, members } = doc.data();

const formattedNames = members.map((member) => member.name);
const formattedEmails = members.map((member) => member.email);
const formattedDiscords = members.map((member) => member.discord);
const formattedUids = members.map((member) => member.uid);
const formattedLinks = Object.entries(links)
.filter(([key, value]) => value !== "")
Expand All @@ -40,7 +40,7 @@ export async function GET() {
output.push({
links: formattedLinks,
members: formattedNames,
emails: formattedEmails,
discords: formattedDiscords,
uids: formattedUids,
status,
uid: doc.id,
Expand Down
49 changes: 49 additions & 0 deletions src/app/form/[type]/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import Admin from "@/components/dynamic/form/Admin";
import Committee from "@/components/dynamic/form/Committee";
import Feedback from "@/components/dynamic/form/Feedback";
import Interest from "@/components/dynamic/form/Interest";
import Judge from "@/components/dynamic/form/Judge";
import Mentor from "@/components/dynamic/form/Mentor";
import Participant from "@/components/dynamic/form/Participant";
import Sponsor from "@/components/dynamic/form/Sponsor";
import Volunteer from "@/components/dynamic/form/Volunteer";
import ProtectedPage from "@/components/dynamic/ProtectedPage";
import Fault from "@/utils/error";

const Page = ({ params }) => {
const components = {
admin: <Admin />,
committee: <Committee />,
feedback: <Feedback />,
interest: <Interest />,
judge: <Judge />,
mentor: <Mentor />,
participant: <Participant />,
sponsor: <Sponsor />,
volunteer: <Volunteer />,
};

const capitalizeFirstLetter = (word) => {
return word[0].toUpperCase() + word.slice(1);
};

if (components.hasOwnProperty(params.type)) {
return (
<ProtectedPage
title={`Form | ${capitalizeFirstLetter(params.type)}`}
restrictions={{}}
customStyle={true}
>
{components[params.type]}
</ProtectedPage>
);
} else {
throw new Fault(
404,
"Page Not Found",
"The page you are looking for does not seem to exist"
);
}
};

export default Page;
12 changes: 0 additions & 12 deletions src/app/form/admin/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/committee/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/feedback/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/interest/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/judge/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/mentor/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/participant/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/sponsor/page.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/app/form/volunteer/page.js

This file was deleted.

13 changes: 11 additions & 2 deletions src/components/dynamic/Checkbox.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { BsCheckLg } from "react-icons/bs";

const Checkbox = ({ toggle, onClick = () => {}, text = "", color }) => {
const Checkbox = ({
toggle,
onClick = () => {},
text = "",
color,
customStyle = false,
"data-cy": dataCy,
}) => {
return (
<div
className="flex items-center hover:cursor-pointer w-fit"
Expand All @@ -9,7 +16,9 @@ const Checkbox = ({ toggle, onClick = () => {}, text = "", color }) => {
>
<div
data-cy="checkbox-bg"
className={`w-4 h-4 rounded-sm border border-white !bg-transparent ${
className={`w-4 h-4 rounded-sm ${
customStyle ? "border border-white !bg-transparent" : ""
} ${
toggle
? `${color ? color : "bg-hackathon-blue-100"}`
: "bg-hackathon-gray-100"
Expand Down
11 changes: 8 additions & 3 deletions src/components/dynamic/Loading.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { AiOutlineLoading3Quarters } from "react-icons/ai";

const Loading = () => {
return (
<div className="w-full h-screen flex flex-col items-center justify-center bg-bear-dark gap-4">
const Loading = ({ customStyle = false }) => {
return customStyle ? (
<div className="w-full h-screen flex flex-col items-center justify-center gap-4 bg-bear-dark">
<p className="text-3xl font-bold text-white font-header">Loading...</p>
<AiOutlineLoading3Quarters className="animate-spin text-white" />
</div>
) : (
<div className="w-full h-full flex flex-col items-center justify-center gap-4">
<p className="text-3xl font-bold text-hackathon-blue-100">Loading...</p>
<AiOutlineLoading3Quarters className="animate-spin text-hackathon-blue-100" />
</div>
);
};

Expand Down
Loading
Loading