Skip to content

Commit

Permalink
merged CarlyFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
lsylcy0307 committed May 14, 2024
2 parents 91a8574 + 4700e8a commit ac1a4c9
Show file tree
Hide file tree
Showing 12 changed files with 1,334 additions and 476 deletions.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@mui/material": "^5.5.3",
"@mui/system": "^5.5.2",
"@mui/x-date-pickers": "^6.19.6",
"@mui/x-date-pickers-pro": "^7.1.1",
"@reduxjs/toolkit": "^1.8.1",
"axios": "^1.1.2",
"dayjs": "^1.11.10",
Expand Down
11 changes: 8 additions & 3 deletions client/src/AdminDashboard/AdminDashboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Typography, Grid } from '@mui/material';
import ScreenGrid from '../components/ScreenGrid';
import UserTable from './UserTable';
import InviteUserButton from '../components/buttons/InviteUserButton';

import SearchDonorsButton from '../components/buttons/SearchDonorsButton';
/**
* A page only accessible to admins that displays all users in a table and allows
* Admin to delete users from admin and promote users to admin.
Expand All @@ -14,8 +14,13 @@ function AdminDashboardPage() {
<Grid item>
<Typography variant="h2">Welcome to the Admin Dashboard</Typography>
</Grid>
<Grid item container width="60vw" justifyContent="flex-end">
<InviteUserButton />
<Grid item container width="60vw" justifyContent="flex-end" spacing={2}>
<Grid item>
<InviteUserButton />
</Grid>
<Grid item>
<SearchDonorsButton />
</Grid>
</Grid>
<Grid item>
<div style={{ height: '60vh', width: '60vw' }}>
Expand Down
12 changes: 7 additions & 5 deletions client/src/AdminDashboard/UserTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ function UserTable() {

// Upon getting the list of users for the database, set the state of the userList to contain all users except for logged in user
useEffect(() => {
setUserList(
users?.data.filter(
(entry: IUser) => entry && entry.email && entry.email !== self.email,
),
);
if (users && users.data) {
setUserList(
users?.data.filter(
(entry: IUser) => entry && entry.email && entry.email !== self.email,
),
);
}
}, [users, self]);

// update state of userlist to remove a user from the frontend representation of the data
Expand Down
2 changes: 1 addition & 1 deletion client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,4 @@ function App() {
);
}

export default App;
export default App;
11 changes: 5 additions & 6 deletions client/src/Authentication/EmailResetPasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import ScreenGrid from '../components/ScreenGrid';
import FormCol from '../components/form/FormCol';
import westPark from '../assets/westPark.png';


/**
* A page allowing users to input their email so a reset password link can be
* sent to them
Expand Down Expand Up @@ -82,16 +81,16 @@ function EmailResetPasswordPage() {
}
};

const title = "Change Password";
const title = 'Change Password';
return (
<ScreenGrid>
<FormGrid>
<FormCol>
<Grid item container justifyContent="center">
<Grid item container justifyContent="center">
<img width="70%" src={westPark} alt="West Park Logo" />
</Grid>
<Typography variant="h5" textAlign="center">
<Grid item container justifyContent="center">
<img width="70%" src={westPark} alt="West Park Logo" />
</Grid>
<Typography variant="h5" textAlign="center">
Donor Management System
</Typography>
<Typography variant="h2">{title}</Typography>
Expand Down
7 changes: 1 addition & 6 deletions client/src/assets/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* A file for defining the global MUI theme used in the project.
*/
import { createTheme } from '@mui/material/styles';
import 'typeface-hk-grotesk';
import { color, fontFamily, fontSize, fontStyle } from '@mui/system';
import COLORS from './colors';
import 'typeface-hk-grotesk';

// https://github.com/hack4impact/chapter-website-template/blob/main/public/style.css
const theme = createTheme({
Expand Down Expand Up @@ -76,11 +76,6 @@ const theme = createTheme({
fontSize: '25px',
color: COLORS.green,
},
h6: {
fontFamily: 'Hind Guntur',
fontWeight: 'bold !important',
fontSize: '25px',
},
},
},
},
Expand Down
Loading

0 comments on commit ac1a4c9

Please sign in to comment.