Skip to content

Commit

Permalink
Merge pull request #173 from ITPNYU/main
Browse files Browse the repository at this point in the history
Staging Release 04.11
  • Loading branch information
rlho authored Apr 11, 2024
2 parents dd97542 + a48003a commit 77fef7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DateSelectArg } from '@fullcalendar/core';
import { RoomCalendar } from './RoomCalendar';
import { RoomSetting } from '../../../../types';
import { formatDate } from '../../../utils/date';
import { HIDING_STATUS } from '../../../../policy';

type CalendarProps = {
allRooms: RoomSetting[];
Expand All @@ -29,6 +30,9 @@ export const Calendars = ({
const allEvents = calendarApi.getEvents();
return allEvents.some((event) => {
if (event.title.includes(TITLE_TAG)) return false;
if (HIDING_STATUS.some((status) => event.title.includes(status)))
return false;

return (
(event.start >= info.start && event.start < info.end) ||
(event.end > info.start && event.end <= info.end) ||
Expand Down
8 changes: 7 additions & 1 deletion media_commons_booking_app/src/policy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/********** GOOGLE SHEETS ************/

import { DevBranch } from './types';
import { BookingStatusLabel, DevBranch } from './types';

/** ACTIVE master Google Sheet */
export const ACTIVE_SHEET_ID = '1MnWbn6bvNyMiawddtYYx0tRW4NMgvugl0I8zBO3sy68';
Expand Down Expand Up @@ -79,3 +79,9 @@ export const SAFETY_TRAINING_REQUIRED_ROOM = [
];

export const INSTANT_APPROVAL_ROOMS = ['221', '222', '223', '224', '233'];

export const HIDING_STATUS = [
BookingStatusLabel.NO_SHOW,
BookingStatusLabel.CANCELED,
BookingStatusLabel.REJECTED,
];

0 comments on commit 77fef7c

Please sign in to comment.