Skip to content

Commit 333f335

Browse files
authored
Merge pull request #1417 from rit-construct-makerspace/main
Final Deployment 🫡
2 parents 56242e2 + c92caac commit 333f335

82 files changed

Lines changed: 860 additions & 1437 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"start": "vite",
4646
"build": "vite build",
4747
"lint:fix": "eslint -c eslint.config.js --fix src/**/*.{ts,tsx}",
48-
"lint": "eslint -c eslint.config.js --fix src/**/*.{ts,tsx}"
48+
"lint": "eslint -c eslint.config.js src/**/*.{ts,tsx}"
4949
},
5050
"husky": {
5151
"hooks": {
@@ -85,4 +85,4 @@
8585
"typescript-eslint": "^8.39.0",
8686
"vite-bundle-analyzer": "^1.2.0"
8787
}
88-
}
88+
}

client/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
1+
import { ApolloClient } from "@apollo/client";
22
import { ApolloProvider } from "@apollo/client/react";
33
import { CssBaseline, ThemeProvider } from "@mui/material";
44
import { ThemeController } from "./types/site_settings/ThemeController";

client/src/AppRouter.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import StorefrontPage from "./pages/lab_management/storefront/StorefrontPage";
1212
import StorefrontPreviewPage from "./pages/lab_management/storefront_preview/StorefrontPreviewPage";
1313
import HelpPage from "./pages/maker/signup/HelpPage";
1414
import SignupPage from "./pages/maker/signup/SignupPage";
15-
import TrainingPage from "./pages/maker/training/TrainingPage";
1615
import MakerspacePage from "./pages/makerspace_page/MakerspacePage";
1716
import AnnouncementsDisplay from "./pages/signage/AnnouncementsDisplay";
1817
import EventsDisplay from "./pages/signage/EventsDisplay";
@@ -235,7 +234,6 @@ export const routes = [
235234
}],
236235
},
237236

238-
{ path: "/maker/training", element: <TrainingPage /> },
239237
{ path: "/maker/training/:id", element: <QuizPage /> },
240238
{ path: "/maker/training/:id/results/", element: <QuizResults /> },
241239
{ path: "/maker/training/:id/results/:submissionID", element: <QuizResults /> },

client/src/common/SearchBar.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@ import { IconButton, InputAdornment, StandardTextFieldProps, TextField } from "@
22
import SearchIcon from "@mui/icons-material/Search";
33
import CloseIcon from "@mui/icons-material/Close";
44

5-
export function searchFilter<T>(
6-
searchText: string,
7-
collection: T[],
8-
getter: (x: T) => string
9-
): T[] {
10-
return collection.filter((x: any) =>
11-
getter(x).toLocaleLowerCase().includes(searchText.toLocaleLowerCase())
12-
);
13-
}
14-
155
interface SearchBarProps extends StandardTextFieldProps {
166
onSubmit?: () => void;
177
onClear?: () => void;

client/src/common/UseCurrentUser.ts

Whitespace-only changes.

client/src/entry-client.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,4 @@ if (root !== null) {
3535
);
3636
}
3737

38-
/*
39-
Start: Inserted by Apollo Client 3->4 migration codemod.
40-
Copy the contents of this block into a `.d.ts` file in your project to enable correct response types in your custom links.
41-
If you do not use the `@defer` directive in your application, you can safely remove this block.
42-
*/
43-
44-
45-
import "@apollo/client";
46-
import { Defer20220824Handler } from "@apollo/client/incremental";
47-
48-
declare module "@apollo/client" {
49-
export interface TypeOverrides extends Defer20220824Handler.TypeOverrides { }
50-
}
51-
52-
/*
53-
End: Inserted by Apollo Client 3->4 migration codemod.
54-
*/
55-
5638

client/src/entry-server.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { renderToPipeableStream, renderToString } from 'react-dom/server';
1+
import { renderToPipeableStream } from 'react-dom/server';
22
import App from './App';
33
import { createStaticHandler, createStaticRouter, StaticRouterProvider } from "react-router-dom"
44
import { routes } from './AppRouter';
@@ -108,21 +108,3 @@ export async function render(req: express.Request, res: express.Response, siteSe
108108
}
109109
);
110110
}
111-
112-
/*
113-
Start: Inserted by Apollo Client 3->4 migration codemod.
114-
Copy the contents of this block into a `.d.ts` file in your project to enable correct response types in your custom links.
115-
If you do not use the `@defer` directive in your application, you can safely remove this block.
116-
*/
117-
118-
119-
import "@apollo/client";
120-
import { Defer20220824Handler } from "@apollo/client/incremental";
121-
122-
declare module "@apollo/client" {
123-
export interface TypeOverrides extends Defer20220824Handler.TypeOverrides { }
124-
}
125-
126-
/*
127-
End: Inserted by Apollo Client 3->4 migration codemod.
128-
*/

client/src/pages/both/user_page/user_trainings/UserTrainingsPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function UserTraingingsPage() {
1818
const makeTheme = useMakeTheme();
1919

2020
const getAllModules = useQuery(GET_ALL_TRAINING_MODULES);
21-
const getAccessChecks = useQuery(GET_ACCESS_CHECKS_BY_USERID, {
21+
const _getAccessChecks = useQuery(GET_ACCESS_CHECKS_BY_USERID, {
2222
variables: { userID: user.id },
2323
});
2424

client/src/pages/lab_management/audit_logs/AuditLogEntity.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useState } from "react";
22
import { Link } from "@mui/material";
3-
import { useNavigate, useParams } from "react-router-dom";
3+
import { useNavigate } from "react-router-dom";
44
import { useCurrentUser } from "../../../common/CurrentUserProvider";
55
import { isManagerFor } from "../../../common/PrivilegeUtils";
66

client/src/pages/lab_management/audit_logs/AuditLogsPage.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { ChangeEvent, useEffect, useMemo, useState } from "react";
1+
import { ChangeEvent, useEffect, useState } from "react";
22
import {
33
Box,
44
Button,
@@ -19,7 +19,6 @@ import {
1919
import SearchBar from "../../../common/SearchBar";
2020
import { gql } from "@apollo/client";
2121
import { useLazyQuery } from "@apollo/client/react";
22-
import RequestWrapper2 from "../../../common/RequestWrapper2";
2322
import AuditLogRow from "./AuditLogRow";
2423
import { useLocation, useNavigate, useParams } from "react-router-dom";
2524
import { endOfDay, parse, startOfDay } from "date-fns";
@@ -85,7 +84,7 @@ export default function LogPage() {
8584
const navigate = useNavigate();
8685
const [query, queryResult] = useLazyQuery(GET_LOGS, { pollInterval: 2000 });
8786
const [searchText, setSearchText] = useState("");
88-
const [expanded, setExpanded] = React.useState(false);
87+
const [expanded, setExpanded] = useState(false);
8988
const [manualSignInModal, setManualSignInModal] = useState(false);
9089

9190
const handleExpandClick = () => {
@@ -140,7 +139,7 @@ export default function LogPage() {
140139
makerspaceID: Number(makerspaceID)
141140
},
142141
});
143-
}, [search, query, filters]);
142+
}, [search, query, filters, makerspaceID]);
144143

145144
const setUrlParam = (paramName: string, paramValue: string) => {
146145
const params = new URLSearchParams(search);
@@ -163,9 +162,7 @@ export default function LogPage() {
163162
const showClearButton =
164163
startDateString || stopDateString || search.includes("q=");
165164

166-
const logs = useMemo(() => {
167-
return queryResult.data ? queryResult.data.makerspaceLogs : undefined;
168-
}, [queryResult.data, queryResult.data?.makerspaceLogs])
165+
const logs = queryResult.data ? queryResult.data.makerspaceLogs : undefined;
169166

170167
return (
171168
<Box margin="25px">

0 commit comments

Comments
 (0)