Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
b8ad1e4
feat(admin): add new edit site page with server API integration
ananyaa06 Aug 1, 2025
feae45b
fix: update the schema file so that calls can be made properly to the…
ananyaa06 Aug 1, 2025
90758fe
fix: correct the name of the new page wherever relevant
ananyaa06 Aug 1, 2025
2deaff3
feat: create functions for editing and creating Site model via API calls
ananyaa06 Aug 2, 2025
4d7c997
feat(admin): add site creation and editing page with MongoDB integration
ananyaa06 Aug 3, 2025
e9559b4
fix: change the CreateEditSite and ListSites pages to use the correct…
ananyaa06 Aug 3, 2025
eb85da0
fix: remove old attempt at passing in props
ananyaa06 Aug 3, 2025
ec7cebc
feat: use URL to load site information when editing
ananyaa06 Aug 3, 2025
2d6aa54
feat: connect API calls to save button in CreateEditSite
ananyaa06 Aug 3, 2025
9a19eab
refactor: import for color picker
ananyaa06 Aug 3, 2025
915ae95
fix: change how sites are parsed from JSON to fix boundary loading
ananyaa06 Aug 8, 2025
071aea1
refactor: run npm format
ananyaa06 Aug 8, 2025
80ba976
feat: add additional validation to all lat/long data entry in CreateE…
ananyaa06 Aug 8, 2025
5a44971
refactor: replace old edit-site routing with new UI
ananyaa06 Aug 8, 2025
04bb588
refactor: replace api/sites with api/public-sites
ananyaa06 Aug 9, 2025
fdce863
Revert "refactor: replace api/sites with api/public-sites"
ananyaa06 Aug 9, 2025
afa04c0
refactor: replace api/public-sites with api/sites and make necessary …
ananyaa06 Aug 9, 2025
9305d53
feat: add confirmation dialog to site deletion plus edit handleSave s…
ananyaa06 Aug 19, 2025
a4e9f7d
refactor: run npm format
ananyaa06 Aug 19, 2025
c47f476
refactor: remove old-sites
ananyaa06 Aug 28, 2025
f78de4a
fix: put edit-sites behind secure
ananyaa06 Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"qrcode.react": "^4.2.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-pick-color": "^2.0.0",
"react-router": "^7.3.0",
"react-router-dom": "^7.3.0",
"react-select": "^5.10.1",
Expand Down
3 changes: 2 additions & 1 deletion src/ListItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ManageAccountsIcon from '@mui/icons-material/ManageAccounts';
import SyncIcon from '@mui/icons-material/Sync';
import HomeIcon from '@mui/icons-material/Home';
import AdminPanelSettingsIcon from '@mui/icons-material/AdminPanelSettings';
import EditIcon from '@mui/icons-material/Edit';
import { ListItemButton } from '@mui/material';

export const mainListItems = (
Expand All @@ -18,7 +19,7 @@ export const mainListItems = (
</ListItemIcon>
<ListItemText primary='Manage users' />
</ListItemButton>
<ListItemButton onClick={() => window.open('/admin/edit-site', '_self')}>
<ListItemButton onClick={() => window.open('/admin/list-sites', '_self')}>
<ListItemIcon>
<EditLocationAltIcon />
</ListItemIcon>
Expand Down
8 changes: 8 additions & 0 deletions src/admin/AdminBody.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import UserPage from './UserPage';
import EditSite from './EditSite';
import EditData from './EditData';
import ListSites from './ListSites';
import CreateEditSite from './CreateEditSite';

interface AdminBodyProps {
page: AdminPage;
Expand All @@ -14,6 +16,12 @@ export default function AdminBody(props: AdminBodyProps) {
return <EditSite />;
case 'edit-data':
return <EditData />;
case 'list-sites':
return <ListSites />;
case 'create-site':
return <CreateEditSite mode='create' />;
case 'new-edit-site':
return <CreateEditSite mode='edit' />;
default:
return <h1>Error</h1>;
}
Expand Down
Loading