Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G.I. Boston Ticket 39 (Get User by Status Endpoint) #42

Open
wants to merge 90 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
fe17dfd
GI: Initial commit
Oct 29, 2023
538c2e9
GI: Initial commit
Oct 29, 2023
2e46be1
GI: Adding in recent changes
Oct 29, 2023
6b02325
GI: Commented out database import
Oct 29, 2023
8469828
Removed unnecessary files
Nov 5, 2023
da4b2c9
changes
dli85 Nov 7, 2023
cbf867d
dependency updates?
hams7504 Nov 9, 2023
1de10ea
Merge branch 'GI-transfer-from-old-repo' of https://github.com/Code-4…
hams7504 Nov 9, 2023
0919212
Merge pull request #3 from Code-4-Community/Dl-gi-13-match-styles
hams7504 Nov 9, 2023
059b10b
Added in recent PRs
Nov 9, 2023
34b4074
Added missing dependency
Nov 9, 2023
ec4e329
Merge branch 'main' of https://github.com/Code-4-Community/green-infr…
Nov 9, 2023
ed19ee5
Merge pull request #4 from Code-4-Community/GI-transfer-from-old-repo
JamesColesanti Nov 9, 2023
fe0db8c
Removing backend-e2e
Jan 13, 2024
79a140e
trying to fix check
hams7504 Feb 23, 2024
5045588
more changes
hams7504 Feb 23, 2024
b122d0a
changed import for flippable tile
hams7504 Feb 23, 2024
23ea1cb
Merge pull request #9 from Code-4-Community/main-branch-fix
hams7504 Feb 23, 2024
d35db4b
Changed tile backgrounds and icons
lphan48 Mar 1, 2024
76b03fe
Fixed icons and background images
lphan48 Mar 2, 2024
9adac06
Merge pull request #11 from Code-4-Community/lp-gib-97-update-feature…
hams7504 Mar 11, 2024
1c7d426
all functionality
dli85 Mar 18, 2024
1aa77be
First commit
lphan48 Mar 18, 2024
76964e8
basic box
jarenadams21 Mar 18, 2024
ca79961
exact styling
jarenadams21 Mar 18, 2024
18b83b6
header centered
jarenadams21 Mar 18, 2024
df58826
removed .env + added .env files to gitignore
hams7504 Mar 18, 2024
580532e
Merge pull request #12 from Code-4-Community/hm-fix-gitignore
hams7504 Mar 18, 2024
ee93a74
signup figma work
jarenadams21 Mar 23, 2024
f76f3c1
Linked signup page to popup boxes, and matched popups to figma
lphan48 Mar 25, 2024
7f4a8ed
Merge pull request #15 from Code-4-Community/dl-match-navbar-styles
hams7504 Mar 29, 2024
9ef6ab3
added volunteer dashboard page
lphan48 Mar 30, 2024
e149617
Delete .env
hams7504 Apr 1, 2024
f7dfbbf
Cleaned up styling code
lphan48 Apr 3, 2024
6ab5696
Added submit and delete buttons to signup popup, and removed unnecess…
lphan48 Apr 3, 2024
c0cd31b
Merge branch 'lp-gib-21-sign-up-frontend' after resolving conflicts
lphan48 Apr 3, 2024
8d9d186
built adopted gi page
lphan48 Apr 16, 2024
aab41fa
Merge pull request #14 from Code-4-Community/lp-gib-21-sign-up-frontend
mahekagg Apr 18, 2024
4465ca6
Merge pull request #16 from Code-4-Community/lp-gib-volunteer-dashboard
mahekagg Apr 18, 2024
66f7ce6
Merge branch 'main' into lp-my-adopted-gi-page
jarenadams21 Apr 18, 2024
31e8ed3
Merge pull request #18 from Code-4-Community/lp-my-adopted-gi-page
jarenadams21 Apr 18, 2024
e868dde
volunteer links back to main
jarenadams21 Apr 18, 2024
77fa367
Merge pull request #19 from Code-4-Community/ja-demo-day-1
mahekagg Apr 18, 2024
a50e96f
route updates and volunteer links to my gi page
jarenadams21 Apr 18, 2024
c2cc209
only show adoption link if site is available
hams7504 Apr 18, 2024
db27540
50-50
jarenadams21 Apr 18, 2024
c484a8f
added sign up popup
hams7504 Apr 18, 2024
0df97b3
added success page
mahekagg Apr 18, 2024
0519210
Merge pull request #21 from Code-4-Community/ja-demo-day-2point5
hams7504 Apr 18, 2024
0fe0f1e
Merge pull request #22 from Code-4-Community/hm-link-button-to-page
mahekagg Apr 18, 2024
f3be44b
Merge branch 'main' into ma-signup-update
mahekagg Apr 18, 2024
c36f2f5
added sidepanel
mahekagg Apr 18, 2024
7b38cfd
added search bar + filter
hams7504 Apr 18, 2024
eae6ddc
Merge pull request #20 from Code-4-Community/hm-fix-adoption-link
hams7504 Apr 18, 2024
6a4f43d
Merge pull request #23 from Code-4-Community/ma-signup-update
mahekagg Apr 18, 2024
9b8fe32
Merge pull request #24 from Code-4-Community/hm-add-gi-site-page-func…
mahekagg Apr 18, 2024
c309cbb
demo styles
jarenadams21 Apr 18, 2024
9b493c2
Merge branch 'main' into ja-demo-day-3-login
jarenadams21 Apr 18, 2024
4bf8daa
Update main.tsx
mahekagg Apr 18, 2024
60f9d52
add content to cards
hams7504 Apr 18, 2024
29236aa
Merge pull request #25 from Code-4-Community/ja-demo-day-3-login
mahekagg Apr 18, 2024
1705792
Merge pull request #26 from Code-4-Community/hm-add-content-to-cards
mahekagg Apr 18, 2024
ca1a200
link login
mahekagg Apr 18, 2024
3e3a950
Merge pull request #27 from Code-4-Community/ma-demo-fix
mahekagg Apr 18, 2024
d20b4b2
Change LogIn and SignUp button to turn red on hover
neetidesai Sep 24, 2024
cf366ad
Fixed login button link
nourshoreibah Sep 27, 2024
f168ef3
stlye changes
dli85 Sep 29, 2024
46a9648
example endpoint setup for sites
hams7504 Sep 30, 2024
3064299
add additional files
hams7504 Sep 30, 2024
7d1344e
add final file
hams7504 Sep 30, 2024
4a7d294
add dependencies for backend
hams7504 Sep 30, 2024
9e14132
Merge pull request #34 from Code-4-Community/hm-add-leftover-dependen…
hams7504 Sep 30, 2024
3d0a241
set up sites endpoint
hams7504 Oct 6, 2024
00b922b
remove unused methods
hams7504 Oct 6, 2024
5c5c21d
Update dynamodb.ts
hams7504 Oct 6, 2024
0ffbdcb
Merge branch 'hm-add-sites-endpoint'
hams7504 Oct 7, 2024
7fcae8f
Merge pull request #29 from Code-4-Community/gl-33-red-text-on-hover
neetidesai Oct 13, 2024
b9c81af
Merge pull request #32 from Code-4-Community/dl-success-page-figma
dli85 Oct 14, 2024
f38d827
change backend site table name and column names
ItsEricSun Oct 20, 2024
b2ccd4e
add scanTable function to dynamodb module
nourshoreibah Oct 20, 2024
84cb463
Merge pull request #31 from Code-4-Community/ns-fix-login-link
nourshoreibah Oct 20, 2024
ff7916a
Add getSitesByStatus endpoint
nourshoreibah Oct 21, 2024
fbe0eca
Merge remote-tracking branch 'origin/GI-45-Fix-GET-site-by-ID' into n…
nourshoreibah Oct 21, 2024
55ffcd1
Add error handling for each site mapping
nourshoreibah Oct 21, 2024
ca6b368
change endpoint name
nourshoreibah Oct 21, 2024
8b7815d
create get all sites by symbol type endpoint and combine with status …
ItsEricSun Oct 21, 2024
8de6a34
make get sites work when no filters are provided - all sites will be …
ItsEricSun Oct 21, 2024
261310c
Merge pull request #40 from Code-4-Community/GI-42-GET-all-sites-by-s…
SushiS1ay3r Oct 21, 2024
c680f4f
fixed get user status by endpoint
SushiS1ay3r Oct 28, 2024
35a067f
testing
SushiS1ay3r Nov 4, 2024
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
Prev Previous commit
Next Next commit
added volunteer dashboard page
lphan48 committed Mar 30, 2024
commit 9ef6ab37096a1a1e14796bef52b54254dca3388f
31 changes: 31 additions & 0 deletions apps/frontend/src/components/volunteerDashboard/InstagramIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export default function generateInstagramIcon() {
return (
<svg
width="36"
height="36"
viewBox="0 0 40 40"
fill="none"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<rect width="40" height="40" fill="url(#pattern0)" />
<defs>
<pattern
id="pattern0"
patternContentUnits="objectBoundingBox"
width="1"
height="1"
>
<use xlinkHref="#image0_893_86" transform="scale(0.0111111)" />{' '}
{/* Change xlink:href to xlinkHref */}
</pattern>
<image
id="image0_893_86"
width="90"
height="90"
xlinkHref="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA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+xMBob2YrfAy/p2y0kyMBrVip/EyMrzZuL+hrs/KYojT6WEk/TyilEL9M+lRJP8frYHRTNkuL2Kuw8O/XTopYr7TmHb3RDviqTX9be0wjPl08WdKuz83fGIwnWqOdHG4pY0TWk5sdVhfTJTnZuoxUwyK4WTnc0o5VstTpH+b/WdYursnfM1InF5Vwi5mQ41u1M9rJoZayfK3FfcYHNdVwxmZvxI6JAKdh1XDGmpXDLZoMSU62ShcmRoc6tntSzl30y3qj6sL82G7Ig+g3gHflSEDRdL0VQzLjO25QJwc7iF7VoxW/ym71Dtnja8gujdet8tpOKe00jw9U9mhFqg8LOQW9r2l0qo+/OQW9rGl0qg90OgX53xI1huVeuKoH5SLTJXkUTxXNI1QuEb2OASleI+H60ILlJYQzEQzQRSJfiZkuzlR5gauLRPMhrtR8NYKBuop1gAD4CuRUBIN1FenbkFcgr5XL9lzNdAFYQ2DGa3Zl5lW5F7sSxmryyb5QpcmL08ipxHPyGiJhWK6RTKn0uw68on0LmOaVmp8O+AxyAfhYaafHnA3yqNvlCIxzXSwQTVnfOWrFMtlempQF8tMyoFB7kK00JzGclpgmJUb1VbhMJpPJZDKZTCaTYRD4Hy2WYZFuOgQHAAAAAElFTkSuQmCC" // Change xlink:href to xlinkHref
/>
</defs>
</svg>
);
}
218 changes: 218 additions & 0 deletions apps/frontend/src/components/volunteerDashboard/VolunteerDashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
import FacebookIcon from '@material-ui/icons/Facebook';
import YouTubeIcon from '@material-ui/icons/YouTube';
import { Box } from '@mui/material';
import generateInstagramIcon from './InstagramIcon';

function VolunteerDashboard() {
return (
<div
className="container"
style={{ width: '90%', paddingBottom: '7%', paddingTop: '2%' }}
>
<Box display="flex" flexDirection="row" justifyContent="space-between">
<div>
<text
style={{
fontFamily: 'Montserrat, sans-serif',
fontWeight: '500',
fontSize: '40px',
}}
>
Welcome,{' '}
</text>
<text
style={{
fontFamily: 'Montserrat, sans-serif',
fontWeight: '700',
fontSize: '40px',
}}
>
Volunteer
</text>
</div>

<Box display="flex" flexDirection="row" gap={3}>
<YouTubeIcon fontSize="large" />
<FacebookIcon fontSize="large" />
{generateInstagramIcon()}
</Box>
</Box>
<div
className="description"
style={{ lineHeight: '.7', paddingBottom: '3%', paddingTop: '3%' }}
>
<text
style={{
fontFamily: 'Lora',
fontSize: '20px',
lineHeight: '0',
}}
>
Welcome to the City's Office of Green Infrastructure Volunteer Program
dashboard!
<br /> Find everything you need at the links below.
</text>
</div>
<Box
sx={{
height: '40%',
width: '100%',
display: 'flex',
flexDirection: 'row',
gap: '2%',
backgroundColor: '#EDEDED',
}}
>
<div
className="column1"
style={{
width: '120%',
paddingLeft: '2%',
paddingTop: '2%',
paddingBottom: '2%',
}}
>
<Box
sx={{
display: 'flex',
flexDirection: 'column',
height: '100%',
gap: '4%',
width: '100%',
}}
>
<Box
sx={{
bgcolor: '#D7D7D7',
height: '50%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
}}
>
My Adopted Green Infrastructure
</Box>
<Box
sx={{
display: 'flex',
flexDirection: 'row',
height: '50%',
gap: '4%',
}}
>
<Box
sx={{
bgcolor: '#D7D7D7',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
width: '100%',
}}
>
Adoption Map
</Box>
<Box
sx={{
bgcolor: '#D7D7D7',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
width: '100%',
padding: '3%',
}}
>
Maintenance Guide
</Box>
</Box>
</Box>
</div>
<div
className="column2"
style={{ paddingTop: '2%', paddingBottom: '2%', width: '55%' }}
>
<Box
sx={{
bgcolor: '#D7D7D7',
height: '100%',
display: 'flex',
width: '100%',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
padding: '8%',
}}
>
Maintenance Visit Checklist
</Box>
</div>
<div
className="column3"
style={{
display: 'flex',
width: '30%',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'space-evenly',
height: '70vh',
paddingRight: '2%',
paddingTop: '2%',
paddingBottom: '2%',
gap: '4%',
}}
>
<Box
sx={{
bgcolor: '#D7D7D7',
height: '30%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
}}
>
Vid 1
</Box>
<Box
sx={{
bgcolor: '#D7D7D7',
height: '30%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
}}
>
Vid 2
</Box>
<Box
sx={{
bgcolor: '#D7D7D7',
height: '40%',
width: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
fontFamily: 'Montserrat, sans-serif',
fontSize: '30px',
}}
>
Other
</Box>
</div>
</Box>
</div>
);
}
export default VolunteerDashboard;
14 changes: 8 additions & 6 deletions apps/frontend/src/main.tsx
Original file line number Diff line number Diff line change
@@ -3,17 +3,19 @@ import ReactDOM from 'react-dom/client';
import { QueryClient, QueryClientProvider } from 'react-query';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import MapPage from './pages/mapPage/MapPage';
import VolunteerPage from './pages/volunteerPage/VolunteerPage';

const queryClient = new QueryClient();

ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>
<QueryClientProvider client={queryClient}>
<BrowserRouter>
<Routes>
<Route path="/" element={<MapPage />} />
</Routes>
</BrowserRouter>
<BrowserRouter>
<Routes>
<Route path="/" element={<MapPage />} />
<Route path="/volunteer" element={<VolunteerPage />} />
</Routes>
</BrowserRouter>
</QueryClientProvider>
</React.StrictMode>
</React.StrictMode>,
);
29 changes: 19 additions & 10 deletions apps/frontend/src/pages/mapPage/MapPage.tsx
Original file line number Diff line number Diff line change
@@ -10,43 +10,52 @@ import Tiles from './Tiles';

const icons: string[] = SITE_STATUS_ROADMAP.map((option) => option.image);


export default function MapPage() {
const [selectedFeatures, setSelectedFeatures] = useState<string[]>([]);
const [selectedStatuses, setSelectedStatuses] = useState<string[]>([]);

return (
<div style={{ background: 'var(--Foreground, #F2F2F2)' }}>
<Navbar />
<div style={{ marginTop: '50px'}} />
<div style={{ marginTop: '50px' }} />
<Header />
<Divider />
<div style={{ position: 'relative' }}>
<Map selectedFeatures={selectedFeatures} selectedStatuses={selectedStatuses} zoom={8} />
<Map
selectedFeatures={selectedFeatures}
selectedStatuses={selectedStatuses}
zoom={8}
/>
<div style={{ position: 'absolute', top: 10, right: 10, zIndex: 100 }}>
<MapLegend selectedFeatures={selectedFeatures} setSelectedFeatures={setSelectedFeatures} selectedStatuses={selectedStatuses} setSelectedStatuses={setSelectedStatuses} icons={icons} />
<MapLegend
selectedFeatures={selectedFeatures}
setSelectedFeatures={setSelectedFeatures}
selectedStatuses={selectedStatuses}
setSelectedStatuses={setSelectedStatuses}
icons={icons}
/>
</div>
<div style={{ position: 'absolute', top: 0, left: 0, zIndex: 100 }}>
<input
<input
id="pac-input"
type="text"
placeholder="Search Box"
style={{
width: '200px',
width: '200px',
height: '40px',
fontFamily: "Open Sans",
paddingLeft: '15px'
fontFamily: 'Open Sans',
paddingLeft: '15px',
}}
/>
</div>
</div>
<Divider />
<About />
<Divider />
<div style={{ paddingTop: '15px'}} />
<div style={{ paddingTop: '15px' }} />
<div style={{ alignContent: 'center' }}>
<Tiles />
</div>
</div>
);
}
}
57 changes: 57 additions & 0 deletions apps/frontend/src/pages/volunteerPage/VolunteerPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import Navbar from '../Navbar';
import VolunteerDashboard from '../../components/volunteerDashboard/VolunteerDashboard';
import Map from '../../components/map/Map';
import MapLegend from '../../components/map/MapLegend';
import { useState } from 'react';
import { SITE_STATUS_ROADMAP } from '../../constants';

const icons: string[] = SITE_STATUS_ROADMAP.map((option) => option.image);

export default function VolunteerPage() {
const [selectedFeatures, setSelectedFeatures] = useState<string[]>([]);
const [selectedStatuses, setSelectedStatuses] = useState<string[]>([]);

return (
<div>
<Navbar />
<div style={{ marginTop: '50px' }} />
<VolunteerDashboard />
<div
style={{
position: 'relative',
width: '88%',
margin: '0 auto',
paddingBottom: '7%',
}}
>
<Map
selectedFeatures={selectedFeatures}
selectedStatuses={selectedStatuses}
zoom={8}
/>
<div style={{ position: 'absolute', top: 10, right: 10, zIndex: 100 }}>
<MapLegend
selectedFeatures={selectedFeatures}
setSelectedFeatures={setSelectedFeatures}
selectedStatuses={selectedStatuses}
setSelectedStatuses={setSelectedStatuses}
icons={icons}
/>
</div>
<div style={{ position: 'absolute', top: 0, left: 0, zIndex: 100 }}>
<input
id="pac-input"
type="text"
placeholder="Search Box"
style={{
width: '200px',
height: '40px',
fontFamily: 'Open Sans',
paddingLeft: '15px',
}}
/>
</div>
</div>
</div>
);
}