Skip to content

Commit b631b3c

Browse files
committed
Merge branch 'development' into forestgeo-app-development
2 parents 780ad20 + 4c7164d commit b631b3c

File tree

10 files changed

+13145
-13424
lines changed

10 files changed

+13145
-13424
lines changed

.github/workflows/dev-forestgeo-livesite.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,22 @@ jobs:
4848
echo OWNER=${{ secrets.OWNER }} >> frontend/.env
4949
echo REPO=${{ secrets.REPO }} >> frontend/.env
5050
51-
- name: Cache node modules
52-
uses: actions/cache@v2
53-
with:
54-
path: frontend/node_modules
55-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56-
restore-keys: |
57-
${{ runner.os }}-node-
51+
# - name: Cache node modules
52+
# uses: actions/cache@v2
53+
# with:
54+
# path: frontend/node_modules
55+
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
56+
# restore-keys: |
57+
# ${{ runner.os }}-node-
5858

59-
- name: Cache Next.js build
60-
uses: actions/cache@v2
61-
with:
62-
path: frontend/build/cache
63-
key: ${{ runner.os }}-next-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/.next/cache') }}
64-
restore-keys: |
65-
${{ runner.os }}-next-
66-
${{ runner.os }}-next-${{ hashFiles('**/package-lock.json') }}
59+
# - name: Cache Next.js build
60+
# uses: actions/cache@v2
61+
# with:
62+
# path: frontend/build/cache
63+
# key: ${{ runner.os }}-next-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/.next/cache') }}
64+
# restore-keys: |
65+
# ${{ runner.os }}-next-
66+
# ${{ runner.os }}-next-${{ hashFiles('**/package-lock.json') }}
6767

6868
- name: move into frontend --> npm install, build, and test
6969
run: |

frontend/__tests__/config/utils.test.ts

-233
This file was deleted.

frontend/app/api/auth/[[...nextauth]]/route.ts

-8
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,26 @@ const handler = NextAuth({
2121
},
2222
callbacks: {
2323
async signIn({ user, profile, email: signInEmail }) {
24-
console.log('callback -- signin');
2524
const azureProfile = profile as AzureADProfile;
2625
const userEmail = user.email || signInEmail || azureProfile.preferred_username;
27-
console.log('user email: ', userEmail);
2826
if (typeof userEmail !== 'string') {
2927
console.error('User email is not a string:', userEmail);
3028
return false; // Email is not a valid string, abort sign-in
3129
}
3230
if (userEmail) {
33-
console.log('getting connection');
3431
let conn, emailVerified, userStatus;
3532
try {
3633
conn = await getConn();
37-
console.log('obtained');
3834
const query = `SELECT UserStatus FROM catalog.users WHERE Email = '${userEmail}' LIMIT 1`;
3935
const results = await runQuery(conn, query);
40-
console.log('results: ', results);
4136

4237
// emailVerified is true if there is at least one result
4338
emailVerified = results.length > 0;
44-
console.log('emailVerified: ', emailVerified);
4539
if (!emailVerified) {
4640
console.error('User email not found.');
4741
return false;
4842
}
4943
userStatus = results[0].UserStatus;
50-
console.log('userStatus: ', userStatus);
5144
} catch (e: any) {
5245
console.error('Error fetching user status:', e);
5346
throw new Error('Failed to fetch user status.');
@@ -66,7 +59,6 @@ const handler = NextAuth({
6659

6760
user.sites = allowedSites;
6861
user.allsites = allSites;
69-
// console.log('all sites: ', user.allsites);
7062
}
7163
return true;
7264
},

frontend/components/client/formcolumns.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const getClosestAreaUnit = (input: string): string | null => {
8080
return closestUnit;
8181
};
8282

83-
const EditUnitsCell = (params: GridRenderEditCellParams & { fieldName: string; isArea: boolean }) => {
83+
export const EditUnitsCell = (params: GridRenderEditCellParams & { fieldName: string; isArea: boolean }) => {
8484
const apiRef = useGridApiContext();
8585
const { id, fieldName, hasFocus, isArea } = params;
8686
const [value, setValue] = useState<string>(params.row[fieldName]);

frontend/components/client/githubfeedbackmodal.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import {
1212
Divider,
1313
FormControl,
1414
FormLabel,
15-
Grid,
1615
Input,
1716
LinearProgress,
1817
List,
@@ -36,6 +35,7 @@ import { usePathname } from 'next/navigation';
3635
import { useSession } from 'next-auth/react';
3736
import ReactMarkdown from 'react-markdown';
3837
import remarkGfm from 'remark-gfm';
38+
import Grid from '@mui/material/Grid2';
3939

4040
// this has been shelved -- it's a little too complicated for a first iteration.
4141
// saving it for a later version.
@@ -185,7 +185,7 @@ ${pathname}
185185
<DialogContent sx={{ display: 'flex', flex: 1, flexDirection: 'column', overflow: 'hidden' }}>
186186
<Divider orientation="horizontal" sx={{ my: 1 }} />
187187
<Grid container spacing={1}>
188-
<Grid xs={4}>
188+
<Grid size={4}>
189189
{currentSite ? (
190190
<Box sx={{ display: 'flex', flex: 1, flexDirection: 'column' }}>
191191
<Typography level="body-sm" fontWeight={'xl'}>
@@ -197,7 +197,7 @@ ${pathname}
197197
<Typography level="body-sm">No site selected.</Typography>
198198
)}
199199
</Grid>
200-
<Grid xs={4}>
200+
<Grid size={4}>
201201
{currentPlot ? (
202202
<Box sx={{ display: 'flex', flex: 1, flexDirection: 'column' }}>
203203
<Typography level="body-sm">Selected Plot: {currentPlot.plotName}</Typography>
@@ -207,7 +207,7 @@ ${pathname}
207207
<Typography level="body-sm">No plot selected.</Typography>
208208
)}
209209
</Grid>
210-
<Grid xs={4}>
210+
<Grid size={4}>
211211
{currentCensus ? (
212212
<Box sx={{ display: 'flex', flex: 1, flexDirection: 'column' }}>
213213
<Typography level="body-sm">Selected Census: {currentCensus.plotCensusNumber}</Typography>

frontend/components/uploadsystem/segments/uploadparsefiles.tsx

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import { Alert, Box, DialogActions, DialogContent, DialogTitle, List, ListItem, Modal, ModalDialog, Stack, Tooltip, Typography } from '@mui/joy';
33
import { UploadParseFilesProps } from '@/config/macros/uploadsystemmacros';
44
import { getTableHeaders } from '@/config/macros/formdetails';
5-
import { Button, Grid } from '@mui/material';
5+
import { Button } from '@mui/material';
6+
import Grid from '@mui/material/Grid2';
67
import { DropzoneLogic } from '@/components/uploadsystemhelpers/dropzone';
78
import { FileList } from '@/components/uploadsystemhelpers/filelist';
89
import { LoadingButton } from '@mui/lab';
@@ -43,7 +44,7 @@ export default function UploadParseFiles(props: Readonly<UploadParseFilesProps>)
4344
return (
4445
<Box sx={{ display: 'flex', flex: 1, flexDirection: 'column' }}>
4546
<Grid container spacing={2}>
46-
<Grid item xs={6}>
47+
<Grid size={6}>
4748
<Box sx={{ display: 'flex', flexDirection: 'column', mb: 10, mr: 10 }}>
4849
<DropzoneLogic onChange={handleFileChange} />
4950
<Modal open={Boolean(fileToReplace)} onClose={() => setFileToReplace(null)}>
@@ -69,7 +70,7 @@ export default function UploadParseFiles(props: Readonly<UploadParseFilesProps>)
6970
</Modal>
7071
</Box>
7172
</Grid>
72-
<Grid item xs={6}>
73+
<Grid size={6}>
7374
<Stack direction={'column'} sx={{ display: 'flex', flexDirection: 'column', mb: 10 }}>
7475
<Typography sx={{ mb: 2 }}>
7576
You have selected {uploadForm}. Please ensure that your file has the following headers before continuing: <br />

0 commit comments

Comments
 (0)