Skip to content

Shubhangii rawat#151

Open
shubhangiirawat wants to merge 2 commits into
developfrom
shubhangii-rawat
Open

Shubhangii rawat#151
shubhangiirawat wants to merge 2 commits into
developfrom
shubhangii-rawat

Conversation

@shubhangiirawat

Copy link
Copy Markdown
Collaborator

exam time table during exams with toggle button

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an exam-period-aware exam timetable experience to the existing timetable UI, including a toggle between “Regular Timetable” and an “Exam Timetable” view and updated exam date configuration.

Changes:

  • Updated timetable page wiring/imports to render the timetable container.
  • Extended TimetableContainer to fetch and render an exam timetable view with a toggle button.
  • Updated exam timetable configuration and exam popup behavior to align with the new date range + exam-period detection.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/pages/Timetable.jsx Adjusts how the timetable container is imported/rendered and updates Helmet metadata.
src/components/Timetable/TimetableContainer.jsx Adds toggle-driven exam timetable view, exam schedule fetching, and related styling/components.
src/components/Timetable/index.jsx Minor change to module exports file (formatting).
src/components/Timetable/examTimetableConfig.js Updates exam date range format and adds isExamPeriod() helper.
src/components/Timetable/ExamTimetable.jsx Aligns exam popup logic with exam-period detection and updated date range parsing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 464 to +468
)
item.tutorialSlots.forEach((slotName) =>
createEventHandler(slotName, 'Tutorial')
)
})

)}
)
Comment on lines +795 to +798
useEffect(() => {
console.log('examCourses:', examCourses)
console.log('isExamPeriod:', isExamPeriod())
if (!isExamPeriod()) return undefined
Comment on lines +1000 to +1002
onClick={() =>
setShowRegularTimetable((prev) => !prev)
}
Comment on lines +1397 to +1407
const CourseDateBadge = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
background: rgb(255, 233, 204);
padding: 0.3rem 0.5rem;
width: 45px;
text-align: center;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
`
Comment thread src/pages/Timetable.jsx
Comment on lines +1 to +5
import React, { useState,useEffect } from 'react'
import { Helmet } from 'react-helmet-async'

import { PageContainer } from 'components/shared'
import { TimetableContainer } from 'components/Timetable'
import TimetableContainer from 'components/Timetable/TimetableContainer'
Comment on lines +30 to +38
export const isExamPeriod = () => {
const today = new Date()
return EXAM_DATE_RANGE.some(({ start, end }) => {
const s = new Date(start)
const e = new Date(end)
e.setHours(23, 59, 59) // include the end day fully
return today >= s && today <= e
})
} No newline at end of file
Comment on lines +45 to 52
padding: '12px',
fontFamily: 'Montserrat,Segoe UI, Tahoma, Geneva, Verdana, sans-serif',
backgroundColor: '#2d2941ff ',
borderRadius: '12px',
JustifyContent: 'start',
marginTop: '1.2rem',
margin: '0px',
width:'550px'
},
Comment on lines +561 to +563
const PopupExample = ({
setShowRegularTimetable,
}) => {
Comment on lines +747 to 751
export const Exam = ({
setShowRegularTimetable,
}) => {
return (
<div className="Exam">
Comment on lines 995 to +999
<PageHeading>
<PageTitle>Timetable</PageTitle>
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
<Exam />
<button
type="button"

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Comment thread src/pages/Timetable.jsx
@@ -1,32 +1,24 @@
import React, { useState,useEffect } from 'react'
Comment thread src/pages/Timetable.jsx

const TimeTable = () => {
return (
// import { Exam(( } from 'components/Timetable/ExamTimetable'
Comment on lines +795 to +798
useEffect(() => {
console.log('examCourses:', examCourses)
console.log('isExamPeriod:', isExamPeriod())
if (!isExamPeriod()) return undefined
Comment on lines +1397 to +1407
const CourseDateBadge = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
background: rgb(255, 233, 204);
padding: 0.3rem 0.5rem;
width: 45px;
text-align: center;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
`
Comment on lines +30 to +38
export const isExamPeriod = () => {
const today = new Date()
return EXAM_DATE_RANGE.some(({ start, end }) => {
const s = new Date(start)
const e = new Date(end)
e.setHours(23, 59, 59) // include the end day fully
return today >= s && today <= e
})
} No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants