Commit 103d65a
authored
Ananya dev (#47)
* feat(admin): add new edit site page with server API integration
- Create new edit site page component
- Implement interface for new server endpoints
- Add initial API request parsing logic
* fix: update the schema file so that calls can be made properly to the new endpoints
* fix: correct the name of the new page wherever relevant
* feat: create functions for editing and creating Site model via API calls
* feat(admin): add site creation and editing page with MongoDB integration
- Create new page for creating and editing sites
- Integrate with new MongoDB endpoints for site management
- Add routing for /admin/create-edit-site
* fix: change the CreateEditSite and ListSites pages to use the correct class
- Update routing to reflect two new modes
- Use Site class instead of the component from the schema
- Add an imported color picker
* fix: remove old attempt at passing in props
* feat: use URL to load site information when editing
* feat: connect API calls to save button in CreateEditSite
* refactor: import for color picker
* fix: change how sites are parsed from JSON to fix boundary loading
* refactor: run npm format
* feat: add additional validation to all lat/long data entry in CreateEditSites.tsx
* refactor: replace old edit-site routing with new UI
* refactor: replace api/sites with api/public-sites
* Revert "refactor: replace api/sites with api/public-sites"
This reverts commit 04bb588.
* refactor: replace api/public-sites with api/sites and make necessary changes to preserve functionality
* feat: add confirmation dialog to site deletion plus edit handleSave so it goes back after site is saved
* refactor: run npm format
* refactor: remove old-sites
* fix: put edit-sites behind secure1 parent 9967fd0 commit 103d65a
File tree
10 files changed
+941
-2
lines changed- src
- admin
- types
- utils
10 files changed
+941
-2
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | 27 | | |
| |||
0 commit comments