From b2de4e3435bcfc36e3850a155399ca48252e6d66 Mon Sep 17 00:00:00 2001 From: Nicole Zonnenberg Date: Mon, 17 Jul 2023 15:04:01 -0400 Subject: [PATCH] favorite badges --- frontend/assets/styles/base/variables.scss | 7 ++- .../assets/styles/components/schedule.scss | 43 ++++++++++++++ frontend/components/FaveCard.tsx | 59 +++++++++++++------ 3 files changed, 89 insertions(+), 20 deletions(-) diff --git a/frontend/assets/styles/base/variables.scss b/frontend/assets/styles/base/variables.scss index f783eecd..dd683cdd 100644 --- a/frontend/assets/styles/base/variables.scss +++ b/frontend/assets/styles/base/variables.scss @@ -65,4 +65,9 @@ $time-label-bg: $lightOrange-50; $time-label-color: $bittersweet; $conflict-btn-color: $raspberry; $fave-item-color: $outer; -$details-color: $french; \ No newline at end of file +$details-color: $french; +$light-color: $seasalt; +$sold-out-badge-bg: $quinacridone; +$diff-day-badge-bg: $raspberry; +$materials-badge-bg: $xanthous; +$tournament-badge-bg: $verdigris; \ No newline at end of file diff --git a/frontend/assets/styles/components/schedule.scss b/frontend/assets/styles/components/schedule.scss index 41a57e26..eb7f6d93 100644 --- a/frontend/assets/styles/components/schedule.scss +++ b/frontend/assets/styles/components/schedule.scss @@ -20,6 +20,11 @@ margin: 10px; width: 100%; + .badge-container { + display: flex; + padding: 15px 5px 0 5px; + } + .conflicts-btn { border-radius: 5px 5px !important; color: $conflict-btn-color; @@ -44,6 +49,10 @@ justify-content: space-between; } + .fave-game-id { + font-size: 16px; + } + .fave-card-title { font-weight: 700; font-size: 17px; @@ -61,5 +70,39 @@ color: $details-color; font-size: 15px; } + + .fave-badge { + border-radius: 5px 5px; + display: flex; + font-size: 14px; + padding: 5px 10px 5px 7px; + } + + .fave-badge+.fave-badge { + margin-left: 25px; + } + + .badge-icon { + margin-right: 5px; + } + + .sold-out-badge { + background-color: $sold-out-badge-bg; + color: $light-color; + } + + .diff-day-badge { + background-color: $diff-day-badge-bg; + color: $light-color; + } + + .materials-badge { + background-color: $materials-badge-bg; + } + + .tournament-badge { + background-color: $tournament-badge-bg; + color: $light-color; + } } } \ No newline at end of file diff --git a/frontend/components/FaveCard.tsx b/frontend/components/FaveCard.tsx index 96352570..41a62424 100644 --- a/frontend/components/FaveCard.tsx +++ b/frontend/components/FaveCard.tsx @@ -10,6 +10,9 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandLessIcon from '@mui/icons-material/ExpandLess'; import ReportGmailErrorredIcon from '@mui/icons-material/ReportGmailerrorred'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; +import DoNotDisturbIcon from '@mui/icons-material/DoNotDisturb'; +import CalendarMonthIcon from '@mui/icons-material/CalendarMonth'; +import DesignServicesIcon from '@mui/icons-material/DesignServices'; import { NewEvent } from '@/assets/interfaces'; import findEvent from '@/helpers/findEvent'; @@ -27,20 +30,23 @@ const ExpandMore = styled((props: ExpandMoreProps) => { export default function FaveCard ({ favoriteEvent }: { favoriteEvent: NewEvent }) { const [expanded, setExpanded] = useState(false); - const { title, - descriptionShort, - startDate, - startTime, - endDate, - endTime, - conflicts, - location, - room, - tableNum, - gameSystem, - gameId, - tournament - } = favoriteEvent; + const { + conflicts, + descriptionShort, + endDate, + endTime, + gameId, + gameSystem, + location, + materials, + room, + startDate, + startTime, + tableNum, + ticketsAvailable, + title, + tournament, + } = favoriteEvent; const handleExpandClick = () => { setExpanded(!expanded); @@ -57,7 +63,7 @@ export default function FaveCard ({ favoriteEvent }: { favoriteEvent: NewEvent }
-
+
{gameId}
@@ -113,11 +119,26 @@ export default function FaveCard ({ favoriteEvent }: { favoriteEvent: NewEvent } {descriptionShort} - + + {!ticketsAvailable && ( +
+ Event Sold Out +
+ )} + {endDate != startDate && ( +
+ Ends on a Different Day +
+ )} + {materials && ( +
+ Materials Required +
+ )} {tournament && ( - <> - Tournament - +
+ Tournament +
)}