You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now when the project page is loaded, the endpoint /projects/{project_id}/entities/statuses is called by default.
There is state param in projectSlice entityOsmMap that stores the mapping of the Entity IDs to the feature (OSM) IDs returned from this endpoint:
// 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.
The text was updated successfully, but these errors were encountered:
@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?
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.
@manjitapandey
Is your feature request related to a problem? Please describe.
/projects/{project_id}/entities/statuses
is called by default.entityOsmMap
that stores the mapping of the Entity IDs to the feature (OSM) IDs returned from this endpoint:projects/{project_id}/entity/status
. It takes JSON params:Describe the solution you'd like
Change the mapping status for a feature:
Map Feature In ODK
button, the new statusLOCKED_FOR_MAPPING
(1) should be POSTed to the entity status endpoint.entityOsmMap
state.Mark As Mapped
, to change the status toMAPPED
.Colour the features based on status:
entityOsmMap
, so can colour the features based on their status.Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: