-
Notifications
You must be signed in to change notification settings - Fork 9
Feature/calendar improvements #3862
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
base: develop
Are you sure you want to change the base?
Conversation
…rtheastern-Electric-Racing/FinishLine into 3775-Delete-Calendar-Modal
…e-Calendar-Modal #3775 added delete calendar modal
…theastern-Electric-Racing/FinishLine into #3636-editcreate-event-modal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR represents a comprehensive overhaul of the calendar system, transitioning from a design-review-centric model to a more flexible event-based architecture. The changes introduce new event management capabilities, availability tracking, conflict resolution, and administrative configuration tools for scheduling.
Key Changes:
- Replaced the design review calendar system with a new event-based calendar supporting multiple event types, recurring events, and resource booking (shops/machinery)
- Added comprehensive event management features including approval workflows, availability tracking, and conflict detection
- Introduced administrative configuration pages for managing calendars, event types, shops, and machinery
Reviewed changes
Copilot reviewed 96 out of 120 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| EventCard.tsx | Updated to use Event model instead of DesignReview |
| ProjectGanttChartPage.tsx | Changed references from designReviews to events |
| GanttChartColorLegend.tsx | Updated to use EventStatus instead of DesignReviewStatus |
| NewCalendarPage.tsx | New main calendar page with event filtering and conflict management |
| EventsTable.tsx | New table component for displaying user events and review bookings |
| EventModal.tsx | New comprehensive modal for creating/editing events with recurring schedules |
| CalendarTab.tsx | New tab navigation component for calendar views |
| CalendarDayCard.tsx | Updated day card to display events instead of design reviews |
| SchedulingConflictsWarning.tsx | New component for displaying scheduling conflicts |
| AdminToolsPage.tsx | Added new Schedule configuration tab |
| design-reviews.hooks.ts | Commented out design review hooks (migration to events) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -45,14 +45,14 @@ const DisplayStatus: React.FC<DesignReviewProps> = ({ designReview, user }) => { | |||
| size="small" | |||
| sx={{ color: 'white', padding: 1 }} | |||
| onClick={() => { | |||
| history.push(`${routes.SETTINGS_PREFERENCES}?drId=${designReview.designReviewId}`); | |||
| history.push(`${routes.SETTINGS_PREFERENCES}?eventId=${event.eventId}`); | |||
| }} | |||
| component={RouterLink} | |||
| > | |||
| Confirm Availibility | |||
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Availibility' to 'Availability'.
| Confirm Availibility | |
| Confirm Availability |
| sx={{ color: 'white', '&.Mui-checked': { color: 'white' } }} | ||
| /> | ||
| <Typography variant="body2" sx={{ fontSize: 14, color: 'white' }}> | ||
| Show Events I For Teams I Am On |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text "Show Events I For Teams I Am On" has a grammatical error. It should be "Show Events For Teams I Am On".
| Show Events I For Teams I Am On | |
| Show Events For Teams I Am On |
chpy04
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend review
| @@ -1,3 +1,4 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we are actually merging code we can get rid of all the DR code
| @@ -1,3 +1,4 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
| } | ||
| }); | ||
|
|
||
| export const getEventWithMembersQueryArgs = (organizationId: string) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use getEventQueryArgs to abstract duplicate code
| const nextDay = new Date(); | ||
| nextDay.setDate(nextDay.getDate() + 1); | ||
|
|
||
| /* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
| isDate(body('scheduleSlot.*.endTime')).optional(), | ||
| intMinZero(body('scheduleSlot.*.recurrenceNumber')), | ||
| isDate(body('scheduleSlot.*.initialDateScheduled')), | ||
| body('scheduleSlot.*.allDay').isBoolean(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a seperate validator dedicated to the scheduleSlot because its all one field
| export function buildScheduledTimesOverlap(start?: Date, end?: Date): Prisma.Schedule_SlotListRelationFilter | undefined { | ||
| if (!start && !end) return undefined; | ||
|
|
||
| const AND: Prisma.Schedule_SlotWhereInput[] = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad variable name
| ...getEventQueryArgs(organization.organizationId) | ||
| }); | ||
|
|
||
| // Check each schedule slot against existing events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be able to use algorithm to speed this up I think
| @@ -1,12 +1,6 @@ | |||
| import { DesignReview } from 'shared'; | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
| | 'Reimbursement Request Comment' | ||
| | 'Calendar' | ||
| | 'Event Type' | ||
| | 'Event'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to delete DR from this list
| calendarEventIds.push(calendarEvent.data.id); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to test this
chpy04
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frontend
| @@ -1,62 +1,69 @@ | |||
| /* | |||
| * This file is part of NER's FinishLine and licensed under GNU AGPLv3. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
| @@ -0,0 +1,53 @@ | |||
| import { Shop, Event, EventPreview, EventWithMembers } from 'shared'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing misc user / date transformers
| @@ -1,3 +1,4 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
| <Route path={routes.CREDITS} component={Credits} /> | ||
| <Route path={routes.FINANCE} component={Finance} /> | ||
| <Route path={routes.CALENDAR} component={Calendar} /> | ||
| <Route path={routes.NEW_CALENDAR} component={NewCalendar} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be just calendar
| onSuccess: () => { | ||
| queryClient.invalidateQueries(EVENT_KEY); | ||
| queryClient.invalidateQueries(['users', user.userId, 'schedule-settings']); | ||
| queryClient.invalidateQueries(['users', user.userId, 'schedule-settings']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
duplicate lines
| ) => Promise<void>; | ||
| } | ||
|
|
||
| export const EventClickPopup: React.FC<EventClickPopupProps> = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seperate file
| setNow(new Date()); | ||
| }, 1000); | ||
| return () => clearInterval(timer); | ||
| }, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will trigger on re-render which is very hard to guarentee will only happen once so I feel like there is a better way to do this
| @@ -3,9 +3,8 @@ | |||
| * See the LICENSE file in the repository root folder for details. | |||
| */ | |||
|
|
|||
| import { DesignReview, DesignReviewStatus, TeamType } from 'shared'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover stubs
| @@ -655,15 +691,15 @@ export const apiUrls = { | |||
| bomCreateUnit, | |||
| bomUnitById, | |||
| bomDeleteUnit, | |||
|
|
|||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover
| @@ -1,3 +1,4 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover
Changes
The Final PR for the calendar improvements team, revamping the entire calendar page and its functionality.
Notes
Took a while but it's here now
Screenshots
Add some here soon
To Do
Bug fixes
Checklist
It can be helpful to check the
ChecksandFiles changedtabs.Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.
yarn.lockchanges (unless dependencies have changed)Closes #3400