Skip to content

Reina - Create Map Showing Location of Organizations#3432

Closed
ReinaT5678 wants to merge 10 commits intodevelopmentfrom
reina-create-map-showing-locations-of-orgs
Closed

Reina - Create Map Showing Location of Organizations#3432
ReinaT5678 wants to merge 10 commits intodevelopmentfrom
reina-create-map-showing-locations-of-orgs

Conversation

@ReinaT5678
Copy link
Contributor

@ReinaT5678 ReinaT5678 commented Apr 21, 2025

Description

This PR is for the HGN Phase 2 Implementation.
Create an interactive map that shows the location of projects under the title, Global Distribution and Project Status Overview. The map was created using LeafLet.js and dots are shown as markers for various locations of TEST organizations. A date filter is implemented on the top right of the map to allow results to be filtered so the data between those days are displayed.

The interactive map is also implemented in the construction weekly project summary dashboard page.

The new PR for this task is #3915

Related PRS (if any):

This frontend PR is related to the #1342 backend PR.

Main changes explained:

  • Added a new route to bmdashboard/interactivemap
  • Implemented a Leaflet.js map with color coded markers / dots to represent test organizations around the world.
  • A date filter on the top right that filters results so only data with between those days are displayed.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. go to http://localhost:3000/bmdashboard/interactivemap
  6. Verify that the map is interactive and the dots are clickable
  7. Verify that the date filters work.
  8. go to http://localhost:3000/bmdashboard/totalconstructionsummary
  9. verify that the map is displayed under "Global Distribution and Project Status"

Screenshots or videos of changes:

Screen.Recording.2025-04-21.at.12.50.26.PM.mov

Note:

The 'view details' button is just a placeholder for now!

@netlify
Copy link

netlify bot commented Apr 21, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 9f9bff6
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/688911fd0e7acd0007428ca2
😎 Deploy Preview https://deploy-preview-3432--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ReinaT5678 ReinaT5678 changed the title reina-create-map-showing-locations-of-orgs Reina - Create Map Showing Location of Organizations Apr 21, 2025
@ReinaT5678 ReinaT5678 added High Priority do not review Do not review or look at code without full context and removed High Priority labels Apr 21, 2025
@ReinaT5678 ReinaT5678 added High Priority and removed do not review Do not review or look at code without full context labels Apr 21, 2025
@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label May 9, 2025
Copy link
Contributor

@pranavgovi pranavgovi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maps are visible at http://localhost:3000/bmdashboard/interactivemap and http://localhost:3000/bmdashboard/totalconstructionsummary

But I dont see any projects (points) in the map. Is that expected?
Screenshot 2025-07-04 180813
Screenshot 2025-07-04 180715

@Varshakaranam18
Copy link

Interactive map is visible. Currently I don't see any projects (points)
map is displayed under "Global Distribution and Project Status"
Good work

Screenshot 2025-07-04 181306
Screenshot 2025-07-04 181342

Copy link
Contributor

@naiduajaykumar naiduajaykumar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I don't see any points on the map when we entered or before entering dates. I also noticed that there is a 400 code in the console that might be issue related
    a) Bad URL request
    b) Request Headers like authorization/token missing?
    c) Request Body (Payload) like malformed JSON? missing fields?

PR-3432-1

  1. I see a map under "Global Distribution and Project Status".
    PR-3432-2

pranavgovi
pranavgovi previously approved these changes Jul 9, 2025
Copy link
Contributor

@pranavgovi pranavgovi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By running the backend branch I am able to see the points

shashank-madan
shashank-madan previously approved these changes Jul 9, 2025
Copy link
Contributor

@shashank-madan shashank-madan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes work as expected. The map is interactive, dots are visible and clickable to open a popup, and the date range filter works. The map is displayed under "Global Distribution and Project Status" in the totalconstructionsummary page. Works in both dark mode and light mode. Approving this PR. Good Job!
pr3432
pr3432_2
pr3432_filtered
pr3432_light
pr3432_light_2

pr3432_video.mp4

@ReinaT5678
Copy link
Contributor Author

  1. I don't see any points on the map when we entered or before entering dates. I also noticed that there is a 400 code in the console that might be issue related
    a) Bad URL request
    b) Request Headers like authorization/token missing?
    c) Request Body (Payload) like malformed JSON? missing fields?

PR-3432-1

  1. I see a map under "Global Distribution and Project Status".
    PR-3432-2

Hi, I couldn't find your name in Slack, so I'll reply here! I wanted to check that you were running the correct backend and connected to MongoDB? That was an issue with a few users before and wanted to double check everything was running correctly on your side.

Copy link
Contributor

@vamsidharpanithi vamsidharpanithi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the interactive map implementation on both /bmdashboard/interactivemap and within the weekly summary page under Global Distribution and Project Status. The map loads correctly. markers are displayed, and the date filter is working as expected. Markers are clickable and the overall map interactivity functions well. Everything looks good!

Please find the Screenshots below.
image

image

Copy link
Contributor

@sphurthy sphurthy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is working well — the map is interactive, the dots are visible and clickable to open popups, and the date range filter functions correctly. The map appears under the "Global Distribution and Project Status" section on the totalconstructionsummary page, and it works seamlessly in both dark and light modes.
image
Map is also displayed under "Global Distribution and Project Status"
image

Copy link

@ManviKishore ManviKishore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Map is interactive but not able to see any projects.
  2. Can see map under "Global Distribution and Project Status"
Screenshot 2025-07-13 142406 Screenshot 2025-07-13 142312

adithya-6101
adithya-6101 previously approved these changes Jul 16, 2025
Copy link
Contributor

@adithya-6101 adithya-6101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this PR and everything works well. The interactive map loads correctly, the dots are clickable, and the date filters are functioning as expected. Also confirmed that the map appears properly under "Global Distribution and Project Status" on the Total Construction Summary page. Looks great approving this!

PR-3432+1342-1 PR-3432+1342-2 PR-3432+1342-3

@ReinaT5678 ReinaT5678 dismissed stale reviews from adithya-6101 and vamsidharpanithi via 0306bb4 July 16, 2025 19:33
@ReinaT5678 ReinaT5678 dismissed stale reviews from shashank-madan and pranavgovi via 0306bb4 July 16, 2025 19:33
Copy link
Contributor

@Neeraj-Kondaveeti Neeraj-Kondaveeti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the PR locally. The interactive map renders correctly with clickable markers and integrates well into both the Interactive Map page and the Construction Weekly Summary dashboard. The date filter functions as expected, filtering the data based on the selected range. Everything looks good—approving the PR.

3432(1)
3432(2)

@Teja-Sri-Surya
Copy link

Bug Found During Local Testing

While testing this PR locally, I encountered a ReferenceError: messageReducer is not defined at the following location:
/src/reducers/index.js:132
Screenshot 2025-07-17 102519
Screenshot 2025-07-17 102537
Screenshot 2025-07-17 102551
Screenshot 2025-07-17 102604
Screenshot 2025-07-17 102615
Screenshot 2025-07-17 102625

uhakruthi1
uhakruthi1 previously approved these changes Jul 21, 2025
Copy link
Contributor

@uhakruthi1 uhakruthi1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes function well—the map is interactive, with visible and clickable dots that trigger popups. The date range filter is working correctly, and the map appears under "Global Distribution and Project Status" on the totalconstructionsummary page. Verified in both dark and light modes. Approving this PR—great work!
Screenshot 2025-07-21 at 11 22 27 AM
Screenshot 2025-07-21 at 11 26 16 AM

@suparshwa31
Copy link
Contributor

I Tested the changes:

  1. the map is interactive.
  2. the dots on the map are clickable
  3. tried the date filter, and the dots on the map are updating as per the date range.
Screenshot 2025-07-21 at 14 14 48

when I check http://localhost:3000/bmdashboard/totalconstructionsummary page, the map does appear under Global distribution and Org status overview but the layout was not correct, as seen in the screenshot

Screenshot 2025-07-21 at 14 17 46

everything looks good expect the map display on the http://localhost:3000/bmdashboard/totalconstructionsummary page

Copy link
Contributor

@harshavarma29 harshavarma29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested the PR locally using the Admin account. Everything is working as expected. The UI looks good in dark mode, and the map is displayed on the /totalconstructionsummary page. However, I noticed two minor issues:

  1. No warning message when the start date is greater than the end date:

startdate-gt-enddate

  1. Project details are not easily visible in dark mode due to the dark text color:

project-details-not-visible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible High Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.