Closed broncha closed 1 year ago
Why is it using the code
, as opposed to the _id
of the response? code isn't guaranteed to be unique. This also has to work for roster items, which this code won't.
Also, it seems a bit complicated. If we're going to hit the server anyway, and we have the location, maybe just do a query to find the admin region as part of renderLocation in ResponseAnswersComponent? You already have the location there, so all you need is the datasource to do a query to find the leaf shape that intersects. You can create a data source given an apiUrl.
@grassick I have extracted the jsonql from the schema and now its using the location value directly.
I have still kept the rendering logic inside ResponseDisplayComponent
as ResponseAnswersComponent
does not have access to apiUrl and login.
Looks good to me! Want to compile, merge, and release portal/app? Or shall I?
Ill do that
https://github.com/mWater/mwater-portal/issues/1604