Skip to content

Conversation

kevinmichaelchen
Copy link
Owner

@kevinmichaelchen kevinmichaelchen commented Jun 4, 2022

Primary functions

The React UI should have 3 functions:

  1. View driver locations on a map.
  2. Add new driver locations by clicking on the map.
  3. Get a ranked list of drivers that are nearest to a point.

TODOs:

Backend

Frontend

  • Render Google Map (docs)
  • Clicking on map should add point (see onClick prop)
  • Marker tooltip should display lat/lng, as well as other info (see title prop)
  • Function to fetch all drivers (docs)
  • map.onClick should generate a fake full name + some random digits as the driver's ID
  • Hovering should display driver ID (their full name)+ geo point
  • Button to ingest/upload all new locations
  • Dragging point should update location (tackle in subsequent PR)

@kevinmichaelchen
Copy link
Owner Author

kevinmichaelchen commented Jun 4, 2022

According to docs, it should be possible to use fetch from the browser. But I don't think an OPTIONS method is supported according to these lines in connect-go.

http OPTIONS http://localhost:8081/coop.drivers.dispatch.v1beta1.DispatchService/ListDrivers \
  "Access-Control-Request-Method":POST \
  "Access-Control-Request-Headers":"content-type" \
  "Origin":"http://localhost:3000"

returns

HTTP/1.1 405 Method Not Allowed

Fixed in c522cf2 and 17f8d02

@kevinmichaelchen kevinmichaelchen merged commit c6e0a68 into main Jun 4, 2022
@kevinmichaelchen kevinmichaelchen deleted the ui branch June 4, 2022 21:17
@kevinmichaelchen kevinmichaelchen added this to the React App milestone Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant