diff --git a/src/App.css b/src/App.css index e69de29..a15fb3f 100644 --- a/src/App.css +++ b/src/App.css @@ -0,0 +1,3 @@ +.Windows-PSOption { + color: black; +} \ No newline at end of file diff --git a/src/components/Events/DailyEvent.jsx b/src/components/Events/DailyEvent.jsx index 071458b..4e4a257 100644 --- a/src/components/Events/DailyEvent.jsx +++ b/src/components/Events/DailyEvent.jsx @@ -2,9 +2,13 @@ import PropTypes from 'prop-types'; import { Box, Flex, Text, Grid, Button, Spacer } from '@chakra-ui/react'; import { useState } from 'react'; import { NPOBackend } from '../../utils/auth_utils.js'; +import AUTH_ROLES from '../../utils/auth_config.js'; +import { useAuthContext } from '../../common/AuthContext.jsx'; +const { USER_ROLE } = AUTH_ROLES.AUTH_ROLES; const DailyEvent = ({ id, startTime, endTime, eventTitle, confirmed, description }) => { const [confirmEvent, setConfirmEvent] = useState(confirmed); + const {currentUser} = useAuthContext(); let border_color = '#2B93D1'; let background_color = '#F7FAFC'; @@ -55,7 +59,7 @@ const DailyEvent = ({ id, startTime, endTime, eventTitle, confirmed, description
-
diff --git a/src/components/Events/EventInfo.jsx b/src/components/Events/EventInfo.jsx index 3f1a3c6..dab6e56 100644 --- a/src/components/Events/EventInfo.jsx +++ b/src/components/Events/EventInfo.jsx @@ -4,11 +4,15 @@ import { DeleteIcon } from '@chakra-ui/icons'; import { LuPen } from 'react-icons/lu'; import PlannerModal from '../Planner/PlannerModal'; import { NPOBackend } from '../../utils/auth_utils'; +import AUTH_ROLES from '../../utils/auth_config.js'; +import { useAuthContext } from '../../common/AuthContext.jsx'; +const { USER_ROLE } = AUTH_ROLES.AUTH_ROLES; const EventInfo = ({ dayId, eventDate, day, startTime, endTime, location, notes, setShouldDataRevalidate }) => { const { isOpen: isOpenPlanner, onOpen: onOpenPlanner, onClose: onClosePlanner } = useDisclosure(); const { isOpen: isOpenDelete, onOpen: onOpenDelete, onClose: onCloseDelete } = useDisclosure(); const toast = useToast(); + const {currentUser} = useAuthContext(); const handlePlannerClose = () => { setShouldDataRevalidate(true); @@ -49,10 +53,10 @@ const EventInfo = ({ dayId, eventDate, day, startTime, endTime, location, notes, {notes ? notes : 'No notes.'} - + - + diff --git a/src/pages/PublishedSchedule/PublishedSchedule.jsx b/src/pages/PublishedSchedule/PublishedSchedule.jsx index b076778..9dd35a8 100644 --- a/src/pages/PublishedSchedule/PublishedSchedule.jsx +++ b/src/pages/PublishedSchedule/PublishedSchedule.jsx @@ -76,10 +76,13 @@ const PublishedSchedule = () => { textColor="transparent" onChange={(e) => setSelectedSeason(e.target.value)} width="23%" + visibility={currentUser.type == USER_ROLE ? 'hidden' : 'visible'} > { currentUser.type === ADMIN_ROLE && allSeasons.map(item => ( - + )) }