Skip to content

Commit

Permalink
Merge branch 'staging' into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-gomez committed Oct 28, 2024
2 parents 8eb9885 + db7fc79 commit 1bb4ff2
Show file tree
Hide file tree
Showing 29 changed files with 611 additions and 668 deletions.
39 changes: 0 additions & 39 deletions .github/workflows/deploy_dev_lucia.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy_dev_noah.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy_dev_riho.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy_development.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy_production.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/deploy_staging.yml

This file was deleted.

17 changes: 16 additions & 1 deletion booking-app/app/api/bookings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
firstApproverEmails,
serverApproveInstantBooking,
serverBookingContents,
serverDeleteDataByCalendarEventId,
serverDeleteFieldsByCalendarEventId,
serverUpdateDataByCalendarEventId,
} from "@/components/src/server/admin";
import {
Expand Down Expand Up @@ -240,6 +240,7 @@ export async function PUT(request: NextRequest) {
}

// update booking contents WITH new calendarEventId
// but remove old approvals
const { id, ...formData } = data;
console.log("newCalendarEventId", newCalendarEventId);
const updatedData = {
Expand All @@ -258,6 +259,20 @@ export async function PUT(request: NextRequest) {
updatedData,
);

<<<<<<< HEAD
=======
await serverDeleteFieldsByCalendarEventId(
TableNames.BOOKING,
newCalendarEventId,
[
"finalApprovedAt",
"finalApprovedBy",
"firstApprovedAt",
"firstApprovedBy",
],
);

>>>>>>> staging
// handle auto-approval + send emails
await handleBookingApprovalEmails(
isAutoApproval,
Expand Down
5 changes: 3 additions & 2 deletions booking-app/app/theme/theme.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"use client";

import { deepPurple, lightGreen } from "@mui/material/colors";

import { Roboto } from "next/font/google";
import { createTheme } from "@mui/material/styles";
import { deepPurple } from "@mui/material/colors";

const theme = createTheme({
palette: {
Expand All @@ -20,7 +21,7 @@ const theme = createTheme({
gray3: "rgba(0,0,0,0.3)",
border: "#e3e3e3",
},
success: { main: "rgb(0 255 0)" },
success: { main: lightGreen.A400 },
warning: { main: "rgb(255 167 0)" },
error: { main: "rgba(255, 26, 26, 1)" },
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const AddLiaisonForm = ({ liaisonEmails, reloadLiaisonEmails }) => {
title="Department Liaisons"
extra={{
components: [departmentDropdown],
values: { department },
values: { department, level: 1 },
updates: [setDepartment],
}}
/>
Expand All @@ -54,7 +54,11 @@ export const Liaisons = () => {
);

const rows = useMemo(() => {
const sorted = liaisonUsers.sort((a, b) =>
const filtered = liaisonUsers.map((liaison) => {
const { level, ...other } = liaison;
return other;
});
const sorted = filtered.sort((a, b) =>
a.department.localeCompare(b.department)
);
return sorted as unknown as { [key: string]: string }[];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import React, { createContext, useContext, useMemo, useState } from "react";

import { DatabaseContext } from "../components/Provider";
import { DateSelectArg } from "@fullcalendar/core";
import { SAFETY_TRAINING_REQUIRED_ROOM } from "../../../policy";
import { SAFETY_TRAINING_REQUIRED_ROOM } from "../../../mediaCommonsPolicy";
import fetchCalendarEvents from "./hooks/fetchCalendarEvents";
import { usePathname } from "next/navigation";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
CAMPUS_MEDIA_SERVICES_ROOMS,
CHECKOUT_EQUIPMENT_ROOMS,
LIGHTING_DMX_ROOMS,
} from "../../../../policy";
} from "../../../../mediaCommonsPolicy";
import { Checkbox, FormControlLabel, Switch } from "@mui/material";
import { Control, Controller, UseFormTrigger } from "react-hook-form";
import { FormContextLevel, Inputs, MediaServices } from "../../../../types";
Expand Down
Loading

0 comments on commit 1bb4ff2

Please sign in to comment.