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

Colour map features based on mapping status #1468

Closed
spwoodcock opened this issue Apr 19, 2024 · 4 comments
Closed

Colour map features based on mapping status #1468

spwoodcock opened this issue Apr 19, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request frontend QA ready Any issues that is fixed

Comments

@spwoodcock
Copy link
Member

@manjitapandey

Is your feature request related to a problem? Please describe.

// This is a list
[{
  "id": "string",  (the Entity ID)
  "osm_id": "integer",  (the feature/OSM ID)
  "status": 0,  (the TaskStatus enum value)
  "updated_at": "string"  (a datetime string)
}]
  • Using this mapping we can call the endpoint POST projects/{project_id}/entity/status. It takes JSON params:
{
  "entity_id": "string",
  "status": 0,
}

Describe the solution you'd like

Change the mapping status for a feature:

  • When the user clicks the Map Feature In ODK button, the new status LOCKED_FOR_MAPPING (1) should be POSTed to the entity status endpoint.
  • The entity id is retrieved from the OSM ID : Entity ID mapping in the entityOsmMap state.
  • The button in the popup should also change based on the Entity status. Similar to the task actions. The next button should beMark As Mapped, to change the status to MAPPED.

Colour the features based on status:

  • We now have the mapping status stored in entityOsmMap, so can colour the features based on their status.
  • This should probably use the same colour scheme / legend as the task areas.

Describe alternatives you've considered

  • Later on, we can work on the XLSForms to determine how to update the mapping status automatically when the user completes the ODK Form.
@NSUWAL123
Copy link
Collaborator

NSUWAL123 commented Apr 30, 2024

@spwoodcock, before proceeding, I have some queries:

Query 1:

When the user clicks the Map Feature In ODK button, the new status LOCKED_FOR_MAPPING (1) should be POSTed to the entity status endpoint.

So if a user clicks the Map Feature In ODK button, we should update the feature status to locked_for_mapping where if it's on mobile it should open ODK and if its desktop it should redirect to playstore.

Query 2:

The button in the popup should also change based on the Entity status. Similar to the task actions. The next button should be Mark As Mapped, to change the status to MAPPED.

Whats the significance of adding Marked as Mapped button? What if the user doesn't make submissions via ODK and clicks the Marked as Mapped button?

@spwoodcock
Copy link
Member Author

Query 1: you are exactly right! On mobile it should attempt to load the entity via intent. Or failing this, hopefully it at least opens ODK Collect for the user to select the form.

Query 2: the feature can be marked as MAPPED both through FMTM and automatically on ODK Collect submission. The reason I suggest having both, is so the user sees their mapping progress in realtime, without having to reload the /entities/statuses endpoint. If they map in ODK Collect, the status will not be reflected in FMTM unless they refresh the page.

@NSUWAL123
Copy link
Collaborator

So what if the user doesn't make submissions via ODK and only clicks the Marked as Mapped button?

@spwoodcock
Copy link
Member Author

Then it's user error - I'm not sure we can account for that! 😆

@spwoodcock spwoodcock added the QA ready Any issues that is fixed label Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend QA ready Any issues that is fixed
Projects
Development

No branches or pull requests

3 participants