Skip to content

Commit b8c9f3c

Browse files
committed
making most calendar fields optional to not block users
1 parent f685d99 commit b8c9f3c

2 files changed

Lines changed: 0 additions & 21 deletions

File tree

src/backend/src/services/calendar.services.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,6 @@ export default class CalendarService {
617617

618618
// NOTE: Use editScheduleSlot to modify individual schedule slots
619619

620-
// question document is required if the status is scheduled or done
621-
if (foundEventType.requiresConfirmation) {
622-
if (status === Event_Status.SCHEDULED || status === Event_Status.DONE) {
623-
if (questionDocumentLink == null) {
624-
throw new HttpException(400, 'doc template link is required for scheduled and done design reviews');
625-
}
626-
}
627-
}
628-
629620
if (requiredMemberIds.length > 0 && requiredMemberIds.some((rMemberId) => optionalMemberIds.includes(rMemberId))) {
630621
throw new HttpException(400, 'required members cannot be in optional members');
631622
}

src/backend/src/utils/calendar.utils.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,9 @@ export function validateEventTypeConfiguration(
117117
const missingBoth = !eventData.location && !eventData.zoomLink;
118118

119119
// Check required fields
120-
if (eventType.requiredMembers && eventData.requiredMemberIds.length === 0) {
121-
throw new InvalidEventTypeConfigurationException('at least one required member');
122-
}
123-
if (eventType.teamType && !eventData.teamTypeId) {
124-
throw new InvalidEventTypeConfigurationException('a team type');
125-
}
126120
if (requiresLocationOrZoom && missingBoth) {
127121
throw new InvalidEventTypeConfigurationException('a location or zoom link');
128122
}
129-
if (eventType.workPackage && eventData.workPackageIds.length === 0) {
130-
throw new InvalidEventTypeConfigurationException('at least one work package');
131-
}
132-
if (eventType.questionDocument && !eventData.questionDocumentLink) {
133-
throw new InvalidEventTypeConfigurationException('a question document');
134-
}
135123

136124
// For requiresConfirmation events, the event must have an initialDateScheduled
137125
if (eventType.requiresConfirmation && !eventData.initialDateScheduled) {

0 commit comments

Comments
 (0)