Skip to content

Conversation

@JoshuaGoldberg
Copy link
Contributor

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 Checks and Files changed tabs.
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.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #3400

JoshuaGoldberg and others added 30 commits December 3, 2025 12:35
…e-Calendar-Modal

#3775 added delete calendar modal
@JoshuaGoldberg JoshuaGoldberg requested a review from chpy04 January 5, 2026 21:43
@chpy04 chpy04 requested a review from Copilot January 5, 2026 21:48
Copy link
Contributor

Copilot AI left a 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
Copy link

Copilot AI Jan 5, 2026

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'.

Suggested change
Confirm Availibility
Confirm Availability

Copilot uses AI. Check for mistakes.
sx={{ color: 'white', '&.Mui-checked': { color: 'white' } }}
/>
<Typography variant="body2" sx={{ fontSize: 14, color: 'white' }}>
Show Events I For Teams I Am On
Copy link

Copilot AI Jan 5, 2026

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".

Suggested change
Show Events I For Teams I Am On
Show Events For Teams I Am On

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@chpy04 chpy04 left a 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 @@
/*
Copy link
Contributor

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 @@
/*
Copy link
Contributor

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) =>
Copy link
Contributor

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);

/*
Copy link
Contributor

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(),
Copy link
Contributor

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[] = [];
Copy link
Contributor

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
Copy link
Contributor

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';
/*
Copy link
Contributor

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';
Copy link
Contributor

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);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

need to test this

Copy link
Contributor

@chpy04 chpy04 left a 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.
Copy link
Contributor

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';
Copy link
Contributor

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 @@
/*
Copy link
Contributor

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} />
Copy link
Contributor

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']);
Copy link
Contributor

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> = ({
Copy link
Contributor

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);
}, []);
Copy link
Contributor

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';
Copy link
Contributor

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,

/*
Copy link
Contributor

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 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover

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.

Calendar Improvements

10 participants